diff options
author | Rob Adams <readams@readams.net> | 2004-04-30 00:26:48 +0000 |
---|---|---|
committer | Rob Adams <readams@src.gnome.org> | 2004-04-30 00:26:48 +0000 |
commit | 0ceb317ac649643983e920b71713be9c14765072 (patch) | |
tree | bdb03a87e14a3e1e9810386a62f9391aa5b5eed3 | |
parent | 4fda4ed80642fa1836a1c8033590e9749e373f16 (diff) | |
download | metacity-0ceb317ac649643983e920b71713be9c14765072.tar.gz |
Add a value type check for the visual bell/audible bell gconf settings.
2004-04-29 Rob Adams <readams@readams.net>
* src/prefs.c (change_notify): Add a value type check for the
visual bell/audible bell gconf settings. Patch from Jarrod
Johnson for #141409.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/prefs.c | 14 |
2 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2004-04-29 Rob Adams <readams@readams.net> + + * src/prefs.c (change_notify): Add a value type check for the + visual bell/audible bell gconf settings. Patch from Jarrod + Johnson for #141409. + 2004-04-19 Mark McLoughlin <mark@skynet.ie> Syncing across this change from libwnck. diff --git a/src/prefs.c b/src/prefs.c index 81af51e3..1166f51b 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -715,6 +715,13 @@ change_notify (GConfClient *client, { gboolean b; + if (value && value->type != GCONF_VALUE_BOOL) + { + meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), + key); + goto out; + } + b = value ? gconf_value_get_bool (value) : provide_visual_bell; if (update_visual_bell (b, bell_is_audible)) queue_changed (META_PREF_VISUAL_BELL); @@ -723,6 +730,13 @@ change_notify (GConfClient *client, { gboolean b; + if (value && value->type != GCONF_VALUE_BOOL) + { + meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), + key); + goto out; + } + b = value ? gconf_value_get_bool (value) : bell_is_audible; if (update_visual_bell (provide_visual_bell, b)) queue_changed (META_PREF_AUDIBLE_BELL); |