Catch exception when enabling/disabling indicator in classic mode

This commit is contained in:
Calum Lind 2012-12-10 19:33:13 +00:00
parent 6c07b7378c
commit c556613b9f
1 changed files with 5 additions and 2 deletions

View File

@ -156,8 +156,11 @@ class SystemTray(component.Component):
if self.config["enable_system_tray"]:
if self.config["classic_mode"]:
self.hide_widget_list.remove("menuitem_quitdaemon")
self.hide_widget_list.remove("separatormenuitem4")
try:
self.hide_widget_list.remove("menuitem_quitdaemon")
self.hide_widget_list.remove("separatormenuitem4")
except ValueError:
pass
self.builder.get_object("menuitem_quitdaemon").hide()
self.builder.get_object("separatormenuitem4").hide()