[gtk+/refactor: 5/7] Add _gtk_entry_get_im_context() internal accessor



commit 8c941d2b4e2566611160b46623a6d81178804f30
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Oct 21 14:06:47 2010 +0200

    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 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 29281f0..603e6a9 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 baf0b9f..63a5cd0 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 f45c0a1..45d0625 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]