summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-03-10 04:56:26 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-03-10 04:56:26 +0000
commit52cfa8cc5f3dedcba9e00b3cb7b800f3d5473136 (patch)
tree51cf4ffaddd82e734ee5766c22b51a664749cce7 /src
parentUpdate to Vinipsmaker changes (diff)
parentRemove unused includes to tidy up the code. (diff)
downloadinkscape-52cfa8cc5f3dedcba9e00b3cb7b800f3d5473136.tar.gz
inkscape-52cfa8cc5f3dedcba9e00b3cb7b800f3d5473136.zip
update to trunk
(bzr r11950.1.289)
Diffstat (limited to 'src')
-rw-r--r--src/attribute-rel-util.h1
-rw-r--r--src/attributes-test.h9
-rw-r--r--src/box3d-side.cpp1
-rw-r--r--src/composite-undo-stack-observer.h1
-rw-r--r--src/display/sp-ctrlquadr.h4
-rw-r--r--src/extension/execution-env.h2
-rw-r--r--src/extension/internal/grid.cpp1
-rw-r--r--src/extension/internal/metafile-inout.cpp1
-rw-r--r--src/gradient-drag.cpp4
-rw-r--r--src/gradient-drag.h1
-rw-r--r--src/knotholder.h1
-rw-r--r--src/libvpsc/generate-constraints.cpp11
-rw-r--r--src/line-geometry.h3
-rw-r--r--src/marker.h1
-rw-r--r--src/persp3d.h4
-rw-r--r--src/selection.h10
-rw-r--r--src/snapper.h1
-rw-r--r--src/sp-image.h3
-rw-r--r--src/sp-paint-server.h1
-rw-r--r--src/sp-root.h1
-rw-r--r--src/sp-script.h3
-rw-r--r--src/sp-symbol.h2
-rw-r--r--src/sp-text.h2
-rw-r--r--src/sp-use.h1
-rw-r--r--src/style-test.h55
-rw-r--r--src/style.cpp2
-rw-r--r--src/style.h3
-rw-r--r--src/ui/tools/spray-tool.cpp4
-rw-r--r--src/ui/tools/text-tool.cpp4
-rw-r--r--src/ui/tools/tool-base.cpp28
-rw-r--r--src/ui/tools/tool-base.h4
-rw-r--r--src/ui/widget/filter-effect-chooser.h1
-rw-r--r--src/ui/widget/style-swatch.h1
-rw-r--r--src/vanishing-point.h3
-rw-r--r--src/widgets/gradient-selector.h1
-rw-r--r--src/widgets/sp-color-icc-selector.h1
-rw-r--r--src/widgets/sp-color-wheel-selector.h1
-rw-r--r--src/widgets/sp-xmlview-attr-list.h2
-rw-r--r--src/widgets/sp-xmlview-content.h5
-rw-r--r--src/widgets/sp-xmlview-tree.h3
-rw-r--r--src/widgets/spray-toolbar.cpp2
-rw-r--r--src/widgets/stroke-style.cpp1
42 files changed, 122 insertions, 68 deletions
diff --git a/src/attribute-rel-util.h b/src/attribute-rel-util.h
index 449a66d9e..3a6661965 100644
--- a/src/attribute-rel-util.h
+++ b/src/attribute-rel-util.h
@@ -9,7 +9,6 @@
*/
#include "glibmm/ustring.h"
-#include "xml/node.h"
#include "xml/sp-css-attr.h"
using Inkscape::XML::Node;
diff --git a/src/attributes-test.h b/src/attributes-test.h
index eee12d3c1..ba34717ea 100644
--- a/src/attributes-test.h
+++ b/src/attributes-test.h
@@ -150,6 +150,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
{"in", true},
{"in2", true},
{"intercept", true},
+ {"isolation", true},
{"k", true},
{"k1", true},
{"k2", true},
@@ -181,6 +182,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
{"media", false},
{"method", false},
{"min", true},
+ {"mix-blend-mode", true},
{"mode", true},
{"name", true},
{"numOctaves", true},
@@ -213,6 +215,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
{"overflow", true},
{"overline-position", true},
{"overline-thickness", true},
+ {"paint-order", true},
{"panose-1", true},
{"path", true},
{"pathLength", false},
@@ -276,9 +279,9 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
{"text-align", true},
{"text-anchor", true},
{"text-decoration", true},
- {"text-decoration-line", false},
- {"text-decoration-style", false},
- {"text-decoration-color", false},
+ {"text-decoration-line", true},
+ {"text-decoration-style", true},
+ {"text-decoration-color", true},
{"text-indent", true},
{"text-rendering", true},
{"text-transform", true},
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index 7b5ddc00e..dfccb63bf 100644
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
@@ -19,6 +19,7 @@
#include "attributes.h"
#include "inkscape.h"
#include "persp3d.h"
+#include "persp3d-reference.h"
#include "ui/tools/box3d-tool.h"
#include "preferences.h"
#include "desktop-style.h"
diff --git a/src/composite-undo-stack-observer.h b/src/composite-undo-stack-observer.h
index 669c39a86..c93a2338b 100644
--- a/src/composite-undo-stack-observer.h
+++ b/src/composite-undo-stack-observer.h
@@ -11,7 +11,6 @@
#define SEEN_COMPOSITE_UNDO_COMMIT_OBSERVER_H
#include "gc-alloc.h"
-#include "gc-managed.h"
#include "undo-stack-observer.h"
#include <list>
diff --git a/src/display/sp-ctrlquadr.h b/src/display/sp-ctrlquadr.h
index 9fdfd29b3..1dfb06456 100644
--- a/src/display/sp-ctrlquadr.h
+++ b/src/display/sp-ctrlquadr.h
@@ -12,9 +12,7 @@
* Released under GNU GPL
*/
-#include "sp-canvas.h"
-
-
+#include <2geom/geom.h>
#define SP_TYPE_CTRLQUADR (sp_ctrlquadr_get_type ())
#define SP_CTRLQUADR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_CTRLQUADR, SPCtrlQuadr))
diff --git a/src/extension/execution-env.h b/src/extension/execution-env.h
index 92f496b90..795f5a65a 100644
--- a/src/extension/execution-env.h
+++ b/src/extension/execution-env.h
@@ -17,8 +17,6 @@
#include <gtkmm/dialog.h>
-#include "extension.h"
-
namespace Inkscape {
namespace UI {
diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp
index c2ef2b27c..c120df719 100644
--- a/src/extension/internal/grid.cpp
+++ b/src/extension/internal/grid.cpp
@@ -29,6 +29,7 @@
#include "selection.h"
#include "sp-object.h"
#include "util/glib-list-iterators.h"
+#include "2geom/geom.h"
#include "svg/path-string.h"
diff --git a/src/extension/internal/metafile-inout.cpp b/src/extension/internal/metafile-inout.cpp
index c7ae53370..1d419a6a0 100644
--- a/src/extension/internal/metafile-inout.cpp
+++ b/src/extension/internal/metafile-inout.cpp
@@ -17,6 +17,7 @@
#include <glib.h>
#include <glibmm/miscutils.h>
+#include "display/curve.h"
#include "extension/internal/metafile-inout.h" // picks up PNG
#include "extension/print.h"
#include "path-prefix.h"
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 0b250fe52..6773069de 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -636,13 +636,13 @@ GrDrag::GrDrag(SPDesktop *desktop) :
style_set_connection(),
style_query_connection()
{
- sel_changed_connection = selection->connectChanged(
+ sel_changed_connection = selection->connectChangedFirst(
sigc::bind(
sigc::ptr_fun(&gr_drag_sel_changed),
(gpointer)this )
);
- sel_modified_connection = selection->connectModified(
+ sel_modified_connection = selection->connectModifiedFirst(
sigc::bind(
sigc::ptr_fun(&gr_drag_sel_modified),
(gpointer)this )
diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index c92a5c22f..4ed13b9f7 100644
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
@@ -25,7 +25,6 @@
#include <2geom/point.h>
-#include "knot-enums.h"
#include "sp-gradient.h" // TODO refactor enums to external .h file
#include "sp-mesh-array.h"
diff --git a/src/knotholder.h b/src/knotholder.h
index 25557bef2..fc91a56fc 100644
--- a/src/knotholder.h
+++ b/src/knotholder.h
@@ -18,7 +18,6 @@
*/
#include <glib.h>
-#include "knot-enums.h"
#include <2geom/forward.h>
#include <list>
#include <sigc++/connection.h>
diff --git a/src/libvpsc/generate-constraints.cpp b/src/libvpsc/generate-constraints.cpp
index fabe5217f..288e7ed53 100644
--- a/src/libvpsc/generate-constraints.cpp
+++ b/src/libvpsc/generate-constraints.cpp
@@ -209,7 +209,6 @@ int generateXConstraints(const int n, Rectangle** rs, Variable** vars, Constrain
}
} else {
// Close event
- int r;
if(useNeighbourLists) {
for(NodeSet::iterator i=v->leftNeighbours->begin();
i!=v->leftNeighbours->end();i++
@@ -217,7 +216,7 @@ int generateXConstraints(const int n, Rectangle** rs, Variable** vars, Constrain
Node *u=*i;
double sep = (v->r->width()+u->r->width())/2.0;
constraints.push_back(new Constraint(u->v,v->v,sep));
- r=u->rightNeighbours->erase(v);
+ u->rightNeighbours->erase(v);
}
for(NodeSet::iterator i=v->rightNeighbours->begin();
@@ -226,22 +225,22 @@ int generateXConstraints(const int n, Rectangle** rs, Variable** vars, Constrain
Node *u=*i;
double sep = (v->r->width()+u->r->width())/2.0;
constraints.push_back(new Constraint(v->v,u->v,sep));
- r=u->leftNeighbours->erase(v);
+ u->leftNeighbours->erase(v);
}
} else {
Node *l=v->firstAbove, *r=v->firstBelow;
if(l!=NULL) {
double sep = (v->r->width()+l->r->width())/2.0;
constraints.push_back(new Constraint(l->v,v->v,sep));
- l->firstBelow=v->firstBelow;
+ l->firstBelow = v->firstBelow;
}
if(r!=NULL) {
double sep = (v->r->width()+r->r->width())/2.0;
constraints.push_back(new Constraint(v->v,r->v,sep));
- r->firstAbove=v->firstAbove;
+ r->firstAbove = v->firstAbove;
}
}
- r=scanline.erase(v);
+ scanline.erase(v);
delete v;
}
delete e;
diff --git a/src/line-geometry.h b/src/line-geometry.h
index 48baad265..d7be9570c 100644
--- a/src/line-geometry.h
+++ b/src/line-geometry.h
@@ -16,8 +16,7 @@
#include "glib.h"
#include "axis-manip.h" // FIXME: This is only for Box3D::epsilon; move that to a better location
#include "2geom/point.h"
-#include "document.h"
-#include "ui/view/view.h"
+#include "persp3d.h"
class SPDesktop;
diff --git a/src/marker.h b/src/marker.h
index 21ad63a41..585615476 100644
--- a/src/marker.h
+++ b/src/marker.h
@@ -29,7 +29,6 @@ struct SPMarkerView;
#include "svg/svg-length.h"
#include "enums.h"
#include "sp-item-group.h"
-#include "sp-marker-loc.h"
#include "uri-references.h"
#include "viewbox.h"
diff --git a/src/persp3d.h b/src/persp3d.h
index 4690c0582..bd3777a19 100644
--- a/src/persp3d.h
+++ b/src/persp3d.h
@@ -18,10 +18,10 @@
#include <list>
#include <vector>
#include <map>
-#include "sp-item.h"
#include "transf_mat_3x4.h"
#include "document.h"
-#include "inkscape.h"
+#include "inkscape.h" // for SP_ACTIVE_DOCUMENT
+#include "sp-object.h"
class SPBox3D;
diff --git a/src/selection.h b/src/selection.h
index 394ab64ff..ba38bec08 100644
--- a/src/selection.h
+++ b/src/selection.h
@@ -23,9 +23,7 @@
#include "gc-finalized.h"
#include "gc-anchored.h"
#include "gc-soft-ptr.h"
-#include "util/list.h"
#include "sp-item.h"
-#include "snapped-point.h"
class SPDesktop;
@@ -302,6 +300,10 @@ public:
sigc::connection connectChanged(sigc::slot<void, Selection *> const &slot) {
return _changed_signal.connect(slot);
}
+ sigc::connection connectChangedFirst(sigc::slot<void, Selection *> const &slot)
+ {
+ return _changed_signal.slots().insert(_changed_signal.slots().begin(), slot);
+ }
/**
* Connects a slot to be notified of selected object modifications.
@@ -319,6 +321,10 @@ public:
{
return _modified_signal.connect(slot);
}
+ sigc::connection connectModifiedFirst(sigc::slot<void, Selection *, guint> const &slot)
+ {
+ return _modified_signal.slots().insert(_modified_signal.slots().begin(), slot);
+ }
private:
/** no copy. */
diff --git a/src/snapper.h b/src/snapper.h
index d9f3ab797..c609239cf 100644
--- a/src/snapper.h
+++ b/src/snapper.h
@@ -20,7 +20,6 @@
#include "snapped-point.h"
#include "snapped-line.h"
#include "snapped-curve.h"
-#include "snap-preferences.h"
#include "snap-candidate.h"
struct IntermSnapResults {
diff --git a/src/sp-image.h b/src/sp-image.h
index 50eb731d7..17262d74f 100644
--- a/src/sp-image.h
+++ b/src/sp-image.h
@@ -17,7 +17,8 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glibmm/ustring.h>
#include "svg/svg-length.h"
-#include "sp-shape.h"
+#include "display/curve.h"
+#include "sp-item.h"
#include "viewbox.h"
#define SP_IMAGE(obj) (dynamic_cast<SPImage*>((SPObject*)obj))
diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h
index 89c4f6b1b..02e2f10ec 100644
--- a/src/sp-paint-server.h
+++ b/src/sp-paint-server.h
@@ -18,7 +18,6 @@
#include <cairo.h>
#include <2geom/rect.h>
#include "sp-object.h"
-#include "uri-references.h"
#define SP_PAINT_SERVER(obj) (dynamic_cast<SPPaintServer*>((SPObject*)obj))
#define SP_IS_PAINT_SERVER(obj) (dynamic_cast<const SPPaintServer*>((SPObject*)obj) != NULL)
diff --git a/src/sp-root.h b/src/sp-root.h
index 0e5d87133..a25e8030c 100644
--- a/src/sp-root.h
+++ b/src/sp-root.h
@@ -16,7 +16,6 @@
#include "version.h"
#include "svg/svg-length.h"
-#include "enums.h"
#include "sp-item-group.h"
#include "viewbox.h"
diff --git a/src/sp-script.h b/src/sp-script.h
index 95b56e79c..36072a0ca 100644
--- a/src/sp-script.h
+++ b/src/sp-script.h
@@ -12,7 +12,8 @@
* Released under GNU GPL version 2 or later, read the file 'COPYING' for more information
*/
-#include "sp-item.h"
+#include "sp-object.h"
+#include "document.h"
#define SP_SCRIPT(obj) (dynamic_cast<SPScript*>((SPObject*)obj))
#define SP_IS_SCRIPT(obj) (dynamic_cast<const SPScript*>((SPObject*)obj) != NULL)
diff --git a/src/sp-symbol.h b/src/sp-symbol.h
index d1e62e923..a2e769cc2 100644
--- a/src/sp-symbol.h
+++ b/src/sp-symbol.h
@@ -22,8 +22,6 @@
#define SP_IS_SYMBOL(obj) (dynamic_cast<const SPSymbol*>((SPObject*)obj) != NULL)
#include <2geom/affine.h>
-#include "svg/svg-length.h"
-#include "enums.h"
#include "sp-item-group.h"
#include "viewbox.h"
diff --git a/src/sp-text.h b/src/sp-text.h
index f7cf5a3aa..5f0485083 100644
--- a/src/sp-text.h
+++ b/src/sp-text.h
@@ -16,8 +16,8 @@
#include <glib.h>
#include <stddef.h>
#include <sigc++/sigc++.h>
+#include "sp-string.h" // Provides many other headers with SP_IS_STRING
#include "sp-item.h"
-#include "sp-string.h"
#include "text-tag-attributes.h"
#include "libnrtype/Layout-TNG.h"
diff --git a/src/sp-use.h b/src/sp-use.h
index 604040d59..215eb44d7 100644
--- a/src/sp-use.h
+++ b/src/sp-use.h
@@ -17,6 +17,7 @@
#include <sigc++/sigc++.h>
#include "svg/svg-length.h"
#include "sp-item.h"
+#include "enums.h"
#define SP_USE(obj) (dynamic_cast<SPUse*>((SPObject*)obj))
#define SP_IS_USE(obj) (dynamic_cast<const SPUse*>((SPObject*)obj) != NULL)
diff --git a/src/style-test.h b/src/style-test.h
index 064773d1d..8a4055cc1 100644
--- a/src/style-test.h
+++ b/src/style-test.h
@@ -86,6 +86,59 @@ public:
// TestCase("fill:url(#painter) inherit", 0, "#painter"),
TestCase("fill:inherit"),
+
+// General tests (in order of appearance in sp_style_read), SPIPaint tested above
+ TestCase("visibility:hidden"), // SPIEnum
+ TestCase("visibility:collapse"),
+ TestCase("visibility:visible"),
+ TestCase("display:none"), // SPIEnum
+ TestCase("overflow:visible"), // SPIEnum
+ TestCase("overflow:auto"), // SPIEnum
+ TestCase("font-size:12", "font-size:12px"), // SPIFontSize
+ TestCase("font-size:12px"),
+ TestCase("font-size:12pt", "font-size:15px"),
+ TestCase("font-size:medium"),
+ TestCase("font-style:italic"), // SPIEnum
+ TestCase("font-variant:small-caps"), // SPIEnum
+ TestCase("font-weight:100"), // SPIEnum
+ TestCase("font-weight:normal"),
+ TestCase("font-weight:bolder"),
+ TestCase("font-stretch:condensed"), // SPIEnum
+ TestCase("text-indent:12em"), // SPILength?
+ TestCase("text-align:center"), // SPIEnum
+ TestCase("text-decoration: underline"), // SPITextDecoration
+ TestCase("line-height:24px"), // SPILengthOrNormal
+ TestCase("letter-spacing:2px"), // SPILengthOrNormal
+ TestCase("word-spacing:2px"), // SPILengthOrNormal
+ TestCase("text-transform:lowercase"), // SPIEnum
+ // ...
+ TestCase("baseline-shift:baseline"), // SPIBaselineShift
+ TestCase("baseline-shift:sub"),
+ TestCase("baseline-shift:12.5%"),
+ TestCase("baseline-shift:2px"),
+ TestCase("opacity:0.1"), // SPIScale24
+ // ...
+ TestCase("stroke-width:2px"), // SPILength
+ TestCase("stroke-linecap:round"), // SPIEnum
+ TestCase("stroke-linejoin:round"), // SPIEnum
+ TestCase("stroke-miterlimit:4"), // SPIFloat
+ TestCase("marker:url(#Arrow)"), // SPIString
+ TestCase("marker-start:url(#Arrow)"),
+ TestCase("marker-mid:url(#Arrow)"),
+ TestCase("marker-end:url(#Arrow)"),
+ TestCase("stroke-opacity:0.5"), // SPIScale24
+ TestCase("stroke-dasharray:0, 1, 0, 1"), // NRVpathDash
+ TestCase("stroke-dasharray:0 1 0 1","stroke-dasharray:0, 1, 0, 1"),
+ TestCase("stroke-dashoffset:13"), // NRVpathDash
+ // ...
+ TestCase("font-family:sans-serif"), // SPIString, text_private
+ //TestCase("filter:url(#myfilter)"), // filter
+
+ TestCase("opacity:0.1;fill:#ff0000;stroke:#0000ff;stroke-width:2px"),
+
+#ifdef WITH_SVG2
+ TestCase("paint-order:stroke"), // SPIPaintOrder
+#endif
TestCase(0)
};
@@ -107,8 +160,10 @@ public:
gchar *str0_set = sp_style_write_string( style, SP_STYLE_FLAG_IFSET );
//printf("<<%s>>\n", str0_set);
if ( cases[i].dst ) {
+ //std::cout << " " << std::string(str0_set) << " " << std::string(cases[i].dst) << std::endl;
TS_ASSERT_EQUALS( std::string(str0_set), std::string(cases[i].dst) );
} else {
+ //std::cout << " " << std::string(str0_set) << " " << std::string(cases[i].src) << std::endl;
TS_ASSERT_EQUALS( std::string(str0_set), std::string(cases[i].src) );
}
diff --git a/src/style.cpp b/src/style.cpp
index ad5aa17ae..f3a12db86 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -4785,7 +4785,7 @@ sp_style_write_ifontsize(gchar *p, gint const len, gchar const *key,
return g_snprintf(p, len, "%s:inherit;", key);
} else if (val->type == SP_FONT_SIZE_LITERAL) {
for (unsigned i = 0; enum_font_size[i].key; i++) {
- if (enum_font_size[i].value == static_cast< gint > (val->value) ) {
+ if (enum_font_size[i].value == static_cast< gint > (val->literal) ) {
return g_snprintf(p, len, "%s:%s;", key, enum_font_size[i].key);
}
}
diff --git a/src/style.h b/src/style.h
index 7366c2a24..5f1f3932a 100644
--- a/src/style.h
+++ b/src/style.h
@@ -19,9 +19,8 @@
#include "sp-marker-loc.h"
#include "sp-filter.h"
#include "sp-filter-reference.h"
-#include "uri-references.h"
-#include "uri.h"
#include "sp-paint-server-reference.h"
+#include "uri.h"
#include <stddef.h>
#include <sigc++/connection.h>
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp
index e43b6575e..08d3119a1 100644
--- a/src/ui/tools/spray-tool.cpp
+++ b/src/ui/tools/spray-tool.cpp
@@ -82,7 +82,7 @@ using namespace std;
// Disabled in 0.91 because of Bug #1274831 (crash, spraying an object
// with the mode: spray object in single path)
// Please enable again when working on 1.0
-//#define ENABLE_SPRAY_MODE_SINGLE_PATH
+#define ENABLE_SPRAY_MODE_SINGLE_PATH
#include "tool-factory.h"
@@ -140,7 +140,7 @@ static void sp_spray_scale_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *it
}
SprayTool::SprayTool()
- : ToolBase(cursor_spray_xpm, 4, 4)
+ : ToolBase(cursor_spray_xpm, 4, 4, false)
, pressure(TC_DEFAULT_PRESSURE)
, dragging(false)
, usepressure(0)
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index bf37937c4..ac830fe6b 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -180,10 +180,10 @@ void TextTool::setup() {
this->shape_editor->set_item(item, SH_KNOTHOLDER);
}
- this->sel_changed_connection = sp_desktop_selection(desktop)->connectChanged(
+ this->sel_changed_connection = sp_desktop_selection(desktop)->connectChangedFirst(
sigc::mem_fun(*this, &TextTool::_selectionChanged)
);
- this->sel_modified_connection = sp_desktop_selection(desktop)->connectModified(
+ this->sel_modified_connection = sp_desktop_selection(desktop)->connectModifiedFirst(
sigc::mem_fun(*this, &TextTool::_selectionModified)
);
this->style_set_connection = desktop->connectSetStyle(
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 45b519fb4..752053be1 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -90,7 +90,7 @@ SPDesktop const& ToolBase::getDesktop() const {
return *desktop;
}
-ToolBase::ToolBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y)
+ToolBase::ToolBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y, bool uses_snap)
: pref_observer(NULL)
, cursor(NULL)
, xp(0)
@@ -106,6 +106,7 @@ ToolBase::ToolBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y)
, _delayed_snap_event(NULL)
, _dse_callback_in_process(false)
, desktop(NULL)
+ , _uses_snap(uses_snap)
, cursor_shape(cursor_shape)
, hot_x(hot_x)
, hot_y(hot_y)
@@ -384,7 +385,9 @@ bool ToolBase::root_handler(GdkEvent* event) {
case 1:
if (this->space_panning) {
// When starting panning, make sure there are no snap events pending because these might disable the panning again
- sp_event_context_discard_delayed_snap_event(this);
+ if (_uses_snap) {
+ sp_event_context_discard_delayed_snap_event(this);
+ }
panning = 1;
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -402,7 +405,9 @@ bool ToolBase::root_handler(GdkEvent* event) {
zoom_rb = 2;
} else {
// When starting panning, make sure there are no snap events pending because these might disable the panning again
- sp_event_context_discard_delayed_snap_event(this);
+ if (_uses_snap) {
+ sp_event_context_discard_delayed_snap_event(this);
+ }
panning = 2;
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -418,7 +423,9 @@ bool ToolBase::root_handler(GdkEvent* event) {
case 3:
if ((event->button.state & GDK_SHIFT_MASK) || (event->button.state & GDK_CONTROL_MASK)) {
// When starting panning, make sure there are no snap events pending because these might disable the panning again
- sp_event_context_discard_delayed_snap_event(this);
+ if (_uses_snap) {
+ sp_event_context_discard_delayed_snap_event(this);
+ }
panning = 3;
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -946,6 +953,10 @@ void sp_event_context_read(ToolBase *ec, gchar const *key) {
gint sp_event_context_root_handler(ToolBase * event_context,
GdkEvent * event)
{
+ if (!event_context->_uses_snap) {
+ return sp_event_context_virtual_root_handler(event_context, event);
+ }
+
switch (event->type) {
case GDK_MOTION_NOTIFY:
sp_event_context_snap_delay_handler(event_context, NULL, NULL,
@@ -995,7 +1006,12 @@ gint sp_event_context_virtual_root_handler(ToolBase * event_context, GdkEvent *
* Calls virtual item_handler(), the item event handling function.
*/
gint sp_event_context_item_handler(ToolBase * event_context,
- SPItem * item, GdkEvent * event) {
+ SPItem * item, GdkEvent * event)
+{
+ if (!event_context->_uses_snap) {
+ return sp_event_context_virtual_item_handler(event_context, item, event);
+ }
+
switch (event->type) {
case GDK_MOTION_NOTIFY:
sp_event_context_snap_delay_handler(event_context, (gpointer) item, NULL, (GdkEventMotion *) event, DelayedSnapEvent::EVENTCONTEXT_ITEM_HANDLER);
@@ -1232,7 +1248,7 @@ void sp_event_context_snap_delay_handler(ToolBase *ec,
static guint32 prev_time;
static boost::optional<Geom::Point> prev_pos;
- if (ec->_dse_callback_in_process) {
+ if (!ec->_uses_snap || ec->_dse_callback_in_process) {
return;
}
diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h
index eb8908f3e..def6e3d91 100644
--- a/src/ui/tools/tool-base.h
+++ b/src/ui/tools/tool-base.h
@@ -113,7 +113,7 @@ public:
void enableGrDrag (bool enable=true);
bool deleteSelectedDrag(bool just_one);
- ToolBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y);
+ ToolBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y, bool uses_snap = true);
virtual ~ToolBase();
@@ -181,6 +181,7 @@ public:
void sp_event_context_update_cursor();
SPDesktop *desktop;
+ bool _uses_snap; // TODO: make protected or private
protected:
/// An xpm containing the shape of the tool's cursor.
@@ -188,6 +189,7 @@ protected:
/// The cursor's hot spot
gint hot_x, hot_y;
+ /// Whether the tool should receive delayed snap events
bool sp_event_context_knot_mouseover() const;
diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h
index 6f0c2f26e..8d2389b15 100644
--- a/src/ui/widget/filter-effect-chooser.h
+++ b/src/ui/widget/filter-effect-chooser.h
@@ -25,7 +25,6 @@
#include "combo-enums.h"
#include "filter-enums.h"
-#include "spin-slider.h"
#include "spin-scale.h"
namespace Inkscape {
diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h
index 6da58a2dd..23ecbdfda 100644
--- a/src/ui/widget/style-swatch.h
+++ b/src/ui/widget/style-swatch.h
@@ -27,7 +27,6 @@
#include <gtkmm/enums.h>
#include "desktop.h"
-#include "button.h"
#include "preferences.h"
struct SPStyle;
diff --git a/src/vanishing-point.h b/src/vanishing-point.h
index 17e3a4aa9..53366fe66 100644
--- a/src/vanishing-point.h
+++ b/src/vanishing-point.h
@@ -16,11 +16,8 @@
#include <2geom/point.h>
#include "knot.h"
#include "selection.h"
-#include "axis-manip.h"
-#include "inkscape.h"
#include "persp3d.h"
#include "box3d.h"
-#include "persp3d-reference.h"
#include "ui/control-manager.h" // TODO break enums out separately
class SPBox3D;
diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h
index c88666b06..1f58de2e4 100644
--- a/src/widgets/gradient-selector.h
+++ b/src/widgets/gradient-selector.h
@@ -37,7 +37,6 @@
#include "sp-gradient.h"
#include "sp-gradient-spread.h"
#include "sp-gradient-units.h"
-#include "gradient-image.h"
class SPGradient;
diff --git a/src/widgets/sp-color-icc-selector.h b/src/widgets/sp-color-icc-selector.h
index 3eb12222c..f63ab0853 100644
--- a/src/widgets/sp-color-icc-selector.h
+++ b/src/widgets/sp-color-icc-selector.h
@@ -4,7 +4,6 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include "../color.h"
#include "sp-color-selector.h"
namespace Inkscape {
diff --git a/src/widgets/sp-color-wheel-selector.h b/src/widgets/sp-color-wheel-selector.h
index 8e0dc6cea..bbd377422 100644
--- a/src/widgets/sp-color-wheel-selector.h
+++ b/src/widgets/sp-color-wheel-selector.h
@@ -4,7 +4,6 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include "../color.h"
#include "sp-color-slider.h"
#include "sp-color-selector.h"
diff --git a/src/widgets/sp-xmlview-attr-list.h b/src/widgets/sp-xmlview-attr-list.h
index 8b1dae49b..367ef1a12 100644
--- a/src/widgets/sp-xmlview-attr-list.h
+++ b/src/widgets/sp-xmlview-attr-list.h
@@ -14,8 +14,6 @@
#include <stdio.h>
#include <gtk/gtk.h>
-#include "../xml/repr.h"
-
#define SP_TYPE_XMLVIEW_ATTR_LIST (sp_xmlview_attr_list_get_type ())
diff --git a/src/widgets/sp-xmlview-content.h b/src/widgets/sp-xmlview-content.h
index 941ef0be1..8b1342c5e 100644
--- a/src/widgets/sp-xmlview-content.h
+++ b/src/widgets/sp-xmlview-content.h
@@ -13,16 +13,11 @@
*/
#include <config.h>
-
#include <stdio.h>
-
#include <gtk/gtk.h>
-#include "../xml/repr.h"
-
#include <glib.h>
-
#define SP_TYPE_XMLVIEW_CONTENT (sp_xmlview_content_get_type ())
#define SP_XMLVIEW_CONTENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_XMLVIEW_CONTENT, SPXMLViewContent))
#define SP_IS_XMLVIEW_CONTENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_XMLVIEW_CONTENT))
diff --git a/src/widgets/sp-xmlview-tree.h b/src/widgets/sp-xmlview-tree.h
index 50fcb3bc8..69228fa88 100644
--- a/src/widgets/sp-xmlview-tree.h
+++ b/src/widgets/sp-xmlview-tree.h
@@ -13,12 +13,9 @@
*/
#include <gtk/gtk.h>
-#include "../xml/repr.h"
-
#include <glib.h>
-
#define SP_TYPE_XMLVIEW_TREE (sp_xmlview_tree_get_type ())
#define SP_XMLVIEW_TREE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_XMLVIEW_TREE, SPXMLViewTree))
#define SP_IS_XMLVIEW_TREE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_XMLVIEW_TREE))
diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp
index cf56b3255..788ce6475 100644
--- a/src/widgets/spray-toolbar.cpp
+++ b/src/widgets/spray-toolbar.cpp
@@ -47,7 +47,7 @@ using Inkscape::UI::PrefPusher;
// Disabled in 0.91 because of Bug #1274831 (crash, spraying an object
// with the mode: spray object in single path)
// Please enable again when working on 1.0
-//#define ENABLE_SPRAY_MODE_SINGLE_PATH
+#define ENABLE_SPRAY_MODE_SINGLE_PATH
//########################
//## Spray ##
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index d140cfb21..dbfb1bcd2 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -24,6 +24,7 @@
#include "svg/svg-color.h"
#include "util/units.h"
#include "ui/widget/unit-menu.h"
+#include "desktop-widget.h"
using Inkscape::DocumentUndo;
using Inkscape::Util::unit_table;