summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-01-25 19:09:54 +0100
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-01-27 09:47:44 +0100
commitf7c6c97710488465f0866dcf90603f02cb493956 (patch)
treedba7053f027d543eff568f56f71638ca05f5921b /demos
parent67c3bf7b027dc931b575f2a1f0f07552ce5c3390 (diff)
downloadgtk+-f7c6c97710488465f0866dcf90603f02cb493956.tar.gz
gtk-demo: Use symbolic names for button numbers
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/clipboard.c2
-rw-r--r--demos/gtk-demo/drawingarea.c2
-rw-r--r--demos/gtk-demo/hypertext.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index 1a321cc682..9497403545 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -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 ();
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index f3aa13865c..c7bbcae313 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -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 */
diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c
index 1e7dd65933..534a62dda8 100644
--- a/demos/gtk-demo/hypertext.c
+++ b/demos/gtk-demo/hypertext.c
@@ -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));