mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
fix torrentfiles with --config
This commit is contained in:
parent
0d7c25879e
commit
f46ce64914
2 changed files with 5 additions and 4 deletions
|
@ -113,7 +113,7 @@ def get_cmd_line_torrents():
|
||||||
def start_deluge():
|
def start_deluge():
|
||||||
print "Starting new Deluge session..."
|
print "Starting new Deluge session..."
|
||||||
upgrade_old_persistent_state()
|
upgrade_old_persistent_state()
|
||||||
interface = deluge.interface.DelugeGTK()
|
interface = deluge.interface.DelugeGTK(config_dir=deluge.common.CONFIG_DIR)
|
||||||
interface.start(get_cmd_line_torrents())
|
interface.start(get_cmd_line_torrents())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -37,8 +37,8 @@ import pygtk
|
||||||
pygtk.require('2.0')
|
pygtk.require('2.0')
|
||||||
import gtk
|
import gtk
|
||||||
|
|
||||||
import core
|
|
||||||
import common
|
import common
|
||||||
|
import core
|
||||||
import dialogs
|
import dialogs
|
||||||
import dgtk
|
import dgtk
|
||||||
import ipc_manager
|
import ipc_manager
|
||||||
|
@ -46,7 +46,9 @@ import plugins
|
||||||
import tab_details
|
import tab_details
|
||||||
|
|
||||||
class DelugeGTK:
|
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)
|
self.ipc_manager = ipc_manager.Manager(self)
|
||||||
#Start the Deluge Manager:
|
#Start the Deluge Manager:
|
||||||
self.manager = core.Manager(common.CLIENT_CODE, common.CLIENT_VERSION,
|
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):
|
def start(self, cmd_line_torrents=None):
|
||||||
if cmd_line_torrents is None:
|
if cmd_line_torrents is None:
|
||||||
cmd_line_torrents = []
|
cmd_line_torrents = []
|
||||||
|
|
||||||
if not(self.config.get("start_in_tray") and \
|
if not(self.config.get("start_in_tray") and \
|
||||||
self.config.get("enable_system_tray") and
|
self.config.get("enable_system_tray") and
|
||||||
self.has_tray) and not self.window.get_property("visible"):
|
self.has_tray) and not self.window.get_property("visible"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue