update glade and config to manage animated static emots. still not working of course

This commit is contained in:
Nikos Kouremenos 2006-02-05 13:44:40 +00:00
parent 327c31c615
commit af95e11fc2
2 changed files with 60 additions and 25 deletions

View File

@ -12,8 +12,6 @@
## Vincent Hanquez <tab@snarc.org>
## Nikos Kouremenos <nkour@jabber.org>
## Dimitur Kirov <dkirov@gmail.com>
## Travis Shirk <travis@pobox.com>
## Norman Rasmussen <norman@rasmussen.co.za>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
@ -122,12 +120,11 @@ class PreferencesWindow:
self.xml.get_widget('show_status_msgs_in_roster_checkbutton').set_active(
st)
#Use emoticons
# useemoticons
st = gajim.config.get('useemoticons')
self.xml.get_widget('use_emoticons_checkbutton').set_active(st)
self.xml.get_widget('add_remove_emoticons_button').set_sensitive(st)
if st:
self.xml.get_widget('emoticons_combobox').set_active(1) # FIXME
#iconset
iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets'))
# new model, image in 0, string in 1
@ -505,9 +502,17 @@ class PreferencesWindow:
self.on_checkbutton_toggled(widget, 'show_avatars_in_roster')
gajim.interface.roster.draw_roster()
def on_use_emoticons_checkbutton_toggled(self, widget):
self.on_checkbutton_toggled(widget, 'useemoticons',
[self.xml.get_widget('add_remove_emoticons_button')])
def on_emoticons_combobox_changed(self, widget):
active = widget.get_active()
if active == -1: # no active item
return
elif active == 0: # animated
gajim.config.set('useemoticons', True) # FIXME
elif active == 1: # static
gajim.config.set('useemoticons', True) # FIXME
else: # disabled
gajim.config.set('useemoticons', False)
gajim.interface.init_emoticons()
gajim.interface.make_regexps()
self.toggle_emoticons()
@ -517,7 +522,7 @@ class PreferencesWindow:
for win in gajim.interface.msg_win_mgr.windows():
win.toggle_emoticons()
def on_add_remove_emoticons_button_clicked(self, widget):
def on_manage_emoticons_button_clicked(self, widget):
if gajim.interface.instances.has_key('manage_emots'):
gajim.interface.instances['manage_emots'].window.present()
else:

View File

@ -3756,21 +3756,34 @@ Per type</property>
<widget class="GtkHBox" id="hbox2947">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="use_emoticons_checkbutton">
<widget class="GtkEventBox" id="eventbox5">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will replace ascii smilies like ':)' with equivalent graphical emoticons</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Use _emoticons</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_use_emoticons_checkbutton_toggled" last_modification_time="Wed, 19 Jan 2005 23:02:04 GMT"/>
<property name="tooltip" translatable="yes">If not disabled, Gajim will replace ascii smilies like ':)' with equivalent animated or static graphical emoticons</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
<child>
<widget class="GtkLabel" id="label381">
<property name="visible">True</property>
<property name="label" translatable="yes">Emoticons:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -3780,14 +3793,31 @@ Per type</property>
</child>
<child>
<widget class="GtkButton" id="add_remove_emoticons_button">
<widget class="GtkComboBox" id="emoticons_combobox">
<property name="visible">True</property>
<property name="items" translatable="yes">Animated
Static
Disabled</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
<signal name="changed" handler="on_emoticons_combobox_changed" last_modification_time="Sun, 05 Feb 2006 14:06:24 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="manage_emoticons_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Manage...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_add_remove_emoticons_button_clicked" last_modification_time="Wed, 06 Apr 2005 14:31:44 GMT"/>
<signal name="clicked" handler="on_manage_emoticons_button_clicked" last_modification_time="Sun, 05 Feb 2006 14:08:33 GMT"/>
</widget>
<packing>
<property name="padding">0</property>