bigboard r7264 - trunk/bigboard
- From: marinaz svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7264 - trunk/bigboard
- Date: Tue, 26 Feb 2008 23:08:26 +0000 (GMT)
Author: marinaz
Date: Tue Feb 26 23:08:26 2008
New Revision: 7264
URL: http://svn.gnome.org/viewvc/bigboard?rev=7264&view=rev
Log:
Use specific set_bool() and set_string() functions for setting
GConf properties, since a generic set_value() function was
creating properties without a schema, which was causing problems
when we were trying to sync them.
Modified:
trunk/bigboard/accounts.py
Modified: trunk/bigboard/accounts.py
==============================================================================
--- trunk/bigboard/accounts.py (original)
+++ trunk/bigboard/accounts.py Tue Feb 26 23:08:26 2008
@@ -403,7 +403,13 @@
_logger.debug("prop %s value %s" % (prop, str(value)))
if isinstance(value, AccountKind):
value = value.get_id()
- gconf.set_value(base_key + '/' + prop, value)
+
+ if isinstance(value, bool):
+ self.__gconf.set_bool(base_key + '/' + prop, value)
+ elif isinstance(value, str):
+ self.__gconf.set_string(base_key + '/' + prop, value)
+ else:
+ _logger.error("prop %s with value %s has an unexpected type %s" % (prop, str(value), type(value)))
set_account_prop(self.__gconf, base_key, 'kind', account.get_kind())
@@ -425,8 +431,8 @@
gconf_dir = self.__find_unused_gconf_dir(kind)
base_key = '/apps/bigboard/accounts/' + gconf_dir
- self.__gconf.set_value(base_key + '/kind', kind.get_id())
- self.__gconf.set_value(base_key + '/enabled', True)
+ self.__gconf.set_string(base_key + '/kind', kind.get_id())
+ self.__gconf.set_bool(base_key + '/enabled', True)
def get_accounts(self):
return self.__enabled_accounts
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]