]> Pileus Git - ~andy/gtk/commitdiff
gtkspinbutton: Use symbolic names for button numbers
authorCarlos Garcia Campos <cgarcia@igalia.com>
Wed, 25 Jan 2012 17:53:56 +0000 (18:53 +0100)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 27 Jan 2012 08:47:44 +0000 (09:47 +0100)
gtk/gtkspinbutton.c

index b2af839d233961f513a265ff8d5443c5284373a3..d4ad324f44f17c0964ab979b6f0a1f89ace76daa 100644 (file)
@@ -1355,9 +1355,9 @@ gtk_spin_button_button_press (GtkWidget      *widget,
           if (gtk_editable_get_editable (GTK_EDITABLE (widget))) {
             gtk_spin_button_update (spin);
 
-            if (event->button == 1)
+            if (event->button == GDK_BUTTON_PRIMARY)
               start_spinning (spin, event->window, gtk_adjustment_get_step_increment (priv->adjustment));
-            else if (event->button == 2)
+            else if (event->button == GDK_BUTTON_MIDDLE)
               start_spinning (spin, event->window, gtk_adjustment_get_page_increment (priv->adjustment));
             else
               priv->click_child = event->window;
@@ -1385,7 +1385,7 @@ gtk_spin_button_button_release (GtkWidget      *widget,
 
       gtk_spin_button_stop_spinning (spin);
 
-      if (event->button == 3)
+      if (event->button == GDK_BUTTON_SECONDARY)
         {
           gdouble diff;