fix torrentfiles with --config

This commit is contained in:
Marcos Pinto 2008-05-02 21:04:55 +00:00
parent 0d7c25879e
commit f46ce64914
2 changed files with 5 additions and 4 deletions

View File

@ -113,7 +113,7 @@ def get_cmd_line_torrents():
def start_deluge():
print "Starting new Deluge session..."
upgrade_old_persistent_state()
interface = deluge.interface.DelugeGTK()
interface = deluge.interface.DelugeGTK(config_dir=deluge.common.CONFIG_DIR)
interface.start(get_cmd_line_torrents())
try:

View File

@ -37,8 +37,8 @@ import pygtk
pygtk.require('2.0')
import gtk
import core
import common
import core
import dialogs
import dgtk
import ipc_manager
@ -46,7 +46,9 @@ import plugins
import tab_details
class DelugeGTK:
def __init__(self):
def __init__(self, config_dir=None):
if config_dir:
common.CONFIG_DIR = config_dir
self.ipc_manager = ipc_manager.Manager(self)
#Start the Deluge Manager:
self.manager = core.Manager(common.CLIENT_CODE, common.CLIENT_VERSION,
@ -1009,7 +1011,6 @@ window, please enter your password"))
def start(self, cmd_line_torrents=None):
if cmd_line_torrents is None:
cmd_line_torrents = []
if not(self.config.get("start_in_tray") and \
self.config.get("enable_system_tray") and
self.has_tray) and not self.window.get_property("visible"):