Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::prefs::Preferences::__init__ (   self,
  rootkey,
  initial 
)

Create a preferences object.

Settings are initialised with 'initial' and then overriden
from values in the gconf database if available.

rootkey : the root gconf key where the values will be stored
initial : a dictionary of string to Value objects.

Definition at line 118 of file prefs.py.

00118                                         :
        """Create a preferences object.

        Settings are initialised with 'initial' and then overriden
        from values in the gconf database if available.

        rootkey : the root gconf key where the values will be stored
        initial : a dictionary of string to Value objects.
        """
        self.__dict__["_gconf"] = gconf.client_get_default()
        self.__dict__["_listeners"] = []
        self.__dict__["_rootkey"] = rootkey
        self.__dict__["_prefs"] = initial
        self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
        self._gconf.notify_add(rootkey, self._on_preference_changed)
        for key, value in self._prefs.items():
            gval = self._gconf.get_without_default("%s/%s" % (rootkey, key) )
            if gval != None:
                value.current = value.getfunc(self._gconf, rootkey, key)

    def __getattr__(self, attr):


Generated by  Doxygen 1.6.0   Back to index