mirror of
https://github.com/codex-storage/deluge.git
synced 2025-03-01 03:20:44 +00:00
Catch glade object issue when re-enabling Autoadd
Found an additional glade object from the previous instance of Autoadd calling cb_get_config resulting in an exceptions.AttributeError. This workaround simply checks that get_widget is not None.
This commit is contained in:
parent
614b002d8b
commit
be5a0b3dc5
@ -407,7 +407,6 @@ class GtkUI(GtkPluginBase):
|
||||
)
|
||||
self.on_show_prefs()
|
||||
|
||||
|
||||
def disable(self):
|
||||
component.get("Preferences").remove_page("AutoAdd")
|
||||
component.get("PluginManager").deregister_hook(
|
||||
@ -511,7 +510,8 @@ class GtkUI(GtkPluginBase):
|
||||
watchdir_id, watchdir['enabled'],
|
||||
watchdir.get('owner', 'localclient'), watchdir['path']
|
||||
])
|
||||
# Workaround for cached glade signal appearing when re-enabling plugin in same session
|
||||
if self.glade.get_widget('edit_button'):
|
||||
# Disable the remove and edit buttons, because nothing in the store is selected
|
||||
self.glade.get_widget('remove_button').set_sensitive(False)
|
||||
self.glade.get_widget('edit_button').set_sensitive(False)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user