From 229d9cac50fa6c7051930ebc0a5efe78436af6ff Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos <kourem@gmail.com> Date: Mon, 25 Sep 2006 09:43:08 +0000 Subject: [PATCH] remove if not iconset checks. it is our philosophy that if user changes his config to set "" to iconset we must fail. else we have to take care of every possible bad config there can exist by his inability to understand what he touches --- src/roster_window.py | 10 ---------- src/systray.py | 2 -- src/systraywin32.py | 5 +---- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 37e2a586ee..e2c7f4b2fe 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -720,8 +720,6 @@ class RosterWindow: new_chat_menuitem = self.xml.get_widget('new_chat_menuitem') join_gc_menuitem = self.xml.get_widget('join_gc_menuitem') iconset = gajim.config.get('iconset') - if not iconset: - iconset = DEFAULT_ICONSET path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') state_images = self.load_iconset(path) if state_images.has_key('muc_active'): @@ -1393,8 +1391,6 @@ class RosterWindow: rename_menuitem.set_image(img) iconset = gajim.config.get('iconset') - if not iconset: - iconset = DEFAULT_ICONSET path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') state_images = self.load_iconset(path) if state_images.has_key('muc_active'): @@ -1419,8 +1415,6 @@ class RosterWindow: start_chat_menuitem.set_submenu(sub_menu) iconset = gajim.config.get('iconset') - if not iconset: - iconset = DEFAULT_ICONSET path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') for c in contacts: # icon MUST be different instance for every item @@ -1798,8 +1792,6 @@ class RosterWindow: # we have to create our own set of icons for the menu # using self.jabber_status_images is poopoo iconset = gajim.config.get('iconset') - if not iconset: - iconset = DEFAULT_ICONSET path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') state_images = self.load_iconset(path) @@ -1880,8 +1872,6 @@ class RosterWindow: else: menu = gtk.Menu() iconset = gajim.config.get('iconset') - if not iconset: - iconset = DEFAULT_ICONSET path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') accounts = [] # Put accounts in a list to sort them for account in gajim.connections: diff --git a/src/systray.py b/src/systray.py index 59893e208b..ade7ffd81d 100644 --- a/src/systray.py +++ b/src/systray.py @@ -124,8 +124,6 @@ class Systray: # We need our own set of status icons, let's make 'em! iconset = gajim.config.get('iconset') - if not iconset: - iconset = 'dcraven' path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') state_images = gajim.interface.roster.load_iconset(path) diff --git a/src/systraywin32.py b/src/systraywin32.py index c758247e01..2705897f7a 100644 --- a/src/systraywin32.py +++ b/src/systraywin32.py @@ -275,10 +275,7 @@ class SystrayWin32(systray.Systray): def load_icos(self): '''load .ico files and return them to a dic of SHOW --> img_obj''' - iconset = str(gajim.config.get('iconset')) - if not iconset: - iconset = 'dcraven' - + iconset = gajim.config.get('iconset') imgs = {} path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16', 'icos') # icon folder for missing icons -- GitLab