summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-08-19 22:07:34 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-08-19 22:07:34 +0800
commit02ec89ba607ba23ea2010eb10965c63c6c0c0e14 (patch)
tree03d79f474a149d47a2641ddef5ccd1256e42844c
parent5db1208c8944053ae5a14eaf37cc10a4f203c6c4 (diff)
parentc68304abd9e44cd3c35341931f8fdb605172d84e (diff)
downloadcompizconfig-backend-gconf-02ec89ba607ba23ea2010eb10965c63c6c0c0e14.tar.gz
compizconfig-backend-gconf-02ec89ba607ba23ea2010eb10965c63c6c0c0e14.tar.bz2
Merge lp:~compiz-team/compiz-compizconfig-gconf/compiz-compizconfig-gconf.fix_802373
-rw-r--r--src/gconf.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/gconf.c b/src/gconf.c
index 5a4e635..fc3f003 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -98,6 +98,7 @@ typedef enum {
OptionInt,
OptionBool,
OptionKey,
+ OptionBell,
OptionString,
OptionSpecial,
} SpecialOptionType;
@@ -167,7 +168,7 @@ const SpecialOption specialOptions[] = {
METACITY "/general/resize_with_right_button", OptionSpecial},
{"visual_bell", "fade", TRUE,
- METACITY "/general/visual_bell", OptionBool},
+ METACITY "/general/visual_bell", OptionBell},
{"fullscreen_visual_bell", "fade", TRUE,
METACITY "/general/visual_bell_type", OptionSpecial},
@@ -995,6 +996,16 @@ readIntegratedOption (CCSContext *context,
ret = TRUE;
}
break;
+ case OptionBell:
+ if (gconfValue->type == GCONF_VALUE_BOOL)
+ {
+ gboolean value;
+
+ value = gconf_value_get_bool (gconfValue);
+ ccsSetBell (setting, value ? TRUE : FALSE);
+ ret = TRUE;
+ }
+ break;
case OptionString:
if (gconfValue->type == GCONF_VALUE_STRING)
{
@@ -1512,6 +1523,20 @@ writeIntegratedOption (CCSContext *context,
newValue, NULL);
}
break;
+ case OptionBell:
+ {
+ Bool newValue;
+ gboolean currentValue;
+ if (!ccsGetBell (setting, &newValue))
+ break;
+ currentValue = gconf_client_get_bool (client, optionName, &err);
+
+ if (!err && ((currentValue && !newValue) ||
+ (!currentValue && newValue)))
+ gconf_client_set_bool (client, specialOptions[index].gnomeName,
+ newValue, NULL);
+ }
+ break;
case OptionString:
{
char *newValue;