[clutter] tests: Update to use the symbolic button names



commit ccc70a911d1314941d95b68a263a60c9b3c30a3e
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Jan 27 09:47:25 2012 +0000

    tests: Update to use the symbolic button names
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668692

 tests/interactive/test-box-layout.c |    2 +-
 tests/interactive/test-clip.c       |    4 ++--
 tests/interactive/test-easing.c     |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/interactive/test-box-layout.c b/tests/interactive/test-box-layout.c
index 7e091e5..fad4ce4 100644
--- a/tests/interactive/test-box-layout.c
+++ b/tests/interactive/test-box-layout.c
@@ -99,7 +99,7 @@ button_release_event (ClutterActor     *actor,
 
   button = clutter_event_get_button (event);
 
-  if (button == 1)
+  if (button == CLUTTER_BUTTON_PRIMARY)
     {
       clutter_box_layout_get_fill (layout, actor, &xfill, &yfill);
       clutter_box_layout_set_fill (layout, actor,
diff --git a/tests/interactive/test-clip.c b/tests/interactive/test-clip.c
index cdfbee1..8e8d770 100644
--- a/tests/interactive/test-clip.c
+++ b/tests/interactive/test-clip.c
@@ -232,8 +232,8 @@ on_button_press (ClutterActor *stage, ClutterButtonEvent *event,
   data->current_clip.y1 = data->current_clip.y2 = event->y;
 
   data->current_clip.type
-    = event->button == 1 ? CLIP_RECTANGLE
-    : event->button == 2 ? CLIP_SHAPES
+    = event->button == CLUTTER_BUTTON_PRIMARY ? CLIP_RECTANGLE
+    : event->button == CLUTTER_BUTTON_MIDDLE ? CLIP_SHAPES
     : CLIP_ROTATED_RECTANGLE;
 
   clutter_actor_queue_redraw (stage);
diff --git a/tests/interactive/test-easing.c b/tests/interactive/test-easing.c
index 876ad95..b81aecd 100644
--- a/tests/interactive/test-easing.c
+++ b/tests/interactive/test-easing.c
@@ -82,7 +82,7 @@ on_button_press (ClutterActor       *actor,
                  ClutterButtonEvent *event,
                  ClutterActor       *rectangle)
 {
-  if (event->button == 3)
+  if (event->button == CLUTTER_BUTTON_SECONDARY)
     {
       gchar *text;
 
@@ -100,7 +100,7 @@ on_button_press (ClutterActor       *actor,
       clutter_text_set_text (CLUTTER_TEXT (easing_mode_label), text);
       g_free (text);
     }
-  else if (event->button == 1)
+  else if (event->button == CLUTTER_BUTTON_PRIMARY)
     {
       ClutterAnimation *animation;
       ClutterAnimationMode cur_mode;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]