keybindings: Small code cleanup

Reuse the name we just set to insert in the hash table, that avoids
duplicating the string.

Suggested-by: Carlos Garnacho <carlosg@gnome.org>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/453
This commit is contained in:
Olivier Fourdan
2019-05-16 10:58:27 +02:00
committed by Carlos Garnacho
parent 851b7d0639
commit c53aa89098
2 changed files with 6 additions and 6 deletions

View File

@ -1728,7 +1728,7 @@ init_bindings (void)
pref->combos = g_slist_prepend (pref->combos, &overlay_key_combo);
pref->builtin = 1;
g_hash_table_insert (key_bindings, g_strdup ("overlay-key"), pref);
g_hash_table_insert (key_bindings, g_strdup (pref->name), pref);
pref = g_new0 (MetaKeyPref, 1);
pref->name = g_strdup ("locate-pointer-key");
@ -1736,7 +1736,7 @@ init_bindings (void)
pref->combos = g_slist_prepend (pref->combos, &locate_pointer_key_combo);
pref->builtin = 1;
g_hash_table_insert (key_bindings, g_strdup ("locate-pointer-key"), pref);
g_hash_table_insert (key_bindings, g_strdup (pref->name), pref);
}
static gboolean