[mutter] prefs: connect to changed:: before reading the value of a setting
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] prefs: connect to changed:: before reading the value of a setting
- Date: Fri, 27 Mar 2015 20:15:49 +0000 (UTC)
commit a13f906ed1ace490dc086b79c0eabd340e704f37
Author: Giovanni Campagna <scampa giovanni gmail com>
Date: Fri Mar 20 12:49:45 2015 -0700
prefs: connect to changed:: before reading the value of a setting
Otherwise glib might skip registering to change notifications
https://bugzilla.gnome.org/show_bug.cgi?id=746509
src/core/prefs.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 183aa11..43828fc 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -2113,12 +2113,6 @@ meta_prefs_add_keybinding (const char *name,
pref->combos = NULL;
pref->builtin = (flags & META_KEY_BINDING_BUILTIN) != 0;
- strokes = g_settings_get_strv (settings, name);
- update_binding (pref, strokes);
- g_strfreev (strokes);
-
- g_hash_table_insert (key_bindings, g_strdup (name), pref);
-
if (pref->builtin)
{
if (g_object_get_data (G_OBJECT (settings), "changed-signal") == NULL)
@@ -2140,6 +2134,12 @@ meta_prefs_add_keybinding (const char *name,
queue_changed (META_PREF_KEYBINDINGS);
}
+ strokes = g_settings_get_strv (settings, name);
+ update_binding (pref, strokes);
+ g_strfreev (strokes);
+
+ g_hash_table_insert (key_bindings, g_strdup (name), pref);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]