]> git.sur5r.net Git - glabels/commitdiff
Replaced gdk_pointer_grab() calls with gnome_canvas_item_grab() calls.
authorJim Evins <evins@snaught.com>
Fri, 8 Nov 2002 01:19:04 +0000 (01:19 +0000)
committerJim Evins <evins@snaught.com>
Fri, 8 Nov 2002 01:19:04 +0000 (01:19 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@175 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/view-barcode.c
glabels2/src/view-box.c
glabels2/src/view-ellipse.c
glabels2/src/view-image.c
glabels2/src/view-line.c
glabels2/src/view-text.c
glabels2/src/wdgt-mini-preview.c

index cd91b087b0cbdcad780a0cb7fcd9fa97f200b493..43382f9fbee44cf04fdb513d1ee4727505111470 100644 (file)
@@ -661,12 +661,11 @@ gl_view_barcode_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (view->canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK,
-                                         NULL, NULL, event->button.time);
+                       gnome_canvas_item_grab (canvas->root,
+                                               GDK_POINTER_MOTION_MASK |
+                                               GDK_BUTTON_RELEASE_MASK |
+                                               GDK_BUTTON_PRESS_MASK,
+                                               NULL, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
@@ -696,7 +695,7 @@ gl_view_barcode_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
index 9545269d08e4f7c30269c5e660779c6e324313eb..075312ebf3ac3e37e6907abe11edb7a2b49677c9 100644 (file)
@@ -652,12 +652,11 @@ gl_view_box_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (view->canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK,
-                                         NULL, NULL, event->button.time);
+                       gnome_canvas_item_grab ( canvas->root,
+                                                GDK_POINTER_MOTION_MASK |
+                                                GDK_BUTTON_RELEASE_MASK |
+                                                GDK_BUTTON_PRESS_MASK,
+                                                NULL, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
@@ -688,7 +687,7 @@ gl_view_box_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
index 1110386090f1f9cc38b60b829acae9a60cf6835a..9c1ec320718579156b2b88f511788d21c4350674 100644 (file)
@@ -652,12 +652,11 @@ gl_view_ellipse_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (view->canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK,
-                                         NULL, NULL, event->button.time);
+                       gnome_canvas_item_grab (canvas->root,
+                                               GDK_POINTER_MOTION_MASK |
+                                               GDK_BUTTON_RELEASE_MASK |
+                                               GDK_BUTTON_PRESS_MASK,
+                                               NULL, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
@@ -669,7 +668,8 @@ gl_view_ellipse_create_event_handler (GnomeCanvas *canvas,
                        line_color = gl_color_set_opacity (gl_prefs->default_line_color, 0.5);
                        fill_color = gl_color_set_opacity (gl_prefs->default_fill_color, 0.5);
                        gl_label_ellipse_set_line_width (GL_LABEL_ELLIPSE(object),
-                                                    gl_prefs->default_line_width);                     gl_label_ellipse_set_line_color (GL_LABEL_ELLIPSE(object),
+                                                    gl_prefs->default_line_width);
+                       gl_label_ellipse_set_line_color (GL_LABEL_ELLIPSE(object),
                                                     line_color);
                        gl_label_ellipse_set_fill_color (GL_LABEL_ELLIPSE(object),
                                                     fill_color);
@@ -687,7 +687,7 @@ gl_view_ellipse_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
index 0cb07635d232fada746f80733d446b118477fdef..8f63e050717cd5ccd2ac995a1250b2687ac8dc4c 100644 (file)
@@ -643,12 +643,11 @@ gl_view_image_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (view->canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK,
-                                         NULL, NULL, event->button.time);
+                       gnome_canvas_item_grab (canvas->root,
+                                               GDK_POINTER_MOTION_MASK |
+                                               GDK_BUTTON_RELEASE_MASK |
+                                               GDK_BUTTON_PRESS_MASK,
+                                               NULL, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
@@ -671,7 +670,7 @@ gl_view_image_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
index ac2b07eb9886ec17a6298434c48e0debb252cfba..1ec74f69f2fd6366cdd0a4f32cc3f1a0b9aa7e12 100644 (file)
@@ -605,12 +605,11 @@ gl_view_line_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (view->canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK,
-                                         NULL, NULL, event->button.time);
+                       gnome_canvas_item_grab (canvas->root,
+                                               GDK_POINTER_MOTION_MASK |
+                                               GDK_BUTTON_RELEASE_MASK |
+                                               GDK_BUTTON_PRESS_MASK,
+                                               NULL, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
@@ -637,7 +636,7 @@ gl_view_line_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
index a7275f0bf588f5753fa744f3524ef9ca87f658a7..110fa87e75da170d8ff35487818f0e125504e3b9 100644 (file)
@@ -609,12 +609,11 @@ gl_view_text_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (view->canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK,
-                                         NULL, NULL, event->button.time);
+                       gnome_canvas_item_grab (canvas->root,
+                                               GDK_POINTER_MOTION_MASK |
+                                               GDK_BUTTON_RELEASE_MASK |
+                                               GDK_BUTTON_PRESS_MASK,
+                                               NULL, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
@@ -645,7 +644,7 @@ gl_view_text_create_event_handler (GnomeCanvas *canvas,
                switch (event->button.button) {
                case 1:
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        gnome_canvas_window_to_world (canvas,
                                                      event->button.x,
                                                      event->button.y, &x, &y);
index b6c99772f5d5db23ab96c6c496742ba79d35d735..ba8c5d342b264d9bc00e3991f37e0893713172d7 100644 (file)
@@ -456,12 +456,11 @@ canvas_event_cb (GnomeCanvas * canvas,
                                break;
                        /* Go into dragging mode while remains pressed. */
                        dragging = TRUE;
-                       gdk_pointer_grab (GTK_WIDGET (canvas)->window,
-                                         FALSE,
-                                         GDK_POINTER_MOTION_MASK |
-                                         GDK_BUTTON_RELEASE_MASK |
-                                         GDK_BUTTON_PRESS_MASK, NULL, NULL,
-                                         event->button.time);
+                       gnome_canvas_item_grab (canvas->root,
+                                               GDK_POINTER_MOTION_MASK |
+                                               GDK_BUTTON_RELEASE_MASK |
+                                               GDK_BUTTON_PRESS_MASK,
+                                               NULL, event->button.time);
                        g_signal_emit (G_OBJECT(preview),
                                       wdgt_mini_preview_signals[CLICKED],
                                       0, i);
@@ -486,7 +485,7 @@ canvas_event_cb (GnomeCanvas * canvas,
                case 1:
                        /* Exit dragging mode */
                        dragging = FALSE;
-                       gdk_pointer_ungrab (event->button.time);
+                       gnome_canvas_item_ungrab (canvas->root, event->button.time);
                        break;
 
                default: