]> git.sur5r.net Git - glabels/commitdiff
Changed event->button.* to event->motion.* when handling GTK_MOTION_NOTIFY events.
authorJim Evins <evins@snaught.com>
Fri, 23 Aug 2002 03:03:30 +0000 (03:03 +0000)
committerJim Evins <evins@snaught.com>
Fri, 23 Aug 2002 03:03:30 +0000 (03:03 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@44 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/view-barcode.c
glabels2/src/view-box.c
glabels2/src/view-ellipse.c
glabels2/src/view-highlight.c
glabels2/src/view-image.c
glabels2/src/view-line.c
glabels2/src/view-text.c

index 49bae8374daeda6d49fd75982987d1229a9e4703..364b24fe9e81ebc079ca0f4391d95dff76a34f71 100644 (file)
@@ -681,8 +681,8 @@ gl_view_barcode_create_event_handler (GnomeCanvas *canvas,
                gl_debug (DEBUG_VIEW, "MOTION_NOTIFY");
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        gnome_canvas_window_to_world (canvas,
-                                                     event->button.x,
-                                                     event->button.y, &x, &y);
+                                                     event->motion.x,
+                                                     event->motion.y, &x, &y);
                        gl_label_object_set_position (GL_LABEL_OBJECT(object),
                                                      x, y);
                        return TRUE;
index 545fd8db5999644dcc3394aa7c6b84c317487795..6fe809ddbc94cbc31a49e0d546e8fbacb9db7f43 100644 (file)
@@ -686,8 +686,8 @@ gl_view_box_create_event_handler (GnomeCanvas *canvas,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        gnome_canvas_window_to_world (canvas,
-                                                     event->button.x,
-                                                     event->button.y, &x, &y);
+                                                     event->motion.x,
+                                                     event->motion.y, &x, &y);
                        gl_label_object_set_position (GL_LABEL_OBJECT(object),
                                                     MIN (x, x0), MIN (y, y0));
                        gl_debug (DEBUG_VIEW, "BUTTON_MOTION (%f, %f) -> (%f, %f)", event->button.x, event->button.y, x, y);
index b21c646f175fd2f3e7826a868df38fe74f7d0507..fe6100a31ab549cbe02e3be8cc58804d7d5040f5 100644 (file)
@@ -686,8 +686,8 @@ gl_view_ellipse_create_event_handler (GnomeCanvas *canvas,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        gnome_canvas_window_to_world (canvas,
-                                                     event->button.x,
-                                                     event->button.y, &x, &y);
+                                                     event->motion.x,
+                                                     event->motion.y, &x, &y);
                        gl_label_object_set_position (GL_LABEL_OBJECT(object),
                                                     MIN (x, x0), MIN (y, y0));
                        w = MAX (x, x0) - MIN (x, x0);
index 5c148b72cd273d28b0ac0d9b3a8316c4d417f61f..64a4df802bcd2087023a394da22dfbabc4a53450 100644 (file)
@@ -746,10 +746,10 @@ tl_resize_event_handler (GnomeCanvasItem * handle_item,
 
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
-                       x = MIN (event->button.x, x2 - MIN_ITEM_SIZE);
-                       y = MIN (event->button.y, y2 - MIN_ITEM_SIZE);
-                       w = MAX (x2 - event->button.x, MIN_ITEM_SIZE);
-                       h = MAX (y2 - event->button.y, MIN_ITEM_SIZE);
+                       x = MIN (event->motion.x, x2 - MIN_ITEM_SIZE);
+                       y = MIN (event->motion.y, y2 - MIN_ITEM_SIZE);
+                       w = MAX (x2 - event->motion.x, MIN_ITEM_SIZE);
+                       h = MAX (y2 - event->motion.y, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -843,9 +843,9 @@ tr_resize_event_handler (GnomeCanvasItem * handle_item,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        x = x1;
-                       y = MIN (event->button.y, y2 - MIN_ITEM_SIZE);
-                       w = MAX (event->button.x - x1, MIN_ITEM_SIZE);
-                       h = MAX (y2 - event->button.y, MIN_ITEM_SIZE);
+                       y = MIN (event->motion.y, y2 - MIN_ITEM_SIZE);
+                       w = MAX (event->motion.x - x1, MIN_ITEM_SIZE);
+                       h = MAX (y2 - event->motion.y, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -938,10 +938,10 @@ bl_resize_event_handler (GnomeCanvasItem * handle_item,
 
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
-                       x = MIN (event->button.x, x2 - MIN_ITEM_SIZE);
+                       x = MIN (event->motion.x, x2 - MIN_ITEM_SIZE);
                        y = y1;
-                       w = MAX (x2 - event->button.x, MIN_ITEM_SIZE);
-                       h = MAX (event->button.y - y1, MIN_ITEM_SIZE);
+                       w = MAX (x2 - event->motion.x, MIN_ITEM_SIZE);
+                       h = MAX (event->motion.y - y1, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -1036,8 +1036,8 @@ br_resize_event_handler (GnomeCanvasItem * handle_item,
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        x = x1;
                        y = y1;
-                       w = MAX (event->button.x - x1, MIN_ITEM_SIZE);
-                       h = MAX (event->button.y - y1, MIN_ITEM_SIZE);
+                       w = MAX (event->motion.x - x1, MIN_ITEM_SIZE);
+                       h = MAX (event->motion.y - y1, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -1127,8 +1127,8 @@ sl_resize_event_handler (GnomeCanvasItem * handle_item,
 
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
-                       x = MIN (event->button.x, x2 - MIN_ITEM_SIZE);
-                       w = MAX (x2 - event->button.x, MIN_ITEM_SIZE);
+                       x = MIN (event->motion.x, x2 - MIN_ITEM_SIZE);
+                       w = MAX (x2 - event->motion.x, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -1219,7 +1219,7 @@ sr_resize_event_handler (GnomeCanvasItem * handle_item,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        x = x1;
-                       w = MAX (event->button.x - x1, MIN_ITEM_SIZE);
+                       w = MAX (event->motion.x - x1, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -1309,8 +1309,8 @@ st_resize_event_handler (GnomeCanvasItem * handle_item,
 
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
-                       y = MIN (event->button.y, y2 - MIN_ITEM_SIZE);
-                       h = MAX (y2 - event->button.y, MIN_ITEM_SIZE);
+                       y = MIN (event->motion.y, y2 - MIN_ITEM_SIZE);
+                       h = MAX (y2 - event->motion.y, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -1401,7 +1401,7 @@ sb_resize_event_handler (GnomeCanvasItem * handle_item,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        y = y1;
-                       h = MAX (event->button.y - y1, MIN_ITEM_SIZE);
+                       h = MAX (event->motion.y - y1, MIN_ITEM_SIZE);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, w, h);
                        return TRUE;
@@ -1496,8 +1496,8 @@ p1_resize_event_handler (GnomeCanvasItem * handle_item,
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        x = x0;
                        y = y0;
-                       dx = (event->button.x - x0);
-                       dy = (event->button.y - y0);
+                       dx = (event->motion.x - x0);
+                       dy = (event->motion.y - y0);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, dx, dy);
                        return TRUE;
@@ -1592,8 +1592,8 @@ p2_resize_event_handler (GnomeCanvasItem * handle_item,
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        x = x0;
                        y = y0;
-                       dx = (event->button.x - x0);
-                       dy = (event->button.y - y0);
+                       dx = (event->motion.x - x0);
+                       dy = (event->motion.y - y0);
                        gl_label_object_set_position (object, x, y);
                        gl_label_object_set_size (object, dx, dy);
                        return TRUE;
index a00db395eb17b886d50a3c3b4cc1cd726263d4b6..a9c8741f742eaf8fcff246496e2d6cc5d0056931 100644 (file)
@@ -665,8 +665,8 @@ gl_view_image_create_event_handler (GnomeCanvas *canvas,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        gnome_canvas_window_to_world (canvas,
-                                                     event->button.x,
-                                                     event->button.y, &x, &y);
+                                                     event->motion.x,
+                                                     event->motion.y, &x, &y);
                        gl_label_object_set_position (GL_LABEL_OBJECT(object),
                                                     MIN (x, x0), MIN (y, y0));
                        w = MAX (x, x0) - MIN (x, x0);
index 27dc8003bc5d9abc3a630ee8ec3fd76ac09858bc..511f6c99099663c242e9ee7aabb898b50a62cb57 100644 (file)
@@ -634,8 +634,8 @@ gl_view_line_create_event_handler (GnomeCanvas *canvas,
        case GDK_MOTION_NOTIFY:
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        gnome_canvas_window_to_world (canvas,
-                                                     event->button.x,
-                                                     event->button.y, &x, &y);
+                                                     event->motion.x,
+                                                     event->motion.y, &x, &y);
                        w = x - x0;
                        h = y - y0;
                        gl_label_object_set_size (GL_LABEL_OBJECT(object),
index 228f0c76c2520392eebf7c13e949a977c928e5b4..f38c4ae355225014223279f210309e6320514e19 100644 (file)
@@ -638,8 +638,8 @@ gl_view_text_create_event_handler (GnomeCanvas *canvas,
                gl_debug (DEBUG_VIEW, "MOTION_NOTIFY");
                if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
                        gnome_canvas_window_to_world (canvas,
-                                                     event->button.x,
-                                                     event->button.y, &x, &y);
+                                                     event->motion.x,
+                                                     event->motion.y, &x, &y);
                        gl_label_object_set_position (GL_LABEL_OBJECT(object),
                                                      x, y);
                        return TRUE;