mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
If KEY_AUTO_RAISE_DELAY is undefined or non-integer, it is not treated as
2007-08-06 Thomas Thurman <thomas@thurman.org.uk> If KEY_AUTO_RAISE_DELAY is undefined or non-integer, it is not treated as zero. * src/prefs.c (meta_prefs_init): check type of key, and behave sensibly if it's unexpected. * src/prefs.c (find_and_update_list_binding): remove old comment. svn path=/trunk/; revision=3287
This commit is contained in:
parent
952e883456
commit
1a6c98c79b
@ -1,3 +1,12 @@
|
||||
2007-08-06 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
If KEY_AUTO_RAISE_DELAY is undefined or non-integer, it is not treated
|
||||
as zero.
|
||||
|
||||
* src/prefs.c (meta_prefs_init): check type of key, and behave sensibly
|
||||
if it's unexpected.
|
||||
* src/prefs.c (find_and_update_list_binding): remove old comment.
|
||||
|
||||
2007-08-03 Frederic Crozat <fcrozat@mandriva.com>
|
||||
|
||||
* src/delete.c: Fix mangled window title in "Force Quit"
|
||||
|
20
src/prefs.c
20
src/prefs.c
@ -364,6 +364,7 @@ meta_prefs_init (void)
|
||||
GError *err = NULL;
|
||||
char *str_val;
|
||||
int int_val;
|
||||
GConfValue *gconf_val;
|
||||
gboolean bool_val, bool_val_2;
|
||||
gboolean update_visual;
|
||||
gboolean update_audible;
|
||||
@ -422,16 +423,18 @@ meta_prefs_init (void)
|
||||
if (get_bool (KEY_AUTO_RAISE, &bool_val))
|
||||
update_auto_raise (bool_val);
|
||||
|
||||
/* FIXME: Since auto_raise_delay of 0 is valid and gconf_client_get_int
|
||||
* silently returns that value when KEY_AUTO_RAISE_DELAY doesn't exist,
|
||||
* we should be using gconf_client_get() instead if we cared about
|
||||
* careful error checking of the key-doesn't-exist case. Since this
|
||||
* setting is crap, though, I'm adding a FIXME instead of fixing it. ;-)
|
||||
*/
|
||||
int_val = gconf_client_get_int (default_client, KEY_AUTO_RAISE_DELAY,
|
||||
gconf_val = gconf_client_get (default_client, KEY_AUTO_RAISE_DELAY,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_auto_raise_delay (int_val);
|
||||
if (gconf_val)
|
||||
{
|
||||
if (gconf_val->type == GCONF_VALUE_INT)
|
||||
update_auto_raise_delay (gconf_value_get_int (gconf_val));
|
||||
else
|
||||
meta_warning(_("Type of %s was not integer"), KEY_AUTO_RAISE_DELAY);
|
||||
|
||||
gconf_value_free (gconf_val);
|
||||
}
|
||||
|
||||
|
||||
str_val = gconf_client_get_string (default_client, KEY_THEME,
|
||||
@ -2549,7 +2552,6 @@ find_and_update_list_binding (MetaKeyPref *bindings,
|
||||
|
||||
name_without_suffix[strlen(name_without_suffix) - strlen(KEY_LIST_BINDINGS_SUFFIX)] = 0;
|
||||
|
||||
/* FIXME factor out dupld code */
|
||||
if (*name_without_suffix == '/')
|
||||
key = relative_key (name_without_suffix);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user