From cc8466988cae07e4031c3a474b6f37c4237265c8 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 17 Sep 2007 04:36:45 +0000 Subject: [PATCH] Add DEFAULT_PREFS. --- deluge/ui/gtkui/gtkui.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 9a859b753..6ff7badb6 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -41,9 +41,24 @@ import pkg_resources from mainwindow import MainWindow from signals import Signals from pluginmanager import PluginManager - +from deluge.config import Config from deluge.log import LOG as log +DEFAULT_PREFS = { + "interactive_add": False, + "enable_files_dialog": False, + "enable_system_tray": True, + "close_to_tray": True, + "start_in_tray": False, + "lock_tray": False, + "tray_password": "", + "open_folder_stock": True, + "stock_file_manager": 0, + "open_folder_location": "", + "check_new_releases": False, + "send_info": False +} + class GtkUI: def __init__(self): # Initialize gettext @@ -60,6 +75,10 @@ class GtkUI: pkg_resources.resource_filename( "deluge", "i18n")) + # Make sure gtkui.conf has at least the defaults set + config = Config("gtkui.conf", DEFAULT_PREFS) + del config + # Initialize the main window self.mainwindow = MainWindow()