summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2014-03-27 00:11:46 +0000
committerMarkus Engel <markus.engel@tum.de>2014-03-27 00:11:46 +0000
commit60e6c1d025ba5923e15a49763378732eaabe4f5a (patch)
tree25bb25b77d58a505619d2a69a7d79025696c7de6 /src/ui
parentCleaned up pencil-tool. (diff)
downloadinkscape-60e6c1d025ba5923e15a49763378732eaabe4f5a.tar.gz
inkscape-60e6c1d025ba5923e15a49763378732eaabe4f5a.zip
Changed some return types from gint to bool.
(bzr r13220)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/tools/connector-tool.cpp8
-rw-r--r--src/ui/tools/connector-tool.h8
-rw-r--r--src/ui/tools/pen-tool.cpp10
-rw-r--r--src/ui/tools/pen-tool.h10
-rw-r--r--src/ui/tools/pencil-tool.cpp10
-rw-r--r--src/ui/tools/pencil-tool.h10
6 files changed, 28 insertions, 28 deletions
diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp
index b72ce5346..e19f35832 100644
--- a/src/ui/tools/connector-tool.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -465,7 +465,7 @@ bool ConnectorTool::root_handler(GdkEvent* event) {
}
-gint ConnectorTool::_handleButtonPress(GdkEventButton const &bevent) {
+bool ConnectorTool::_handleButtonPress(GdkEventButton const &bevent) {
Geom::Point const event_w(bevent.x, bevent.y);
/* Find desktop coordinates */
Geom::Point p = this->desktop->w2d(event_w);
@@ -565,7 +565,7 @@ gint ConnectorTool::_handleButtonPress(GdkEventButton const &bevent) {
return ret;
}
-gint ConnectorTool::_handleMotionNotify(GdkEventMotion const &mevent) {
+bool ConnectorTool::_handleMotionNotify(GdkEventMotion const &mevent) {
bool ret = false;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -654,7 +654,7 @@ gint ConnectorTool::_handleMotionNotify(GdkEventMotion const &mevent) {
return ret;
}
-gint ConnectorTool::_handleButtonRelease(GdkEventButton const &revent) {
+bool ConnectorTool::_handleButtonRelease(GdkEventButton const &revent) {
bool ret = false;
if ( revent.button == 1 && !this->space_panning ) {
@@ -714,7 +714,7 @@ gint ConnectorTool::_handleButtonRelease(GdkEventButton const &revent) {
return ret;
}
-gint ConnectorTool::_handleKeyPress(guint const keyval) {
+bool ConnectorTool::_handleKeyPress(guint const keyval) {
bool ret = false;
switch (keyval) {
diff --git a/src/ui/tools/connector-tool.h b/src/ui/tools/connector-tool.h
index b85412a53..9a9ae64cf 100644
--- a/src/ui/tools/connector-tool.h
+++ b/src/ui/tools/connector-tool.h
@@ -124,10 +124,10 @@ public:
private:
void _selectionChanged(Inkscape::Selection *selection);
- gint _handleButtonPress(GdkEventButton const &bevent);
- gint _handleMotionNotify(GdkEventMotion const &mevent);
- gint _handleButtonRelease(GdkEventButton const &revent);
- gint _handleKeyPress(guint const keyval);
+ bool _handleButtonPress(GdkEventButton const &bevent);
+ bool _handleMotionNotify(GdkEventMotion const &mevent);
+ bool _handleButtonRelease(GdkEventButton const &revent);
+ bool _handleKeyPress(guint const keyval);
void _setInitialPoint(Geom::Point const p);
void _setSubsequentPoint(Geom::Point const p);
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index ea66360d0..09c0a2a4f 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -324,7 +324,7 @@ bool PenTool::root_handler(GdkEvent* event) {
/**
* Handle mouse button press event.
*/
-gint PenTool::_handleButtonPress(GdkEventButton const &bevent) {
+bool PenTool::_handleButtonPress(GdkEventButton const &bevent) {
if (this->events_disabled) {
// skip event processing if events are disabled
return false;
@@ -495,7 +495,7 @@ gint PenTool::_handleButtonPress(GdkEventButton const &bevent) {
/**
* Handle motion_notify event.
*/
-gint PenTool::_handleMotionNotify(GdkEventMotion const &mevent) {
+bool PenTool::_handleMotionNotify(GdkEventMotion const &mevent) {
bool ret = false;
if (this->space_panning || mevent.state & GDK_BUTTON2_MASK || mevent.state & GDK_BUTTON3_MASK) {
@@ -633,7 +633,7 @@ gint PenTool::_handleMotionNotify(GdkEventMotion const &mevent) {
/**
* Handle mouse button release event.
*/
-gint PenTool::_handleButtonRelease(GdkEventButton const &revent) {
+bool PenTool::_handleButtonRelease(GdkEventButton const &revent) {
if (this->events_disabled) {
// skip event processing if events are disabled
return false;
@@ -760,7 +760,7 @@ gint PenTool::_handleButtonRelease(GdkEventButton const &revent) {
return ret;
}
-gint PenTool::_handle2ButtonPress(GdkEventButton const &bevent) {
+bool PenTool::_handle2ButtonPress(GdkEventButton const &bevent) {
bool ret = false;
// only end on LMB double click. Otherwise horizontal scrolling causes ending of the path
if (this->npoints != 0 && bevent.button == 1) {
@@ -871,7 +871,7 @@ void PenTool::_lastpointToLine() {
}
-gint PenTool::_handleKeyPress(GdkEvent *event) {
+bool PenTool::_handleKeyPress(GdkEvent *event) {
bool ret = false;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gdouble const nudge = prefs->getDoubleLimited("/options/nudgedistance/value", 2, 0, 1000, "px"); // in px
diff --git a/src/ui/tools/pen-tool.h b/src/ui/tools/pen-tool.h
index 182d270ee..4dec7b4fe 100644
--- a/src/ui/tools/pen-tool.h
+++ b/src/ui/tools/pen-tool.h
@@ -80,11 +80,11 @@ protected:
virtual bool item_handler(SPItem* item, GdkEvent* event);
private:
- gint _handleButtonPress(GdkEventButton const &bevent);
- gint _handleMotionNotify(GdkEventMotion const &mevent);
- gint _handleButtonRelease(GdkEventButton const &revent);
- gint _handle2ButtonPress(GdkEventButton const &bevent);
- gint _handleKeyPress(GdkEvent *event);
+ bool _handleButtonPress(GdkEventButton const &bevent);
+ bool _handleMotionNotify(GdkEventMotion const &mevent);
+ bool _handleButtonRelease(GdkEventButton const &revent);
+ bool _handle2ButtonPress(GdkEventButton const &bevent);
+ bool _handleKeyPress(GdkEvent *event);
void _setInitialPoint(Geom::Point const p);
void _setSubsequentPoint(Geom::Point const p, bool statusbar, guint status = 0);
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index 86274928b..374846539 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -149,7 +149,7 @@ bool PencilTool::root_handler(GdkEvent* event) {
return ret;
}
-gint PencilTool::_handleButtonPress(GdkEventButton const &bevent) {
+bool PencilTool::_handleButtonPress(GdkEventButton const &bevent) {
bool ret = false;
if ( bevent.button == 1 && !this->space_panning) {
@@ -227,7 +227,7 @@ gint PencilTool::_handleButtonPress(GdkEventButton const &bevent) {
return ret;
}
-gint PencilTool::_handleMotionNotify(GdkEventMotion const &mevent) {
+bool PencilTool::_handleMotionNotify(GdkEventMotion const &mevent) {
if ((mevent.state & GDK_CONTROL_MASK) && (mevent.state & GDK_BUTTON1_MASK)) {
// mouse was accidentally moved during Ctrl+click;
// ignore the motion and create a single point
@@ -345,7 +345,7 @@ gint PencilTool::_handleMotionNotify(GdkEventMotion const &mevent) {
return ret;
}
-gint PencilTool::_handleButtonRelease(GdkEventButton const &revent) {
+bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) {
bool ret = false;
if ( revent.button == 1 && this->is_drawing && !this->space_panning) {
@@ -467,7 +467,7 @@ void PencilTool::_cancel() {
this->desktop->canvas->endForcedFullRedraws();
}
-gint PencilTool::_handleKeyPress(guint const keyval, guint const state) {
+bool PencilTool::_handleKeyPress(guint const keyval, guint const state) {
bool ret = false;
switch (keyval) {
@@ -520,7 +520,7 @@ gint PencilTool::_handleKeyPress(guint const keyval, guint const state) {
return ret;
}
-gint PencilTool::_handleKeyRelease(guint const keyval, guint const /*state*/) {
+bool PencilTool::_handleKeyRelease(guint const keyval, guint const /*state*/) {
bool ret = false;
switch (keyval) {
case GDK_KEY_Alt_L:
diff --git a/src/ui/tools/pencil-tool.h b/src/ui/tools/pencil-tool.h
index 2ad05606d..e01b0afb5 100644
--- a/src/ui/tools/pencil-tool.h
+++ b/src/ui/tools/pencil-tool.h
@@ -54,11 +54,11 @@ protected:
virtual bool root_handler(GdkEvent* event);
private:
- gint _handleButtonPress(GdkEventButton const &bevent);
- gint _handleMotionNotify(GdkEventMotion const &mevent);
- gint _handleButtonRelease(GdkEventButton const &revent);
- gint _handleKeyPress(guint const keyval, guint const state);
- gint _handleKeyRelease(guint const keyval, guint const state);
+ bool _handleButtonPress(GdkEventButton const &bevent);
+ bool _handleMotionNotify(GdkEventMotion const &mevent);
+ bool _handleButtonRelease(GdkEventButton const &revent);
+ bool _handleKeyPress(guint const keyval, guint const state);
+ bool _handleKeyRelease(guint const keyval, guint const state);
void _setStartpoint(Geom::Point const &p);
void _setEndpoint(Geom::Point const &p);