diff --git a/deluge/core/daemon.py b/deluge/core/daemon.py
index e1c32f7c2..21a011c4d 100644
--- a/deluge/core/daemon.py
+++ b/deluge/core/daemon.py
@@ -64,19 +64,19 @@ def is_daemon_running(pid_file):
class Daemon(object):
"""The Deluge Daemon class"""
- def __init__(self, listen_interface=None, interface=None, port=None, classic=False,
+ def __init__(self, listen_interface=None, interface=None, port=None, standalone=False,
read_only_config_keys=None):
"""
Args:
listen_interface (str, optional): The IP address to listen to bittorrent connections on.
interface (str, optional): The IP address the daemon will listen for UI connections on.
port (int, optional): The port the daemon will listen for UI connections on.
- classic (bool, optional): If True the client is in Classic (Standalone) mode otherwise, if
+ standalone (bool, optional): If True the client is in Standalone mode otherwise, if
False, start the daemon as separate process.
read_only_config_keys (list of str, optional): A list of config keys that will not be
altered by core.set_config() RPC method.
"""
- self.classic = classic
+ self.standalone = standalone
self.pid_file = get_config_dir("deluged.pid")
log.info("Deluge daemon %s", get_version())
if is_daemon_running(self.pid_file):
@@ -110,7 +110,7 @@ class Daemon(object):
self.rpcserver = RPCServer(
port=port,
allow_remote=self.core.config["allow_remote"],
- listen=not classic,
+ listen=not standalone,
interface=interface
)
@@ -124,7 +124,7 @@ class Daemon(object):
# Make sure we start the PreferencesManager first
component.start("PreferencesManager")
- if not self.classic:
+ if not self.standalone:
log.info("Deluge daemon starting...")
# Create pid file to track if deluged is running, also includes the port number.
pid = os.getpid()
@@ -148,7 +148,7 @@ class Daemon(object):
def _shutdown(self, *args, **kwargs):
log.info("Deluge daemon shutting down, waiting for components to shutdown...")
- if not self.classic:
+ if not self.standalone:
return component.shutdown()
@export()
diff --git a/deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py b/deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py
index a9ca8dc6a..36bd1c235 100644
--- a/deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py
+++ b/deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py
@@ -31,12 +31,12 @@ class StatsTestCase(BaseTestCase):
def set_up(self):
defer.setDebugging(True)
tests_common.set_tmp_config_dir()
- client.start_classic_mode()
+ client.start_standalone()
client.core.enable_plugin("Stats")
return component.start()
def tear_down(self):
- client.stop_classic_mode()
+ client.stop_standalone()
return component.shutdown()
@defer.inlineCallbacks
diff --git a/deluge/ui/client.py b/deluge/ui/client.py
index 1bcd92bf2..2ec72b086 100644
--- a/deluge/ui/client.py
+++ b/deluge/ui/client.py
@@ -424,18 +424,18 @@ class DaemonSSLProxy(DaemonProxy):
return self.protocol.get_bytes_sent()
-class DaemonClassicProxy(DaemonProxy):
+class DaemonStandaloneProxy(DaemonProxy):
def __init__(self, event_handlers=None):
if event_handlers is None:
event_handlers = {}
from deluge.core import daemon
- self.__daemon = daemon.Daemon(classic=True)
+ self.__daemon = daemon.Daemon(standalone=True)
self.__daemon.start()
log.debug("daemon created!")
self.connected = True
self.host = "localhost"
self.port = 58846
- # Running in classic mode, it's safe to import auth level
+ # Running in standalone mode, it's safe to import auth level
from deluge.core.authmanager import (AUTH_LEVEL_ADMIN,
AUTH_LEVELS_MAPPING,
AUTH_LEVELS_MAPPING_REVERSE)
@@ -528,7 +528,7 @@ class Client(object):
def __init__(self):
self._daemon_proxy = None
self.disconnect_callback = None
- self.__started_in_classic = False
+ self.__started_standalone = False
def connect(self, host="127.0.0.1", port=58846, username="", password="",
skip_authentication=False):
@@ -586,27 +586,35 @@ class Client(object):
"""
Disconnects from the daemon.
"""
- if self.is_classicmode():
+ if self.is_standalone():
self._daemon_proxy.disconnect()
- self.stop_classic_mode()
+ self.stop_standalone()
return defer.succeed(True)
if self._daemon_proxy:
return self._daemon_proxy.disconnect()
- def start_classic_mode(self):
+ def start_standalone(self):
"""
Starts a daemon in the same process as the client.
"""
- self._daemon_proxy = DaemonClassicProxy(self.__event_handlers)
- self.__started_in_classic = True
+ self._daemon_proxy = DaemonStandaloneProxy(self.__event_handlers)
+ self.__started_standalone = True
- def stop_classic_mode(self):
+ def stop_standalone(self):
"""
Stops the daemon process in the client.
"""
self._daemon_proxy = None
- self.__started_in_classic = False
+ self.__started_standalone = False
+
+ def start_classic_mode(self):
+ """Deprecated"""
+ self.start_standalone()
+
+ def stop_classic_mode(self):
+ """Deprecated"""
+ self.stop_standalone()
def start_daemon(self, port, config):
"""
@@ -649,18 +657,22 @@ that you forgot to install the deluged package or it's not in your PATH."))
"""
if (self._daemon_proxy and self._daemon_proxy.host in ("127.0.0.1", "localhost") or
- isinstance(self._daemon_proxy, DaemonClassicProxy)):
+ isinstance(self._daemon_proxy, DaemonStandaloneProxy)):
return True
return False
+ def is_standalone(self):
+ """
+ Checks to see if the client has been started in standalone mode.
+
+ :returns: bool, True if in standalone mode
+
+ """
+ return self.__started_standalone
+
def is_classicmode(self):
- """
- Checks to see if the client has been started in classic mode.
-
- :returns: bool, True if in classic mode
-
- """
- return self.__started_in_classic
+ """Deprecated"""
+ self.is_standalone()
def connected(self):
"""
diff --git a/deluge/ui/gtkui/aboutdialog.py b/deluge/ui/gtkui/aboutdialog.py
index 8ef54e296..037411423 100644
--- a/deluge/ui/gtkui/aboutdialog.py
+++ b/deluge/ui/gtkui/aboutdialog.py
@@ -254,7 +254,7 @@ class AboutDialog(object):
self.about.set_logo(gtk.gdk.pixbuf_new_from_file(get_pixmap("deluge-about.png")))
if client.connected():
- if not client.is_classicmode():
+ if not client.is_standalone():
self.about.set_comments(
self.about.get_comments() + _("Server:") + " %coreversion%\n")
@@ -272,7 +272,7 @@ class AboutDialog(object):
self.about.set_comments(c)
client.core.get_libtorrent_version().addCallback(on_lt_version)
- if not client.is_classicmode():
+ if not client.is_standalone():
client.daemon.info().addCallback(on_info)
else:
client.core.get_libtorrent_version().addCallback(on_lt_version)
diff --git a/deluge/ui/gtkui/glade/preferences_dialog.ui b/deluge/ui/gtkui/glade/preferences_dialog.ui
index d3855a908..04e74e10a 100644
--- a/deluge/ui/gtkui/glade/preferences_dialog.ui
+++ b/deluge/ui/gtkui/glade/preferences_dialog.ui
@@ -374,7 +374,7 @@
TrueFalse
-