[gtk+/gtk-2-24] immodule: Fix context ID lookup on module with	multiple contexts
- From: Changwoo Ryu <cwryu src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+/gtk-2-24] immodule: Fix context ID lookup on module with	multiple contexts
- Date: Mon,  4 Mar 2013 04:11:23 +0000 (UTC)
commit b01f90b8d19b3de8bded46362e12853610a4afb7
Author: Changwoo Ryu <cwryu debian org>
Date:   Wed Feb 13 02:44:00 2013 +0000
    immodule: Fix context ID lookup on module with multiple contexts
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690247
 gtk/gtkimmodule.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index f7baa03..d29162d 100644
--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -658,12 +658,14 @@ lookup_immodule (gchar **immodules_list)
       if (g_strcmp0 (*immodules_list, SIMPLE_ID) == 0)
         return SIMPLE_ID;
       else
-       {
-         GtkIMModule *module;
-         module = g_hash_table_lookup (contexts_hash, *immodules_list);
-         if (module)
-           return module->contexts[0]->context_id;
-       }
+       {
+         gboolean found;
+         gchar *context_id;
+         found = g_hash_table_lookup_extended (contexts_hash, *immodules_list,
+                                               &context_id, NULL);
+         if (found)
+           return context_id;
+       }
       immodules_list++;
     }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]