Hook up ConnectionManager tool button.
Fix preferences when applying config with no daemon.
This commit is contained in:
parent
e03401e3aa
commit
40e1376bc4
|
@ -341,17 +341,19 @@ class Preferences(component.Component):
|
||||||
self.gtkui_config[key] = new_gtkui_config[key]
|
self.gtkui_config[key] = new_gtkui_config[key]
|
||||||
|
|
||||||
# Core
|
# Core
|
||||||
config_to_set = {}
|
if client.get_core_uri() != None:
|
||||||
for key in new_core_config.keys():
|
# Only do this if we're connected to a daemon
|
||||||
# The values do not match so this needs to be updated
|
config_to_set = {}
|
||||||
if self.core_config[key] != new_core_config[key]:
|
for key in new_core_config.keys():
|
||||||
config_to_set[key] = new_core_config[key]
|
# 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
|
# Set each changed config value in the core
|
||||||
client.set_config(config_to_set)
|
client.set_config(config_to_set)
|
||||||
|
|
||||||
# Update the configuration
|
# Update the configuration
|
||||||
self.core_config.update(config_to_set)
|
self.core_config.update(config_to_set)
|
||||||
|
|
||||||
# Re-show the dialog to make sure everything has been updated
|
# Re-show the dialog to make sure everything has been updated
|
||||||
self.show()
|
self.show()
|
||||||
|
|
|
@ -52,9 +52,9 @@ class ToolBar(component.Component):
|
||||||
"on_toolbutton_pause_clicked": self.on_toolbutton_pause_clicked,
|
"on_toolbutton_pause_clicked": self.on_toolbutton_pause_clicked,
|
||||||
"on_toolbutton_resume_clicked": self.on_toolbutton_resume_clicked,
|
"on_toolbutton_resume_clicked": self.on_toolbutton_resume_clicked,
|
||||||
"on_toolbutton_preferences_clicked": \
|
"on_toolbutton_preferences_clicked": \
|
||||||
self.on_toolbutton_preferences_clicked,
|
self.on_toolbutton_preferences_clicked,
|
||||||
"on_toolbutton_plugins_clicked": \
|
"on_toolbutton_connectionmanager_clicked": \
|
||||||
self.on_toolbutton_plugins_clicked,
|
self.on_toolbutton_connectionmanager_clicked
|
||||||
})
|
})
|
||||||
|
|
||||||
def add_toolbutton(self, callback, label=None, image=None, stock=None,
|
def add_toolbutton(self, callback, label=None, image=None, stock=None,
|
||||||
|
@ -123,7 +123,7 @@ class ToolBar(component.Component):
|
||||||
# Use the menubar's callbacks
|
# Use the menubar's callbacks
|
||||||
component.get("MenuBar").on_menuitem_preferences_activate(data)
|
component.get("MenuBar").on_menuitem_preferences_activate(data)
|
||||||
|
|
||||||
def on_toolbutton_plugins_clicked(self, data):
|
def on_toolbutton_connectionmanager_clicked(self, data):
|
||||||
log.debug("on_toolbutton_plugins_clicked")
|
log.debug("on_toolbutton_connectionmanager_clicked")
|
||||||
# Use the menubar's callbacks
|
# Use the menubar's callbacks
|
||||||
component.get("MenuBar").on_menuitem_preferences_activate(data)
|
component.get("MenuBar").on_menuitem_connectionmanager_activate(data)
|
||||||
|
|
Loading…
Reference in New Issue