From 9d80e9eb56a82701b54cfea653608fedb1ed9bb9 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 2 Apr 2006 16:27:58 +0000 Subject: [PATCH] Don't create bus object until constructor is called. git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib2@4536 66de3db3-b00d-0410-b41b-f4738ad19bea --- python/rox/settings.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/rox/settings.py b/python/rox/settings.py index ad11a66..1273879 100644 --- a/python/rox/settings.py +++ b/python/rox/settings.py @@ -88,11 +88,12 @@ def get_gconf(): client = None return client - class Settings(OptionGroup): """A group of options associated with the dbus interface. """ - program = os.path.basename(rox.app_dir) - def __init__(self, bus = get_xsettings(), client = None): + + program = os.path.basename(rox.app_dir) # For dialog box title + + def __init__(self, bus = None, client = None): """Constructor bus: ROX-Session's dbus interface. Omit to use default @@ -100,7 +101,7 @@ class Settings(OptionGroup): """ self.options = {} self.callbacks = [] - self.bus = bus + self.bus = bus or get_xsettings() self.client = client def notify(self): @@ -111,7 +112,6 @@ class Settings(OptionGroup): def save(self): pass - class Setting(Option): def __init__(self, name, default, settings, garbage = False, gconf_key = None): -- 2.11.4.GIT