diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index 41bef0ad3..6b5fc8f6c 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -40,6 +40,7 @@ import deluge.ui.gtkui.common as common from deluge.ui.common import get_localhost_auth_uri from deluge.ui.client import aclient as client from deluge.configmanager import ConfigManager +import deluge.configmanager from deluge.log import LOG as log DEFAULT_URI = "http://127.0.0.1:58846" @@ -480,7 +481,7 @@ class ConnectionManager(component.Component): win32api.WinExec("deluged -p %s" % port) else: subprocess.call(["deluged", "--port=%s" % port, - "--config=%s" % self.gtkui_config["config_location"]]) + "--config=%s" % deluge.configmanager.get_config_dir()]) def on_button_close_clicked(self, widget): log.debug("on_button_close_clicked") diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py index dc133e0a9..3d3b1d75d 100644 --- a/deluge/ui/gtkui/files_tab.py +++ b/deluge/ui/gtkui/files_tab.py @@ -32,6 +32,7 @@ import cPickle from deluge.ui.gtkui.torrentdetails import Tab from deluge.ui.client import aclient as client from deluge.configmanager import ConfigManager +import deluge.configmanager import deluge.component as component import deluge.common @@ -221,7 +222,7 @@ class FilesTab(Tab): } # Get the config location for saving the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() try: log.debug("Saving FilesTab state file: %s", filename) @@ -234,7 +235,7 @@ class FilesTab(Tab): def load_state(self): filename = "files_tab.state" # Get the config location for loading the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() state = None try: diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 3d71e1d2c..d73568f0e 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -60,7 +60,6 @@ import deluge.configmanager import deluge.common DEFAULT_PREFS = { - "config_location": deluge.configmanager.get_config_dir(), "classic_mode": True, "interactive_add": True, "focus_add_dialog": True, diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py index 6a5f5a539..d70ee06ed 100644 --- a/deluge/ui/gtkui/listview.py +++ b/deluge/ui/gtkui/listview.py @@ -33,6 +33,7 @@ import gtk import gettext from deluge.configmanager import ConfigManager +import deluge.configmanager import deluge.common from deluge.log import LOG as log @@ -204,7 +205,7 @@ class ListView: counter += 1 # Get the config location for saving the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() try: log.debug("Saving ListView state file: %s", filename) @@ -217,7 +218,7 @@ class ListView: def load_state(self, filename): """Load the listview state from filename.""" # Get the config location for loading the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() state = None try: diff --git a/deluge/ui/gtkui/peers_tab.py b/deluge/ui/gtkui/peers_tab.py index 8615a797a..dc678cb23 100644 --- a/deluge/ui/gtkui/peers_tab.py +++ b/deluge/ui/gtkui/peers_tab.py @@ -32,6 +32,7 @@ from itertools import izip from deluge.ui.client import aclient as client from deluge.configmanager import ConfigManager +import deluge.configmanager import deluge.component as component import deluge.common import deluge.ui.gtkui.common as common @@ -175,7 +176,7 @@ class PeersTab(Tab): } # Get the config location for saving the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() try: log.debug("Saving FilesTab state file: %s", filename) @@ -188,7 +189,7 @@ class PeersTab(Tab): def load_state(self): filename = "peers_tab.state" # Get the config location for loading the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() state = None try: diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 5fa5964b2..515f18ce9 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -35,6 +35,7 @@ import deluge.common import deluge.error import deluge.ui.gtkui.common as common from deluge.configmanager import ConfigManager +import deluge.configmanager class Preferences(component.Component): def __init__(self): @@ -855,7 +856,7 @@ class Preferences(component.Component): filename = os.path.split(filepath)[1] shutil.copyfile( filepath, - os.path.join(self.gtkui_config["config_location"], "plugins", filename)) + os.path.join(deluge.configmanager.get_config_dir(), "plugins", filename)) component.get("PluginManager").scan_for_plugins() diff --git a/deluge/ui/gtkui/torrentdetails.py b/deluge/ui/gtkui/torrentdetails.py index cdd61dc7b..ed3f55a98 100644 --- a/deluge/ui/gtkui/torrentdetails.py +++ b/deluge/ui/gtkui/torrentdetails.py @@ -33,6 +33,7 @@ import cPickle import deluge.component as component from deluge.ui.client import aclient as client from deluge.configmanager import ConfigManager +import deluge.configmanager from deluge.log import LOG as log @@ -371,7 +372,7 @@ class TorrentDetails(component.Component): state = [(n, v) for w, n, v in state] # Get the config location for saving the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() try: log.debug("Saving TorrentDetails state file: %s", filename) @@ -384,7 +385,7 @@ class TorrentDetails(component.Component): def load_state(self): filename = "tabs.state" # Get the config location for loading the state file - config_location = ConfigManager("gtkui.conf")["config_location"] + config_location = deluge.configmanager.get_config_dir() state = None try: