rox.settings
index

ROX-Session settings with D-Bus and optional Gnome (gconf) setting
 
Setting and Settings are derived from ROX-Lib's Option and OptionGroup
respectively. A Setting sends a dbus message to ROX-Session when changed.
 
Use get_xsettings to get the dbus interface, then create a Settings object
with it to pass to each Setting.

 
Classes
       
rox.options.Option
Setting
BoolSetting
rox.options.OptionGroup
Settings

 
class BoolSetting(Setting)
      Bool setting for GConf/D-Bus
 
Option doesn't distinguish between int and bool, but gconf does,
so use this for bool options.
 
  Methods defined here:
__init__(self, name, default, settings, theme, gconf_key=None)
make_gconf_value(self)

 
class Setting(rox.options.Option)
       
  Methods defined here:
__init__(self, name, default, settings, garbage=False, gconf_key=None)
Constructor
 
name: Option name as sent in dbus message.
default: Default value.
settings: The group of Settings this one belongs to.
garbage: Font and theme changes cause (some versions of?) GTK to
        update all windows even if they're supposed to have been
        destroyed. If we've just closed a dialog eg font selection (or
        menu?), this can cause a crash, so this option forces a garbage
        collection to make sure there is no stale reference.
gconf_key: Optional gconf setting key. If it begins with / it
        will be treated as the absolute path, otherwise it will
        have /desktop/gnome/interface/ prepended.
make_gconf_value(self)
Returns value ready to be converted to a GConfValue.
 
Override if necessary. Return a bool, int or string
(so the name is slightly misleading).
post_notify_hook(self)
Called just after notifying dbus the standard way.
 
Override to perform additional operations.
Won't be called if there's no bus, but otherwise will be called
even if pre_notif_hook() returns True.
pre_notify_hook(self)
Called just before notifying dbus the standard way.
 
Override to perform additional operations and return True
if you want to prevent normal notification.
Won't be called if there's no bus.

 
class Settings(rox.options.OptionGroup)
      A group of options associated with the dbus interface.
 
  Methods defined here:
__init__(self, bus=None, client=None)
Constructor
 
bus: ROX-Session's dbus interface. Omit to use default
client: gconf client connection. Omit to use default
notify(self)
save(self)

 
Functions
       
get_gconf()
Get GConf connection.
 
Some of the options have corresponding gconf entries; this gets
the gconf client connection. It will be called automatically if
and when necessary.
get_xsettings()
Returns ROX-Session's Settings dbus/xxmlrpc interface.
 
Called automatically if and when necessary