summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/tool-base.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2014-03-02 00:31:12 +0000
committerMarkus Engel <markus.engel@tum.de>2014-03-02 00:31:12 +0000
commit3aa344e9a40d97db7cd5a89671896bab70da33a4 (patch)
tree1ea673a167ac9d121b64689c084383791bddf65a /src/ui/tools/tool-base.cpp
parentFix for crash when cycle-selecting. (diff)
downloadinkscape-3aa344e9a40d97db7cd5a89671896bab70da33a4.tar.gz
inkscape-3aa344e9a40d97db7cd5a89671896bab70da33a4.zip
Added some consts. Turned functions to member functions.
(bzr r13089)
Diffstat (limited to 'src/ui/tools/tool-base.cpp')
-rw-r--r--src/ui/tools/tool-base.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 99b72c386..45b519fb4 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -143,9 +143,9 @@ ToolBase::~ToolBase() {
/**
* Set the cursor to a standard GDK cursor
*/
-static void sp_event_context_set_cursor(ToolBase *event_context, GdkCursorType cursor_type) {
+void ToolBase::sp_event_context_set_cursor(GdkCursorType cursor_type) {
- GtkWidget *w = GTK_WIDGET(sp_desktop_canvas(event_context->desktop));
+ GtkWidget *w = GTK_WIDGET(sp_desktop_canvas(this->desktop));
GdkDisplay *display = gdk_display_get_default();
GdkCursor *cursor = gdk_cursor_new_for_display(display, cursor_type);
@@ -480,7 +480,7 @@ bool ToolBase::root_handler(GdkEvent* event) {
if (panning_cursor == 0) {
panning_cursor = 1;
- sp_event_context_set_cursor(this, GDK_FLEUR);
+ this->sp_event_context_set_cursor(GDK_FLEUR);
}
Geom::Point const motion_w(event->motion.x, event->motion.y);
@@ -876,10 +876,9 @@ bool ToolBase::item_handler(SPItem* item, GdkEvent* event) {
/**
* Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case).
*/
-bool sp_event_context_knot_mouseover(ToolBase *ec)
-{
- if (ec->shape_editor) {
- return ec->shape_editor->knot_mouseover();
+bool ToolBase::sp_event_context_knot_mouseover() const {
+ if (this->shape_editor) {
+ return this->shape_editor->knot_mouseover();
}
return false;