Skip to content
This repository has been archived by the owner on May 13, 2018. It is now read-only.

Commit

Permalink
Fixed LP: #1146122
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerdino committed Mar 6, 2013
1 parent b153748 commit 2c01981
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions UnityTweakTool/section/sphagetti/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,25 @@ def refresh(self):
# Window theme
windowthemesel=self.ui['tree_window_theme'].get_selection()
windowtheme=gsettings.gnome('desktop.wm.preferences').get_string('theme')
windowthemesel.select_iter(self.windowthemes[windowtheme]['iter'])

# FIXME: Workaround to fix LP bug: #1146122
try:
windowthemesel.select_iter(self.windowthemes[windowtheme]['iter'])

# TODO: This except part should do a lot more.
except KeyError:
windowthemesel.unselect_all()

# Icon theme
iconthemesel=self.ui['tree_icon_theme'].get_selection()
icontheme=gsettings.gnome('desktop.interface').get_string('icon-theme')
iconthemesel.select_iter(self.iconthemes[icontheme]['iter'])

# FIXME: Workaround to fix potential bug
try:
iconthemesel.select_iter(self.iconthemes[icontheme]['iter'])

except KeyError:
iconthemesel.unselect_all()

# Cursor theme
cursorthemesel=self.ui['tree_cursor_theme'].get_selection()
Expand Down

0 comments on commit 2c01981

Please sign in to comment.