How to use the gconf.Value function in gconf

To help you get started, we’ve selected a few gconf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gmate / gmate / plugins / gedit2 / multi_edit / multi_edit / __init__.py View on Github external
def _set_config_str(self, key, string):
        """ Save a value to a gconf key. """
        key = self._gconf_key_base + key
        value = gconf.Value(gconf.VALUE_STRING)
        value.set_string(string)
        gconf.client_get_default().set(key, value)
github GNOME / gedit-plugins / plugins / drawspaces / drawspaces.py View on Github external
def gconf_set_str(key, value):
    v = gconf.Value(gconf.VALUE_STRING)
    v.set_string(value)
    gconf.client_get_default().set(key, v)
github GNOME / gedit-plugins / plugins / drawspaces / drawspaces.py View on Github external
def gconf_set_bool(key, value):
    v = gconf.Value(gconf.VALUE_BOOL)
    v.set_bool(value)
    gconf.client_get_default().set(key, v)
github gmate / gmate / plugins / gconfoptions.py View on Github external
def __init__(self, *args, **kwargs):
        self.getter = getattr(gconf.Value, 'get_%s' % self.gconf_type.value_nick)
        self.setter = getattr(gconf.Value, 'set_%s' % self.gconf_type.value_nick)
        super(SimpleOption, self).__init__(*args, **kwargs)
github gmate / gmate / plugins / gconfoptions.py View on Github external
def __set__(self, instance, value):
        gconf_value = gconf.Value(self.gconf_type)
        self.setter(gconf_value, value)
        super(SimpleOption, self).__set__(instance, gconf_value)
github gmate / gmate / plugins / gedit2 / completion / lib / sgconf / __init__.py View on Github external
def __set__(self, instance, value):
        gconf_value = gconf.Value(self.gconf_type)
        self.setter(gconf_value, value)
        super(SimpleOption, self).__set__(instance, gconf_value)
github gmate / gmate / plugins / gedit2 / completion / lib / sgconf / __init__.py View on Github external
def __set__(self, instance, value):
        assert hasattr(value, '__iter__'), 'value of ListOption must be iterable'
        gvalues = [gconf.Value(self.list_type) for i in range(len(value))]
        for g, v in map(None, gvalues, value):
            getattr(g, 'set_%s' % self.list_type.value_nick)(v)
        gconf_value = gconf.Value(self.gconf_type)
        gconf_value.set_list_type(self.list_type)
        self.setter(gconf_value, gvalues)
        Option.__set__(self, instance, gconf_value)