mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
gtk-demo: Use symbolic names for button numbers
This commit is contained in:
parent
67c3bf7b02
commit
f7c6c97710
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user