diff options
Diffstat (limited to 'src/ui/tools')
| -rw-r--r-- | src/ui/tools/arc-tool.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/box3d-tool.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/calligraphic-tool.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/dropper-tool.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/eraser-tool.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/measure-tool.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/pencil-tool.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/rect-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/select-tool.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/spiral-tool.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tools/star-tool.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/text-tool.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/tool-base.cpp | 22 | ||||
| -rw-r--r-- | src/ui/tools/zoom-tool.cpp | 4 |
16 files changed, 48 insertions, 63 deletions
diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp index 14fe72bdd..835681745 100644 --- a/src/ui/tools/arc-tool.cpp +++ b/src/ui/tools/arc-tool.cpp @@ -67,7 +67,7 @@ ArcTool::ArcTool() } void ArcTool::finish() { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), GDK_CURRENT_TIME); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); this->finishItem(); this->sel_changed_connection.disconnect(); @@ -225,7 +225,7 @@ bool ArcTool::root_handler(GdkEvent* event) { this->item_to_select = nullptr; handled = true; } - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); break; case GDK_KEY_PRESS: @@ -266,7 +266,7 @@ bool ArcTool::root_handler(GdkEvent* event) { case GDK_KEY_space: if (dragging) { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); dragging = false; sp_event_context_discard_delayed_snap_event(this); @@ -454,7 +454,7 @@ void ArcTool::finishItem() { void ArcTool::cancel() { desktop->getSelection()->clear(); - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); if (this->arc != nullptr) { this->arc->deleteObject(); diff --git a/src/ui/tools/box3d-tool.cpp b/src/ui/tools/box3d-tool.cpp index 9df0ef34e..967c1de63 100644 --- a/src/ui/tools/box3d-tool.cpp +++ b/src/ui/tools/box3d-tool.cpp @@ -70,7 +70,7 @@ Box3dTool::Box3dTool() } void Box3dTool::finish() { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), GDK_CURRENT_TIME); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); this->finishItem(); this->sel_changed_connection.disconnect(); @@ -336,8 +336,7 @@ bool Box3dTool::root_handler(GdkEvent* event) { this->item_to_select = nullptr; ret = TRUE; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); } break; @@ -459,8 +458,7 @@ bool Box3dTool::root_handler(GdkEvent* event) { case GDK_KEY_space: if (dragging) { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); dragging = false; sp_event_context_discard_delayed_snap_event(this); if (!this->within_tolerance) { diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp index 37a4a24f0..ac9db6f0d 100644 --- a/src/ui/tools/calligraphic-tool.cpp +++ b/src/ui/tools/calligraphic-tool.cpp @@ -425,7 +425,7 @@ void CalligraphicTool::cancel() { this->dragging = false; this->is_drawing = false; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); /* Remove all temporary line segments */ for (auto i:this->segments) @@ -727,7 +727,7 @@ bool CalligraphicTool::root_handler(GdkEvent* event) { Geom::Point const motion_w(event->button.x, event->button.y); Geom::Point const motion_dt(desktop->w2d(motion_w)); - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); desktop->canvas->endForcedFullRedraws(); this->is_drawing = false; diff --git a/src/ui/tools/dropper-tool.cpp b/src/ui/tools/dropper-tool.cpp index 99d92b58a..504232967 100644 --- a/src/ui/tools/dropper-tool.cpp +++ b/src/ui/tools/dropper-tool.cpp @@ -109,7 +109,7 @@ void DropperTool::finish() { this->enableGrDrag(false); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -295,7 +295,7 @@ bool DropperTool::root_handler(GdkEvent* event) { this->dragging = false; if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, event->button.time); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp index eaad1cee4..9e306dec7 100644 --- a/src/ui/tools/eraser-tool.cpp +++ b/src/ui/tools/eraser-tool.cpp @@ -364,7 +364,7 @@ void EraserTool::cancel() { SPDesktop *desktop = SP_EVENT_CONTEXT(this)->desktop; this->dragging = FALSE; this->is_drawing = false; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); /* Remove all temporary line segments */ for (auto i : this->segments) sp_canvas_item_destroy(SP_CANVAS_ITEM(i)); @@ -459,7 +459,7 @@ bool EraserTool::root_handler(GdkEvent* event) { Geom::Point const motion_w(event->button.x, event->button.y); Geom::Point const motion_dt(desktop->w2d(motion_w)); - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); desktop->canvas->endForcedFullRedraws(); this->is_drawing = false; diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index c211fc8ec..4f9db3e2b 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -103,7 +103,7 @@ FreehandBase::FreehandBase(gchar const *const *cursor_shape) FreehandBase::~FreehandBase() { if (this->grab) { - sp_canvas_item_ungrab(this->grab, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grab); this->grab = nullptr; } @@ -160,7 +160,7 @@ void FreehandBase::finish() { this->sel_modified_connection.disconnect(); if (this->grab) { - sp_canvas_item_ungrab(this->grab, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grab); } if (this->selection) { diff --git a/src/ui/tools/measure-tool.cpp b/src/ui/tools/measure-tool.cpp index e2dae85a5..6633cdd64 100644 --- a/src/ui/tools/measure-tool.cpp +++ b/src/ui/tools/measure-tool.cpp @@ -491,7 +491,7 @@ void MeasureTool::finish() this->enableGrDrag(false); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -655,7 +655,7 @@ bool MeasureTool::root_handler(GdkEvent* event) showCanvasItems(); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, event->button.time); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } break; diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 8ba3a8d7b..726703ebd 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -814,7 +814,7 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) { } if (this->grab) { // Release grab now - sp_canvas_item_ungrab(this->grab, revent.time); + sp_canvas_item_ungrab(this->grab); this->grab = nullptr; } diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp index cbcba16b5..812027d58 100644 --- a/src/ui/tools/pencil-tool.cpp +++ b/src/ui/tools/pencil-tool.cpp @@ -506,7 +506,7 @@ bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) { if (this->grab) { /* Release grab now */ - sp_canvas_item_ungrab(this->grab, revent.time); + sp_canvas_item_ungrab(this->grab); this->grab = nullptr; } @@ -518,7 +518,7 @@ bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) { void PencilTool::_cancel() { if (this->grab) { /* Release grab now */ - sp_canvas_item_ungrab(this->grab, 0); + sp_canvas_item_ungrab(this->grab); this->grab = nullptr; } diff --git a/src/ui/tools/rect-tool.cpp b/src/ui/tools/rect-tool.cpp index be4b49dce..93f9cb5f8 100644 --- a/src/ui/tools/rect-tool.cpp +++ b/src/ui/tools/rect-tool.cpp @@ -66,7 +66,7 @@ RectTool::RectTool() } void RectTool::finish() { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate), GDK_CURRENT_TIME); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate)); this->finishItem(); this->sel_changed_connection.disconnect(); @@ -259,8 +259,7 @@ bool RectTool::root_handler(GdkEvent* event) { this->item_to_select = nullptr; ret = TRUE; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); } break; case GDK_KEY_PRESS: @@ -308,8 +307,7 @@ bool RectTool::root_handler(GdkEvent* event) { case GDK_KEY_space: if (dragging) { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); dragging = false; sp_event_context_discard_delayed_snap_event(this); @@ -476,7 +474,7 @@ void RectTool::finishItem() { void RectTool::cancel(){ this->desktop->getSelection()->clear(); - sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate), 0); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate)); if (this->rect != nullptr) { this->rect->deleteObject(); diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index 44968887a..88b432004 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -127,7 +127,7 @@ SelectTool::~SelectTool() { this->enableGrDrag(false); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -318,7 +318,7 @@ bool SelectTool::item_handler(SPItem* item, GdkEvent* event) { rb_escaped = drag_escaped = 0; if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, event->button.time); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -521,7 +521,7 @@ bool SelectTool::root_handler(GdkEvent* event) { Inkscape::Rubberband::get(desktop)->start(desktop, p); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, event->button.time); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -793,7 +793,7 @@ bool SelectTool::root_handler(GdkEvent* event) { } if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, event->button.time); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } diff --git a/src/ui/tools/spiral-tool.cpp b/src/ui/tools/spiral-tool.cpp index 3d3845987..dd4a839e4 100644 --- a/src/ui/tools/spiral-tool.cpp +++ b/src/ui/tools/spiral-tool.cpp @@ -67,7 +67,7 @@ SpiralTool::SpiralTool() void SpiralTool::finish() { SPDesktop *desktop = this->desktop; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), GDK_CURRENT_TIME); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); this->finishItem(); this->sel_changed_connection.disconnect(); @@ -232,7 +232,7 @@ bool SpiralTool::root_handler(GdkEvent* event) { this->item_to_select = nullptr; ret = TRUE; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); } break; @@ -271,8 +271,7 @@ bool SpiralTool::root_handler(GdkEvent* event) { case GDK_KEY_space: if (dragging) { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); dragging = false; sp_event_context_discard_delayed_snap_event(this); @@ -408,7 +407,7 @@ void SpiralTool::finishItem() { void SpiralTool::cancel() { this->desktop->getSelection()->clear(); - sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate), 0); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate)); if (this->spiral != nullptr) { this->spiral->deleteObject(); diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index 2e92d1ae9..a6a143ec0 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -68,7 +68,7 @@ StarTool::StarTool() } void StarTool::finish() { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), GDK_CURRENT_TIME); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); this->finishItem(); this->sel_changed_connection.disconnect(); @@ -241,7 +241,7 @@ bool StarTool::root_handler(GdkEvent* event) { this->item_to_select = nullptr; ret = TRUE; - sp_canvas_item_ungrab(SP_CANVAS_ITEM (desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM (desktop->acetate)); } break; @@ -280,7 +280,7 @@ bool StarTool::root_handler(GdkEvent* event) { case GDK_KEY_space: if (dragging) { - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); dragging = false; @@ -426,7 +426,7 @@ void StarTool::finishItem() { void StarTool::cancel() { desktop->getSelection()->clear(); - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); if (this->star != nullptr) { this->star->deleteObject(); diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index f27f37300..18fefa508 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -109,7 +109,7 @@ TextTool::~TextTool() { this->shape_editor = nullptr; if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -611,7 +611,7 @@ bool TextTool::root_handler(GdkEvent* event) { m.unSetup(); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -1134,7 +1134,7 @@ bool TextTool::root_handler(GdkEvent* event) { if (this->creating) { this->creating = false; if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } Inkscape::Rubberband::get(desktop)->stop(); @@ -1256,7 +1256,7 @@ bool TextTool::root_handler(GdkEvent* event) { if (this->creating) { this->creating = false; if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } Inkscape::Rubberband::get(desktop)->stop(); diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp index 6b0608fd5..1dc4ad2fb 100644 --- a/src/ui/tools/tool-base.cpp +++ b/src/ui/tools/tool-base.cpp @@ -358,7 +358,7 @@ bool ToolBase::root_handler(GdkEvent* event) { case GDK_2BUTTON_PRESS: if (panning) { panning = 0; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); ret = TRUE; } else { /* sp_desktop_dialog(); */ @@ -399,7 +399,7 @@ bool ToolBase::root_handler(GdkEvent* event) { // Grab background before doing anything else sp_canvas_rotate_start (SP_CANVAS_ROTATE(desktop->canvas_rotate), desktop->canvas->_backing_store); - sp_canvas_item_ungrab (desktop->acetate, event->button.time); + sp_canvas_item_ungrab (desktop->acetate); sp_canvas_item_show (desktop->canvas_rotate); sp_canvas_item_grab (desktop->canvas_rotate, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | @@ -471,7 +471,7 @@ bool ToolBase::root_handler(GdkEvent* event) { || (panning == 3 && !(event->motion.state & GDK_BUTTON3_MASK))) { /* Gdk seems to lose button release for us sometimes :-( */ panning = 0; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); ret = TRUE; } else { if (within_tolerance && (abs((gint) event->motion.x - xp) @@ -544,8 +544,7 @@ bool ToolBase::root_handler(GdkEvent* event) { if (panning) { panning = 0; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); } Geom::Point const event_w(event->button.x, event->button.y); @@ -561,8 +560,7 @@ bool ToolBase::root_handler(GdkEvent* event) { ret = TRUE; } else if (panning == event->button.button) { panning = 0; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->button.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); // in slow complex drawings, some of the motion events are lost; // to make up for this, we scroll it once again to the button-up event coordinates @@ -736,8 +734,7 @@ bool ToolBase::root_handler(GdkEvent* event) { panning = 0; xp = yp = 0; - sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), - event->key.time); + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate)); desktop->updateNow(); } @@ -1164,15 +1161,8 @@ void sp_event_root_menu_popup(SPDesktop *desktop, SPItem *item, GdkEvent *event) switch (event->type) { case GDK_BUTTON_PRESS: -#if GTKMM_CHECK_VERSION(3,22,0) case GDK_KEY_PRESS: CM->popup_at_pointer(event); -#else - CM->popup(event->button.button, event->button.time); - break; - case GDK_KEY_PRESS: - CM->popup(0, event->key.time); -#endif break; default: break; diff --git a/src/ui/tools/zoom-tool.cpp b/src/ui/tools/zoom-tool.cpp index 4f6627d82..0372e8d6c 100644 --- a/src/ui/tools/zoom-tool.cpp +++ b/src/ui/tools/zoom-tool.cpp @@ -49,7 +49,7 @@ void ZoomTool::finish() { this->enableGrDrag(false); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, GDK_CURRENT_TIME); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } @@ -159,7 +159,7 @@ bool ZoomTool::root_handler(GdkEvent* event) { Inkscape::Rubberband::get(desktop)->stop(); if (this->grabbed) { - sp_canvas_item_ungrab(this->grabbed, event->button.time); + sp_canvas_item_ungrab(this->grabbed); this->grabbed = nullptr; } |
