Module: deluge Branch: master Commit: c556613b9ff7fb6babea8ed367199dce27054856
Author: Calum Lind <[email protected]> Date: Mon Dec 10 19:33:13 2012 +0000 Catch exception when enabling/disabling indicator in classic mode --- deluge/ui/gtkui/systemtray.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/systemtray.py b/deluge/ui/gtkui/systemtray.py index 9e1248a..0c5c104 100644 --- a/deluge/ui/gtkui/systemtray.py +++ b/deluge/ui/gtkui/systemtray.py @@ -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() -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
