gtk+ r19801 - trunk/gtk



Author: federico
Date: Thu Mar 13 00:27:16 2008
New Revision: 19801
URL: http://svn.gnome.org/viewvc/gtk+?rev=19801&view=rev

Log:
Move the cursor to the end only if we highlight the completed match

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:27:16 2008
@@ -536,6 +536,8 @@
 					  chooser_entry->file_part_pos + common_prefix_len);
 	      chooser_entry->has_completion = TRUE;
 	    }
+	  else
+	    gtk_editable_set_position (GTK_EDITABLE (chooser_entry), GTK_ENTRY (chooser_entry)->text_length);
 	}
 
       g_free (common_prefix);
@@ -786,8 +788,6 @@
       if (!chooser_entry->has_completion)
 	append_common_prefix (chooser_entry, FALSE);
 
-      gtk_editable_set_position (editable, entry->text_length);
-
       /* Trigger the completion window to pop up again by a 
        * zero-length insertion, a bit of a hack.
        */



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