summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-30 15:49:40 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-30 15:49:40 +0000
commit18770eebe339cdc673812a48c5e05c7cdcb3a82e (patch)
tree1e3846a72decad64d24100cdbe0a2e0d42f252b8 /src/ui/tools
parentUpdate to experimental r13464 (diff)
parentFix paint-selector orientation (diff)
downloadinkscape-18770eebe339cdc673812a48c5e05c7cdcb3a82e.tar.gz
inkscape-18770eebe339cdc673812a48c5e05c7cdcb3a82e.zip
Update to experimental r13527
(bzr r13341.5.15)
Diffstat (limited to 'src/ui/tools')
-rw-r--r--src/ui/tools/arc-tool.h2
-rw-r--r--src/ui/tools/flood-tool.h4
-rw-r--r--src/ui/tools/freehand-base.cpp8
-rw-r--r--src/ui/tools/gradient-tool.cpp17
-rw-r--r--src/ui/tools/node-tool.cpp2
-rw-r--r--src/ui/tools/select-tool.h1
-rw-r--r--src/ui/tools/spiral-tool.h8
-rw-r--r--src/ui/tools/text-tool.h7
-rw-r--r--src/ui/tools/tool-base.cpp3
9 files changed, 25 insertions, 27 deletions
diff --git a/src/ui/tools/arc-tool.h b/src/ui/tools/arc-tool.h
index c4c67660d..55cbaf78c 100644
--- a/src/ui/tools/arc-tool.h
+++ b/src/ui/tools/arc-tool.h
@@ -30,7 +30,7 @@ namespace Inkscape {
}
#define SP_ARC_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::ArcTool*>((Inkscape::UI::Tools::ToolBase*)obj))
-#define SP_IS_ARC_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::ArcTool*>(const Inkscape::UI::Tools::ToolBase*(obj)) != NULL)
+#define SP_IS_ARC_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::ArcTool*>(obj) != NULL)
namespace Inkscape {
namespace UI {
diff --git a/src/ui/tools/flood-tool.h b/src/ui/tools/flood-tool.h
index 3ed670e8b..5104a42e9 100644
--- a/src/ui/tools/flood-tool.h
+++ b/src/ui/tools/flood-tool.h
@@ -11,9 +11,7 @@
* Released under GNU GPL
*/
-#include <stddef.h>
-#include <sigc++/sigc++.h>
-#include <gtk/gtk.h>
+#include <sigc++/connection.h>
#include "ui/tools/tool-base.h"
#define SP_FLOOD_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::FloodTool*>((Inkscape::UI::Tools::ToolBase*)obj))
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index aad924844..72250a550 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -610,13 +610,13 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed)
if (dc->sa) {
SPCurve *s = dc->sa->curve;
dc->white_curves = g_slist_remove(dc->white_curves, s);
- if(prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 ||
- prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2){
- s = dc->overwriteCurve;
- }
if (dc->sa->start) {
s = reverse_then_unref(s);
}
+ if(prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 ||
+ prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2){
+ dc->overwriteCurve = s;
+ }
s->append_continuous(c, 0.0625);
c->unref();
c = s;
diff --git a/src/ui/tools/gradient-tool.cpp b/src/ui/tools/gradient-tool.cpp
index a0bbfbaf1..4f9a7b59b 100644
--- a/src/ui/tools/gradient-tool.cpp
+++ b/src/ui/tools/gradient-tool.cpp
@@ -213,17 +213,20 @@ sp_gradient_context_is_over_line (GradientTool *rc, SPItem *item, Geom::Point ev
//Translate mouse point into proper coord system
rc->mousepoint_doc = desktop->w2d(event_p);
- SPCtrlLine* line = SP_CTRLLINE(item);
+ if (SP_IS_CTRLLINE(item)) {
+ SPCtrlLine* line = SP_CTRLLINE(item);
- Geom::LineSegment ls(line->s, line->e);
- Geom::Point nearest = ls.pointAt(ls.nearestPoint(rc->mousepoint_doc));
- double dist_screen = Geom::L2 (rc->mousepoint_doc - nearest) * desktop->current_zoom();
+ Geom::LineSegment ls(line->s, line->e);
+ Geom::Point nearest = ls.pointAt(ls.nearestPoint(rc->mousepoint_doc));
+ double dist_screen = Geom::L2 (rc->mousepoint_doc - nearest) * desktop->current_zoom();
- double tolerance = (double) SP_EVENT_CONTEXT(rc)->tolerance;
+ double tolerance = (double) SP_EVENT_CONTEXT(rc)->tolerance;
- bool close = (dist_screen < tolerance);
+ bool close = (dist_screen < tolerance);
- return close;
+ return close;
+ }
+ return false;
}
static std::vector<Geom::Point>
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index d2584ee74..d4d7b2c35 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -245,7 +245,7 @@ void NodeTool::setup() {
)
);
- this->_selected_nodes->signal_point_changed.connect(
+ this->_selected_nodes->signal_selection_changed.connect(
// Hide both signal parameters and bind the function parameter to 0
// sigc::signal<void, SelectableControlPoint *, bool>
// <=>
diff --git a/src/ui/tools/select-tool.h b/src/ui/tools/select-tool.h
index edc4069a2..5af99a56a 100644
--- a/src/ui/tools/select-tool.h
+++ b/src/ui/tools/select-tool.h
@@ -13,7 +13,6 @@
*/
#include "ui/tools/tool-base.h"
-#include <gtk/gtk.h>
#define SP_SELECT_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::SelectTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_SELECT_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::SelectTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/ui/tools/spiral-tool.h b/src/ui/tools/spiral-tool.h
index 416aeb7e4..add92342d 100644
--- a/src/ui/tools/spiral-tool.h
+++ b/src/ui/tools/spiral-tool.h
@@ -15,17 +15,15 @@
* Released under GNU GPL
*/
-#include <gtk/gtk.h>
-#include <stddef.h>
-#include <sigc++/sigc++.h>
+#include <sigc++/connection.h>
#include <2geom/point.h>
#include "ui/tools/tool-base.h"
-#include "sp-spiral.h"
-
#define SP_SPIRAL_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::SpiralTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_SPIRAL_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::SpiralTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
+class SPSpiral;
+
namespace Inkscape {
namespace UI {
namespace Tools {
diff --git a/src/ui/tools/text-tool.h b/src/ui/tools/text-tool.h
index ca2b3d19a..289ee180d 100644
--- a/src/ui/tools/text-tool.h
+++ b/src/ui/tools/text-tool.h
@@ -14,10 +14,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-/* #include <gdk/gdkic.h> */
-#include <stddef.h>
-#include <sigc++/sigc++.h>
-#include <gtk/gtk.h>
+#include <sigc++/connection.h>
#include "ui/tools/tool-base.h"
#include <2geom/point.h>
@@ -26,6 +23,8 @@
#define SP_TEXT_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::TextTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::TextTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
+typedef struct _GtkIMContext GtkIMContext;
+
struct SPCtrlLine;
namespace Inkscape {
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index c23da87c0..c28b86416 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -18,6 +18,8 @@
# include "config.h"
#endif
+#include "widgets/desktop-widget.h"
+
#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
#endif
@@ -40,7 +42,6 @@
#include "desktop-handles.h"
#include "desktop-events.h"
#include "desktop-style.h"
-#include "widgets/desktop-widget.h"
#include "sp-namedview.h"
#include "selection.h"
#include "interface.h"