Ticket #636: config_chg.diff
File config_chg.diff, 3.0 KB (added by , 16 years ago) |
---|
-
deluge/ui/gtkui/connectionmanager.py
118 118 119 119 # If classic mode is set, we just start up a localhost daemon and connect to it 120 120 if self.gtkui_config["classic_mode"]: 121 uri = "http://localhost:58846" 122 self.start_localhost(58846) 121 uri = "http://" + DEFAULT_CONFIG["hosts"][0] 122 port = uri[7:].split(":")[1] 123 self.start_localhost(port) 123 124 # We need to wait for the host to start before connecting 124 125 while not self.test_online_status(uri): 125 126 time.sleep(0.01) … … 393 394 log.debug("on_button_startdaemon_clicked") 394 395 if self.liststore.iter_n_children(None) < 1: 395 396 # There is nothing in the list, so lets create a localhost entry 396 self.add_host("localhost", 58846) 397 port = DEFAULT_CONFIG["hosts"][0].split(":")[1] 398 self.add_host(DEFAULT_CONFIG["hosts"][0].split(":")[0], 399 port) 397 400 # ..and start the daemon. 398 self.start_localhost( 58846)401 self.start_localhost(port) 399 402 return 400 403 401 404 paths = self.hostlist.get_selection().get_selected_rows()[1] … … 425 428 if deluge.common.windows_check(): 426 429 win32api.WinExec("deluged -p %s" % port) 427 430 else: 428 subprocess.call(["deluged", "-p %s" % port]) 431 subprocess.call(["deluged", "--port=%s" % port, 432 "--config=%s" % self.gtkui_config["config_location"]]) 429 433 430 434 def on_button_close_clicked(self, widget): 431 435 log.debug("on_button_close_clicked") -
deluge/ui/gtkui/filtertreeview.py
71 71 self.scrolled = glade.get_widget("scrolledwindow_sidebar") 72 72 self.sidebar = component.get("SideBar") 73 73 self.config = ConfigManager("gtkui.conf") 74 self.tracker_icons = TrackerIcons( )74 self.tracker_icons = TrackerIcons(self.config["config_location"]) 75 75 76 76 self.label_view = gtk.TreeView() 77 77 self.sidebar.add_tab(self.label_view, "filters", _("Filters")) -
deluge/ui/tracker_icons.py
60 60 return data 61 61 62 62 class TrackerIcons(object): 63 def __init__(self ):63 def __init__(self, config_dir=None): 64 64 #set image cache dir 65 self.image_dir = get_default_config_dir("icons") 65 if config_dir == None: 66 self.image_dir = get_default_config_dir("icons") 67 else: 68 self.image_dir = os.path.join(config_dir, "icons") 66 69 if not os.path.exists(self.image_dir): 67 70 os.mkdir(self.image_dir) 68 71