[gnome-desktop] gnome-xkb-info: Fix adding layouts to language and country tables
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] gnome-xkb-info: Fix adding layouts to language and country tables
- Date: Fri, 29 Aug 2014 15:04:37 +0000 (UTC)
commit b18bd36bb7bfaf6cd2fabcabb22025d15574e756
Author: Rui Matos <tiagomatos gmail com>
Date: Thu Aug 28 19:16:05 2014 +0200
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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c
index 1f20d52..1d10939 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]