Commit f7c6c977 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos Committed by Carlos Garcia Campos

gtk-demo: Use symbolic names for button numbers

parent 67c3bf7b
......@@ -172,7 +172,7 @@ button_press (GtkWidget *widget,
GtkWidget *menu;
GtkWidget *item;
if (button->button != 3)
if (button->button != GDK_BUTTON_SECONDARY)
return FALSE;
menu = gtk_menu_new ();
......
......@@ -97,7 +97,7 @@ scribble_button_press_event (GtkWidget *widget,
if (surface == NULL)
return FALSE; /* paranoia check, in case we haven't gotten a configure event */
if (event->button == 1)
if (event->button == GDK_BUTTON_PRIMARY)
draw_brush (widget, event->x, event->y);
/* We've handled the event, stop processing */
......
......@@ -144,7 +144,7 @@ event_after (GtkWidget *text_view,
event = (GdkEventButton *)ev;
if (event->button != 1)
if (event->button != GDK_BUTTON_PRIMARY)
return FALSE;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment