]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkimmodule.c
separator: Don't use padding and borders wrongly
[~andy/gtk] / gtk / gtkimmodule.c
index 0f45847c61110eb4886338c2ffb21117753f2017..e6372f2edb6763b233b81164d2618e952e98033a 100644 (file)
@@ -646,12 +646,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,
+                                               (gpointer *) &context_id, NULL);
+         if (found)
+           return context_id;
+       }
       immodules_list++;
     }