From a13f906ed1ace490dc086b79c0eabd340e704f37 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Fri, 20 Mar 2015 12:49:45 -0700 Subject: [PATCH] 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 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/prefs.c b/src/core/prefs.c index 183aa11fb..43828fca4 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; }