summaryrefslogtreecommitdiff
path: root/libgnome-desktop
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2014-08-28 19:16:05 +0200
committerRui Matos <tiagomatos@gmail.com>2014-08-28 19:39:01 +0200
commitb18bd36bb7bfaf6cd2fabcabb22025d15574e756 (patch)
treec96baeb0c90f56fd572daf1af46527b039c2378d /libgnome-desktop
parent004e897e391f1776fa3a010730ee733108e02c88 (diff)
downloadgnome-desktop-b18bd36bb7bfaf6cd2fabcabb22025d15574e756.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
Diffstat (limited to 'libgnome-desktop')
-rw-r--r--libgnome-desktop/gnome-xkb-info.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c
index 1f20d52c..1d10939d 100644
--- a/libgnome-desktop/gnome-xkb-info.c
+++ b/libgnome-desktop/gnome-xkb-info.c
@@ -287,7 +287,7 @@ add_layout_to_table (GHashTable *table,
{
GHashTable *set;
- if (!layout->xkb_name)
+ if (!layout->id)
return;
set = g_hash_table_lookup (table, key);
@@ -298,10 +298,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