Package conduit :: Package platform :: Module SettingsGConf :: Class SettingsImpl
[hide private]

Class SettingsImpl

source code


Settings implementation which stores settings in GConf

Instance Methods [hide private]
 
__init__(self, defaults, changedCb) source code
string
_fix_key(self, key)
Appends the CONDUIT_GCONF_PREFIX to the key if needed
source code
 
_key_changed(self, client, cnxn_id, entry, data=None)
Callback when a gconf key changes
source code
 
get(self, key, default=None)
Returns the value of the key or the default value if the key is not yet in gconf
source code
 
set(self, key, value)
Sets the key value in gconf and connects adds a signal which is fired if the key changes
source code
 
proxy_enabled(self)
Returns: True if the user has specified a http proxy via the http_proxy environment variable, or in gconf
source code
 
get_proxy(self)
Returns the details of the configured http proxy.
source code

Inherited from Settings: save, set_overrides

Class Variables [hide private]
  CONDUIT_GCONF_DIR = "/apps/conduit/"
  VALID_KEY_TYPES = bool, str, int, list, tuple
Method Details [hide private]

__init__(self, defaults, changedCb)
(Constructor)

source code 
Overrides: Settings.__init__

_fix_key(self, key)

source code 
Appends the CONDUIT_GCONF_PREFIX to the key if needed
Parameters:
  • key (string) - The key to check
Returns: string
The fixed key

get(self, key, default=None)

source code 
Returns the value of the key or the default value if the key is not yet in gconf
Overrides: Settings.get

set(self, key, value)

source code 
Sets the key value in gconf and connects adds a signal which is fired if the key changes
Overrides: Settings.set

proxy_enabled(self)

source code 
Returns:
True if the user has specified a http proxy via the http_proxy environment variable, or in gconf
Overrides: Settings.proxy_enabled

get_proxy(self)

source code 
Returns the details of the configured http proxy. The http_proxy environment variable overrides the GNOME setting
Returns:
host,port,user,password
Overrides: Settings.get_proxy