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
This commit is contained in:
Rui Matos 2014-02-25 19:49:16 +01:00
parent 91389c89a1
commit 2b3fc741fb
3 changed files with 14 additions and 14 deletions

View File

@ -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;

View File

@ -533,7 +533,7 @@ count_bindings (GList *prefs)
while (p)
{
MetaKeyPref *pref = (MetaKeyPref*)p->data;
GSList *tmp = pref->bindings;
GSList *tmp = pref->combos;
while (tmp)
{
@ -577,7 +577,7 @@ rebuild_binding_table (MetaDisplay *display,
while (p)
{
MetaKeyPref *pref = (MetaKeyPref*)p->data;
GSList *tmp = pref->bindings;
GSList *tmp = pref->combos;
while (tmp)
{

View File

@ -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)
{