diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 8d22ca26f..baeb3d151 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -341,17 +341,19 @@ class Preferences(component.Component): self.gtkui_config[key] = new_gtkui_config[key] # Core - config_to_set = {} - for key in new_core_config.keys(): - # The values do not match so this needs to be updated - if self.core_config[key] != new_core_config[key]: - config_to_set[key] = new_core_config[key] + if client.get_core_uri() != None: + # Only do this if we're connected to a daemon + config_to_set = {} + for key in new_core_config.keys(): + # The values do not match so this needs to be updated + if self.core_config[key] != new_core_config[key]: + config_to_set[key] = new_core_config[key] - # Set each changed config value in the core - client.set_config(config_to_set) + # Set each changed config value in the core + client.set_config(config_to_set) - # Update the configuration - self.core_config.update(config_to_set) + # Update the configuration + self.core_config.update(config_to_set) # Re-show the dialog to make sure everything has been updated self.show() diff --git a/deluge/ui/gtkui/toolbar.py b/deluge/ui/gtkui/toolbar.py index e2cf8cd24..3da269967 100644 --- a/deluge/ui/gtkui/toolbar.py +++ b/deluge/ui/gtkui/toolbar.py @@ -52,9 +52,9 @@ class ToolBar(component.Component): "on_toolbutton_pause_clicked": self.on_toolbutton_pause_clicked, "on_toolbutton_resume_clicked": self.on_toolbutton_resume_clicked, "on_toolbutton_preferences_clicked": \ - self.on_toolbutton_preferences_clicked, - "on_toolbutton_plugins_clicked": \ - self.on_toolbutton_plugins_clicked, + self.on_toolbutton_preferences_clicked, + "on_toolbutton_connectionmanager_clicked": \ + self.on_toolbutton_connectionmanager_clicked }) def add_toolbutton(self, callback, label=None, image=None, stock=None, @@ -123,7 +123,7 @@ class ToolBar(component.Component): # Use the menubar's callbacks component.get("MenuBar").on_menuitem_preferences_activate(data) - def on_toolbutton_plugins_clicked(self, data): - log.debug("on_toolbutton_plugins_clicked") + def on_toolbutton_connectionmanager_clicked(self, data): + log.debug("on_toolbutton_connectionmanager_clicked") # Use the menubar's callbacks - component.get("MenuBar").on_menuitem_preferences_activate(data) + component.get("MenuBar").on_menuitem_connectionmanager_activate(data)