From: Jim Evins Date: Fri, 8 Nov 2002 01:19:04 +0000 (+0000) Subject: Replaced gdk_pointer_grab() calls with gnome_canvas_item_grab() calls. X-Git-Tag: glabels-2_3_0~712 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c83e8558a35b8713796e36370bf53064c57b1426;p=glabels Replaced gdk_pointer_grab() calls with gnome_canvas_item_grab() calls. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@175 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/view-barcode.c b/glabels2/src/view-barcode.c index cd91b087..43382f9f 100644 --- a/glabels2/src/view-barcode.c +++ b/glabels2/src/view-barcode.c @@ -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); diff --git a/glabels2/src/view-box.c b/glabels2/src/view-box.c index 9545269d..075312eb 100644 --- a/glabels2/src/view-box.c +++ b/glabels2/src/view-box.c @@ -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); diff --git a/glabels2/src/view-ellipse.c b/glabels2/src/view-ellipse.c index 11103860..9c1ec320 100644 --- a/glabels2/src/view-ellipse.c +++ b/glabels2/src/view-ellipse.c @@ -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); diff --git a/glabels2/src/view-image.c b/glabels2/src/view-image.c index 0cb07635..8f63e050 100644 --- a/glabels2/src/view-image.c +++ b/glabels2/src/view-image.c @@ -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); diff --git a/glabels2/src/view-line.c b/glabels2/src/view-line.c index ac2b07eb..1ec74f69 100644 --- a/glabels2/src/view-line.c +++ b/glabels2/src/view-line.c @@ -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); diff --git a/glabels2/src/view-text.c b/glabels2/src/view-text.c index a7275f0b..110fa87e 100644 --- a/glabels2/src/view-text.c +++ b/glabels2/src/view-text.c @@ -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); diff --git a/glabels2/src/wdgt-mini-preview.c b/glabels2/src/wdgt-mini-preview.c index b6c99772..ba8c5d34 100644 --- a/glabels2/src/wdgt-mini-preview.c +++ b/glabels2/src/wdgt-mini-preview.c @@ -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: