[libgda] Better handle overwriting selection in GdauiEntry widget



commit c5147ef17dd574ddafc92ee13f9723facc93f395
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Dec 15 20:43:58 2009 +0100

    Better handle overwriting selection in GdauiEntry widget

 libgda-ui/data-entries/gdaui-entry.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libgda-ui/data-entries/gdaui-entry.c b/libgda-ui/data-entries/gdaui-entry.c
index 5eb87fd..c0fdaec 100644
--- a/libgda-ui/data-entries/gdaui-entry.c
+++ b/libgda-ui/data-entries/gdaui-entry.c
@@ -585,6 +585,10 @@ insert_text_cb (GtkEditable *editable, const gchar *text, gint text_length, gint
 	gint clen;
 	GdauiEntry *entry = GDAUI_ENTRY (editable);
 	gint text_clen;
+	gint start;
+
+	if (gtk_editable_get_selection_bounds (editable, &start, NULL))
+		*position = start;
 
 	signal_handlers_block (entry);
 



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