gtk+ r19828 - trunk/gtk
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19828 - trunk/gtk
- Date: Thu, 13 Mar 2008 00:38:32 +0000 (GMT)
Author: federico
Date: Thu Mar 13 00:38:31 2008
New Revision: 19828
URL: http://svn.gnome.org/viewvc/gtk+?rev=19828&view=rev
Log:
Clear pending completions thoroughly
Signed-off-by: Federico Mena Quintero <federico gnu org>
Modified:
trunk/gtk/gtkfilechooserentry.c
Modified: trunk/gtk/gtkfilechooserentry.c
==============================================================================
--- trunk/gtk/gtkfilechooserentry.c (original)
+++ trunk/gtk/gtkfilechooserentry.c Thu Mar 13 00:38:31 2008
@@ -595,6 +595,13 @@
}
static void
+clear_completions (GtkFileChooserEntry *chooser_entry)
+{
+ chooser_entry->has_completion = FALSE;
+ chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+}
+
+static void
gtk_file_chooser_entry_do_delete_text (GtkEditable *editable,
gint start_pos,
gint end_pos)
@@ -606,7 +613,7 @@
if (chooser_entry->in_change)
return;
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+ clear_completions (chooser_entry);
}
static void
@@ -620,7 +627,7 @@
if (chooser_entry->in_change)
return;
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+ clear_completions (chooser_entry);
}
static void
@@ -635,7 +642,7 @@
if (chooser_entry->in_change)
return;
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+ clear_completions (chooser_entry);
}
static void
@@ -680,10 +687,13 @@
if (chooser_entry->has_completion)
{
+ gboolean has_selection;
gint sel_end;
- if (gtk_editable_get_selection_bounds (editable, NULL, &sel_end))
- gtk_editable_set_position (editable, sel_end);
+ has_selection = gtk_editable_get_selection_bounds (editable, NULL, &sel_end);
+ g_assert (has_selection && sel_end == GTK_ENTRY (entry)->text_length);
+
+ gtk_editable_set_position (editable, sel_end);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]