]> Pileus Git - ~andy/gtk/commitdiff
106574 - Inconsistent increment behavior for gtkspinbutton
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 27 May 2008 22:50:49 +0000 (22:50 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 27 May 2008 22:50:49 +0000 (22:50 +0000)
        * gtk/gtkspinbutton.c (gtk_spin_button_real_value_change):
        Commit the entry text before doing an increment. Patch by
        Björn Lindqvist.

svn path=/trunk/; revision=20196

ChangeLog
gtk/gtkspinbutton.c

index 021336e0cdaadd792d72cbbc3adbef6bcc812b07..55032e0fa1e6e94331686c45addf031aa28b615f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-27  Matthias Clasen  <mclasen@redhat.com>
+
+       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.
+
 2008-05-27  Federico Mena Quintero  <federico@novell.com>
 
        http://bugzilla.gnome.org/show_bug.cgi?id=533891 - Don't allow
index 2218e1e1f0aa3b34999659468883b399b89ad839..a9eca0d3ec6ac8695f73a61a978e2591f801341b 100644 (file)
@@ -1266,7 +1266,15 @@ static void
 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