Skip to content
Snippets Groups Projects
Commit 229d9cac authored by nkour's avatar nkour
Browse files

remove if not iconset checks. it is our philosophy that if user changes his...

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
parent 44c40a6e
No related branches found
No related tags found
No related merge requests found
...@@ -720,8 +720,6 @@ class RosterWindow: ...@@ -720,8 +720,6 @@ class RosterWindow:
new_chat_menuitem = self.xml.get_widget('new_chat_menuitem') new_chat_menuitem = self.xml.get_widget('new_chat_menuitem')
join_gc_menuitem = self.xml.get_widget('join_gc_menuitem') join_gc_menuitem = self.xml.get_widget('join_gc_menuitem')
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
if not iconset:
iconset = DEFAULT_ICONSET
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16')
state_images = self.load_iconset(path) state_images = self.load_iconset(path)
if state_images.has_key('muc_active'): if state_images.has_key('muc_active'):
...@@ -1393,8 +1391,6 @@ class RosterWindow: ...@@ -1393,8 +1391,6 @@ class RosterWindow:
rename_menuitem.set_image(img) rename_menuitem.set_image(img)
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
if not iconset:
iconset = DEFAULT_ICONSET
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16')
state_images = self.load_iconset(path) state_images = self.load_iconset(path)
if state_images.has_key('muc_active'): if state_images.has_key('muc_active'):
...@@ -1419,8 +1415,6 @@ class RosterWindow: ...@@ -1419,8 +1415,6 @@ class RosterWindow:
start_chat_menuitem.set_submenu(sub_menu) start_chat_menuitem.set_submenu(sub_menu)
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
if not iconset:
iconset = DEFAULT_ICONSET
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16')
for c in contacts: for c in contacts:
# icon MUST be different instance for every item # icon MUST be different instance for every item
...@@ -1798,8 +1792,6 @@ class RosterWindow: ...@@ -1798,8 +1792,6 @@ class RosterWindow:
# we have to create our own set of icons for the menu # we have to create our own set of icons for the menu
# using self.jabber_status_images is poopoo # using self.jabber_status_images is poopoo
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
if not iconset:
iconset = DEFAULT_ICONSET
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16')
state_images = self.load_iconset(path) state_images = self.load_iconset(path)
...@@ -1880,8 +1872,6 @@ class RosterWindow: ...@@ -1880,8 +1872,6 @@ class RosterWindow:
else: else:
menu = gtk.Menu() menu = gtk.Menu()
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
if not iconset:
iconset = DEFAULT_ICONSET
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16')
accounts = [] # Put accounts in a list to sort them accounts = [] # Put accounts in a list to sort them
for account in gajim.connections: for account in gajim.connections:
......
...@@ -124,8 +124,6 @@ class Systray: ...@@ -124,8 +124,6 @@ class Systray:
# We need our own set of status icons, let's make 'em! # We need our own set of status icons, let's make 'em!
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
if not iconset:
iconset = 'dcraven'
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16')
state_images = gajim.interface.roster.load_iconset(path) state_images = gajim.interface.roster.load_iconset(path)
......
...@@ -275,10 +275,7 @@ class SystrayWin32(systray.Systray): ...@@ -275,10 +275,7 @@ class SystrayWin32(systray.Systray):
def load_icos(self): def load_icos(self):
'''load .ico files and return them to a dic of SHOW --> img_obj''' '''load .ico files and return them to a dic of SHOW --> img_obj'''
iconset = str(gajim.config.get('iconset')) iconset = gajim.config.get('iconset')
if not iconset:
iconset = 'dcraven'
imgs = {} imgs = {}
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16', 'icos') path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16', 'icos')
# icon folder for missing icons # icon folder for missing icons
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment