diff options
author | Rui Matos <tiagomatos@gmail.com> | 2014-08-28 19:16:05 +0200 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2014-10-21 15:19:12 +0200 |
commit | 4999cfd5fb9ff3bedef2c6bafc0b34832a94b029 (patch) | |
tree | 973137809c4b5722280f3465fde6691235073af3 | |
parent | 917123ec0ce802c474a17cdb268986fdd8593d0c (diff) | |
download | gnome-desktop-4999cfd5fb9ff3bedef2c6bafc0b34832a94b029.tar.gz |
gnome-xkb-info: Fix adding layouts to language and country tables
Layout->xkb_name isn't unique so we can't use it as a key in the hash
table. Layout->id is the unique identifier that we should be using,
otherwise some layouts would never get added.
https://bugzilla.gnome.org/show_bug.cgi?id=729210
-rw-r--r-- | libgnome-desktop/gnome-xkb-info.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c index eec1224e..0cd089f0 100644 --- a/libgnome-desktop/gnome-xkb-info.c +++ b/libgnome-desktop/gnome-xkb-info.c @@ -367,7 +367,7 @@ add_layout_to_table (GHashTable *table, { GHashTable *set; - if (!layout->xkb_name) + if (!layout->id) return; set = g_hash_table_lookup (table, key); @@ -378,10 +378,10 @@ add_layout_to_table (GHashTable *table, } else { - if (g_hash_table_contains (set, layout->xkb_name)) + if (g_hash_table_contains (set, layout->id)) return; } - g_hash_table_replace (set, layout->xkb_name, layout); + g_hash_table_replace (set, layout->id, layout); } static void |