mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 11:00:54 -05:00
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:
parent
4fda4ed806
commit
0ceb317ac6
@ -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.
|
||||
|
14
src/prefs.c
14
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);
|
||||
|
Loading…
Reference in New Issue
Block a user