From 4999cfd5fb9ff3bedef2c6bafc0b34832a94b029 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 28 Aug 2014 19:16:05 +0200 Subject: 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 --- libgnome-desktop/gnome-xkb-info.c | 6 +++--- 1 file 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 -- cgit v1.2.1