mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 03:18:47 +00:00
Fix up stopping classic mode
This commit is contained in:
parent
6d55c44983
commit
ac5f9a2828
2 changed files with 15 additions and 8 deletions
|
@ -613,6 +613,11 @@ class Client(object):
|
|||
"""
|
||||
Disconnects from the daemon.
|
||||
"""
|
||||
if self.is_classicmode():
|
||||
self._daemon_proxy.disconnect()
|
||||
self.stop_classic_mode()
|
||||
return
|
||||
|
||||
if self._daemon_proxy:
|
||||
return self._daemon_proxy.disconnect()
|
||||
|
||||
|
@ -623,6 +628,13 @@ class Client(object):
|
|||
self._daemon_proxy = DaemonClassicProxy(self.__event_handlers)
|
||||
self.__started_in_classic = True
|
||||
|
||||
def stop_classic_mode(self):
|
||||
"""
|
||||
Stops the daemon process in the client.
|
||||
"""
|
||||
self._daemon_proxy = None
|
||||
self.__started_in_classic = False
|
||||
|
||||
def start_daemon(self, port, config):
|
||||
"""
|
||||
Starts a daemon process.
|
||||
|
|
|
@ -835,14 +835,9 @@ class Preferences(component.Component):
|
|||
if response == gtk.RESPONSE_NO:
|
||||
# Set each changed config value in the core
|
||||
self.gtkui_config["classic_mode"] = True
|
||||
client.core.set_config({"classic_mode": True})
|
||||
client.force_call(True)
|
||||
# Update the configuration
|
||||
self.core_config.update({"classic_mode": True})
|
||||
self.glade.get_widget("chk_classic_mode").set_active(True)
|
||||
else:
|
||||
client.disconnect()
|
||||
if client.is_classicmode():
|
||||
component.stop()
|
||||
dialog = dialogs.YesNoDialog(
|
||||
_("Attention"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue