Only call apply_prefs() if OK is pressed in the Preferences dialog.
This commit is contained in:
parent
ee9e5a09ea
commit
94dc14b355
|
@ -131,6 +131,8 @@ class PreferencesDlg:
|
|||
self.preferences.set("enable_dht", self.glade.get_widget("chk_dht").get_active())
|
||||
self.preferences.set("gui_update_interval", self.glade.get_widget("spin_gui").get_value())
|
||||
|
||||
return r
|
||||
|
||||
def TestPort(self, widget):
|
||||
activep = str(self.parent.manager.get_state()['port'])
|
||||
common.open_url_in_browser(self.dialog,'http://www.deluge-torrent.org/test-port.php?port=%s' %activep)
|
||||
|
|
|
@ -674,17 +674,19 @@ class DelugeGTK:
|
|||
|
||||
def show_pref_dialog(self, arg=None):
|
||||
if self.window.get_property("visible"):
|
||||
self.preferences_dialog.show()
|
||||
self.apply_prefs()
|
||||
self.config.save()
|
||||
# Only apply the prefs if the user pressed OK in the prefs dialog
|
||||
if self.preferences_dialog.show() == 1:
|
||||
self.apply_prefs()
|
||||
self.config.save()
|
||||
|
||||
else:
|
||||
if self.config.get("lock_tray") == True:
|
||||
self.unlock_tray("prefwinshow")
|
||||
else:
|
||||
self.preferences_dialog.show()
|
||||
self.apply_prefs()
|
||||
self.config.save()
|
||||
# Only apply the prefs if the user pressed OK in the prefs dialog
|
||||
if self.preferences_dialog.show() == 1:
|
||||
self.apply_prefs()
|
||||
self.config.save()
|
||||
|
||||
def show_plugin_dialog(self, arg=None):
|
||||
self.plugin_dialog.show()
|
||||
|
|
Loading…
Reference in New Issue