summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-04-29 20:51:23 +0000
committerMarc Jeanmougin <mc@M0nst3r.bouyguesbox.fr>2015-04-29 20:51:23 +0000
commit5163b1155c85c040b55f28c771f6d12bcd483765 (patch)
tree79afe1546f86f49fe1dc8fd625e125c0646bc59b /src
parentmerge with trunk (diff)
parentBetter solution picking (diff)
downloadinkscape-5163b1155c85c040b55f28c771f6d12bcd483765.tar.gz
inkscape-5163b1155c85c040b55f28c771f6d12bcd483765.zip
updated with trunk
(bzr r13922.1.19)
Diffstat (limited to 'src')
-rw-r--r--src/display/canvas-axonomgrid.cpp4
-rw-r--r--src/display/canvas-grid.cpp4
-rw-r--r--src/extension/execution-env.cpp4
-rw-r--r--src/extension/extension.cpp4
-rw-r--r--src/extension/internal/bitmap/imagemagick.cpp4
-rw-r--r--src/extension/internal/cdr-input.h4
-rw-r--r--src/extension/internal/grid.cpp4
-rw-r--r--src/extension/internal/pdfinput/pdf-input.h4
-rw-r--r--src/extension/internal/vsd-input.h4
-rw-r--r--src/extension/internal/wmf-inout.cpp6
-rw-r--r--src/extension/param/bool.cpp4
-rw-r--r--src/extension/param/color.cpp4
-rw-r--r--src/extension/param/description.cpp4
-rw-r--r--src/extension/param/enum.cpp4
-rw-r--r--src/extension/param/float.cpp4
-rw-r--r--src/extension/param/int.cpp4
-rw-r--r--src/extension/param/notebook.cpp4
-rw-r--r--src/extension/param/radiobutton.cpp4
-rw-r--r--src/extension/param/string.cpp4
-rw-r--r--src/extension/prefdialog.h9
-rw-r--r--src/helper/geom-pathstroke.cpp204
-rw-r--r--src/inkscape.cpp4
-rw-r--r--src/libdepixelize/kopftracer2011.cpp7
-rw-r--r--src/libnrtype/FontFactory.h2
-rw-r--r--src/live_effects/lpe-fillet-chamfer.h8
-rw-r--r--src/live_effects/lpe-lattice2.cpp2
-rw-r--r--src/live_effects/lpe-lattice2.h6
-rw-r--r--src/live_effects/parameter/originalpath.cpp4
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp4
-rw-r--r--src/live_effects/parameter/path.cpp8
-rw-r--r--src/path-chemistry.cpp12
-rw-r--r--src/ui/dialog-events.cpp4
-rw-r--r--src/ui/dialog/aboutbox.h8
-rw-r--r--src/ui/dialog/calligraphic-profile-rename.h4
-rw-r--r--src/ui/dialog/color-item.cpp4
-rw-r--r--src/ui/dialog/debug.cpp4
-rw-r--r--src/ui/dialog/export.cpp4
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.h8
-rw-r--r--src/ui/dialog/filedialogimpl-win32.h5
-rw-r--r--src/ui/dialog/floating-behavior.cpp4
-rw-r--r--src/ui/dialog/font-substitution.cpp4
-rw-r--r--src/ui/dialog/guides.h4
-rw-r--r--src/ui/dialog/icon-preview.cpp4
-rw-r--r--src/ui/dialog/layer-properties.h4
-rw-r--r--src/ui/dialog/layers.h4
-rw-r--r--src/ui/dialog/livepatheffect-add.h8
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.cpp4
-rw-r--r--src/ui/dialog/lpe-powerstroke-properties.cpp4
-rw-r--r--src/ui/dialog/messages.h8
-rw-r--r--src/ui/dialog/objects.h4
-rw-r--r--src/ui/dialog/ocaldialogs.h4
-rw-r--r--src/ui/dialog/spellcheck.h4
-rw-r--r--src/ui/dialog/symbols.cpp4
-rw-r--r--src/ui/dialog/text-edit.h4
-rw-r--r--src/ui/dialog/tile.h4
-rw-r--r--src/ui/dialog/transformation.cpp4
-rw-r--r--src/ui/previewholder.h4
-rw-r--r--src/ui/tools/tool-base.cpp4
-rw-r--r--src/ui/widget/addtoicon.cpp4
-rw-r--r--src/ui/widget/button.h8
-rw-r--r--src/ui/widget/clipmaskicon.cpp4
-rw-r--r--src/ui/widget/color-picker.h8
-rw-r--r--src/ui/widget/color-preview.h4
-rw-r--r--src/ui/widget/dock-item.h4
-rw-r--r--src/ui/widget/dock.h8
-rw-r--r--src/ui/widget/entity-entry.cpp4
-rw-r--r--src/ui/widget/filter-effect-chooser.h8
-rw-r--r--src/ui/widget/frame.h8
-rw-r--r--src/ui/widget/imageicon.h8
-rw-r--r--src/ui/widget/imagetoggler.h4
-rw-r--r--src/ui/widget/insertordericon.h3
-rw-r--r--src/ui/widget/labelled.h8
-rw-r--r--src/ui/widget/layertypeicon.cpp4
-rw-r--r--src/ui/widget/licensor.h8
-rw-r--r--src/ui/widget/notebook-page.h4
-rw-r--r--src/ui/widget/object-composite-settings.h8
-rw-r--r--src/ui/widget/panel.cpp4
-rw-r--r--src/ui/widget/panel.h4
-rw-r--r--src/ui/widget/preferences-widget.cpp4
-rw-r--r--src/ui/widget/preferences-widget.h4
-rw-r--r--src/ui/widget/rotateable.cpp4
-rw-r--r--src/ui/widget/selected-style.h4
-rw-r--r--src/ui/widget/spin-scale.h4
-rw-r--r--src/ui/widget/spin-slider.h4
-rw-r--r--src/ui/widget/spinbutton.h8
-rw-r--r--src/ui/widget/style-swatch.h4
-rw-r--r--src/ui/widget/tolerance-slider.cpp4
-rw-r--r--src/ui/widget/unit-menu.h8
-rw-r--r--src/verbs.cpp7
-rw-r--r--src/widgets/dash-selector.h4
-rw-r--r--src/widgets/desktop-widget.h8
-rw-r--r--src/widgets/fill-style.cpp4
-rw-r--r--src/widgets/icon.cpp4
-rw-r--r--src/widgets/paint-selector.cpp4
-rw-r--r--src/widgets/shrink-wrap-button.cpp4
-rw-r--r--src/widgets/sp-attribute-widget.h4
-rw-r--r--src/widgets/spw-utilities.cpp4
-rw-r--r--src/widgets/stroke-marker-selector.h8
-rw-r--r--src/widgets/swatch-selector.h8
-rw-r--r--src/widgets/text-toolbar.cpp14
-rw-r--r--src/widgets/toolbox.cpp4
101 files changed, 169 insertions, 544 deletions
diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp
index a2df86823..1794ccbab 100644
--- a/src/display/canvas-axonomgrid.cpp
+++ b/src/display/canvas-axonomgrid.cpp
@@ -17,10 +17,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/label.h>
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index 9b9f64529..4eda9b194 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -17,10 +17,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/label.h>
diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp
index 971f0b64a..29c2b5537 100644
--- a/src/extension/execution-env.cpp
+++ b/src/extension/execution-env.cpp
@@ -14,10 +14,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include "gtkmm/messagedialog.h"
#include "execution-env.h"
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index 3d0f49a20..6f7539360 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -19,10 +19,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/frame.h>
diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp
index 5e4c930bc..bc0dd8e33 100644
--- a/src/extension/internal/bitmap/imagemagick.cpp
+++ b/src/extension/internal/bitmap/imagemagick.cpp
@@ -12,10 +12,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <libintl.h>
#include <gtkmm/box.h>
diff --git a/src/extension/internal/cdr-input.h b/src/extension/internal/cdr-input.h
index 3de6c1ed0..10af41d5a 100644
--- a/src/extension/internal/cdr-input.h
+++ b/src/extension/internal/cdr-input.h
@@ -19,10 +19,6 @@
#ifdef WITH_LIBCDR
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include "../implementation/implementation.h"
diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp
index 932d9a0d0..8fd82b675 100644
--- a/src/extension/internal/grid.cpp
+++ b/src/extension/internal/grid.cpp
@@ -15,10 +15,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/spinbutton.h>
diff --git a/src/extension/internal/pdfinput/pdf-input.h b/src/extension/internal/pdfinput/pdf-input.h
index d57c3e993..866db5d82 100644
--- a/src/extension/internal/pdfinput/pdf-input.h
+++ b/src/extension/internal/pdfinput/pdf-input.h
@@ -16,10 +16,6 @@
#ifdef HAVE_POPPLER
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include "../../implementation/implementation.h"
diff --git a/src/extension/internal/vsd-input.h b/src/extension/internal/vsd-input.h
index 3414e0ec9..acc52debf 100644
--- a/src/extension/internal/vsd-input.h
+++ b/src/extension/internal/vsd-input.h
@@ -19,10 +19,6 @@
#ifdef WITH_LIBVISIO
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include "../implementation/implementation.h"
diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp
index 30a028eec..3ab7a4e89 100644
--- a/src/extension/internal/wmf-inout.cpp
+++ b/src/extension/internal/wmf-inout.cpp
@@ -3085,8 +3085,12 @@ Wmf::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
d.dc[0].style.stroke_dasharray.set = 0;
d.dc[0].style.stroke_linecap.computed = 2; // U_PS_ENDCAP_SQUARE;
d.dc[0].style.stroke_linejoin.computed = 0; // U_PS_JOIN_MITER;
- d.dc[0].style.stroke_width.value = 1.0; // will be reset to something reasonable once WMF draying size is known
+ d.dc[0].style.stroke_width.value = 1.0; // will be reset to something reasonable once WMF drawing size is known
d.dc[0].style.stroke.value.color.set( 0, 0, 0 );
+ d.dc[0].stroke_set = true;
+
+ // Default brush is none - no fill. WMF files that do not specify a brush are unlikely to look very good!
+ d.dc[0].fill_set = false;
d.dc[0].font_name = strdup("Arial"); // Default font, set only on lowest level, it copies up from there WMF spec says device can pick whatever it wants
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index 548dec4fa..de9b1c586 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -10,10 +10,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/spinbutton.h>
diff --git a/src/extension/param/color.cpp b/src/extension/param/color.cpp
index 5bd70359f..b774bac83 100644
--- a/src/extension/param/color.cpp
+++ b/src/extension/param/color.cpp
@@ -14,10 +14,6 @@
#include <iostream>
#include <sstream>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/spinbutton.h>
diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp
index 95ed04afc..326e75e4a 100644
--- a/src/extension/param/description.cpp
+++ b/src/extension/param/description.cpp
@@ -13,10 +13,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <glibmm/i18n.h>
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 74b2a75ad..8bc0fbda7 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -18,10 +18,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/comboboxtext.h>
#include <glibmm/i18n.h>
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp
index 464938f03..81508f6c0 100644
--- a/src/extension/param/float.cpp
+++ b/src/extension/param/float.cpp
@@ -10,10 +10,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/scale.h>
diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp
index 819c75693..c286018fd 100644
--- a/src/extension/param/int.cpp
+++ b/src/extension/param/int.cpp
@@ -10,10 +10,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/scale.h>
diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp
index 9ec31ca6b..20c8e8481 100644
--- a/src/extension/param/notebook.cpp
+++ b/src/extension/param/notebook.cpp
@@ -16,10 +16,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/spinbutton.h>
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp
index 740acf1d1..8181c6f51 100644
--- a/src/extension/param/radiobutton.cpp
+++ b/src/extension/param/radiobutton.cpp
@@ -18,10 +18,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/radiobutton.h>
diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp
index d6e438db5..4e525ff73 100644
--- a/src/extension/param/string.cpp
+++ b/src/extension/param/string.cpp
@@ -10,10 +10,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/spinbutton.h>
diff --git a/src/extension/prefdialog.h b/src/extension/prefdialog.h
index 905d35744..4714c2c3f 100644
--- a/src/extension/prefdialog.h
+++ b/src/extension/prefdialog.h
@@ -10,19 +10,10 @@
#ifndef INKSCAPE_EXTENSION_DIALOG_H__
#define INKSCAPE_EXTENSION_DIALOG_H__
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <glibmm/value.h>
#include <glibmm/ustring.h>
-
namespace Gtk {
class CheckButton;
}
diff --git a/src/helper/geom-pathstroke.cpp b/src/helper/geom-pathstroke.cpp
index eb0c432c6..1df17acf5 100644
--- a/src/helper/geom-pathstroke.cpp
+++ b/src/helper/geom-pathstroke.cpp
@@ -127,87 +127,104 @@ static Circle touching_circle( D2<SBasis> const &curve, double t, double tol=0.0
namespace {
-// Join functions may:
-// - inspect any curve of the current path
-// - append any type of curve to the current path
-// - inspect the outgoing path
-//
-// Join functions must:
-// - append the outgoing curve
-// OR
-// - end at outgoing.finalPoint
-
-typedef void join_func(Geom::Path& res, Geom::Curve const& outgoing, double miter, double width);
-
-void bevel_join(Geom::Path& res, Geom::Curve const& outgoing, double /*miter*/, double /*width*/)
+// Internal data structure
+
+struct join_data
+{
+ join_data(Geom::Path &_res, Geom::Path const&_outgoing, Geom::Point _in_tang, Geom::Point _out_tang, double _miter, double _width)
+ : res(_res), outgoing(_outgoing), in_tang(_in_tang)
+ , out_tang(_out_tang), miter(_miter), width(_width) {}
+
+ // I/O
+ Geom::Path &res;
+ Geom::Path const& outgoing;
+
+ // input tangents
+ Geom::Point in_tang;
+ Geom::Point out_tang;
+
+ // line parameters
+ double miter;
+ double width;
+};
+
+// Join functions must append the outgoing path
+
+typedef void join_func(join_data jd);
+
+void bevel_join(join_data jd)
{
- res.appendNew<Geom::LineSegment>(outgoing.initialPoint());
- res.append(outgoing);
+ jd.res.appendNew<Geom::LineSegment>(jd.outgoing.initialPoint());
+ jd.res.append(jd.outgoing);
}
-void round_join(Geom::Path& res, Geom::Curve const& outgoing, double /*miter*/, double width)
+void round_join(join_data jd)
{
- res.appendNew<Geom::SVGEllipticalArc>(width, width, 0, false, width <= 0, outgoing.initialPoint());
- res.append(outgoing);
+ jd.res.appendNew<Geom::SVGEllipticalArc>(jd.width, jd.width, 0, false, jd.width <= 0, jd.outgoing.initialPoint());
+ jd.res.append(jd.outgoing);
}
-void miter_join_internal(Geom::Path& res, Geom::Curve const& outgoing, double miter, double width, bool clip)
+void miter_join_internal(join_data jd, bool clip)
{
- Geom::Curve const& incoming = res.back();
- Geom::Point tang1 = Geom::unitTangentAt(reverse(incoming.toSBasis()), 0.);
- Geom::Point tang2 = outgoing.unitTangentAt(0);
- Geom::Point p = Geom::intersection_point(incoming.finalPoint(), tang1, outgoing.initialPoint(), tang2);
+ using namespace Geom;
+
+ Curve const& incoming = jd.res.back();
+ Curve const& outgoing = jd.outgoing.front();
+ Path &res = jd.res;
+ double width = jd.width, miter = jd.miter;
+
+ Point tang1 = jd.in_tang;
+ Point tang2 = jd.out_tang;
+ Point p = intersection_point(incoming.finalPoint(), tang1, outgoing.initialPoint(), tang2);
bool satisfied = false;
bool inc_ls = res.back_open().degreesOfFreedom() <= 4;
if (p.isFinite()) {
// check size of miter
- Geom::Point point_on_path = incoming.finalPoint() + Geom::rot90(tang1)*width;
- satisfied = Geom::distance(p, point_on_path) <= miter * 2.0 * width;
+ Point point_on_path = incoming.finalPoint() + rot90(tang1)*width;
+ satisfied = distance(p, point_on_path) <= miter * 2.0 * width;
if (satisfied) {
// miter OK, check to see if we can do a relocation
if (inc_ls) {
res.setFinal(p);
} else {
- res.appendNew<Geom::LineSegment>(p);
+ res.appendNew<LineSegment>(p);
}
} else if (clip) {
// miter needs clipping, find two points
- Geom::Point bisector_versor = Geom::Line(point_on_path, p).versor();
- Geom::Point point_limit = point_on_path + miter * 2.0 * width * bisector_versor;
+ Point bisector_versor = Line(point_on_path, p).versor();
+ Point point_limit = point_on_path + miter * 2.0 * width * bisector_versor;
- Geom::Point p1 = Geom::intersection_point(incoming.finalPoint(), tang1, point_limit, bisector_versor.cw());
- Geom::Point p2 = Geom::intersection_point(outgoing.initialPoint(), tang2, point_limit, bisector_versor.cw());
+ Point p1 = intersection_point(incoming.finalPoint(), tang1, point_limit, bisector_versor.cw());
+ Point p2 = intersection_point(outgoing.initialPoint(), tang2, point_limit, bisector_versor.cw());
if (inc_ls) {
res.setFinal(p1);
} else {
- res.appendNew<Geom::LineSegment>(p1);
+ res.appendNew<LineSegment>(p1);
}
- res.appendNew<Geom::LineSegment>(p2);
+ res.appendNew<LineSegment>(p2);
}
}
- res.appendNew<Geom::LineSegment>(outgoing.initialPoint());
+ res.appendNew<LineSegment>(outgoing.initialPoint());
// check if we can do another relocation
bool out_ls = outgoing.degreesOfFreedom() <= 4;
- if ( (satisfied || clip) && out_ls) {
+ if ((satisfied || clip) && out_ls) {
res.setFinal(outgoing.finalPoint());
} else {
res.append(outgoing);
}
-}
-void miter_join(Geom::Path& res, Geom::Curve const& outgoing, double miter, double width) {
- miter_join_internal( res, outgoing, miter, width, false );
+ // either way, add the rest of the path
+ res.insert(res.end(), ++jd.outgoing.begin(), jd.outgoing.end());
}
-void miter_clip_join(Geom::Path& res, Geom::Curve const& outgoing, double miter, double width) {
- miter_join_internal( res, outgoing, miter, width, true );
-}
+void miter_join(join_data jd) { miter_join_internal(jd, false); }
+void miter_clip_join(join_data jd) { miter_join_internal(jd, true); }
Geom::Point pick_solution(Geom::Point points[2], Geom::Point tang2, Geom::Point endPt)
{
@@ -225,15 +242,18 @@ Geom::Point pick_solution(Geom::Point points[2], Geom::Point tang2, Geom::Point
return sol;
}
-void extrapolate_join(Geom::Path& res, Geom::Curve const& outgoing, double miter, double width)
+void extrapolate_join(join_data jd)
{
using namespace Geom;
+ Geom::Path &res = jd.res;
Geom::Curve const& incoming = res.back();
+ Geom::Curve const& outgoing = jd.outgoing.front();
Geom::Point startPt = incoming.finalPoint();
Geom::Point endPt = outgoing.initialPoint();
- Geom::Point tang1 = Geom::unitTangentAt(reverse(incoming.toSBasis()), 0.);
- Geom::Point tang2 = outgoing.unitTangentAt(0);
+ Geom::Point tang1 = jd.in_tang;
+ Geom::Point tang2 = jd.out_tang;
+ double width = jd.width, miter = jd.miter;
Geom::Circle circle1 = Geom::touching_circle(Geom::reverse(incoming.toSBasis()), 0.);
Geom::Circle circle2 = Geom::touching_circle(outgoing.toSBasis(), 0);
@@ -280,7 +300,7 @@ void extrapolate_join(Geom::Path& res, Geom::Curve const& outgoing, double miter
if (solutions != 2)
// no solutions available, fall back to miter
- return miter_clip_join(res, outgoing, miter, width);
+ return miter_clip_join(jd);
// We have a solution, thus sol is defined.
p1 = sol;
@@ -381,53 +401,78 @@ void extrapolate_join(Geom::Path& res, Geom::Curve const& outgoing, double miter
// Straight line segment:
res.appendNew<Geom::LineSegment>(outgoing.finalPoint());
}
-
+
+ // add the rest of the path
+ res.insert(res.end(), ++jd.outgoing.begin(), jd.outgoing.end());
+
delete arc1;
delete arc2;
}
-void join_inside(Geom::Path& res, Geom::Curve const& outgoing)
+void join_inside(join_data jd)
{
- Geom::Curve const& incoming = res.back_open();
- Geom::Crossings cross = Geom::crossings(incoming, outgoing);
-
- if (!cross.empty()) {
- // yeah if we could avoid allocing that'd be great
- Geom::Curve *d1 = incoming.portion(0., cross[0].ta);
- res.erase_last();
- res.append(*d1);
- delete d1;
+ Geom::Path &res = jd.res;
+ Geom::Path const& temp = jd.outgoing;
+ Geom::Crossings cross = Geom::crossings(res, temp);
+
+ int solution = -1; // lol, really hope there aren't more than INT_MAX crossings
+ if (cross.size() == 1) solution = 0;
+ else if (cross.size() > 1) {
+ // I am not sure how well this will work -- we pick the join node closest
+ // to the cross point of the paths
+ Geom::Point original = res.finalPoint()+Geom::rot90(jd.in_tang)*jd.width;
+ Geom::Coord trial = Geom::L2(res.pointAt(cross[0].ta)-original);
+ solution = 0;
+ for (size_t i = 1; i < cross.size(); ++i) {
+ //printf("Trying %d\n", i);
+ Geom::Coord test = Geom::L2(res.pointAt(cross[i].ta)-original);
+ if (test < trial) {
+ trial = test;
+ solution = i;
+ //printf("Found improved solution: %f\n", trial);
+ }
+ }
+ }
- Geom::Curve *d2 = outgoing.portion(cross[0].tb, 1.);
- res.setFinal(d2->initialPoint());
- res.append(*d2);
- delete d2;
+ if (solution != -1) {
+ Geom::Path d1 = res.portion(0., cross[solution].ta);
+ Geom::Path d2 = temp.portion(cross[solution].tb, temp.size());
+
+ // Watch for bugs in 2geom crossing regarding severe inflection points
+ res.clear();
+ res.append(d1);
+ res.setFinal(d2.initialPoint());
+ res.append(d2);
} else {
- res.appendNew<Geom::LineSegment>(outgoing.initialPoint());
- res.append(outgoing);
+ res.appendNew<Geom::LineSegment>(temp.initialPoint());
+ res.append(temp);
}
}
-bool decide(Geom::Curve const& incoming, Geom::Curve const& outgoing)
+void tangents(Geom::Point tang[2], Geom::Curve const& incoming, Geom::Curve const& outgoing)
{
Geom::Point tang1 = Geom::unitTangentAt(reverse(incoming.toSBasis()), 0.);
Geom::Point tang2 = outgoing.unitTangentAt(0.);
- return (Geom::cross(tang1, tang2) < 0);
+ tang[0] = tang1, tang[1] = tang2;
}
-void outline_helper(Geom::Path& res, Geom::Path const& to_add, double width, bool on_outside, double miter, Inkscape::LineJoinType join)
+void outline_helper(Geom::Path &res, Geom::Path const& temp, Geom::Point in_tang, Geom::Point out_tang, double width, double miter, Inkscape::LineJoinType join)
{
- if (res.size() == 0 || to_add.size() == 0)
+ if (res.size() == 0 || temp.size() == 0)
return;
- Geom::Curve const& outgoing = to_add[0];
+ Geom::Curve const& outgoing = temp.front();
if (Geom::are_near(res.finalPoint(), outgoing.initialPoint())) {
// if the points are /that/ close, just ignore this one
- res.setFinal(outgoing.initialPoint());
- res.append(outgoing);
+ res.setFinal(temp.initialPoint());
+ res.append(temp);
return;
}
+ join_data jd(res, temp, in_tang, out_tang, miter, width);
+
+ bool on_outside = (Geom::cross(in_tang, out_tang) < 0);
+
if (on_outside) {
join_func *jf;
switch (join) {
@@ -446,9 +491,9 @@ void outline_helper(Geom::Path& res, Geom::Path const& to_add, double width, boo
default:
jf = &miter_join;
}
- jf(res, outgoing, miter, width);
+ jf(jd);
} else {
- join_inside(res, outgoing);
+ join_inside(jd);
}
}
@@ -579,7 +624,7 @@ void offset_quadratic(Geom::Path& p, Geom::QuadraticBezier const& bez, double wi
void offset_curve(Geom::Path& res, Geom::Curve const* current, double width)
{
- double const tolerance = 0.005;
+ double const tolerance = 0.0025;
size_t levels = 8;
if (current->isDegenerate()) return; // don't do anything
@@ -705,6 +750,7 @@ Geom::Path half_outline(Geom::Path const& input, double width, double miter, Lin
Geom::Point tang1 = input[0].unitTangentAt(0);
Geom::Point start = input.initialPoint() + tang1 * width;
Geom::Path temp;
+ Geom::Point tang[2];
res.start(start);
@@ -720,20 +766,16 @@ Geom::Path half_outline(Geom::Path const& input, double width, double miter, Lin
if (u == 0) {
res.append(temp);
} else {
- bool on_outside = decide(input[u-1], input[u]);
- outline_helper(res, temp, width, on_outside, miter, join);
- if (temp.size() > 0)
- res.insert(res.end(), ++temp.begin(), temp.end());
+ tangents(tang, input[u-1], input[u]);
+ outline_helper(res, temp, tang[0], tang[1], width, miter, join);
}
// odd number of paths
if (u < k - 1) {
temp = Geom::Path();
offset_curve(temp, &input[u+1], width);
- bool on_outside = decide(input[u], input[u+1]);
- outline_helper(res, temp, width, on_outside, miter, join);
- if (temp.size() > 0)
- res.insert(res.end(), ++temp.begin(), temp.end());
+ tangents(tang, input[u], input[u+1]);
+ outline_helper(res, temp, tang[0], tang[1], width, miter, join);
}
}
@@ -744,8 +786,8 @@ Geom::Path half_outline(Geom::Path const& input, double width, double miter, Lin
temp.append(c1);
Geom::Path temp2;
temp2.append(c2);
- bool on_outside = decide(input.back(), input.front());
- outline_helper(temp, temp2, width, on_outside, miter, join);
+ tangents(tang, input.back(), input.front());
+ outline_helper(temp, temp2, tang[0], tang[1], width, miter, join);
res.erase(res.begin());
res.erase_last();
//
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 6a0e0f35a..888a64430 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -22,10 +22,6 @@
#include <map>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/messagedialog.h>
#include "debug/simple-event.h"
#include "debug/event-tracker.h"
diff --git a/src/libdepixelize/kopftracer2011.cpp b/src/libdepixelize/kopftracer2011.cpp
index 1e769b0c9..96784b14f 100644
--- a/src/libdepixelize/kopftracer2011.cpp
+++ b/src/libdepixelize/kopftracer2011.cpp
@@ -28,11 +28,6 @@
#include <glibmm.h>
-// Build fix under Inkscape build tree
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <algorithm>
#include "kopftracer2011.h"
#include "priv/colorspace.h"
@@ -667,4 +662,4 @@ inline bool Heuristics::islands(PixelGraph::const_iterator a,
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/libnrtype/FontFactory.h b/src/libnrtype/FontFactory.h
index bd5a4460c..4c8c2cb29 100644
--- a/src/libnrtype/FontFactory.h
+++ b/src/libnrtype/FontFactory.h
@@ -68,7 +68,7 @@ public:
};
// Map type for gathering UI family and style names
-typedef std::map<Glib::ustring, std::list<StyleNames> > FamilyToStylesMap;
+// typedef std::map<Glib::ustring, std::list<StyleNames> > FamilyToStylesMap;
class font_factory {
public:
diff --git a/src/live_effects/lpe-fillet-chamfer.h b/src/live_effects/lpe-fillet-chamfer.h
index 0d6a1ff17..fb06e804c 100644
--- a/src/live_effects/lpe-fillet-chamfer.h
+++ b/src/live_effects/lpe-fillet-chamfer.h
@@ -15,14 +15,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#if defined(GLIBMM_DISABLE_DEPRECATED) && defined(HAVE_GLIBMM_THREADS_H)
-# include <glibmm/threads.h>
-#endif
-
#include "live_effects/parameter/enum.h"
#include "live_effects/parameter/bool.h"
#include "live_effects/parameter/unit.h"
diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp
index abd6e7786..02bda3af5 100644
--- a/src/live_effects/lpe-lattice2.cpp
+++ b/src/live_effects/lpe-lattice2.cpp
@@ -18,6 +18,8 @@
#include "live_effects/lpe-lattice2.h"
+#include <gtkmm/expander.h>
+
#include "sp-shape.h"
#include "sp-item.h"
#include "sp-path.h"
diff --git a/src/live_effects/lpe-lattice2.h b/src/live_effects/lpe-lattice2.h
index ff2e75641..b32903c9e 100644
--- a/src/live_effects/lpe-lattice2.h
+++ b/src/live_effects/lpe-lattice2.h
@@ -18,12 +18,16 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <gtkmm.h>
#include "live_effects/parameter/enum.h"
+#include <gtkmm/widget.h>
#include "live_effects/effect.h"
#include "live_effects/parameter/point.h"
#include "live_effects/lpegroupbbox.h"
+namespace Gtk {
+class Expander;
+}
+
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/parameter/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp
index 0884c4c9c..2741461be 100644
--- a/src/live_effects/parameter/originalpath.cpp
+++ b/src/live_effects/parameter/originalpath.cpp
@@ -8,10 +8,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include "live_effects/parameter/originalpath.h"
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 7706dbdf8..78e061e66 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -8,10 +8,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include "live_effects/parameter/originalpatharray.h"
#include <gtkmm/widget.h>
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index ba95affd9..32e82ff8c 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -427,7 +427,13 @@ PathParam::paste_param_path(const char *svgd)
if (svgd && *svgd) {
// remove possible link to path
remove_link();
-
+ SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem();
+ if (item != NULL) {
+ Geom::PathVector path_clipboard = sp_svg_read_pathv(svgd);
+ path_clipboard *= item->i2doc_affine().inverse();
+ svgd = sp_svg_write_path( path_clipboard );
+ }
+
param_write_to_repr(svgd);
signal_path_pasted.emit();
}
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index bb313ef1a..8d2695b85 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -354,9 +354,7 @@ bool
sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>& selected, std::vector<Inkscape::XML::Node*> &to_select, bool skip_all_lpeitems)
{
bool did = false;
-
for (std::vector<SPItem*>::const_iterator i = items.begin(); i != items.end(); i++){
-
SPItem *item = *i;
g_assert(item != NULL);
SPDocument *document = item->document;
@@ -475,6 +473,9 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
if (dynamic_cast<SPText *>(item) || dynamic_cast<SPFlowtext *>(item)) {
// Special treatment for text: convert each glyph to separate path, then group the paths
Inkscape::XML::Node *g_repr = xml_doc->createElement("svg:g");
+
+ Glib::ustring original_text; // To save original text of accessibility.
+
g_repr->setAttribute("transform", item->getRepr()->attribute("transform"));
/* Mask */
gchar *mask_str = (gchar *) item->getRepr()->attribute("mask");
@@ -495,6 +496,8 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
Inkscape::Text::Layout::iterator iter = te_get_layout(item)->begin();
do {
+ original_text += (gunichar)te_get_layout(item)->characterAt( iter );
+
Inkscape::Text::Layout::iterator iter_next = iter;
iter_next.nextGlyph(); // iter_next is one glyph ahead from iter
if (iter == iter_next)
@@ -534,6 +537,11 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
p_repr->setAttribute("style", style_str.c_str());
g_repr->appendChild(p_repr);
+
+ // For accessibility, store original string
+ if( original_text.size() > 0 ) {
+ g_repr->setAttribute("aria-label", original_text.c_str() );
+ }
Inkscape::GC::release(p_repr);
if (iter == te_get_layout(item)->end())
diff --git a/src/ui/dialog-events.cpp b/src/ui/dialog-events.cpp
index 5bc8088a1..8856631c0 100644
--- a/src/ui/dialog-events.cpp
+++ b/src/ui/dialog-events.cpp
@@ -15,10 +15,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/entry.h>
#include <gtkmm/window.h>
#include <gdk/gdkkeysyms.h>
diff --git a/src/ui/dialog/aboutbox.h b/src/ui/dialog/aboutbox.h
index 015e344a1..f3234b88d 100644
--- a/src/ui/dialog/aboutbox.h
+++ b/src/ui/dialog/aboutbox.h
@@ -15,14 +15,6 @@
#ifndef INKSCAPE_UI_DIALOG_ABOUTBOX_H
#define INKSCAPE_UI_DIALOG_ABOUTBOX_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
namespace Inkscape {
diff --git a/src/ui/dialog/calligraphic-profile-rename.h b/src/ui/dialog/calligraphic-profile-rename.h
index fa13db196..4ef71900b 100644
--- a/src/ui/dialog/calligraphic-profile-rename.h
+++ b/src/ui/dialog/calligraphic-profile-rename.h
@@ -15,10 +15,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-# include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp
index a49a47d5c..6603d5c69 100644
--- a/src/ui/dialog/color-item.cpp
+++ b/src/ui/dialog/color-item.cpp
@@ -17,10 +17,6 @@
#include <errno.h>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/label.h>
#include <glibmm/i18n.h>
#include <cairo.h>
diff --git a/src/ui/dialog/debug.cpp b/src/ui/dialog/debug.cpp
index 9e2287f80..d127261c0 100644
--- a/src/ui/dialog/debug.cpp
+++ b/src/ui/dialog/debug.cpp
@@ -13,10 +13,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/dialog.h>
#include <gtkmm/textview.h>
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index ca3971019..384aec415 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -20,10 +20,6 @@
// This has to be included prior to anything that includes setjmp.h, it croaks otherwise
#include <png.h>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/dialog.h>
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h
index 6687915d7..7501b5e14 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.h
+++ b/src/ui/dialog/filedialogimpl-gtkmm.h
@@ -17,14 +17,6 @@
#ifndef __FILE_DIALOGIMPL_H__
#define __FILE_DIALOGIMPL_H__
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
//Gtk includes
#include <gtkmm/filechooserdialog.h>
#include <glib/gstdio.h>
diff --git a/src/ui/dialog/filedialogimpl-win32.h b/src/ui/dialog/filedialogimpl-win32.h
index 8c3b6bad6..b254c3ef6 100644
--- a/src/ui/dialog/filedialogimpl-win32.h
+++ b/src/ui/dialog/filedialogimpl-win32.h
@@ -16,11 +16,6 @@
#include <glibmm.h>
#ifdef WIN32
-#if WITH_GLIBMM_2_32
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-# include <glibmm/threads.h>
-#endif
-#endif
#include "filedialogimpl-gtkmm.h"
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index 11db14801..740acd989 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -14,10 +14,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <gtkmm/stock.h>
#include <glibmm/main.h>
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index 1be87d180..19506c6a3 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -10,10 +10,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/messagedialog.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/scrolledwindow.h>
diff --git a/src/ui/dialog/guides.h b/src/ui/dialog/guides.h
index 22bf5097a..4ff7b4fde 100644
--- a/src/ui/dialog/guides.h
+++ b/src/ui/dialog/guides.h
@@ -15,10 +15,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#if WITH_GTKMM_3_0
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index e9ee7802d..7dc55c95c 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -17,10 +17,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/buttonbox.h>
#include <boost/scoped_ptr.hpp>
diff --git a/src/ui/dialog/layer-properties.h b/src/ui/dialog/layer-properties.h
index d114c6ba5..c75a7f190 100644
--- a/src/ui/dialog/layer-properties.h
+++ b/src/ui/dialog/layer-properties.h
@@ -16,10 +16,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
diff --git a/src/ui/dialog/layers.h b/src/ui/dialog/layers.h
index ae0ac6040..9cd2c3b92 100644
--- a/src/ui/dialog/layers.h
+++ b/src/ui/dialog/layers.h
@@ -16,10 +16,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treestore.h>
diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h
index 99ead878c..c686e8365 100644
--- a/src/ui/dialog/livepatheffect-add.h
+++ b/src/ui/dialog/livepatheffect-add.h
@@ -11,14 +11,6 @@
#ifndef INKSCAPE_DIALOG_LIVEPATHEFFECT_ADD_H
#define INKSCAPE_DIALOG_LIVEPATHEFFECT_ADD_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <gtkmm/liststore.h>
#include <gtkmm/treeview.h>
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
index 7e5c17133..f63b19e86 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
@@ -8,10 +8,6 @@
#include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED &&HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm.h>
#include "lpe-fillet-chamfer-properties.h"
#include <boost/lexical_cast.hpp>
diff --git a/src/ui/dialog/lpe-powerstroke-properties.cpp b/src/ui/dialog/lpe-powerstroke-properties.cpp
index a9e57970d..0cf3e9706 100644
--- a/src/ui/dialog/lpe-powerstroke-properties.cpp
+++ b/src/ui/dialog/lpe-powerstroke-properties.cpp
@@ -17,10 +17,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include "lpe-powerstroke-properties.h"
#include <boost/lexical_cast.hpp>
#include <gtkmm/stock.h>
diff --git a/src/ui/dialog/messages.h b/src/ui/dialog/messages.h
index 54ca84f47..6ed246ece 100644
--- a/src/ui/dialog/messages.h
+++ b/src/ui/dialog/messages.h
@@ -16,14 +16,6 @@
#ifndef INKSCAPE_UI_DIALOG_MESSAGES_H
#define INKSCAPE_UI_DIALOG_MESSAGES_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/textview.h>
#include <gtkmm/button.h>
diff --git a/src/ui/dialog/objects.h b/src/ui/dialog/objects.h
index 74c2382ac..1842fea11 100644
--- a/src/ui/dialog/objects.h
+++ b/src/ui/dialog/objects.h
@@ -16,10 +16,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-# include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treestore.h>
diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h
index bd028c145..6ceceb9ef 100644
--- a/src/ui/dialog/ocaldialogs.h
+++ b/src/ui/dialog/ocaldialogs.h
@@ -17,10 +17,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
//Gtk includes
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
diff --git a/src/ui/dialog/spellcheck.h b/src/ui/dialog/spellcheck.h
index 27b89e34e..e98a9d80e 100644
--- a/src/ui/dialog/spellcheck.h
+++ b/src/ui/dialog/spellcheck.h
@@ -16,10 +16,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/buttonbox.h>
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index eeb4d6cbe..06c17611f 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -18,10 +18,6 @@
#include <functional>
#include <sstream>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/buttonbox.h>
#include <gtkmm/label.h>
diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h
index 8683d80a3..117ad2e28 100644
--- a/src/ui/dialog/text-edit.h
+++ b/src/ui/dialog/text-edit.h
@@ -22,10 +22,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/notebook.h>
#include <gtkmm/button.h>
diff --git a/src/ui/dialog/tile.h b/src/ui/dialog/tile.h
index 2f75a8922..de1d3028b 100644
--- a/src/ui/dialog/tile.h
+++ b/src/ui/dialog/tile.h
@@ -20,10 +20,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/notebook.h>
#include <gtkmm/checkbutton.h>
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index f571828ce..498ad7822 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -15,10 +15,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <gtkmm/stock.h>
#include <2geom/transforms.h>
diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h
index f9f923be4..f6d1985cc 100644
--- a/src/ui/previewholder.h
+++ b/src/ui/previewholder.h
@@ -16,10 +16,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/bin.h>
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index def8080d0..0f9b3ee7a 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -20,10 +20,6 @@
#include "widgets/desktop-widget.h"
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include "shortcuts.h"
#include "file.h"
#include "ui/tools/tool-base.h"
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index f15d7abf7..823e24a00 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -12,10 +12,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-# include <glibmm/threads.h>
-#endif
-
#include "ui/widget/addtoicon.h"
#include <gtkmm/icontheme.h>
diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h
index 471b7d8a2..d3c9afa02 100644
--- a/src/ui/widget/button.h
+++ b/src/ui/widget/button.h
@@ -10,14 +10,6 @@
#ifndef INKSCAPE_UI_WIDGET_BUTTON_H
#define INKSCAPE_UI_WIDGET_BUTTON_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/checkbutton.h>
#include <gtkmm/radiobutton.h>
diff --git a/src/ui/widget/clipmaskicon.cpp b/src/ui/widget/clipmaskicon.cpp
index 943b1bebc..421f1df1e 100644
--- a/src/ui/widget/clipmaskicon.cpp
+++ b/src/ui/widget/clipmaskicon.cpp
@@ -11,10 +11,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-# include <glibmm/threads.h>
-#endif
-
#include "ui/widget/clipmaskicon.h"
#include <gtkmm/icontheme.h>
diff --git a/src/ui/widget/color-picker.h b/src/ui/widget/color-picker.h
index b4da5dbf2..99904b081 100644
--- a/src/ui/widget/color-picker.h
+++ b/src/ui/widget/color-picker.h
@@ -13,16 +13,8 @@
#ifndef __COLOR_PICKER_H__
#define __COLOR_PICKER_H__
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <stddef.h>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h>
#include <gtkmm/button.h>
#include <sigc++/sigc++.h>
diff --git a/src/ui/widget/color-preview.h b/src/ui/widget/color-preview.h
index 959b5e09b..caddfb9a2 100644
--- a/src/ui/widget/color-preview.h
+++ b/src/ui/widget/color-preview.h
@@ -15,10 +15,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/widget.h>
namespace Inkscape {
diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h
index cc0c13eea..25a69d94c 100644
--- a/src/ui/widget/dock-item.h
+++ b/src/ui/widget/dock-item.h
@@ -15,10 +15,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/frame.h>
#include <gtkmm/window.h>
diff --git a/src/ui/widget/dock.h b/src/ui/widget/dock.h
index 33e60b836..74b072d22 100644
--- a/src/ui/widget/dock.h
+++ b/src/ui/widget/dock.h
@@ -12,14 +12,6 @@
#ifndef INKSCAPE_UI_WIDGET_DOCK_H
#define INKSCAPE_UI_WIDGET_DOCK_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <list>
#include "ui/widget/dock-item.h"
diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp
index c7d5efe29..69173fa25 100644
--- a/src/ui/widget/entity-entry.cpp
+++ b/src/ui/widget/entity-entry.cpp
@@ -17,10 +17,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/entry.h>
diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h
index 6092c61a5..0bcf97433 100644
--- a/src/ui/widget/filter-effect-chooser.h
+++ b/src/ui/widget/filter-effect-chooser.h
@@ -12,14 +12,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/combobox.h>
diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h
index 55638ad40..a04666651 100644
--- a/src/ui/widget/frame.h
+++ b/src/ui/widget/frame.h
@@ -10,14 +10,6 @@
#ifndef INKSCAPE_UI_WIDGET_FRAME_H
#define INKSCAPE_UI_WIDGET_FRAME_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/alignment.h>
#include <gtkmm/frame.h>
#include <gtkmm/label.h>
diff --git a/src/ui/widget/imageicon.h b/src/ui/widget/imageicon.h
index 8faf13cb1..2ea8b8533 100644
--- a/src/ui/widget/imageicon.h
+++ b/src/ui/widget/imageicon.h
@@ -12,14 +12,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <glibmm/ustring.h>
diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h
index df6eb7ded..7b02fa4dc 100644
--- a/src/ui/widget/imagetoggler.h
+++ b/src/ui/widget/imagetoggler.h
@@ -14,10 +14,6 @@
#include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/cellrendererpixbuf.h>
#include <gtkmm/widget.h>
#include <glibmm/property.h>
diff --git a/src/ui/widget/insertordericon.h b/src/ui/widget/insertordericon.h
index fb3412d3f..bf8ac4fa7 100644
--- a/src/ui/widget/insertordericon.h
+++ b/src/ui/widget/insertordericon.h
@@ -13,10 +13,11 @@
# include "config.h"
#endif
-#include <glibmm.h>
#include <gtkmm/cellrendererpixbuf.h>
#include <gtkmm/widget.h>
+#include <glibmm/property.h>
+
namespace Inkscape {
namespace UI {
namespace Widget {
diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h
index 5334454bc..88eb3ce19 100644
--- a/src/ui/widget/labelled.h
+++ b/src/ui/widget/labelled.h
@@ -11,14 +11,6 @@
#ifndef INKSCAPE_UI_WIDGET_LABELLED_H
#define INKSCAPE_UI_WIDGET_LABELLED_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
namespace Gtk {
diff --git a/src/ui/widget/layertypeicon.cpp b/src/ui/widget/layertypeicon.cpp
index 3d6182bf8..672c607e5 100644
--- a/src/ui/widget/layertypeicon.cpp
+++ b/src/ui/widget/layertypeicon.cpp
@@ -11,10 +11,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-# include <glibmm/threads.h>
-#endif
-
#include "ui/widget/layertypeicon.h"
#include <gtkmm/icontheme.h>
diff --git a/src/ui/widget/licensor.h b/src/ui/widget/licensor.h
index c75c5fe9e..b96162589 100644
--- a/src/ui/widget/licensor.h
+++ b/src/ui/widget/licensor.h
@@ -10,14 +10,6 @@
#ifndef INKSCAPE_UI_WIDGET_LICENSOR_H
#define INKSCAPE_UI_WIDGET_LICENSOR_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
class SPDocument;
diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h
index 4f7915423..c11de1b5b 100644
--- a/src/ui/widget/notebook-page.h
+++ b/src/ui/widget/notebook-page.h
@@ -14,10 +14,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
namespace Gtk {
diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h
index 5a723a2fd..ae16564e1 100644
--- a/src/ui/widget/object-composite-settings.h
+++ b/src/ui/widget/object-composite-settings.h
@@ -11,14 +11,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/alignment.h>
#include <gtkmm/adjustment.h>
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 0cff25d88..8a1e98a63 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -15,10 +15,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/dialog.h> // for Gtk::RESPONSE_*
#include <gtkmm/menu.h>
#include <gtkmm/stock.h>
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 5680cac30..a90060e17 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -17,10 +17,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/arrow.h>
#include <gtkmm/button.h>
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 98028ed78..72597e4d9 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -14,10 +14,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/frame.h>
#include <gtkmm/alignment.h>
diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h
index 5d9816e74..8b75b8368 100644
--- a/src/ui/widget/preferences-widget.h
+++ b/src/ui/widget/preferences-widget.h
@@ -22,10 +22,6 @@
#include <iostream>
#include <vector>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/filechooserbutton.h>
#include "ui/widget/spinbutton.h"
#include <stddef.h>
diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp
index 2d7597d7c..5e938dee6 100644
--- a/src/ui/widget/rotateable.cpp
+++ b/src/ui/widget/rotateable.cpp
@@ -11,10 +11,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <glibmm/i18n.h>
diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h
index 0b6a14762..804a6fef6 100644
--- a/src/ui/widget/selected-style.h
+++ b/src/ui/widget/selected-style.h
@@ -15,10 +15,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#if WITH_GTKMM_3_0
diff --git a/src/ui/widget/spin-scale.h b/src/ui/widget/spin-scale.h
index d0447e4a6..50e4fc953 100644
--- a/src/ui/widget/spin-scale.h
+++ b/src/ui/widget/spin-scale.h
@@ -13,10 +13,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/scale.h>
diff --git a/src/ui/widget/spin-slider.h b/src/ui/widget/spin-slider.h
index 74982ea58..a5999f14f 100644
--- a/src/ui/widget/spin-slider.h
+++ b/src/ui/widget/spin-slider.h
@@ -14,10 +14,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/scale.h>
diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h
index cbe33e8ea..30ffc7d77 100644
--- a/src/ui/widget/spinbutton.h
+++ b/src/ui/widget/spinbutton.h
@@ -10,14 +10,6 @@
#ifndef INKSCAPE_UI_WIDGET_SPINBUTTON_H
#define INKSCAPE_UI_WIDGET_SPINBUTTON_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/spinbutton.h>
namespace Inkscape {
diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h
index 582d2ebb3..0016e0256 100644
--- a/src/ui/widget/style-swatch.h
+++ b/src/ui/widget/style-swatch.h
@@ -17,10 +17,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/eventbox.h>
diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp
index ff525c679..ced811c57 100644
--- a/src/ui/widget/tolerance-slider.cpp
+++ b/src/ui/widget/tolerance-slider.cpp
@@ -12,10 +12,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/label.h>
diff --git a/src/ui/widget/unit-menu.h b/src/ui/widget/unit-menu.h
index 2fd25a6a9..f414660f7 100644
--- a/src/ui/widget/unit-menu.h
+++ b/src/ui/widget/unit-menu.h
@@ -10,14 +10,6 @@
#ifndef INKSCAPE_UI_WIDGET_UNIT_H
#define INKSCAPE_UI_WIDGET_UNIT_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/comboboxtext.h>
#include "util/units.h"
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 5febeeb7c..ea2c06dcf 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -32,10 +32,9 @@
#include <cstring>
#include <string>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
+// Note that gtkmm headers must be included before gtk+ C headers
+// in all files. The same applies for glibmm/glib etc.
+// If this is not done, then errors will be generate relating to Glib::Threads being undefined
#include <gtkmm/filechooserdialog.h>
#include <gtkmm/messagedialog.h>
#include <gtkmm/stock.h>
diff --git a/src/widgets/dash-selector.h b/src/widgets/dash-selector.h
index 5b9ebfa2b..ec5a1cbd5 100644
--- a/src/widgets/dash-selector.h
+++ b/src/widgets/dash-selector.h
@@ -14,10 +14,6 @@
# include <config.h>
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/combobox.h>
#include <gtkmm/liststore.h>
diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h
index a77d56fc3..489217d9a 100644
--- a/src/widgets/desktop-widget.h
+++ b/src/widgets/desktop-widget.h
@@ -12,14 +12,6 @@
* ? -2004
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/window.h>
#include "message.h"
#include "ui/view/view-widget.h"
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 1d258bbb0..b1f812338 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -22,10 +22,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <glibmm/i18n.h>
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index afc4fcfb0..542d16797 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -16,10 +16,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/icontheme.h>
#include <cstring>
#include <glib.h>
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index 948c80db3..740ce2b0e 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -24,10 +24,6 @@
#include <cstring>
#include <string>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include "widgets/swatch-selector.h"
#include "sp-pattern.h"
#include <glibmm/i18n.h>
diff --git a/src/widgets/shrink-wrap-button.cpp b/src/widgets/shrink-wrap-button.cpp
index 3558780ed..941a0466c 100644
--- a/src/widgets/shrink-wrap-button.cpp
+++ b/src/widgets/shrink-wrap-button.cpp
@@ -13,10 +13,6 @@
#include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/button.h>
#include <gtk/gtk.h>
diff --git a/src/widgets/sp-attribute-widget.h b/src/widgets/sp-attribute-widget.h
index 4bd6c6959..d9b972201 100644
--- a/src/widgets/sp-attribute-widget.h
+++ b/src/widgets/sp-attribute-widget.h
@@ -19,10 +19,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/widget.h>
#include <stddef.h>
#include <sigc++/connection.h>
diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp
index f87889bb1..7030753a5 100644
--- a/src/widgets/spw-utilities.cpp
+++ b/src/widgets/spw-utilities.cpp
@@ -17,10 +17,6 @@
#include <cstring>
#include <string>
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/label.h>
diff --git a/src/widgets/stroke-marker-selector.h b/src/widgets/stroke-marker-selector.h
index 27ac76d6f..a7ee788b8 100644
--- a/src/widgets/stroke-marker-selector.h
+++ b/src/widgets/stroke-marker-selector.h
@@ -10,14 +10,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/combobox.h>
#include <gtkmm/liststore.h>
diff --git a/src/widgets/swatch-selector.h b/src/widgets/swatch-selector.h
index c8c9983a6..4b7aa483f 100644
--- a/src/widgets/swatch-selector.h
+++ b/src/widgets/swatch-selector.h
@@ -1,14 +1,6 @@
#ifndef SEEN_SP_SWATCH_SELECTOR_H
#define SEEN_SP_SWATCH_SELECTOR_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
class SPDocument;
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 2160cad2e..7b22e4af7 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -162,11 +162,17 @@ static void sp_text_fontfamily_value_changed( Ink_ComboBoxEntry_Action *act, GOb
fontlister->fill_css( css );
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- sp_desktop_set_style (desktop, css, true, true); // Results in selection change called twice.
+ if( desktop->getSelection()->isEmpty() ) {
+ // Update default
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ prefs->mergeStyle("/tools/text/style", css);
+ } else {
+ // If there is a selection, update
+ sp_desktop_set_style (desktop, css, true, true); // Results in selection change called twice.
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT,
+ _("Text: Change font family"));
+ }
sp_repr_css_attr_unref (css);
-
- DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT,
- _("Text: Change font family"));
}
// unfreeze
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 5d52db6f2..d56b91f5e 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -29,10 +29,6 @@
# include "config.h"
#endif
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/box.h>
#include <gtkmm/action.h>
#include <gtkmm/actiongroup.h>