From 2dbfa884596aac0e9b336e4b3fd1f896a241e5dd Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Wed, 25 Jan 2012 18:21:50 +0100 Subject: [PATCH] gtkcolorsel: Use symbolic names for button numbers --- gtk/gtkcolorsel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index a5f181ee90..2f36d3e0bb 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -1553,7 +1553,7 @@ palette_release (GtkWidget *drawing_area, gtk_widget_grab_focus (drawing_area); - if (event->button == 1 && + if (event->button == GDK_BUTTON_PRIMARY && g_object_get_data (G_OBJECT (drawing_area), "gtk-colorsel-have-pointer") != NULL) { @@ -1816,7 +1816,7 @@ mouse_release (GtkWidget *invisible, { /* GtkColorSelection *colorsel = data; */ - if (event->button != 1) + if (event->button != GDK_BUTTON_PRIMARY) return FALSE; grab_color_at_pointer (gdk_event_get_screen ((GdkEvent *) event), @@ -1912,7 +1912,7 @@ mouse_press (GtkWidget *invisible, GdkEventButton *event, gpointer data) { - if (event->type == GDK_BUTTON_PRESS && event->button == 1) + if (event->type == GDK_BUTTON_PRESS && event->button == GDK_BUTTON_PRIMARY) { g_signal_connect (invisible, "motion-notify-event", G_CALLBACK (mouse_motion), data);