[gtk+/gtk-2-24] Make GtkEntryCompletion::match-selected arguments consistent



commit 4eeef28b4ff1031d7538e6f22916c80f8af79df6
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 31 10:48:40 2011 -0500

    Make GtkEntryCompletion::match-selected arguments consistent
    
    For keynav, we were still passing it the filter model.
    https://bugzilla.gnome.org/show_bug.cgi?id=640698

 gtk/gtkentry.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 8b3aadc..a121781 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -9544,6 +9544,8 @@ keypress_completion_out:
     {
       GtkTreeIter iter;
       GtkTreeModel *model = NULL;
+      GtkTreeModel *child_model;
+      GtkTreeIter child_iter;
       GtkTreeSelection *sel;
       gboolean retval = TRUE;
 
@@ -9557,9 +9559,11 @@ keypress_completion_out:
           sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view));
           if (gtk_tree_selection_get_selected (sel, &model, &iter))
             {
+              gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model), &child_iter, 
&iter);
+              child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
               g_signal_handler_block (widget, completion->priv->changed_id);
               g_signal_emit_by_name (completion, "match-selected",
-                                     model, &iter, &entry_set);
+                                     child_model, &child_iter, &entry_set);
               g_signal_handler_unblock (widget, completion->priv->changed_id);
 
               if (!entry_set)


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