]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkimmodule.c
a11y: Emit text-changed signals directly
[~andy/gtk] / gtk / gtkimmodule.c
index de03fda507915197df0d543748b25be6fda5f8ec..e6372f2edb6763b233b81164d2618e952e98033a 100644 (file)
@@ -12,8 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.Free
  */
 
 /*
 
 #include <glib/gstdio.h>
 #include <gmodule.h>
-#include "gtkimmodule.h"
+#include "gtkimmoduleprivate.h"
 #include "gtkimcontextsimple.h"
 #include "gtksettings.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
+#undef GDK_DEPRECATED
+#undef GDK_DEPRECATED_FOR
+#define GDK_DEPRECATED
+#define GDK_DEPRECATED_FOR(f)
+
 #include "deprecated/gtkrc.h"
 
 #define SIMPLE_ID "gtk-im-context-simple"
@@ -642,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++;
     }