gtk+ r20284 - in branches/gtk-2-12: . gtk



Author: matthiasc
Date: Mon Jun  2 22:07:23 2008
New Revision: 20284
URL: http://svn.gnome.org/viewvc/gtk+?rev=20284&view=rev

Log:
        Bug 106574 - Inconsistent increment behavior for gtkspinbutton

        * gtk/gtkspinbutton.c (gtk_spin_button_real_value_change):
        Commit the entry text before doing an increment. Patch by
        BjÃrn Lindqvist.



Modified:
   branches/gtk-2-12/ChangeLog
   branches/gtk-2-12/gtk/gtkspinbutton.c

Modified: branches/gtk-2-12/gtk/gtkspinbutton.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkspinbutton.c	(original)
+++ branches/gtk-2-12/gtk/gtkspinbutton.c	Mon Jun  2 22:07:23 2008
@@ -1255,7 +1255,15 @@
 gtk_spin_button_real_change_value (GtkSpinButton *spin,
 				   GtkScrollType  scroll)
 {
-  gdouble old_value = spin->adjustment->value;
+  gdouble old_value;
+
+  /* When the key binding is activated, there may be an outstanding
+   * value, so we first have to commit what is currently written in
+   * the spin buttons text entry. See #106574
+   */
+  gtk_spin_button_update (spin);
+
+  old_value = spin->adjustment->value;
 
   /* We don't test whether the entry is editable, since
    * this key binding conceptually corresponds to changing



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