[gnumeric] Work around GTK bug #601922.



commit 97517b1181098c46abba639a729d2d67c1e4924f
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Nov 14 15:38:00 2009 -0700

    Work around GTK bug #601922.
    
    2009-11-14  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (gee_rangesel_update_text): work around gtk
    	  bug #601922
    
    2009-11-14  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* configure.in: check for gtk_entry_get_buffer (We need to use it to
    	  work around a gtk bug that only occurs when this is in fact
    	  available.)

 ChangeLog                         |    6 ++++++
 NEWS                              |    1 +
 configure.in                      |    2 +-
 src/widgets/ChangeLog             |    5 +++++
 src/widgets/gnumeric-expr-entry.c |    6 ++++++
 5 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 46069b3..012a264 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-11-14  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* configure.in: check for gtk_entry_get_buffer (We need to use it to
+	  work around a gtk bug that only occurs when this is in fact 
+	  available.)
+
+2009-11-14  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/sheet.h (gnm_sheet_get_sort_setups): new
 	(gnm_sheet_add_sort_setup): new
 	(gnm_sheet_find_sort_setup): new
diff --git a/NEWS b/NEWS
index f083a34..00d3f3d 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
 	* Sort the translated labels in the preference dialog.
 	* Turn view properties dialog into instant-apply dialog.
 	* Temporarily remember the sort setups. [#100541]
+	* Work around GTK bug #601922.
 
 Jean:
 	* Fix cursor and cell edition on dark backgrounds. [#600656]
diff --git a/configure.in b/configure.in
index c06b34f..b9ac188 100644
--- a/configure.in
+++ b/configure.in
@@ -670,7 +670,7 @@ LIBS="$GNUMERIC_LIBS $LIBS"
 
 AC_CHECK_FUNCS(g_date_set_time_t g_slice_alloc g_option_context_set_delocalize)
 AC_CHECK_FUNCS(pango_font_map_create_context)
-AC_CHECK_FUNCS(gtk_recent_manager_get_default gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area)
+AC_CHECK_FUNCS(gtk_recent_manager_get_default gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer)
 AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules)
 
 AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 70537f8..ea2a672 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-14  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* gnumeric-expr-entry.c (gee_rangesel_update_text): work around gtk 
+	  bug #601922
+
 2009-11-12  Morten Welinder  <terra gnome org>
 
 	* gnumeric-expr-entry.c (gnm_expr_entry_parse_as_value): If new
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 959a143..cb02d40 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -1045,6 +1045,12 @@ gee_rangesel_update_text (GnmExprEntry *gee)
 	if (text != NULL) {
 		/* Set the cursor at the end.  It looks nicer */
 		len = strlen (text);
+
+#ifdef HAVE_GTK_ENTRY_GET_BUFFER
+		/* We need to work around gtk bug #601922 */
+		gtk_entry_get_buffer (GTK_ENTRY (gee->entry));
+#endif
+
 		gtk_editable_insert_text (editable, text, len, &rs->text_end);
 		gtk_editable_set_position (editable, rs->text_end);
 		g_free (text);



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