mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
Do not use the stored config_location value because it should only be used if the --config option is
set.
This commit is contained in:
parent
7b99298203
commit
c58e2481b9
6 changed files with 16 additions and 10 deletions
|
@ -39,6 +39,7 @@ import deluge.common
|
|||
import deluge.ui.gtkui.common as common
|
||||
from deluge.ui.common import get_localhost_auth_uri
|
||||
from deluge.ui.client import aclient as client
|
||||
import deluge.configmanager
|
||||
from deluge.configmanager import ConfigManager
|
||||
from deluge.log import LOG as log
|
||||
|
||||
|
@ -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")
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -32,6 +32,7 @@ pygtk.require('2.0')
|
|||
import gtk
|
||||
import gettext
|
||||
|
||||
import deluge.configmanager
|
||||
from deluge.configmanager import 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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue