summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/2geom/elliptical-arc.cpp2
-rw-r--r--src/Makefile.am6
-rw-r--r--src/bind/javabind.h2
-rw-r--r--src/color-profile.cpp4
-rw-r--r--src/console-output-undo-observer.cpp2
-rw-r--r--src/desktop-events.cpp2
-rw-r--r--src/desktop.cpp5
-rw-r--r--src/device-manager.cpp3
-rw-r--r--src/device-manager.h2
-rw-r--r--src/display/canvas-grid.cpp3
-rw-r--r--src/display/nr-filter-image.cpp2
-rw-r--r--src/display/sp-canvas.cpp2
-rw-r--r--src/dom/dom.h4
-rw-r--r--src/dom/io/domstream.cpp5
-rw-r--r--src/dom/uri.cpp9
-rw-r--r--src/dom/views.h5
-rw-r--r--src/dom/xpathparser.cpp3
-rw-r--r--src/dropper-context.cpp1
-rw-r--r--src/ege-color-prof-tracker.h6
-rw-r--r--src/event-context.cpp2
-rw-r--r--src/event-log.cpp2
-rw-r--r--src/event-log.h2
-rw-r--r--src/extension/error-file.cpp5
-rw-r--r--src/extension/extension.cpp2
-rw-r--r--src/extension/init.cpp4
-rw-r--r--src/extension/internal/odf.h5
-rw-r--r--src/extension/param/string.cpp3
-rw-r--r--src/extension/prefdialog.h2
-rw-r--r--src/extension/script/InkscapeScript.h4
-rw-r--r--src/file.cpp4
-rw-r--r--src/file.h6
-rw-r--r--src/filters/image.cpp2
-rw-r--r--src/gradient-chemistry.cpp3
-rw-r--r--src/helper/geom.cpp26
-rw-r--r--src/helper/pixbuf-ops.cpp1
-rw-r--r--src/inkscape.cpp3
-rw-r--r--src/inkview.cpp3
-rw-r--r--src/interface.cpp11
-rw-r--r--src/io/stringstream.h2
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/libnrtype/font-lister.cpp146
-rw-r--r--src/live_effects/effect.cpp3
-rw-r--r--src/live_effects/lpe-bendpath.h2
-rw-r--r--src/live_effects/lpe-boolops.h2
-rw-r--r--src/live_effects/lpe-curvestitch.cpp3
-rw-r--r--src/live_effects/lpe-dynastroke.h2
-rw-r--r--src/live_effects/lpe-envelope.h2
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp3
-rw-r--r--src/live_effects/lpe-ruler.h2
-rw-r--r--src/live_effects/parameter/bool.cpp3
-rw-r--r--src/live_effects/parameter/parameter.cpp2
-rw-r--r--src/live_effects/parameter/path.cpp2
-rw-r--r--src/live_effects/parameter/point.cpp3
-rw-r--r--src/live_effects/parameter/random.cpp5
-rw-r--r--src/live_effects/parameter/text.cpp2
-rw-r--r--src/live_effects/parameter/unit.cpp2
-rw-r--r--src/live_effects/parameter/vector.cpp2
-rw-r--r--src/main.cpp4
-rw-r--r--src/registrytool.cpp5
-rw-r--r--src/registrytool.h5
-rw-r--r--src/resource-manager.cpp2
-rw-r--r--src/selection-chemistry.cpp5
-rw-r--r--src/shortcuts.cpp5
-rw-r--r--src/shortcuts.h11
-rw-r--r--src/sp-mesh-array.cpp18
-rw-r--r--src/sp-rect.cpp4
-rw-r--r--src/sp-stop.h10
-rw-r--r--src/tools-switch.cpp1
-rw-r--r--src/ui/cache/svg_preview_cache.cpp1
-rw-r--r--src/ui/clipboard.cpp2
-rw-r--r--src/ui/control-manager.cpp1
-rw-r--r--src/ui/dialog/clonetiler.cpp1
-rw-r--r--src/ui/dialog/clonetiler.h1
-rw-r--r--src/ui/dialog/color-item.cpp2
-rw-r--r--src/ui/dialog/debug.cpp2
-rw-r--r--src/ui/dialog/desktop-tracker.h3
-rw-r--r--src/ui/dialog/export.cpp2
-rw-r--r--src/ui/dialog/filedialog.cpp2
-rw-r--r--src/ui/dialog/filedialog.h3
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp5
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp4
-rw-r--r--src/ui/dialog/find.h2
-rw-r--r--src/ui/dialog/font-substitution.cpp15
-rw-r--r--src/ui/dialog/font-substitution.h15
-rw-r--r--src/ui/dialog/icon-preview.cpp1
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp3
-rw-r--r--src/ui/dialog/object-attributes.cpp6
-rw-r--r--src/ui/dialog/object-attributes.h3
-rw-r--r--src/ui/dialog/ocaldialogs.cpp8
-rw-r--r--src/ui/dialog/ocaldialogs.h4
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp4
-rw-r--r--src/ui/dialog/symbols.cpp3
-rw-r--r--src/ui/dialog/symbols.h11
-rw-r--r--src/ui/dialog/undo-history.cpp2
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp3
-rw-r--r--src/ui/tool/node-tool.h7
-rw-r--r--src/ui/tool/path-manipulator.cpp1
-rw-r--r--src/ui/uxmanager.h11
-rw-r--r--src/ui/widget/imageicon.h3
-rw-r--r--src/ui/widget/imagetoggler.h2
-rw-r--r--src/ui/widget/panel.cpp4
-rw-r--r--src/ui/widget/point.h2
-rw-r--r--src/ui/widget/preferences-widget.cpp2
-rw-r--r--src/ui/widget/rendering-options.cpp5
-rw-r--r--src/ui/widget/spin-scale.cpp3
-rw-r--r--src/ui/widget/spin-slider.cpp5
-rw-r--r--src/unicoderange.h4
-rw-r--r--src/widgets/arc-toolbar.cpp2
-rw-r--r--src/widgets/box3d-toolbar.cpp2
-rw-r--r--src/widgets/calligraphy-toolbar.cpp4
-rw-r--r--src/widgets/dropper-toolbar.cpp3
-rw-r--r--src/widgets/erasor-toolbar.cpp4
-rw-r--r--src/widgets/fill-style.cpp2
-rw-r--r--src/widgets/gradient-selector.cpp2
-rw-r--r--src/widgets/gradient-vector.cpp5
-rw-r--r--src/widgets/gradient-vector.h1
-rw-r--r--src/widgets/measure-toolbar.cpp3
-rw-r--r--src/widgets/node-toolbar.cpp3
-rw-r--r--src/widgets/paintbucket-toolbar.cpp4
-rw-r--r--src/widgets/pencil-toolbar.cpp3
-rw-r--r--src/widgets/rect-toolbar.cpp3
-rw-r--r--src/widgets/sp-color-icc-selector.cpp3
-rw-r--r--src/widgets/sp-color-notebook.cpp2
-rw-r--r--src/widgets/spiral-toolbar.cpp5
-rw-r--r--src/widgets/spray-toolbar.cpp3
-rw-r--r--src/widgets/star-toolbar.cpp3
-rw-r--r--src/widgets/swatch-selector.cpp5
-rw-r--r--src/widgets/text-toolbar.cpp4
-rw-r--r--src/widgets/toolbox.cpp2
-rw-r--r--src/widgets/tweak-toolbar.cpp3
-rw-r--r--src/xml/repr-io.cpp2
131 files changed, 313 insertions, 338 deletions
diff --git a/src/2geom/elliptical-arc.cpp b/src/2geom/elliptical-arc.cpp
index 75b6777a2..29e983ad4 100644
--- a/src/2geom/elliptical-arc.cpp
+++ b/src/2geom/elliptical-arc.cpp
@@ -202,7 +202,7 @@ std::vector<Coord> EllipticalArc::roots(Coord v, Dim2 d) const
{
return sol;
}
- double ray_prj;
+ double ray_prj = 0.0;
switch(d)
{
case X:
diff --git a/src/Makefile.am b/src/Makefile.am
index 09f2ea8eb..667ebef4e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,7 +49,8 @@ all_libs = \
$(LIBCDR_LIBS) \
$(DBUS_LIBS) \
$(GDL_LIBS) \
- $(IMAGEMAGICK_LIBS)
+ $(IMAGEMAGICK_LIBS) \
+ $(X11_LIBS)
# Add sources common for Inkscape and Inkview to this variable.
ink_common_sources =
@@ -83,7 +84,8 @@ AM_CPPFLAGS = \
$(WIN32_CFLAGS) \
-I$(srcdir)/bind/javainc \
-I$(srcdir)/bind/javainc/linux \
- -I$(builddir)/extension/dbus
+ -I$(builddir)/extension/dbus \
+ $(X11_CFLAGS)
CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
diff --git a/src/bind/javabind.h b/src/bind/javabind.h
index 254548bfb..c11656a66 100644
--- a/src/bind/javabind.h
+++ b/src/bind/javabind.h
@@ -27,8 +27,8 @@
#ifndef SEEN_JAVABIND_H
#define SEEN_JAVABIND_H
-#include <glibmm.h>
#include <vector>
+#include <glibmm/ustring.h>
namespace Inkscape
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index fe663957c..14f88c77e 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -4,9 +4,9 @@
#define noDEBUG_LCMS
+#include <gdkmm/color.h>
#include <glib/gstdio.h>
#include <fcntl.h>
-#include <gdkmm/color.h>
#include <glib/gi18n.h>
#ifdef DEBUG_LCMS
@@ -47,6 +47,8 @@
#include <icm.h>
#endif // WIN32
+#include <glibmm/convert.h>
+
using Inkscape::ColorProfile;
using Inkscape::ColorProfileClass;
using Inkscape::ColorProfileImpl;
diff --git a/src/console-output-undo-observer.cpp b/src/console-output-undo-observer.cpp
index 92c937273..209997003 100644
--- a/src/console-output-undo-observer.cpp
+++ b/src/console-output-undo-observer.cpp
@@ -11,8 +11,6 @@
* Released under GNU GPL, see the file 'COPYING' for more information
*/
-#include <glibmm.h>
-
#include "console-output-undo-observer.h"
namespace Inkscape {
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index 9942e3a13..217187553 100644
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
@@ -17,11 +17,11 @@
#endif
#include <map>
#include <string>
+#include "ui/dialog/guides.h"
#include <2geom/line.h>
#include <2geom/angle.h>
#include <glibmm/i18n.h>
-#include "ui/dialog/guides.h"
#include "desktop.h"
#include "desktop-events.h"
#include "desktop-handles.h"
diff --git a/src/desktop.cpp b/src/desktop.cpp
index d74e8fdad..0bf442b7a 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -26,14 +26,13 @@
# include "config.h"
#endif
+#include "ui/dialog/dialog-manager.h"
#include <glibmm/i18n.h>
#include <sigc++/functors/mem_fun.h>
#include <2geom/transforms.h>
#include <2geom/rect.h>
-#include "ui/dialog/dialog-manager.h"
-
#include "box3d-context.h"
#include "color.h"
#include "desktop-events.h"
@@ -812,7 +811,7 @@ SPDesktop::push_current_zoom (std::list<Geom::Rect> &history)
{
Geom::Rect area = get_display_area();
- if (history.empty() || history.front() == area) {
+ if (history.empty() || history.front() != area) {
history.push_front(area);
}
}
diff --git a/src/device-manager.cpp b/src/device-manager.cpp
index a07231805..610173d3d 100644
--- a/src/device-manager.cpp
+++ b/src/device-manager.cpp
@@ -7,11 +7,10 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
+#include "device-manager.h"
#include <map>
#include <set>
-#include "device-manager.h"
#include "preferences.h"
#include <gtk/gtk.h>
#include <glibmm/regex.h>
diff --git a/src/device-manager.h b/src/device-manager.h
index 5f83ab7b0..d608a5717 100644
--- a/src/device-manager.h
+++ b/src/device-manager.h
@@ -10,9 +10,9 @@
#define SEEN_INKSCAPE_DEVICE_MANAGER_H
+#include <gdkmm/device.h>
#include <list>
#include <glibmm/ustring.h>
-#include <gdkmm/device.h>
namespace Inkscape {
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index c53890f9f..88da22835 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -17,7 +17,6 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
#include <gtkmm/box.h>
#include <gtkmm/label.h>
@@ -27,6 +26,8 @@
# include <gtkmm/table.h>
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/registered-widget.h"
#include "desktop.h"
#include "sp-canvas-util.h"
diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp
index fca8fdba3..7a27d857e 100644
--- a/src/display/nr-filter-image.cpp
+++ b/src/display/nr-filter-image.cpp
@@ -10,6 +10,7 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "display/nr-filter-image.h"
#include "document.h"
#include "sp-item.h"
#include "display/cairo-utils.h"
@@ -17,7 +18,6 @@
#include "display/drawing.h"
#include "display/drawing-item.h"
#include "display/nr-filter.h"
-#include "display/nr-filter-image.h"
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
#include "enums.h"
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 8b20ab2de..9d4049512 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -19,6 +19,7 @@
# include <config.h>
#endif
+#include <gdkmm/rectangle.h>
#include <cairomm/region.h>
#include "helper/sp-marshal.h"
@@ -35,7 +36,6 @@
#include "debug/gdk-event-latency-tracker.h"
#include "desktop.h"
#include "sp-namedview.h"
-#include <gdkmm/rectangle.h>
using Inkscape::Debug::GdkEventLatencyTracker;
diff --git a/src/dom/dom.h b/src/dom/dom.h
index 22fd09ebf..14165166e 100644
--- a/src/dom/dom.h
+++ b/src/dom/dom.h
@@ -60,9 +60,9 @@
*/
#ifdef DOM_STANDALONE
-#include <string>
+# include <string>
#else
-#include <glibmm.h>
+# include <glibmm/ustring.h>
#endif
//# Unfortunate hack for a name collision
diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp
index 7118025d6..1f08c0eee 100644
--- a/src/dom/io/domstream.cpp
+++ b/src/dom/io/domstream.cpp
@@ -34,9 +34,10 @@
*
*/
+#include <cmath>
+#include <cstdarg>
#include <cstdio>
-#include <math.h>
-#include <stdarg.h>
+#include <cstdlib>
#include "domstream.h"
#include "dom/ucd.h"
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index e1089017d..231995daf 100644
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
@@ -27,17 +27,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
-
#include "uri.h"
#include "ucd.h"
-#include <stdio.h>
-#include <stdarg.h>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
#include <vector>
-
namespace org
{
namespace w3c
diff --git a/src/dom/views.h b/src/dom/views.h
index f165d2a9b..f1154fb62 100644
--- a/src/dom/views.h
+++ b/src/dom/views.h
@@ -45,12 +45,9 @@
* Be prepared in the future to adjust to this, if SVG ever switches .
*/
-
-
+#include <cstdlib>
#include "dom.h"
-
-
namespace org
{
namespace w3c
diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp
index b19975966..4785ce93f 100644
--- a/src/dom/xpathparser.cpp
+++ b/src/dom/xpathparser.cpp
@@ -27,10 +27,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#include "ucd.h"
#include "xpathparser.h"
-
+#include <cstdlib>
namespace org
{
diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp
index d41e4059d..05d22017e 100644
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -15,7 +15,6 @@
# include <config.h>
#endif
-#include <glibmm.h>
#include <glibmm/i18n.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
diff --git a/src/ege-color-prof-tracker.h b/src/ege-color-prof-tracker.h
index 09aeae970..19423c19f 100644
--- a/src/ege-color-prof-tracker.h
+++ b/src/ege-color-prof-tracker.h
@@ -45,16 +45,12 @@
/* Note: this file should be kept compilable as both .cpp and .c */
-#include <glib.h>
#include <glib-object.h>
+typedef struct _GtkWidget GtkWidget;
G_BEGIN_DECLS
-#ifdef __cplusplus
-typedef struct _GtkWidget GtkWidget;
-#endif /* __cplusplus */
-
#define EGE_COLOR_PROF_TRACKER_TYPE ( ege_color_prof_tracker_get_type() )
#define EGE_COLOR_PROF_TRACKER( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), EGE_COLOR_PROF_TRACKER_TYPE, EgeColorProfTracker) )
#define EGE_COLOR_PROF_TRACKER_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), EGE_COLOR_PROF_TRACKER_TYPE, EgeColorProfTrackerClass) )
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 11b814aab..6e5f0caad 100644
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -18,6 +18,7 @@
# include "config.h"
#endif
+#include "shortcuts.h"
#include "file.h"
#include "event-context.h"
@@ -31,7 +32,6 @@
#include "display/sp-canvas.h"
#include "xml/node-event-vector.h"
#include "sp-cursor.h"
-#include "shortcuts.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "desktop-events.h"
diff --git a/src/event-log.cpp b/src/event-log.cpp
index 9304f68c5..d0342fbe9 100644
--- a/src/event-log.cpp
+++ b/src/event-log.cpp
@@ -7,9 +7,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "event-log.h"
#include <glibmm/i18n.h>
-#include "event-log.h"
#include "desktop.h"
#include "inkscape.h"
#include "util/ucompose.hpp"
diff --git a/src/event-log.h b/src/event-log.h
index 766979731..cabc3ae9a 100644
--- a/src/event-log.h
+++ b/src/event-log.h
@@ -10,8 +10,8 @@
#ifndef INKSCAPE_EVENT_LOG_H
#define INKSCAPE_EVENT_LOG_H
-#include <glibmm/refptr.h>
#include <gtkmm/treestore.h>
+#include <glibmm/refptr.h>
#include <gtkmm/treeselection.h>
#include <gtkmm/treeview.h>
diff --git a/src/extension/error-file.cpp b/src/extension/error-file.cpp
index 778295f47..5a8bede70 100644
--- a/src/extension/error-file.cpp
+++ b/src/extension/error-file.cpp
@@ -12,12 +12,11 @@
#include "config.h"
#endif
-#include <glibmm/i18n.h>
-
+#include "ui/dialog/extensions.h"
+#include <glibmm/i18n.h>
#include "inkscape.h"
#include "preferences.h"
-#include "ui/dialog/extensions.h"
#include "extension/extension.h"
#include "error-file.h"
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index 28f556e75..f9cf70960 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -19,7 +19,6 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/frame.h>
@@ -30,6 +29,7 @@
# include <gtkmm/table.h>
#endif
+#include <glibmm/i18n.h>
#include "inkscape.h"
#include "extension/implementation/implementation.h"
#include "extension.h"
diff --git a/src/extension/init.cpp b/src/extension/init.cpp
index 3be7d1509..1a163d4c2 100644
--- a/src/extension/init.cpp
+++ b/src/extension/init.cpp
@@ -26,8 +26,10 @@
#include "path-prefix.h"
#include "inkscape.h"
-#include <glibmm/ustring.h>
+
+#include <glibmm/fileutils.h>
#include <glibmm/i18n.h>
+#include <glibmm/ustring.h>
#include "system.h"
#include "db.h"
diff --git a/src/extension/internal/odf.h b/src/extension/internal/odf.h
index 219a99a4f..001f5e1f1 100644
--- a/src/extension/internal/odf.h
+++ b/src/extension/internal/odf.h
@@ -27,19 +27,18 @@
#include <io/stringstream.h>
#include <dom/uri.h>
-#include <glibmm.h>
#include "extension/implementation/implementation.h"
-
#include <xml/repr.h>
#include <string>
#include <map>
#include <dom/util/ziptool.h>
-//#include <io/domstream.h>
#include "sp-item.h"
+#include <glibmm/ustring.h>
+
namespace Inkscape
{
namespace Extension
diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp
index 2020fb24d..4e525ff73 100644
--- a/src/extension/param/string.cpp
+++ b/src/extension/param/string.cpp
@@ -10,11 +10,12 @@
# include "config.h"
#endif
-#include <glibmm/value.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/spinbutton.h>
+#include <glibmm/value.h>
+
#include "xml/node.h"
#include "extension/extension.h"
#include "string.h"
diff --git a/src/extension/prefdialog.h b/src/extension/prefdialog.h
index 943273623..e1999791f 100644
--- a/src/extension/prefdialog.h
+++ b/src/extension/prefdialog.h
@@ -10,8 +10,8 @@
#ifndef INKSCAPE_EXTENSION_DIALOG_H__
#define INKSCAPE_EXTENSION_DIALOG_H__
-#include <glibmm/value.h>
#include <gtkmm/dialog.h>
+#include <glibmm/value.h>
#include <glibmm/ustring.h>
diff --git a/src/extension/script/InkscapeScript.h b/src/extension/script/InkscapeScript.h
index 2ebeb1b19..8d6346582 100644
--- a/src/extension/script/InkscapeScript.h
+++ b/src/extension/script/InkscapeScript.h
@@ -12,7 +12,9 @@
#include "config.h"
-#include <glibmm.h>
+namespace Glib {
+class ustring;
+}
namespace Inkscape
{
diff --git a/src/file.cpp b/src/file.cpp
index 5737f0a8a..453ddb546 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -68,8 +68,10 @@
#include "ui/dialog/font-substitution.h"
#include <gtk/gtk.h>
-#include <glib.h>
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
using Inkscape::DocumentUndo;
diff --git a/src/file.h b/src/file.h
index b173ca58c..fe8ad9af3 100644
--- a/src/file.h
+++ b/src/file.h
@@ -16,7 +16,7 @@
*/
#include <glibmm/ustring.h>
-#include "ui/dialog/ocaldialogs.h"
+#include "extension/system.h"
class SPDesktop;
class SPDocument;
@@ -28,6 +28,10 @@ namespace Inkscape {
}
}
+namespace Gtk {
+class Window;
+}
+
// Get the name of the default template uri
Glib::ustring sp_file_default_template_uri();
diff --git a/src/filters/image.cpp b/src/filters/image.cpp
index ec31e59a7..0f15e9d0f 100644
--- a/src/filters/image.cpp
+++ b/src/filters/image.cpp
@@ -17,6 +17,7 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include "display/nr-filter-image.h"
#include "uri.h"
#include "uri-references.h"
#include "enums.h"
@@ -27,7 +28,6 @@
#include <string.h>
#include "display/nr-filter.h"
-#include "display/nr-filter-image.h"
/* FeImage base class */
static void sp_feImage_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index 6b019ad2a..a0c20c609 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -18,6 +18,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "widgets/gradient-vector.h"
+
#include <2geom/transforms.h>
#include <2geom/bezier-curve.h>
#include <2geom/crossing.h>
@@ -41,7 +43,6 @@
#include "sp-radial-gradient.h"
#include "sp-mesh-gradient.h"
#include "sp-stop.h"
-#include "widgets/gradient-vector.h"
#include "gradient-drag.h"
#include "gradient-chemistry.h"
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp
index a0a440308..eebc566f2 100644
--- a/src/helper/geom.cpp
+++ b/src/helper/geom.cpp
@@ -9,6 +9,7 @@
* Released under GNU GPL
*/
+#include <algorithm>
#include "helper/geom.h"
#include "helper/geom-curves.h"
#include <typeinfo>
@@ -20,7 +21,6 @@
#include <2geom/rect.h>
#include <2geom/coord.h>
#include <2geom/sbasis-to-bezier.h>
-#include <glibmm.h>
#include <math.h> // for M_PI
using Geom::X;
@@ -276,18 +276,18 @@ geom_cubic_bbox_wind_distance (Geom::Coord x000, Geom::Coord y000,
if (bbox) cubic_bbox (x000, y000, x001, y001, x011, y011, x111, y111, *bbox);
- x0 = MIN (x000, x001);
- x0 = MIN (x0, x011);
- x0 = MIN (x0, x111);
- y0 = MIN (y000, y001);
- y0 = MIN (y0, y011);
- y0 = MIN (y0, y111);
- x1 = MAX (x000, x001);
- x1 = MAX (x1, x011);
- x1 = MAX (x1, x111);
- y1 = MAX (y000, y001);
- y1 = MAX (y1, y011);
- y1 = MAX (y1, y111);
+ x0 = std::min (x000, x001);
+ x0 = std::min (x0, x011);
+ x0 = std::min (x0, x111);
+ y0 = std::min (y000, y001);
+ y0 = std::min (y0, y011);
+ y0 = std::min (y0, y111);
+ x1 = std::min (x000, x001);
+ x1 = std::min (x1, x011);
+ x1 = std::min (x1, x111);
+ y1 = std::min (y000, y001);
+ y1 = std::min (y1, y011);
+ y1 = std::min (y1, y111);
if (best) {
/* Quickly adjust to endpoints */
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index cae297e89..9cd1967d8 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -15,7 +15,6 @@
# include "config.h"
#endif
-#include <glib.h>
#include <png.h>
#include <2geom/transforms.h>
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 491acd73e..ac419784f 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -19,6 +19,7 @@
#include <errno.h>
#include <map>
+#include <gtkmm/messagedialog.h>
#include "debug/simple-event.h"
#include "debug/event-tracker.h"
@@ -35,11 +36,9 @@
#include <cstring>
#include <glib/gstdio.h>
-#include <glib.h>
#include <glibmm/i18n.h>
#include <glibmm/miscutils.h>
#include <glibmm/convert.h>
-#include <gtkmm/messagedialog.h>
#include <gtk/gtk.h>
#include <signal.h>
#include <string>
diff --git a/src/inkview.cpp b/src/inkview.cpp
index ee93b4134..fd7f6b608 100644
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
@@ -38,6 +38,7 @@
#include <sys/stat.h>
#include <locale.h>
+#include <gtkmm/main.h>
#include <glib.h>
// #include <stropts.h>
@@ -46,8 +47,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
-#include <gtkmm/main.h>
-
#include "gc-core.h"
#include "preferences.h"
diff --git a/src/interface.cpp b/src/interface.cpp
index 69832a2eb..986d3107f 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -23,9 +23,9 @@
# include "config.h"
#endif
-#include "file.h"
-#include <glib.h>
+#include "ui/dialog/dialog-manager.h"
#include <gtkmm/icontheme.h>
+#include "file.h"
#include <gtkmm/imagemenuitem.h>
#include <gtkmm/separatormenuitem.h>
@@ -75,15 +75,12 @@
#include "sp-image.h"
#include "sp-item.h"
#include "sp-mask.h"
-// #include "verbs.h"
#include "message-stack.h"
-// #include "inkscape.h"
-#include "ui/dialog/dialog-manager.h"
-// #include "../xml/repr.h"
#include "ui/dialog/layer-properties.h"
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
+
+#include <glibmm/miscutils.h>
using Inkscape::DocumentUndo;
diff --git a/src/io/stringstream.h b/src/io/stringstream.h
index 939a87455..248e42e50 100644
--- a/src/io/stringstream.h
+++ b/src/io/stringstream.h
@@ -1,7 +1,7 @@
#ifndef __INKSCAPE_IO_STRINGSTREAM_H__
#define __INKSCAPE_IO_STRINGSTREAM_H__
-#include <glibmm.h>
+#include <glibmm/ustring.h>
#include "inkscapestream.h"
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index bb8b0887f..74c706a1b 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -14,9 +14,7 @@
# include "config.h"
#endif
-#include <glibmm.h>
-#include <glib.h>
-#include <glibmm/i18n.h> // _()
+#include <glibmm/i18n.h>
#include <pango/pangoft2.h>
#include "libnrtype/FontFactory.h"
#include "libnrtype/font-instance.h"
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 5b495d14d..39a04914b 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -2,13 +2,13 @@
# include <config.h>
#endif
+#include <gtkmm/treemodel.h>
+#include <gtkmm/liststore.h>
+
#include <libnrtype/font-instance.h>
#include <libnrtype/TextWrapper.h>
#include <libnrtype/one-glyph.h>
-#include <glibmm.h>
-#include <gtkmm/treemodel.h>
-#include <gtkmm/liststore.h>
#include "font-lister.h"
#include "FontFactory.h"
@@ -21,6 +21,8 @@
#include "sp-root.h"
#include "xml/repr.h"
+#include <glibmm/regex.h>
+
//#define DEBUG_FONT
namespace Inkscape
@@ -285,6 +287,14 @@ namespace Inkscape
const gchar* family = pango_font_description_get_family(descr);
Glib::ustring Family = family;
+ // PANGO BUG...
+ // A font spec of Delicious, 500 Italic should result in a family of 'Delicious'
+ // and a style of 'Medium Italic'. It results instead with: a family of
+ // 'Delicious, 500' with a style of 'Medium Italic'. We chop of any weight numbers
+ // at the end of the family: match ",[1-9]00^".
+ Glib::RefPtr<Glib::Regex> weight = Glib::Regex::create(",[1-9]00$");
+ Family = weight->replace( Family, 0, "", Glib::REGEX_MATCH_PARTIAL );
+
// Pango canonized strings remove space after comma between family names. Put it back.
size_t i = 0;
while( (i = Family.find(",", i)) != std::string::npos) {
@@ -324,7 +334,7 @@ namespace Inkscape
// From style
if( fontspec.empty() ) {
- //std::cout << " Attempting desktop style" << std::endl;
+ //std::cout << " Attempting desktop style" << std::endl;
int rfamily = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTFAMILY);
int rstyle = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTSTYLE);
@@ -337,7 +347,7 @@ namespace Inkscape
// From preferences
if( fontspec.empty() ) {
- //std::cout << " Attempting preferences" << std::endl;
+ //std::cout << " Attempting preferences" << std::endl;
sp_style_read_from_prefs(query, "/tools/text");
fontspec = fontspec_from_style( query );
//std::cout << " fontspec from prefs :" << fontspec << ":" << std::endl;
@@ -346,7 +356,7 @@ namespace Inkscape
// From thin air
if( fontspec.empty() ) {
- //std::cout << " Attempting thin air" << std::endl;
+ //std::cout << " Attempting thin air" << std::endl;
fontspec = current_family + ", " + current_style;
//std::cout << " fontspec from thin air :" << fontspec << ":" << std::endl;
}
@@ -373,89 +383,87 @@ namespace Inkscape
}
- // Set fontspec. If check is false, best style match will not be done.
- void
- FontLister::set_fontspec (Glib::ustring new_fontspec, gboolean check) {
-
- std::pair<Glib::ustring,Glib::ustring> ui = ui_from_fontspec( new_fontspec );
- Glib::ustring new_family = ui.first;
- Glib::ustring new_style = ui.second;
+// Set fontspec. If check is false, best style match will not be done.
+void FontLister::set_fontspec(Glib::ustring new_fontspec, gboolean /*check*/)
+{
+ std::pair<Glib::ustring,Glib::ustring> ui = ui_from_fontspec( new_fontspec );
+ Glib::ustring new_family = ui.first;
+ Glib::ustring new_style = ui.second;
#ifdef DEBUG_FONT
- std::cout << "FontLister::set_fontspec: family: " << new_family
- << " style:" << new_style << std::endl;
+ std::cout << "FontLister::set_fontspec: family: " << new_family
+ << " style:" << new_style << std::endl;
#endif
- set_font_family( new_family, false );
- set_font_style( new_style );
- }
-
+ set_font_family( new_family, false );
+ set_font_style( new_style );
+}
- // TODO: use to determine font-selector best style
- std::pair<Glib::ustring, Glib::ustring>
- FontLister::new_font_family (Glib::ustring new_family, gboolean check_style ) {
+// TODO: use to determine font-selector best style
+std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustring new_family, gboolean /*check_style*/ )
+{
#ifdef DEBUG_FONT
- std::cout << "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
- std::cout << "FontLister::new_font_family: " << new_family << std::endl;
+ std::cout << "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
+ std::cout << "FontLister::new_font_family: " << new_family << std::endl;
#endif
- // No need to do anything if new family is same as old family.
- if( new_family.compare( current_family ) == 0 ) {
+ // No need to do anything if new family is same as old family.
+ if ( new_family.compare( current_family ) == 0 ) {
#ifdef DEBUG_FONT
std::cout << "FontLister::new_font_family: exit: no change in family." << std::endl;
std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" << std::endl;
#endif
return std::make_pair( current_family, current_style );
- }
+ }
- // We need to do two things:
- // 1. Update style list for new family.
- // 2. Select best valid style match to old style.
+ // We need to do two things:
+ // 1. Update style list for new family.
+ // 2. Select best valid style match to old style.
- // For finding style list, use list of first family in font-family list.
- GList* styles = NULL;
- Gtk::TreeModel::iterator iter = font_list_store->get_iter( "0" );
- while( iter != font_list_store->children().end() ) {
+ // For finding style list, use list of first family in font-family list.
+ GList* styles = NULL;
+ Gtk::TreeModel::iterator iter = font_list_store->get_iter( "0" );
+ while( iter != font_list_store->children().end() ) {
Gtk::TreeModel::Row row = *iter;
if( new_family.compare( row[FontList.family] ) == 0 ) {
- styles = row[FontList.styles];
- break;
+ styles = row[FontList.styles];
+ break;
}
++iter;
- }
+ }
- // Newly typed in font-family may not yet be in list... use default list.
- // TODO: if font-family is list, check if first family in list is on system
- // and set style accordingly.
- if( styles == NULL ) {
+ // Newly typed in font-family may not yet be in list... use default list.
+ // TODO: if font-family is list, check if first family in list is on system
+ // and set style accordingly.
+ if( styles == NULL ) {
styles = default_styles;
- }
+ }
- // Update style list.
- style_list_store->freeze_notify();
- style_list_store->clear();
+ // Update style list.
+ style_list_store->freeze_notify();
+ style_list_store->clear();
- for (GList *l=styles; l; l = l->next) {
+ for (GList *l=styles; l; l = l->next) {
Gtk::TreeModel::iterator treeModelIter = style_list_store->append();
(*treeModelIter)[FontStyleList.styles] = (char*)l->data;
- }
+ }
- style_list_store->thaw_notify();
+ style_list_store->thaw_notify();
- // Find best match to the style from the old font-family to the
- // styles available with the new font.
- // TODO: Maybe check if an exact match exists before using Pango.
- Glib::ustring best_style = get_best_style_match( new_family, current_style );
+ // Find best match to the style from the old font-family to the
+ // styles available with the new font.
+ // TODO: Maybe check if an exact match exists before using Pango.
+ Glib::ustring best_style = get_best_style_match( new_family, current_style );
#ifdef DEBUG_FONT
- std::cout << "FontLister::new_font_family: exit: " << new_family << " " << best_style << std::endl;
- std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" << std::endl;
+ std::cout << "FontLister::new_font_family: exit: " << new_family << " " << best_style << std::endl;
+ std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" << std::endl;
#endif
- return std::make_pair( new_family, best_style );
- }
+ return std::make_pair( new_family, best_style );
+}
std::pair<Glib::ustring, Glib::ustring>
FontLister::set_font_family (Glib::ustring new_family, gboolean check_style) {
@@ -555,13 +563,13 @@ namespace Inkscape
PangoWeight weight = pango_font_description_get_weight( desc );
switch ( weight ) {
case PANGO_WEIGHT_THIN:
- sp_repr_css_set_property (css, "font-weight", "thin" );
+ sp_repr_css_set_property (css, "font-weight", "100" );
break;
case PANGO_WEIGHT_ULTRALIGHT:
- sp_repr_css_set_property (css, "font-weight", "extra light" );
+ sp_repr_css_set_property (css, "font-weight", "200" );
break;
case PANGO_WEIGHT_LIGHT:
- sp_repr_css_set_property (css, "font-weight", "light" );
+ sp_repr_css_set_property (css, "font-weight", "300" );
break;
case PANGO_WEIGHT_BOOK:
sp_repr_css_set_property (css, "font-weight", "380" );
@@ -570,19 +578,19 @@ namespace Inkscape
sp_repr_css_set_property (css, "font-weight", "normal" );
break;
case PANGO_WEIGHT_MEDIUM:
- sp_repr_css_set_property (css, "font-weight", "medium" );
+ sp_repr_css_set_property (css, "font-weight", "500" );
break;
case PANGO_WEIGHT_SEMIBOLD:
- sp_repr_css_set_property (css, "font-weight", "semi bold" );
+ sp_repr_css_set_property (css, "font-weight", "600" );
break;
case PANGO_WEIGHT_BOLD:
sp_repr_css_set_property (css, "font-weight", "bold" );
break;
case PANGO_WEIGHT_ULTRABOLD:
- sp_repr_css_set_property (css, "font-weight", "extra bold" );
+ sp_repr_css_set_property (css, "font-weight", "800" );
break;
case PANGO_WEIGHT_HEAVY:
- sp_repr_css_set_property (css, "font-weight", "black" );
+ sp_repr_css_set_property (css, "font-weight", "900" );
break;
case PANGO_WEIGHT_ULTRAHEAVY:
sp_repr_css_set_property (css, "font-weight", "1000" );
@@ -730,11 +738,11 @@ namespace Inkscape
switch (style->font_stretch.computed) {
case SP_CSS_FONT_STRETCH_ULTRA_CONDENSED:
- fontspec += " extra_condensed";
+ fontspec += " extra-condensed";
break;
case SP_CSS_FONT_STRETCH_EXTRA_CONDENSED:
- fontspec += " extra_condensed";
+ fontspec += " extra-condensed";
break;
case SP_CSS_FONT_STRETCH_CONDENSED:
@@ -743,7 +751,7 @@ namespace Inkscape
break;
case SP_CSS_FONT_STRETCH_SEMI_CONDENSED:
- fontspec += " semi_condensed";
+ fontspec += " semi-condensed";
break;
case SP_CSS_FONT_STRETCH_NORMAL:
@@ -751,7 +759,7 @@ namespace Inkscape
break;
case SP_CSS_FONT_STRETCH_SEMI_EXPANDED:
- fontspec += " semi_expanded";
+ fontspec += " semi-expanded";
break;
case SP_CSS_FONT_STRETCH_EXPANDED:
@@ -760,11 +768,11 @@ namespace Inkscape
break;
case SP_CSS_FONT_STRETCH_EXTRA_EXPANDED:
- fontspec += " extra_expanded";
+ fontspec += " extra-expanded";
break;
case SP_CSS_FONT_STRETCH_ULTRA_EXPANDED:
- fontspec += " ultra_expanded";
+ fontspec += " ultra-expanded";
break;
default:
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index b0be02b95..105fdea32 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -7,14 +7,13 @@
//#define LPE_ENABLE_TEST_EFFECTS
-#include "live_effects/effect.h"
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
// include effects:
#include "live_effects/lpe-patternalongpath.h"
+#include "live_effects/effect.h"
#include "live_effects/lpe-bendpath.h"
#include "live_effects/lpe-sketch.h"
#include "live_effects/lpe-vonkoch.h"
diff --git a/src/live_effects/lpe-bendpath.h b/src/live_effects/lpe-bendpath.h
index 3d336e2e7..16b8c6137 100644
--- a/src/live_effects/lpe-bendpath.h
+++ b/src/live_effects/lpe-bendpath.h
@@ -10,9 +10,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "live_effects/parameter/enum.h"
#include "live_effects/effect.h"
#include "live_effects/parameter/path.h"
-#include "live_effects/parameter/enum.h"
#include "live_effects/parameter/bool.h"
#include <2geom/sbasis.h>
diff --git a/src/live_effects/lpe-boolops.h b/src/live_effects/lpe-boolops.h
index 8040c1df6..3c8dc85c4 100644
--- a/src/live_effects/lpe-boolops.h
+++ b/src/live_effects/lpe-boolops.h
@@ -14,8 +14,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "live_effects/effect.h"
#include "live_effects/parameter/enum.h"
+#include "live_effects/effect.h"
#include "live_effects/parameter/path.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-curvestitch.cpp b/src/live_effects/lpe-curvestitch.cpp
index af928fff8..854cc0734 100644
--- a/src/live_effects/lpe-curvestitch.cpp
+++ b/src/live_effects/lpe-curvestitch.cpp
@@ -12,6 +12,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "ui/widget/scalar.h"
#include <glibmm/i18n.h>
#include "live_effects/lpe-curvestitch.h"
@@ -30,8 +31,6 @@
#include <2geom/d2.h>
#include <2geom/affine.h>
-#include "ui/widget/scalar.h"
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-dynastroke.h b/src/live_effects/lpe-dynastroke.h
index ced376515..816cb60a6 100644
--- a/src/live_effects/lpe-dynastroke.h
+++ b/src/live_effects/lpe-dynastroke.h
@@ -14,9 +14,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "live_effects/parameter/enum.h"
#include "live_effects/effect.h"
#include "live_effects/parameter/parameter.h"
-#include "live_effects/parameter/enum.h"
#include "live_effects/parameter/path.h"
#include "live_effects/parameter/bool.h"
diff --git a/src/live_effects/lpe-envelope.h b/src/live_effects/lpe-envelope.h
index b5d6ceb50..64f6a4c0c 100644
--- a/src/live_effects/lpe-envelope.h
+++ b/src/live_effects/lpe-envelope.h
@@ -9,9 +9,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "live_effects/parameter/enum.h"
#include "live_effects/effect.h"
#include "live_effects/parameter/path.h"
-#include "live_effects/parameter/enum.h"
#include "live_effects/parameter/bool.h"
#include <2geom/sbasis.h>
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index 96b0bb0ae..0579b1016 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -12,9 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glibmm/i18n.h>
-
#include "ui/widget/scalar.h"
+#include <glibmm/i18n.h>
#include "live_effects/lpe-rough-hatches.h"
#include "sp-item.h"
diff --git a/src/live_effects/lpe-ruler.h b/src/live_effects/lpe-ruler.h
index 497398e22..8c5c83ceb 100644
--- a/src/live_effects/lpe-ruler.h
+++ b/src/live_effects/lpe-ruler.h
@@ -15,8 +15,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "live_effects/effect.h"
#include "live_effects/parameter/enum.h"
+#include "live_effects/effect.h"
#include "live_effects/parameter/unit.h"
namespace Inkscape {
diff --git a/src/live_effects/parameter/bool.cpp b/src/live_effects/parameter/bool.cpp
index 2beee7cec..c1e8f8a7b 100644
--- a/src/live_effects/parameter/bool.cpp
+++ b/src/live_effects/parameter/bool.cpp
@@ -4,8 +4,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glibmm/i18n.h>
-
#include "ui/widget/registered-widget.h"
#include "live_effects/parameter/bool.h"
#include "live_effects/effect.h"
@@ -15,6 +13,7 @@
#include "inkscape.h"
#include "verbs.h"
#include "helper-fns.h"
+#include <glibmm/i18n.h>
namespace Inkscape {
diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp
index 8615721b0..a5de2169e 100644
--- a/src/live_effects/parameter/parameter.cpp
+++ b/src/live_effects/parameter/parameter.cpp
@@ -4,13 +4,13 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "ui/widget/registered-widget.h"
#include <glibmm/i18n.h>
#include "live_effects/parameter/parameter.h"
#include "live_effects/effect.h"
#include "svg/svg.h"
#include "xml/repr.h"
-#include "ui/widget/registered-widget.h"
#include "svg/stringstream.h"
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index eca0d7a22..e5648dc68 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -5,6 +5,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "ui/widget/point.h"
#include <glibmm/i18n.h>
#include "live_effects/parameter/path.h"
@@ -15,7 +16,6 @@
#include <2geom/pathvector.h>
#include <2geom/d2.h>
-#include "ui/widget/point.h"
#include "widgets/icon.h"
#include <gtk/gtk.h>
#include "selection-chemistry.h"
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 53866f278..302818e55 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -4,8 +4,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glibmm/i18n.h>
-
#include "ui/widget/registered-widget.h"
#include "live_effects/parameter/point.h"
#include "live_effects/effect.h"
@@ -16,6 +14,7 @@
#include "inkscape.h"
#include "verbs.h"
#include "knotholder.h"
+#include <glibmm/i18n.h>
// needed for on-canvas editting:
#include "desktop.h"
diff --git a/src/live_effects/parameter/random.cpp b/src/live_effects/parameter/random.cpp
index 7a3c6d8cb..075e85ee1 100644
--- a/src/live_effects/parameter/random.cpp
+++ b/src/live_effects/parameter/random.cpp
@@ -4,12 +4,11 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glibmm/i18n.h>
-
+#include "ui/widget/registered-widget.h"
#include "live_effects/parameter/random.h"
#include "live_effects/effect.h"
+#include <glibmm/i18n.h>
#include "svg/svg.h"
-#include "ui/widget/registered-widget.h"
#include "ui/widget/random.h"
#include "svg/stringstream.h"
diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp
index 090c28bd2..fcb2fc9fc 100644
--- a/src/live_effects/parameter/text.cpp
+++ b/src/live_effects/parameter/text.cpp
@@ -8,9 +8,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "ui/widget/registered-widget.h"
#include <glibmm/i18n.h>
-#include "ui/widget/registered-widget.h"
#include "live_effects/parameter/text.h"
#include "live_effects/effect.h"
#include "svg/svg.h"
diff --git a/src/live_effects/parameter/unit.cpp b/src/live_effects/parameter/unit.cpp
index 7a2ce6f65..602d806a0 100644
--- a/src/live_effects/parameter/unit.cpp
+++ b/src/live_effects/parameter/unit.cpp
@@ -4,11 +4,11 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "ui/widget/registered-widget.h"
#include <glibmm/i18n.h>
#include "live_effects/parameter/unit.h"
#include "live_effects/effect.h"
-#include "ui/widget/registered-widget.h"
#include "verbs.h"
namespace Inkscape {
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp
index edd6b863f..cfaa9e7e7 100644
--- a/src/live_effects/parameter/vector.cpp
+++ b/src/live_effects/parameter/vector.cpp
@@ -4,9 +4,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "ui/widget/registered-widget.h"
#include <glibmm/i18n.h>
-#include "ui/widget/registered-widget.h"
#include "live_effects/parameter/vector.h"
#include "sp-lpe-item.h"
#include "knotholder.h"
diff --git a/src/main.cpp b/src/main.cpp
index 20330edbb..58ab19616 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -47,7 +47,6 @@
#endif /* Not def: POPT_TABLEEND */
#include <libxml/tree.h>
-#include <glib.h>
#include <glib/gprintf.h>
#include <glib-object.h>
#include <gtk/gtk.h>
@@ -103,6 +102,9 @@
#include "extension/init.h"
#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/miscutils.h>
+
#include <gtkmm/main.h>
#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
diff --git a/src/registrytool.cpp b/src/registrytool.cpp
index 72b53821e..01a83a7e0 100644
--- a/src/registrytool.cpp
+++ b/src/registrytool.cpp
@@ -21,12 +21,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "registrytool.h"
+
#include <windows.h>
#include <string>
#include <cstdio>
-#include "registrytool.h"
-
+#include <glibmm/ustring.h>
typedef struct
{
diff --git a/src/registrytool.h b/src/registrytool.h
index 0a8139184..335a8bd52 100644
--- a/src/registrytool.h
+++ b/src/registrytool.h
@@ -21,8 +21,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string>
-#include <glibmm.h>
+namespace Glib {
+ class ustring;
+}
/**
* Inkscape Registry Tool
diff --git a/src/resource-manager.cpp b/src/resource-manager.cpp
index 8e2e95988..fe53eca4f 100644
--- a/src/resource-manager.cpp
+++ b/src/resource-manager.cpp
@@ -9,12 +9,12 @@
#include <string>
#include <vector>
#include <algorithm>
+#include <gtkmm/recentmanager.h>
#include <glibmm/i18n.h>
#include <glibmm/convert.h>
#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
#include <glibmm/uriutils.h>
-#include <gtkmm/recentmanager.h>
#include "resource-manager.h"
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 946858ec4..41ebc9bfc 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -23,15 +23,14 @@
# include "config.h"
#endif
+#include <gtkmm/clipboard.h>
+
#include "file.h"
#include "selection-chemistry.h"
// TOOD fixme: This should be moved into preference repr
SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
-
-#include <gtkmm/clipboard.h>
-
#include "svg/svg.h"
#include "desktop.h"
#include "desktop-style.h"
diff --git a/src/shortcuts.cpp b/src/shortcuts.cpp
index 755269edb..2af04929e 100644
--- a/src/shortcuts.cpp
+++ b/src/shortcuts.cpp
@@ -25,15 +25,18 @@
#include <string>
#include <map>
+#include "shortcuts.h"
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
#include "helper/action.h"
#include "io/sys.h"
#include "io/resource.h"
-#include "shortcuts.h"
#include "verbs.h"
#include "xml/node-iterators.h"
#include "xml/repr.h"
diff --git a/src/shortcuts.h b/src/shortcuts.h
index c2a6f6cde..406768f97 100644
--- a/src/shortcuts.h
+++ b/src/shortcuts.h
@@ -1,8 +1,6 @@
#ifndef __SP_SHORTCUTS_H__
#define __SP_SHORTCUTS_H__
-#include <gtkmm/cellrendereraccel.h>
-
/*
* Keyboard shortcut processing
*
@@ -12,6 +10,15 @@
* This code is in public domain
*/
+#include <vector>
+#include <gdkmm/types.h>
+
+typedef struct _GtkAccelGroup GtkAccelGroup;
+typedef struct _GtkWidget GtkWidget;
+
+struct _GtkAccelGroup;
+struct _GtkWidget;
+
namespace Inkscape {
class Verb;
namespace UI {
diff --git a/src/sp-mesh-array.cpp b/src/sp-mesh-array.cpp
index 249f9562e..2c3c7fa65 100644
--- a/src/sp-mesh-array.cpp
+++ b/src/sp-mesh-array.cpp
@@ -317,21 +317,26 @@ Geom::Point SPMeshPatchI::getTensorPoint( guint k ) {
assert( k < 4 );
- guint i, j;
+ guint i = 0;
+ guint j = 0;
switch ( k ) {
case 0:
- i = 1; j = 1;
+ i = 1;
+ j = 1;
break;
case 1:
- i = 1; j = 2;
+ i = 1;
+ j = 2;
break;
case 2:
- i = 2; j = 2;
+ i = 2;
+ j = 2;
break;
case 3:
- i = 2; j = 1;
+ i = 2;
+ j = 1;
break;
}
@@ -342,7 +347,6 @@ Geom::Point SPMeshPatchI::getTensorPoint( guint k ) {
p = coonsTensorPoint( k );
}
return p;
-
}
/**
@@ -522,7 +526,7 @@ gdouble SPMeshPatchI::getOpacity( guint i ) {
assert( i < 4 );
- gdouble opacity;
+ gdouble opacity = 0.0;
switch ( i ) {
case 0:
opacity = (*nodes)[ row ][ col ]->opacity;
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index e7e1432c2..747a988a9 100644
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
@@ -120,13 +120,13 @@ sp_rect_set(SPObject *object, unsigned key, gchar const *value)
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
case SP_ATTR_RX:
- if (!rect->rx.read(value) || rect->rx.value < 0.0) {
+ if (!rect->rx.read(value) || rect->rx.value <= 0.0) {
rect->rx.unset();
}
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
case SP_ATTR_RY:
- if (!rect->ry.read(value) || rect->ry.value < 0.0) {
+ if (!rect->ry.read(value) || rect->ry.value <= 0.0) {
rect->ry.unset();
}
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
diff --git a/src/sp-stop.h b/src/sp-stop.h
index b82dd0b13..d22e86e00 100644
--- a/src/sp-stop.h
+++ b/src/sp-stop.h
@@ -8,15 +8,13 @@
* Authors?
*/
-#include <glib.h>
-#include <glibmm/ustring.h>
#include "sp-object.h"
#include "color.h"
+#include <glib.h>
-class SPObjectClass;
-
-struct SPStop;
-struct SPStopClass;
+namespace Glib {
+class ustring;
+}
#define SP_TYPE_STOP (sp_stop_get_type())
#define SP_STOP(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_STOP, SPStop))
diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp
index f0535e2ff..9e7dfa3f9 100644
--- a/src/tools-switch.cpp
+++ b/src/tools-switch.cpp
@@ -213,7 +213,6 @@ tools_switch(SPDesktop *dt, int num)
dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> or <b>double click</b> to create a mesh on selected objects, <b>drag handles</b> to adjust meshes."));
break;
case TOOLS_ZOOM:
- std::cout << "tools-switch.cpp: TOOLS_ZOOM" << std::endl;
dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]);
dt->activate_guides(false);
inkscape_eventcontext_set(sp_desktop_event_context(dt));
diff --git a/src/ui/cache/svg_preview_cache.cpp b/src/ui/cache/svg_preview_cache.cpp
index 7842bd5b3..74e94b827 100644
--- a/src/ui/cache/svg_preview_cache.cpp
+++ b/src/ui/cache/svg_preview_cache.cpp
@@ -19,7 +19,6 @@
# include "config.h"
#endif
-#include <glib.h>
#include <gtk/gtk.h>
#include <2geom/transforms.h>
#include "sp-namedview.h"
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 8cdb37f4f..f2b9fb02a 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -21,6 +21,7 @@
* See the file COPYING for details.
*/
+#include <gtkmm/clipboard.h>
#include "ui/clipboard.h"
// TODO: reduce header bloat if possible
@@ -28,7 +29,6 @@
#include "file.h" // for file_import, used in _pasteImage
#include <list>
#include <algorithm>
-#include <gtkmm/clipboard.h>
#include <glibmm/ustring.h>
#include <glibmm/i18n.h>
#include <glib/gstdio.h> // for g_file_set_contents etc., used in _onGet and paste
diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp
index 62e6ce3a3..5a3c5a496 100644
--- a/src/ui/control-manager.cpp
+++ b/src/ui/control-manager.cpp
@@ -14,7 +14,6 @@
#include <algorithm>
#include <set>
-#include <glib.h>
#include <glib-object.h>
#include "display/sodipodi-ctrl.h" // for SP_TYPE_CTRL
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index e971cfb09..753320ab9 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -21,7 +21,6 @@
#include <climits>
-#include <glib.h>
#include <glibmm/i18n.h>
#include <2geom/transforms.h>
#include <gtkmm/adjustment.h>
diff --git a/src/ui/dialog/clonetiler.h b/src/ui/dialog/clonetiler.h
index 2cad30e9e..7ec30cfaa 100644
--- a/src/ui/dialog/clonetiler.h
+++ b/src/ui/dialog/clonetiler.h
@@ -11,7 +11,6 @@
#define __SP_CLONE_TILER_H__
#include "ui/widget/panel.h"
-#include <glib.h>
#include <gtk/gtk.h>
#include "ui/dialog/desktop-tracker.h"
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp
index 2ff4ed657..e09d9b1d1 100644
--- a/src/ui/dialog/color-item.cpp
+++ b/src/ui/dialog/color-item.cpp
@@ -12,8 +12,8 @@
*/
#include <errno.h>
-#include <glibmm/i18n.h>
#include <gtkmm/label.h>
+#include <glibmm/i18n.h>
#include <cairo.h>
#include <gtk/gtk.h>
diff --git a/src/ui/dialog/debug.cpp b/src/ui/dialog/debug.cpp
index e61f8e389..d127261c0 100644
--- a/src/ui/dialog/debug.cpp
+++ b/src/ui/dialog/debug.cpp
@@ -13,13 +13,13 @@
# include <config.h>
#endif
-#include <glibmm/i18n.h>
#include <gtkmm/box.h>
#include <gtkmm/dialog.h>
#include <gtkmm/textview.h>
#include <gtkmm/button.h>
#include <gtkmm/menubar.h>
#include <gtkmm/scrolledwindow.h>
+#include <glibmm/i18n.h>
#include "debug.h"
diff --git a/src/ui/dialog/desktop-tracker.h b/src/ui/dialog/desktop-tracker.h
index c219e8d98..7da55cf2f 100644
--- a/src/ui/dialog/desktop-tracker.h
+++ b/src/ui/dialog/desktop-tracker.h
@@ -7,9 +7,8 @@
#ifndef SEEN_DIALOG_DESKTOP_TRACKER
#define SEEN_DIALOG_DESKTOP_TRACKER
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/connection.h>
-#include <glib.h>
typedef struct _GtkWidget GtkWidget;
class SPDesktop;
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 99a8c08d2..3017dc117 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -42,6 +42,8 @@
#endif
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
+
#include "helper/unit-menu.h"
#include "helper/units.h"
#include "unit-constants.h"
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp
index b3af6fc00..3413b0b0d 100644
--- a/src/ui/dialog/filedialog.cpp
+++ b/src/ui/dialog/filedialog.cpp
@@ -24,6 +24,8 @@
#include "extension/output.h"
#include "preferences.h"
+#include <glibmm/convert.h>
+
namespace Inkscape
{
namespace UI
diff --git a/src/ui/dialog/filedialog.h b/src/ui/dialog/filedialog.h
index 63cee6bdc..8dfcf5dce 100644
--- a/src/ui/dialog/filedialog.h
+++ b/src/ui/dialog/filedialog.h
@@ -16,12 +16,13 @@
#ifndef __FILE_DIALOG_H__
#define __FILE_DIALOG_H__
-#include <glibmm.h>
#include <vector>
#include <set>
#include "extension/system.h"
+#include <glibmm/ustring.h>
+
class SPDocument;
namespace Inkscape {
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index cb6d92799..5808d7d21 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -34,7 +34,12 @@
#include <gtkmm/expander.h>
#include <gtkmm/stock.h>
+
+#include <glibmm/convert.h>
+#include <glibmm/fileutils.h>
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
+
#include "extension/input.h"
#include "extension/output.h"
#include "extension/db.h"
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index d65f5c48c..0d2d0757c 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -26,7 +26,11 @@
#endif
#include "ui/widget/spinbutton.h"
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/stringutils.h>
#include "desktop.h"
#include "desktop-handles.h"
diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h
index 14d54b8d4..c0c635f94 100644
--- a/src/ui/dialog/find.h
+++ b/src/ui/dialog/find.h
@@ -20,14 +20,12 @@
#include "ui/widget/button.h"
#include "ui/widget/entry.h"
#include "ui/widget/frame.h"
-#include <glib.h>
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/expander.h>
#include <gtkmm/label.h>
-#include "desktop.h"
#include "ui/dialog/desktop-tracker.h"
class SPItem;
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index f0112f1d8..8df3ee5c8 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -10,6 +10,10 @@
# include <config.h>
#endif
+#include <gtkmm/messagedialog.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/textview.h>
+
#include <set>
#include "font-substitution.h"
@@ -24,7 +28,9 @@
#include "preferences.h"
#include "xml/repr.h"
+
#include "sp-defs.h"
+#include "sp-root.h"
#include "sp-text.h"
#include "sp-textpath.h"
#include "sp-flowtext.h"
@@ -37,6 +43,7 @@
#include "libnrtype/FontFactory.h"
#include "libnrtype/font-instance.h"
+#include <glibmm/i18n.h>
#include <glibmm/regex.h>
namespace Inkscape {
@@ -228,7 +235,11 @@ GSList * FontSubstitution::getFontReplacedItems(SPDocument* doc, Glib::ustring *
std::set<Glib::ustring>::const_iterator iter = setFontSpans.find(font);
if (iter != setFontSpans.end() ||
font == Glib::ustring("sans-serif") ||
- font == Glib::ustring("Sans")) {
+ font == Glib::ustring("Sans") ||
+ font == Glib::ustring("serif") ||
+ font == Glib::ustring("Serif") ||
+ font == Glib::ustring("monospace") ||
+ font == Glib::ustring("Monospace")) {
fontFound = true;
break;
}
@@ -236,7 +247,7 @@ GSList * FontSubstitution::getFontReplacedItems(SPDocument* doc, Glib::ustring *
if (fontFound == false) {
Glib::ustring subName = getSubstituteFontName(fonts);
Glib::ustring err = Glib::ustring::compose(
- "Font '%1' substituted with '%2'", fonts.c_str(), subName.c_str());
+ _("Font '%1' substituted with '%2'"), fonts.c_str(), subName.c_str());
setErrors.insert(err);
outList = g_slist_prepend (outList, item);
}
diff --git a/src/ui/dialog/font-substitution.h b/src/ui/dialog/font-substitution.h
index 6fa5aee91..1c445081b 100644
--- a/src/ui/dialog/font-substitution.h
+++ b/src/ui/dialog/font-substitution.h
@@ -12,19 +12,9 @@
#ifndef INKSCAPE_UI_FONT_SUBSTITUTION_H
#define INKSCAPE_UI_FONT_SUBSTITUTION_H
-#include <gtkmm/box.h>
-#include <gtkmm/widget.h>
-#include <gtkmm/messagedialog.h>
-#include <gtkmm/textview.h>
-#include <gtkmm/scrolledwindow.h>
-#if WITH_GTKMM_3_0
-#include <gtkmm/checkbutton.h>
-#endif
-#include <glibmm/i18n.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include "sp-root.h"
+#include <glibmm/ustring.h>
+class SPDocument;
namespace Inkscape {
namespace UI {
@@ -46,7 +36,6 @@ protected:
private:
FontSubstitution(FontSubstitution const &d);
FontSubstitution& operator=(FontSubstitution const &d);
-
};
} // namespace Dialog
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 801ab2922..1a52410b8 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -19,7 +19,6 @@
#include <gtkmm/buttonbox.h>
#include <boost/scoped_ptr.hpp>
-#include <glib.h>
#include <glibmm/i18n.h>
#include <glibmm/main.h>
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 34a908995..65c6a20fe 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -17,10 +17,9 @@
# include <config.h>
#endif
+#include "inkscape-preferences.h"
#include <glibmm/i18n.h>
#include <glibmm/miscutils.h>
-
-#include "inkscape-preferences.h"
#include <gtkmm/main.h>
#include <gtkmm/frame.h>
#include <gtkmm/scrolledwindow.h>
diff --git a/src/ui/dialog/object-attributes.cpp b/src/ui/dialog/object-attributes.cpp
index 3d780fa83..027c9ae56 100644
--- a/src/ui/dialog/object-attributes.cpp
+++ b/src/ui/dialog/object-attributes.cpp
@@ -20,19 +20,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <glibmm/i18n.h>
-
+#include "ui/dialog/dialog-manager.h"
+#include "desktop.h"
#include "desktop-handles.h"
#include "macros.h"
#include "sp-anchor.h"
#include "sp-image.h"
#include "verbs.h"
#include "xml/repr.h"
-#include "ui/dialog/dialog-manager.h"
#include "ui/dialog/object-attributes.h"
#include "widgets/sp-attribute-widget.h"
#include "inkscape.h"
#include "selection.h"
+#include <glibmm/i18n.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/dialog/object-attributes.h b/src/ui/dialog/object-attributes.h
index b0d02a0af..956091989 100644
--- a/src/ui/dialog/object-attributes.h
+++ b/src/ui/dialog/object-attributes.h
@@ -23,9 +23,6 @@
#ifndef SEEN_DIALOGS_OBJECT_ATTRIBUTES_H
#define SEEN_DIALOGS_OBJECT_ATTRIBUTES_H
-#include <glib.h>
-
-#include "desktop.h"
#include "ui/dialog/desktop-tracker.h"
#include "ui/widget/panel.h"
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index 09ce59e9c..c597bc849 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -33,10 +33,16 @@
#include <gtkmm/notebook.h>
#include <gtkmm/spinner.h>
#include <gtkmm/stock.h>
-#include <glibmm/i18n.h>
#include <gdkmm/general.h>
#include <libxml/tree.h>
+#include <glibmm/convert.h>
+#include <glibmm/fileutils.h>
+#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/markup.h>
+#include <glibmm/miscutils.h>
+
namespace Inkscape
{
namespace UI
diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h
index 326542579..8cb247766 100644
--- a/src/ui/dialog/ocaldialogs.h
+++ b/src/ui/dialog/ocaldialogs.h
@@ -13,8 +13,6 @@
#ifndef __OCAL_DIALOG_H__
#define __OCAL_DIALOG_H__
-#include <cairomm/refptr.h>
-
//Gtk includes
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
@@ -22,6 +20,8 @@
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/window.h>
+#include <cairomm/refptr.h>
+
#if GTK_CHECK_VERSION(3,6,0)
# include <gtkmm/searchentry.h>
#endif
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index bce63093d..ab5f4c0e9 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -22,7 +22,6 @@
#include <gtkmm/imagemenuitem.h>
#include <gtkmm/scale.h>
#include <gtkmm/stock.h>
-#include <glibmm/i18n.h>
#include <message-stack.h>
#include "selection.h"
#include <string.h>
@@ -38,6 +37,9 @@
#include "sp-font.h"
#include "sp-glyph-kerning.h"
+#include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
+
SvgFontDrawingArea::SvgFontDrawingArea():
_x(0),
_y(0),
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index cc6ddd7de..dfc92774c 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -18,8 +18,6 @@
#include <functional>
#include <sstream>
-#include <glibmm/i18n.h>
-
#include <gtkmm/buttonbox.h>
#include <gtkmm/label.h>
@@ -36,6 +34,7 @@
#include <gtkmm/treemodelcolumn.h>
#include <gtkmm/clipboard.h>
+#include <glibmm/i18n.h>
#include "path-prefix.h"
#include "io/sys.h"
diff --git a/src/ui/dialog/symbols.h b/src/ui/dialog/symbols.h
index 5486ff546..08221bf22 100644
--- a/src/ui/dialog/symbols.h
+++ b/src/ui/dialog/symbols.h
@@ -12,15 +12,11 @@
#ifndef INKSCAPE_UI_DIALOG_SYMBOLS_H
#define INKSCAPE_UI_DIALOG_SYMBOLS_H
-#include "ui/widget/panel.h"
-#include "ui/widget/button.h"
+#include "display/drawing.h"
#include "ui/dialog/desktop-tracker.h"
-#include "display/drawing.h"
-
-#include <glib.h>
-#include <gtkmm/treemodel.h>
+#include "ui/widget/panel.h"
#include <vector>
@@ -43,9 +39,6 @@ public:
static SymbolsDialog& getInstance();
-protected:
-
-
private:
SymbolsDialog(SymbolsDialog const &); // no copy
SymbolsDialog &operator=(SymbolsDialog const &); // no assign
diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp
index b96c9158a..a487eb930 100644
--- a/src/ui/dialog/undo-history.cpp
+++ b/src/ui/dialog/undo-history.cpp
@@ -14,11 +14,11 @@
# include <config.h>
#endif
+#include "undo-history.h"
#include <glibmm/i18n.h>
#include <stddef.h>
#include <sigc++/sigc++.h>
-#include "undo-history.h"
#include "document.h"
#include "document-undo.h"
#include "inkscape.h"
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index 629608242..70bd0e859 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -11,9 +11,8 @@
*/
#include <boost/shared_ptr.hpp>
-#include <glib.h>
-#include <glibmm/i18n.h>
#include "node.h"
+#include <glibmm/i18n.h>
#include "desktop.h"
#include "desktop-handles.h"
#include "document.h"
diff --git a/src/ui/tool/node-tool.h b/src/ui/tool/node-tool.h
index bc5267bb2..341faf329 100644
--- a/src/ui/tool/node-tool.h
+++ b/src/ui/tool/node-tool.h
@@ -14,12 +14,9 @@
#include <memory>
#include <boost/ptr_container/ptr_map.hpp>
#include <glib.h>
-#include <stddef.h>
-#include <sigc++/sigc++.h>
#include "event-context.h"
-#include "ui/tool/node-types.h"
-#define INK_TYPE_NODE_TOOL (ink_node_tool_get_type ())
+#define INK_TYPE_NODE_TOOL (ink_node_tool_get_type ())
#define INK_NODE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INK_TYPE_NODE_TOOL, InkNodeTool))
#define INK_NODE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INK_TYPE_NODE_TOOL, InkNodeToolClass))
#define INK_IS_NODE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INK_TYPE_NODE_TOOL))
@@ -74,7 +71,7 @@ struct InkNodeTool : public SPEventContext
};
struct InkNodeToolClass {
- SPEventContextClass parent_class;
+ SPEventContextClass parent_class;
};
GType ink_node_tool_get_type (void);
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 35eb23f42..ac023beaa 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -19,7 +19,6 @@
#include <2geom/bezier-curve.h>
#include <2geom/bezier-utils.h>
#include <2geom/svg-path.h>
-#include <glibmm.h>
#include <glibmm/i18n.h>
#include "ui/tool/path-manipulator.h"
#include "desktop.h"
diff --git a/src/ui/uxmanager.h b/src/ui/uxmanager.h
index 5fef08f11..711703192 100644
--- a/src/ui/uxmanager.h
+++ b/src/ui/uxmanager.h
@@ -11,20 +11,13 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
#include <vector>
+#include <glib.h>
-extern "C"
-{
- typedef struct _GObject GObject;
- typedef struct _GtkWidget GtkWidget;
-}
-
+extern "C" typedef struct _GtkWidget GtkWidget;
class SPDesktop;
-
struct SPDesktopWidget;
-
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/imageicon.h b/src/ui/widget/imageicon.h
index 803b2f53f..2ea8b8533 100644
--- a/src/ui/widget/imageicon.h
+++ b/src/ui/widget/imageicon.h
@@ -12,9 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glibmm/ustring.h>
#include <gtkmm/box.h>
-
+#include <glibmm/ustring.h>
class SPDocument;
diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h
index ca1bfd69d..7b02fa4dc 100644
--- a/src/ui/widget/imagetoggler.h
+++ b/src/ui/widget/imagetoggler.h
@@ -14,9 +14,9 @@
#include "config.h"
#endif
-#include <glibmm/property.h>
#include <gtkmm/cellrendererpixbuf.h>
#include <gtkmm/widget.h>
+#include <glibmm/property.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 48749fda2..7eb114d0a 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -15,8 +15,6 @@
# include <config.h>
#endif
-#include <glibmm/i18n.h>
-
#include <gtkmm/dialog.h> // for Gtk::RESPONSE_*
#include <gtkmm/menu.h>
#include <gtkmm/stock.h>
@@ -24,6 +22,8 @@
#include <gtkmm/radiomenuitem.h>
#include <gtkmm/separatormenuitem.h>
+#include <glibmm/i18n.h>
+
#include <gtk/gtk.h>
#include "panel.h"
diff --git a/src/ui/widget/point.h b/src/ui/widget/point.h
index 15f1a80fb..17078df8f 100644
--- a/src/ui/widget/point.h
+++ b/src/ui/widget/point.h
@@ -13,8 +13,8 @@
#ifndef INKSCAPE_UI_WIDGET_POINT_H
#define INKSCAPE_UI_WIDGET_POINT_H
-#include <2geom/point.h>
#include "ui/widget/labelled.h"
+#include <2geom/point.h>
#include "ui/widget/scalar.h"
namespace Gtk {
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 314bf75bf..d32de6871 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -41,6 +41,8 @@
#include "selection-chemistry.h"
#include "ui/dialog/filedialog.h"
#include "xml/repr.h"
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
using namespace Inkscape::UI::Widget;
diff --git a/src/ui/widget/rendering-options.cpp b/src/ui/widget/rendering-options.cpp
index 7655f25e3..f26e71553 100644
--- a/src/ui/widget/rendering-options.cpp
+++ b/src/ui/widget/rendering-options.cpp
@@ -12,10 +12,9 @@
# include <config.h>
#endif
-#include <glibmm/i18n.h>
-
-#include "unit-constants.h"
#include "rendering-options.h"
+#include "unit-constants.h"
+#include <glibmm/i18n.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/spin-scale.cpp b/src/ui/widget/spin-scale.cpp
index 8aab57a34..548e9a6a6 100644
--- a/src/ui/widget/spin-scale.cpp
+++ b/src/ui/widget/spin-scale.cpp
@@ -6,10 +6,9 @@
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
-#include <glib.h>
+#include <gtkmm/adjustment.h>
#include <glibmm/i18n.h>
#include <glibmm/stringutils.h>
-#include <gtkmm/adjustment.h>
#include "spin-scale.h"
#include "ui/widget/gimpspinscale.h"
diff --git a/src/ui/widget/spin-slider.cpp b/src/ui/widget/spin-slider.cpp
index facbf704c..1cb59a7b3 100644
--- a/src/ui/widget/spin-slider.cpp
+++ b/src/ui/widget/spin-slider.cpp
@@ -8,12 +8,11 @@
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
-#include <glib.h>
+#include "spin-slider.h"
+
#include <glibmm/i18n.h>
#include <glibmm/stringutils.h>
-#include "spin-slider.h"
-
namespace Inkscape {
namespace UI {
namespace Widget {
diff --git a/src/unicoderange.h b/src/unicoderange.h
index b0c7f34a9..2f73f7b47 100644
--- a/src/unicoderange.h
+++ b/src/unicoderange.h
@@ -1,6 +1,6 @@
+#include <glibmm/ustring.h>
#include <glib-object.h>
-#include<vector>
-#include <glibmm.h>
+#include <vector>
struct Urange{
gchar* start;
diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp
index e96e4c097..809050ad9 100644
--- a/src/widgets/arc-toolbar.cpp
+++ b/src/widgets/arc-toolbar.cpp
@@ -28,9 +28,9 @@
# include "config.h"
#endif
+#include "ui/widget/spinbutton.h"
#include <glibmm/i18n.h>
-#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "arc-toolbar.h"
diff --git a/src/widgets/box3d-toolbar.cpp b/src/widgets/box3d-toolbar.cpp
index cb4951660..e8b330375 100644
--- a/src/widgets/box3d-toolbar.cpp
+++ b/src/widgets/box3d-toolbar.cpp
@@ -28,9 +28,9 @@
# include "config.h"
#endif
+#include "ui/widget/spinbutton.h"
#include <glibmm/i18n.h>
-#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "box3d-toolbar.h"
diff --git a/src/widgets/calligraphy-toolbar.cpp b/src/widgets/calligraphy-toolbar.cpp
index 287deb815..4cb4813b5 100644
--- a/src/widgets/calligraphy-toolbar.cpp
+++ b/src/widgets/calligraphy-toolbar.cpp
@@ -28,11 +28,9 @@
# include "config.h"
#endif
-
+#include "ui/dialog/calligraphic-profile-rename.h"
#include <glibmm/i18n.h>
-#include "../ui/dialog/calligraphic-profile-rename.h"
-
#include "toolbox.h"
#include "calligraphy-toolbar.h"
diff --git a/src/widgets/dropper-toolbar.cpp b/src/widgets/dropper-toolbar.cpp
index 8eeebf5c1..cf58aa507 100644
--- a/src/widgets/dropper-toolbar.cpp
+++ b/src/widgets/dropper-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "dropper-toolbar.h"
diff --git a/src/widgets/erasor-toolbar.cpp b/src/widgets/erasor-toolbar.cpp
index 14f87c943..2e074490d 100644
--- a/src/widgets/erasor-toolbar.cpp
+++ b/src/widgets/erasor-toolbar.cpp
@@ -28,10 +28,8 @@
# include "config.h"
#endif
-
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "erasor-toolbar.h"
#include "calligraphy-toolbar.h"
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index d4186cd93..60e115f54 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -22,8 +22,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
#include <gtkmm/box.h>
+#include <glibmm/i18n.h>
#include "verbs.h"
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index 972155ea9..7a7f0d8ff 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -16,6 +16,7 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include "gradient-vector.h"
#include <gtk/gtk.h>
#include "document.h"
@@ -30,7 +31,6 @@
#include <glibmm/i18n.h>
#include <xml/repr.h>
-#include "gradient-vector.h"
#include "gradient-selector.h"
#include "paint-selector.h"
#include "style.h"
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 3a95b552a..e15f81e0f 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -22,10 +22,9 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-#ifdef HAVE_STRING_H
-#endif
-#include "ui/widget/color-preview.h"
+
#include "gradient-vector.h"
+#include "ui/widget/color-preview.h"
#include "verbs.h"
#include <gtk/gtk.h>
#include "macros.h"
diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h
index 6719691d1..463d77912 100644
--- a/src/widgets/gradient-vector.h
+++ b/src/widgets/gradient-vector.h
@@ -15,7 +15,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
#include <gtkmm/liststore.h>
#include <stddef.h>
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index f556c0c7b..21df4c6d9 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "measure-toolbar.h"
diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp
index 79cdf8117..849de874d 100644
--- a/src/widgets/node-toolbar.cpp
+++ b/src/widgets/node-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "node-toolbar.h"
diff --git a/src/widgets/paintbucket-toolbar.cpp b/src/widgets/paintbucket-toolbar.cpp
index a99350a44..73815b86d 100644
--- a/src/widgets/paintbucket-toolbar.cpp
+++ b/src/widgets/paintbucket-toolbar.cpp
@@ -28,10 +28,8 @@
# include "config.h"
#endif
-
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "paintbucket-toolbar.h"
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index 87942f141..e0cf67bd0 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "pencil-toolbar.h"
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index 65eebf94b..8c1a735c5 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "rect-toolbar.h"
diff --git a/src/widgets/sp-color-icc-selector.cpp b/src/widgets/sp-color-icc-selector.cpp
index d89d35e9c..ce9323311 100644
--- a/src/widgets/sp-color-icc-selector.cpp
+++ b/src/widgets/sp-color-icc-selector.cpp
@@ -1,6 +1,8 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+
+#include "gradient-vector.h"
#include <math.h>
#include <gtk/gtk.h>
#include <glibmm/i18n.h>
@@ -11,7 +13,6 @@
#include "document.h"
#include "inkscape.h"
#include "profile-manager.h"
-#include "gradient-vector.h"
#define noDEBUG_LCMS
diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp
index 07cafc391..588221a7c 100644
--- a/src/widgets/sp-color-notebook.cpp
+++ b/src/widgets/sp-color-notebook.cpp
@@ -17,6 +17,7 @@
# include "config.h"
#endif
+#include "widgets/icon.h"
#include <cstring>
#include <string>
#include <cstdlib>
@@ -37,7 +38,6 @@
#include "../profile-manager.h"
#include "color-profile.h"
#include "cms-system.h"
-#include "widgets/icon.h"
#include "tools-switch.h"
#include "event-context.h"
diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp
index b493ca5bf..08d26f3d1 100644
--- a/src/widgets/spiral-toolbar.cpp
+++ b/src/widgets/spiral-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "spiral-toolbar.h"
@@ -39,8 +38,6 @@
#include "document-undo.h"
#include "../verbs.h"
#include "../inkscape.h"
-//#include "../interface.h"
-//#include "../connection-pool.h"
#include "../selection-chemistry.h"
#include "../selection.h"
#include "../ege-adjustment-action.h"
diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp
index e56a0c61a..06850d261 100644
--- a/src/widgets/spray-toolbar.cpp
+++ b/src/widgets/spray-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "spray-toolbar.h"
diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp
index f8c5714cb..8c07c6473 100644
--- a/src/widgets/star-toolbar.cpp
+++ b/src/widgets/star-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "star-toolbar.h"
diff --git a/src/widgets/swatch-selector.cpp b/src/widgets/swatch-selector.cpp
index 524072cf0..ad59e0dc3 100644
--- a/src/widgets/swatch-selector.cpp
+++ b/src/widgets/swatch-selector.cpp
@@ -1,8 +1,5 @@
-
-
-#include <glibmm/i18n.h>
-
#include "swatch-selector.h"
+#include <glibmm/i18n.h>
#include "document.h"
#include "document-undo.h"
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index ef7d31d76..87cb54d10 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -28,10 +28,8 @@
# include "config.h"
#endif
-
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "text-toolbar.h"
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 3a7eb6b9c..f03835e17 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -936,7 +936,7 @@ static Glib::RefPtr<Gtk::ActionGroup> create_or_fetch_actions( SPDesktop* deskto
}
-static GtkWidget* toolboxNewCommon( GtkWidget* tb, BarId id, GtkPositionType handlePos )
+static GtkWidget* toolboxNewCommon( GtkWidget* tb, BarId id, GtkPositionType /*handlePos*/ )
{
g_object_set_data(G_OBJECT(tb), "desktop", NULL);
diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp
index 9b2c0bfe3..beb527a17 100644
--- a/src/widgets/tweak-toolbar.cpp
+++ b/src/widgets/tweak-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "tweak-toolbar.h"
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index 1258617c7..1b6116936 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -37,6 +37,8 @@
#include "preferences.h"
+#include <glibmm/miscutils.h>
+
using Inkscape::IO::Writer;
using Inkscape::Util::List;
using Inkscape::Util::cons;