gtk-demo: Use symbolic names for button numbers

This commit is contained in:
Carlos Garcia Campos 2012-01-25 19:09:54 +01:00 committed by Carlos Garcia Campos
parent 67c3bf7b02
commit f7c6c97710
3 changed files with 3 additions and 3 deletions

View File

@ -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 ();

View File

@ -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 */

View File

@ -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));