From 8c941d2b4e2566611160b46623a6d81178804f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Thu, 21 Oct 2010 14:06:47 +0200 Subject: [PATCH] Add _gtk_entry_get_im_context() internal accessor It's needed by gtktreeview --- gtk/gtkentry.c | 5 +++++ gtk/gtkentryprivate.h | 1 + gtk/gtktreeview.c | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 29281f0348..603e6a922f 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -5840,6 +5840,11 @@ gtk_entry_im_context_filter_keypress (GtkEntry *entry, return gtk_im_context_filter_keypress (entry->im_context, event); } +GtkIMContext* +_gtk_entry_get_im_context (GtkEntry *entry) +{ + return entry->im_context; +} static gint gtk_entry_find_position (GtkEntry *entry, diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h index baf0b9fe1f..63a5cd02c2 100644 --- a/gtk/gtkentryprivate.h +++ b/gtk/gtkentryprivate.h @@ -84,6 +84,7 @@ void _gtk_entry_get_borders (GtkEntry *entry, void _gtk_entry_effective_inner_border (GtkEntry *entry, GtkBorder *border); void _gtk_entry_reset_im_context (GtkEntry *entry); +GtkIMContext* _gtk_entry_get_im_context (GtkEntry *entry); G_END_DECLS #endif /* __GTK_ENTRY_PRIVATE_H__ */ diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index f45c0a18d7..45d0625a02 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -47,6 +47,7 @@ #include "gtkscrollable.h" #include "gtkprivate.h" #include "gtkwidgetprivate.h" +#include "gtkentryprivate.h" /** @@ -10467,10 +10468,12 @@ gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view) g_signal_connect (tree_view->priv->search_entry, "activate", G_CALLBACK (gtk_tree_view_search_activate), tree_view); - g_signal_connect (GTK_ENTRY (tree_view->priv->search_entry)->im_context, + + g_signal_connect (_gtk_entry_get_im_context (GTK_ENTRY (tree_view->priv->search_entry)), "preedit-changed", G_CALLBACK (gtk_tree_view_search_preedit_changed), tree_view); + gtk_container_add (GTK_CONTAINER (vbox), tree_view->priv->search_entry);