summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserentry.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-03-29 18:58:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-03-29 18:59:07 -0400
commitd51840ccf31a4c0c8ecea293a20e8344b8cd2338 (patch)
tree66927ae887172ce6112504e721adbc2e5385b0f8 /gtk/gtkfilechooserentry.c
parent71a82b1e987f18bec3b231304623bf8f8d9587ae (diff)
downloadgtk+-d51840ccf31a4c0c8ecea293a20e8344b8cd2338.tar.gz
filechooser: Fix entry completion
Inserting the selected completion did not actually work. Oops. https://bugzilla.gnome.org/show_bug.cgi?id=673090
Diffstat (limited to 'gtk/gtkfilechooserentry.c')
-rw-r--r--gtk/gtkfilechooserentry.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 720eb1e533..98ecd24c71 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -233,23 +233,25 @@ gtk_file_chooser_entry_dispose (GObject *object)
/* Match functions for the GtkEntryCompletion */
static gboolean
match_selected_callback (GtkEntryCompletion *completion,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- GtkFileChooserEntry *chooser_entry)
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkFileChooserEntry *chooser_entry)
{
char *path;
-
+ gint pos;
+
gtk_tree_model_get (model, iter,
- FULL_PATH_COLUMN, &path,
+ FULL_PATH_COLUMN, &path,
-1);
gtk_editable_delete_text (GTK_EDITABLE (chooser_entry),
- 0,
+ 0,
gtk_editable_get_position (GTK_EDITABLE (chooser_entry)));
+ pos = 0;
gtk_editable_insert_text (GTK_EDITABLE (chooser_entry),
- path,
- 0,
- NULL);
+ path,
+ -1,
+ &pos);
g_free (path);