Add DEFAULT_PREFS.

This commit is contained in:
Andrew Resch 2007-09-17 04:36:45 +00:00
parent 978a2ae80b
commit cc8466988c
1 changed files with 20 additions and 1 deletions

View File

@ -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()