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.
This commit is contained in:
Rob Adams 2004-04-30 00:26:48 +00:00 committed by Rob Adams
parent 4fda4ed806
commit 0ceb317ac6
2 changed files with 20 additions and 0 deletions

View File

@ -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.

View File

@ -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);