diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 02964ff39449f80ff811190dc47d1310533f9a86..f1e18a868cf0027d762b4f66b69b69e1f2a96f71 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -71,11 +71,11 @@ class Preferences_window: self.plugin.roster.regroup = self.plugin.config['mergeaccounts'] self.plugin.roster.draw_roster() - def on_iconstyle_combobox_changed(self, widget): + def on_iconset_combobox_changed(self, widget): model = widget.get_model() active = widget.get_active() icon_string = model[active][0] - self.plugin.config['iconstyle'] = icon_string + self.plugin.config['iconset'] = icon_string self.plugin.roster.mkpixbufs() self.plugin.roster.draw_roster() @@ -702,7 +702,7 @@ class Preferences_window: self.plugin = plugin self.xml.get_widget('emoticons_image').set_from_file(\ 'plugins/gtkgui/pixmaps/smile.png') - self.iconstyle_combobox = self.xml.get_widget('iconstyle_combobox') + self.iconset_combobox = self.xml.get_widget('iconset_combobox') self.auto_pp_checkbutton = self.xml.get_widget('auto_pop_up_checkbutton') self.auto_pp_away_checkbutton = self.xml.get_widget \ ('auto_pop_up_away_checkbutton') @@ -730,10 +730,10 @@ class Preferences_window: st = self.plugin.config['mergeaccounts'] self.xml.get_widget('merge_checkbutton').set_active(st) - #iconStyle + #iconset list_style = os.listdir('plugins/gtkgui/icons/') model = gtk.ListStore(gobject.TYPE_STRING) - self.iconstyle_combobox.set_model(model) + self.iconset_combobox.set_model(model) l = [] for i in list_style: if i != 'CVS' and i[0] != '.': @@ -742,8 +742,8 @@ class Preferences_window: l.append(' ') for i in range(len(l)): model.append([l[i]]) - if self.plugin.config['iconstyle'] == l[i]: - self.iconstyle_combobox.set_active(i) + if self.plugin.config['iconset'] == l[i]: + self.iconset_combobox.set_active(i) #Color for account text colSt = self.plugin.config['accounttextcolor'] diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 056a8230d0cf04d1a3ccfbbc5091e03c5e287f2d..4357274699f9ea36654b6ae4097e58f709acc550 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -2991,7 +2991,7 @@ <child> <widget class="GtkLabel" id="label174"> <property name="visible">True</property> - <property name="label" translatable="yes">Icon _style:</property> + <property name="label" translatable="yes">_Status iconset:</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -3014,12 +3014,12 @@ </child> <child> - <widget class="GtkComboBox" id="iconstyle_combobox"> + <widget class="GtkComboBox" id="iconset_combobox"> <property name="visible">True</property> <property name="items" translatable="yes"></property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> - <signal name="changed" handler="on_iconstyle_combobox_changed" last_modification_time="Sun, 06 Mar 2005 16:01:18 GMT"/> + <signal name="changed" handler="on_iconset_combobox_changed" last_modification_time="Wed, 30 Mar 2005 12:19:34 GMT"/> </widget> <packing> <property name="padding">0</property> diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 5a0ea062b1a94d959c1e2c99514650c577d57bf9..0c7188abafa399463d3c91d41beb307aa77a4ead 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -818,8 +818,10 @@ class plugin: 'msg4':'I\'m working.',\ 'msg5_name':'Nap',\ 'msg5':'I\'m taking a nap.',\ + 'msg6_name':'Offline',\ + 'msg6':'I\'m offline.',\ 'trayicon':1,\ - 'iconstyle':'sun',\ + 'iconset':'sun',\ 'inmsgcolor':'#ff0000',\ 'outmsgcolor': '#0000ff',\ 'statusmsgcolor':'#1eaa1e',\ @@ -881,11 +883,11 @@ class plugin: #2:autoaway and use sleeper #3:autoxa and use sleeper self.send('ASK_ROSTER', a, self.queueIN) - #in pygtk2.4 - iconstyle = self.config['iconstyle'] - if not iconstyle: - iconstyle = 'sun' - path = 'plugins/gtkgui/icons/' + iconstyle + '/' + #in pygtk2.4 FIXME: (nk) WHAT DO YOU MEAN? + iconset = self.config['iconset'] + if not iconset: + iconset = 'sun' + path = 'plugins/gtkgui/icons/' + iconset + '/' files = [path + 'online.gif', path + 'online.png', path + 'online.xpm'] pix = None for fname in files: diff --git a/plugins/gtkgui/roster_window.py b/plugins/gtkgui/roster_window.py index 86897280a49d33ee22a9f8d76f6ad01b1389e8db..ca7db358d238e5caeff2ed191c035445fc14a70d 100644 --- a/plugins/gtkgui/roster_window.py +++ b/plugins/gtkgui/roster_window.py @@ -1097,16 +1097,16 @@ class Roster_window: def mkpixbufs(self): """initialise pixbufs array""" - iconstyle = self.plugin.config['iconstyle'] - if not iconstyle: - iconstyle = 'sun' - self.path = 'plugins/gtkgui/icons/' + iconstyle + '/' + iconset = self.plugin.config['iconset'] + if not iconset: + iconset = 'sun' + self.path = 'plugins/gtkgui/icons/' + iconset + '/' self.pixbufs = {} for state in ('connecting', 'online', 'chat', 'away', 'xa', 'dnd', \ 'invisible', 'offline', 'error', 'requested', 'message', 'opened', \ 'closed', 'not in the roster'): # try to open a pixfile with the correct method - state_file = state.replace(" ", "_") + state_file = state.replace(' ', '_') files = [] files.append(self.path + state_file + '.gif') files.append(self.path + state_file + '.png') @@ -1115,10 +1115,9 @@ class Roster_window: image.show() self.pixbufs[state] = image for file in files: - if not os.path.exists(file): - continue - image.set_from_file(file) - break + if os.path.exists(file): + image.set_from_file(file) + break def sound_is_ok(self, sound): if not os.path.exists(sound):