From f54f2a50ec9b83822db3ee1f6087b9d2d754951a Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 14 Oct 2007 21:48:40 +0000 Subject: [PATCH] make default run in thread if in windows and default not in thread if not in windows --- plugins/WebUi/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/WebUi/__init__.py b/plugins/WebUi/__init__.py index 35bcee063..85b559bd9 100644 --- a/plugins/WebUi/__init__.py +++ b/plugins/WebUi/__init__.py @@ -91,8 +91,8 @@ class plugin_WebUi(object): #set default values: self.config.set("port", 8112) #future->use deluge-core setting for download_dir (if it is set) - self.config.set("download_dir", os.path.expanduser("~/")) - self.config.set("torrent_dir", os.path.expanduser("~/")) + self.config.set("download_dir", os.path.expanduser("~")) + self.config.set("torrent_dir", os.path.expanduser("~")) self.config.set("button_style", 2) self.config.set("auto_refresh", False) self.config.set("auto_refresh_secs", 4) @@ -106,8 +106,12 @@ class plugin_WebUi(object): if self.config.get("cache_templates") == None: self.config.set("cache_templates", True) - if self.config.get("run_in_thread") == None: - self.config.set("run_in_thread", True) + if deluge.common.windows_check(): + if self.config.get("run_in_thread") == None: + self.config.set("run_in_thread", True) + else: + if self.config.get("run_in_thread") == None: + self.config.set("run_in_thread", False) self.dbus_manager = get_dbus_manager(deluge_core, deluge_interface, self.config, self.config_file)