[mutter/wayland] keybindings: Rename MetaKeyPref.bindings to MetaKeyPref.combos



commit 46cbd0bf4897bd53819b4a01256a44a3ea500a7b
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Feb 25 19:49:16 2014 +0100

    keybindings: Rename MetaKeyPref.bindings to MetaKeyPref.combos
    
    Let's call it what it really is, otherwise it's just confusing since
    MetaKeyBinding also exists.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725588

 src/core/keybindings-private.h |    2 +-
 src/core/keybindings.c         |    4 ++--
 src/core/prefs.c               |   22 +++++++++++-----------
 3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/core/keybindings-private.h b/src/core/keybindings-private.h
index 491d41e..15c1700 100644
--- a/src/core/keybindings-private.h
+++ b/src/core/keybindings-private.h
@@ -78,7 +78,7 @@ typedef struct
    * this keypref. If one has keysym==modifiers==0, it is
    * ignored.
    */
-  GSList *bindings;
+  GSList *combos;
 
   /* for keybindings that can have shift or not like Alt+Tab */
   gboolean      add_shift:1;
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index adfa2c6..8caa02c 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -531,7 +531,7 @@ count_bindings (GList *prefs)
   while (p)
     {
       MetaKeyPref *pref = (MetaKeyPref*)p->data;
-      GSList *tmp = pref->bindings;
+      GSList *tmp = pref->combos;
 
       while (tmp)
         {
@@ -575,7 +575,7 @@ rebuild_binding_table (MetaDisplay     *display,
   while (p)
     {
       MetaKeyPref *pref = (MetaKeyPref*)p->data;
-      GSList *tmp = pref->bindings;
+      GSList *tmp = pref->combos;
 
       while (tmp)
         {
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 85ecb0c..a2d01de 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -1856,7 +1856,7 @@ init_bindings (void)
   pref = g_new0 (MetaKeyPref, 1);
   pref->name = g_strdup ("overlay-key");
   pref->action = META_KEYBINDING_ACTION_OVERLAY_KEY;
-  pref->bindings = g_slist_prepend (pref->bindings, &overlay_key_combo);
+  pref->combos = g_slist_prepend (pref->combos, &overlay_key_combo);
   pref->builtin = 1;
 
   g_hash_table_insert (key_bindings, g_strdup ("overlay-key"), pref);
@@ -1866,7 +1866,7 @@ static gboolean
 update_binding (MetaKeyPref *binding,
                 gchar      **strokes)
 {
-  GSList *old_bindings, *a, *b;
+  GSList *old_combos, *a, *b;
   gboolean changed;
   unsigned int keysym;
   unsigned int keycode;
@@ -1878,8 +1878,8 @@ update_binding (MetaKeyPref *binding,
               "Binding \"%s\" has new GSettings value\n",
               binding->name);
 
-  old_bindings = binding->bindings;
-  binding->bindings = NULL;
+  old_combos = binding->combos;
+  binding->combos = NULL;
 
   for (i = 0; strokes && strokes[i]; i++)
     {
@@ -1920,17 +1920,17 @@ update_binding (MetaKeyPref *binding,
       combo->keysym = keysym;
       combo->keycode = keycode;
       combo->modifiers = mods;
-      binding->bindings = g_slist_prepend (binding->bindings, combo);
+      binding->combos = g_slist_prepend (binding->combos, combo);
 
       meta_topic (META_DEBUG_KEYBINDINGS,
                       "New keybinding for \"%s\" is keysym = 0x%x keycode = 0x%x mods = 0x%x\n",
                       binding->name, keysym, keycode, mods);
     }
 
-  binding->bindings = g_slist_reverse (binding->bindings);
+  binding->combos = g_slist_reverse (binding->combos);
 
-  a = old_bindings;
-  b = binding->bindings;
+  a = old_combos;
+  b = binding->combos;
   while (TRUE)
     {
       if ((!a && b) || (a && !b))
@@ -1955,7 +1955,7 @@ update_binding (MetaKeyPref *binding,
         }
     }
 
-  g_slist_free_full (old_bindings, g_free);
+  g_slist_free_full (old_combos, g_free);
 
   return changed;
 }
@@ -2090,7 +2090,7 @@ meta_prefs_add_keybinding (const char           *name,
   pref->name = g_strdup (name);
   pref->settings = g_object_ref (settings);
   pref->action = action;
-  pref->bindings = NULL;
+  pref->combos = NULL;
   pref->add_shift = (flags & META_KEY_BINDING_REVERSES) != 0;
   pref->per_window = (flags & META_KEY_BINDING_PER_WINDOW) != 0;
   pref->builtin = (flags & META_KEY_BINDING_BUILTIN) != 0;
@@ -2254,7 +2254,7 @@ meta_prefs_get_window_binding (const char          *name,
 
   if (pref->per_window)
     {
-      GSList *s = pref->bindings;
+      GSList *s = pref->combos;
 
       while (s)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]