summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/display/canvas-axonomgrid.cpp2
-rw-r--r--src/display/canvas-grid.cpp2
-rw-r--r--src/doxygen-main.cpp2
-rw-r--r--src/live_effects/lpe-angle_bisector.cpp2
-rw-r--r--src/live_effects/lpe-clone-original.cpp2
-rw-r--r--src/live_effects/lpe-constructgrid.cpp2
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp2
-rw-r--r--src/live_effects/lpe-curvestitch.cpp2
-rw-r--r--src/live_effects/lpe-extrude.cpp2
-rw-r--r--src/live_effects/lpe-gears.cpp3
-rw-r--r--src/live_effects/lpe-interpolate.cpp2
-rw-r--r--src/live_effects/lpe-knot.cpp2
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp2
-rw-r--r--src/live_effects/lpe-offset.cpp2
-rw-r--r--src/live_effects/lpe-parallel.cpp2
-rw-r--r--src/live_effects/lpe-path_length.cpp2
-rw-r--r--src/live_effects/lpe-perp_bisector.cpp2
-rw-r--r--src/live_effects/lpe-perspective_path.cpp2
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp2
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp2
-rw-r--r--src/live_effects/lpe-sketch.cpp2
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp2
-rw-r--r--src/live_effects/lpe-test-doEffect-stack.cpp2
-rw-r--r--src/live_effects/lpe-text_label.cpp2
-rw-r--r--src/live_effects/lpe-vonkoch.cpp3
-rw-r--r--src/live_effects/parameter/bool.cpp2
-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.cpp2
-rw-r--r--src/live_effects/parameter/powerstrokepointarray.cpp2
-rw-r--r--src/live_effects/parameter/random.cpp2
-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/lpe-tool-context.cpp1
-rw-r--r--src/sp-lpe-item.cpp2
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp2
-rw-r--r--src/ui/widget/Makefile_insert12
-rw-r--r--src/ui/widget/button.h3
-rw-r--r--src/ui/widget/handlebox.cpp42
-rw-r--r--src/ui/widget/handlebox.h52
-rw-r--r--src/ui/widget/page-sizer.cpp3
-rw-r--r--src/ui/widget/registry.h4
-rw-r--r--src/ui/widget/ruler.cpp237
-rw-r--r--src/ui/widget/ruler.h181
-rw-r--r--src/ui/widget/svg-canvas.cpp103
-rw-r--r--src/ui/widget/svg-canvas.h57
-rw-r--r--src/ui/widget/toolbox.cpp272
-rw-r--r--src/ui/widget/toolbox.h74
-rw-r--r--src/ui/widget/zoom-status.cpp136
-rw-r--r--src/ui/widget/zoom-status.h69
-rw-r--r--src/widgets/arc-toolbar.cpp2
-rw-r--r--src/widgets/box3d-toolbar.cpp2
-rw-r--r--src/widgets/calligraphy-toolbar.cpp2
-rw-r--r--src/widgets/dropper-toolbar.cpp2
-rw-r--r--src/widgets/erasor-toolbar.cpp2
-rw-r--r--src/widgets/measure-toolbar.cpp2
-rw-r--r--src/widgets/node-toolbar.cpp2
-rw-r--r--src/widgets/paintbucket-toolbar.cpp2
-rw-r--r--src/widgets/pencil-toolbar.cpp2
-rw-r--r--src/widgets/rect-toolbar.cpp2
-rw-r--r--src/widgets/spiral-toolbar.cpp2
-rw-r--r--src/widgets/spray-toolbar.cpp2
-rw-r--r--src/widgets/star-toolbar.cpp2
-rw-r--r--src/widgets/text-toolbar.cpp2
-rw-r--r--src/widgets/tweak-toolbar.cpp2
66 files changed, 111 insertions, 1239 deletions
diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp
index 478a33044..b33cd39fe 100644
--- a/src/display/canvas-axonomgrid.cpp
+++ b/src/display/canvas-axonomgrid.cpp
@@ -18,6 +18,8 @@
* THIS FILE AND THE HEADER FILE NEED CLEANING UP. PLEASE DO NOT HESISTATE TO DO SO.
*/
+#include <glibmm/i18n.h>
+
#include "ui/widget/registered-widget.h"
#include "display/canvas-axonomgrid.h"
#include "2geom/line.h"
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index 2ba748022..8adf9cf82 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -13,6 +13,8 @@
* Don't be shy to correct things.
*/
+#include <glibmm/i18n.h>
+
#include "ui/widget/registered-widget.h"
#include "desktop.h"
#include "sp-canvas-util.h"
diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp
index 70c62b3a9..d41675c56 100644
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
@@ -306,7 +306,7 @@ namespace XML {}
* [\ref interface.cpp, \ref memeq.h] [\ref main.cpp, \ref winmain.cpp]
* [\ref menus-skeleton.h, \ref preferences-skeleton.h]
* [\ref select-toolbar.cpp] [\ref shortcuts.cpp]
- * [\ref sp-cursor.cpp] [\ref text-edit.cpp] [\ref toolbox.cpp, \ref ui/widget/toolbox.cpp]
+ * [\ref sp-cursor.cpp] [\ref text-edit.cpp] [\ref toolbox.cpp]
* Inkscape::Verb [\ref verbs.h]
*
*/
diff --git a/src/live_effects/lpe-angle_bisector.cpp b/src/live_effects/lpe-angle_bisector.cpp
index b337f71d8..ce2196246 100644
--- a/src/live_effects/lpe-angle_bisector.cpp
+++ b/src/live_effects/lpe-angle_bisector.cpp
@@ -9,6 +9,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-angle_bisector.h"
#include <2geom/path.h>
diff --git a/src/live_effects/lpe-clone-original.cpp b/src/live_effects/lpe-clone-original.cpp
index ce51f4aa2..70d933020 100644
--- a/src/live_effects/lpe-clone-original.cpp
+++ b/src/live_effects/lpe-clone-original.cpp
@@ -6,6 +6,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-clone-original.h"
#include "display/curve.h"
diff --git a/src/live_effects/lpe-constructgrid.cpp b/src/live_effects/lpe-constructgrid.cpp
index cb9c031aa..fb018e155 100644
--- a/src/live_effects/lpe-constructgrid.cpp
+++ b/src/live_effects/lpe-constructgrid.cpp
@@ -11,6 +11,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-constructgrid.h"
#include <2geom/path.h>
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index bddd65be6..7d138d4b8 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -12,6 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-copy_rotate.h"
#include "sp-shape.h"
#include "display/curve.h"
diff --git a/src/live_effects/lpe-curvestitch.cpp b/src/live_effects/lpe-curvestitch.cpp
index 9bac3b860..345114e2e 100644
--- a/src/live_effects/lpe-curvestitch.cpp
+++ b/src/live_effects/lpe-curvestitch.cpp
@@ -13,6 +13,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-curvestitch.h"
#include "sp-item.h"
diff --git a/src/live_effects/lpe-extrude.cpp b/src/live_effects/lpe-extrude.cpp
index 61b61f7bf..4351f3aa0 100644
--- a/src/live_effects/lpe-extrude.cpp
+++ b/src/live_effects/lpe-extrude.cpp
@@ -13,6 +13,8 @@
#include "live_effects/lpe-extrude.h"
+#include <glibmm/i18n.h>
+
#include <2geom/path.h>
#include <2geom/piecewise.h>
#include <2geom/transforms.h>
diff --git a/src/live_effects/lpe-gears.cpp b/src/live_effects/lpe-gears.cpp
index ac2db1716..14584a844 100644
--- a/src/live_effects/lpe-gears.cpp
+++ b/src/live_effects/lpe-gears.cpp
@@ -11,6 +11,9 @@
#include "live_effects/lpe-gears.h"
#include <vector>
+
+#include <glibmm/i18n.h>
+
#include <2geom/d2.h>
#include <2geom/sbasis.h>
#include <2geom/bezier-to-sbasis.h>
diff --git a/src/live_effects/lpe-interpolate.cpp b/src/live_effects/lpe-interpolate.cpp
index 83c41d3e9..ccd1cdcd6 100644
--- a/src/live_effects/lpe-interpolate.cpp
+++ b/src/live_effects/lpe-interpolate.cpp
@@ -11,6 +11,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-interpolate.h"
#include <2geom/path.h>
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 3a9b036d8..d3dd10d26 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -21,6 +21,8 @@
#include "knot-holder-entity.h"
#include "knotholder.h"
+#include <glibmm/i18n.h>
+
#include <2geom/sbasis-to-bezier.h>
#include <2geom/sbasis.h>
#include <2geom/d2.h>
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index 2d043ca91..7bfaf2d99 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -13,6 +13,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-mirror_symmetry.h"
#include <sp-path.h>
#include <display/curve.h>
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index 26e86335b..ceb3d785f 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -12,6 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-offset.h"
#include "sp-shape.h"
#include "display/curve.h"
diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp
index 95340fcf4..52849c20d 100644
--- a/src/live_effects/lpe-parallel.cpp
+++ b/src/live_effects/lpe-parallel.cpp
@@ -12,6 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-parallel.h"
#include "sp-shape.h"
#include "display/curve.h"
diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp
index e33a16002..ddfacf4e8 100644
--- a/src/live_effects/lpe-path_length.cpp
+++ b/src/live_effects/lpe-path_length.cpp
@@ -12,6 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-path_length.h"
#include "sp-metrics.h"
diff --git a/src/live_effects/lpe-perp_bisector.cpp b/src/live_effects/lpe-perp_bisector.cpp
index f6d69f03c..ef8578bec 100644
--- a/src/live_effects/lpe-perp_bisector.cpp
+++ b/src/live_effects/lpe-perp_bisector.cpp
@@ -13,6 +13,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-perp_bisector.h"
#include "display/curve.h"
#include "sp-path.h"
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index c8048f74b..f3cf802a1 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -11,6 +11,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "persp3d.h"
//#include "transf_mat_3x4.h"
#include "document.h"
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index c1cc47d7f..cd1140950 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -10,6 +10,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-recursiveskeleton.h"
#include <2geom/path.h>
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index fb3d143aa..5cfbecded 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -13,6 +13,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "ui/widget/scalar.h"
#include "live_effects/lpe-rough-hatches.h"
diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp
index e39b82f20..ccc508144 100644
--- a/src/live_effects/lpe-sketch.cpp
+++ b/src/live_effects/lpe-sketch.cpp
@@ -13,6 +13,8 @@
#include "live_effects/lpe-sketch.h"
+#include <glibmm/i18n.h>
+
// You might need to include other 2geom files. You can add them here:
#include <2geom/path.h>
#include <2geom/sbasis.h>
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index 633a36860..91e8e5065 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -14,6 +14,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-tangent_to_curve.h"
// FIXME: The following are only needed to convert the path's SPCurve* to pwd2.
// There must be a more convenient way to achieve this.
diff --git a/src/live_effects/lpe-test-doEffect-stack.cpp b/src/live_effects/lpe-test-doEffect-stack.cpp
index bb6d36fdc..675c4dbbe 100644
--- a/src/live_effects/lpe-test-doEffect-stack.cpp
+++ b/src/live_effects/lpe-test-doEffect-stack.cpp
@@ -6,6 +6,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-test-doEffect-stack.h"
#include <2geom/piecewise.h>
diff --git a/src/live_effects/lpe-text_label.cpp b/src/live_effects/lpe-text_label.cpp
index c986dbd63..8a9054186 100644
--- a/src/live_effects/lpe-text_label.cpp
+++ b/src/live_effects/lpe-text_label.cpp
@@ -12,6 +12,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-text_label.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp
index 953c2d443..0148ef547 100644
--- a/src/live_effects/lpe-vonkoch.cpp
+++ b/src/live_effects/lpe-vonkoch.cpp
@@ -7,6 +7,9 @@
*/
#include <cstdio>
+
+#include <glibmm/i18n.h>
+
#include "live_effects/lpe-vonkoch.h"
#include <2geom/transforms.h>
diff --git a/src/live_effects/parameter/bool.cpp b/src/live_effects/parameter/bool.cpp
index 6dbe2918f..c6ee6d5a3 100644
--- a/src/live_effects/parameter/bool.cpp
+++ b/src/live_effects/parameter/bool.cpp
@@ -6,6 +6,8 @@
* 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"
diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp
index f0a090b24..4d23ef8bd 100644
--- a/src/live_effects/parameter/parameter.cpp
+++ b/src/live_effects/parameter/parameter.cpp
@@ -6,6 +6,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/parameter/parameter.h"
#include "live_effects/effect.h"
#include "svg/svg.h"
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index 69c337a7c..1b3d7417d 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -5,6 +5,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/parameter/path.h"
#include "live_effects/effect.h"
#include "svg/svg.h"
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index c192cd6d6..c4524f970 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -6,6 +6,8 @@
* 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"
diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp
index 07cc71245..863c26e2a 100644
--- a/src/live_effects/parameter/powerstrokepointarray.cpp
+++ b/src/live_effects/parameter/powerstrokepointarray.cpp
@@ -6,6 +6,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/parameter/powerstrokepointarray.h"
#include "live_effects/effect.h"
diff --git a/src/live_effects/parameter/random.cpp b/src/live_effects/parameter/random.cpp
index 10f76b6ba..4de7934fd 100644
--- a/src/live_effects/parameter/random.cpp
+++ b/src/live_effects/parameter/random.cpp
@@ -6,6 +6,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/parameter/random.h"
#include "live_effects/effect.h"
#include "svg/svg.h"
diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp
index 13440798b..8ffa492bd 100644
--- a/src/live_effects/parameter/text.cpp
+++ b/src/live_effects/parameter/text.cpp
@@ -10,6 +10,8 @@
* 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/text.h"
#include "live_effects/effect.h"
diff --git a/src/live_effects/parameter/unit.cpp b/src/live_effects/parameter/unit.cpp
index 2f2d71679..a885577e7 100644
--- a/src/live_effects/parameter/unit.cpp
+++ b/src/live_effects/parameter/unit.cpp
@@ -6,6 +6,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "live_effects/parameter/unit.h"
#include "live_effects/effect.h"
#include "ui/widget/registered-widget.h"
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp
index 3348670dd..6e8edf3f5 100644
--- a/src/live_effects/parameter/vector.cpp
+++ b/src/live_effects/parameter/vector.cpp
@@ -6,6 +6,8 @@
* 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/vector.h"
#include "sp-lpe-item.h"
diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp
index 60588abf3..fc755b9dc 100644
--- a/src/lpe-tool-context.cpp
+++ b/src/lpe-tool-context.cpp
@@ -21,6 +21,7 @@
#include <2geom/sbasis-geometric.h>
#include <gdk/gdkkeysyms.h>
+#include <glibmm/i18n.h>
#include "macros.h"
#include "pixmaps/cursor-crosshairs.xpm"
#include <gtk/gtk.h>
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 33b7dd4aa..f17422d02 100644
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -16,6 +16,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "live_effects/effect.h"
#include "live_effects/lpe-path_length.h"
#include "live_effects/lpeobject.h"
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 66149237a..c39ea45fe 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -17,6 +17,8 @@
# include <config.h>
#endif
+#include <glibmm/i18n.h>
+
#include "inkscape-preferences.h"
#include <gtkmm/main.h>
#include <gtkmm/frame.h>
diff --git a/src/ui/widget/Makefile_insert b/src/ui/widget/Makefile_insert
index 89a532ad1..8589f16b0 100644
--- a/src/ui/widget/Makefile_insert
+++ b/src/ui/widget/Makefile_insert
@@ -21,8 +21,6 @@ ink_common_sources += \
ui/widget/filter-effect-chooser.cpp \
ui/widget/frame.cpp \
ui/widget/frame.h \
- ui/widget/handlebox.cpp \
- ui/widget/handlebox.h \
ui/widget/imageicon.cpp \
ui/widget/imageicon.h \
ui/widget/imagetoggler.cpp \
@@ -56,8 +54,6 @@ ink_common_sources += \
ui/widget/rendering-options.h \
ui/widget/rotateable.h \
ui/widget/rotateable.cpp \
- ui/widget/ruler.cpp \
- ui/widget/ruler.h \
ui/widget/scalar-unit.cpp \
ui/widget/scalar-unit.h \
ui/widget/scalar.cpp \
@@ -72,16 +68,10 @@ ink_common_sources += \
ui/widget/style-subject.cpp \
ui/widget/style-swatch.h \
ui/widget/style-swatch.cpp \
- ui/widget/svg-canvas.cpp \
- ui/widget/svg-canvas.h \
ui/widget/text.cpp \
ui/widget/text.h \
ui/widget/tolerance-slider.cpp \
ui/widget/tolerance-slider.h \
- ui/widget/toolbox.cpp \
- ui/widget/toolbox.h \
ui/widget/unit-menu.cpp \
- ui/widget/unit-menu.h \
- ui/widget/zoom-status.h \
- ui/widget/zoom-status.cpp
+ ui/widget/unit-menu.h
diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h
index b219fc3db..efadfad07 100644
--- a/src/ui/widget/button.h
+++ b/src/ui/widget/button.h
@@ -19,6 +19,7 @@ namespace Widget {
/**
* Button widget.
+ * @deprecated - no need for an explicit subclass... just perhaps a helper function.
*/
class Button : public Gtk::Button
{
@@ -29,6 +30,7 @@ public:
/**
* CheckButton widget.
+ * @deprecated - no need for an explicit subclass... just perhaps a helper function.
*/
class CheckButton : public Gtk::CheckButton
{
@@ -41,6 +43,7 @@ public:
/**
* RadioButton widget.
+ * @deprecated - no need for an explicit subclass... just perhaps a helper function.
*/
class RadioButton : public Gtk::RadioButton
{
diff --git a/src/ui/widget/handlebox.cpp b/src/ui/widget/handlebox.cpp
deleted file mode 100644
index 0ac84ef3a..000000000
--- a/src/ui/widget/handlebox.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Author:
- * Derek P. Moore <derekm@hackunix.org>
- *
- * Copyright (C) 2004 Derek P. Moore
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "handlebox.h"
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-HandleBox::HandleBox(Gtk::Widget *widget,
- Gtk::PositionType position)
- : _widget(widget)
-{
- g_assert(_widget != NULL);
- add(*Gtk::manage(_widget));
- set_handle_position(position);
-}
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/ui/widget/handlebox.h b/src/ui/widget/handlebox.h
deleted file mode 100644
index db384552b..000000000
--- a/src/ui/widget/handlebox.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Author:
- * Derek P. Moore <derekm@hackunix.org>
- *
- * Copyright (C) 2004 Derek P. Moore
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifndef INKSCAPE_UI_WIDGET_HANDLEBOX_H
-#define INKSCAPE_UI_WIDGET_HANDLEBOX_H
-
-#include <gtkmm/handlebox.h>
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-/**
- * Adds a detachment handle to another widget.
- *
- * This work really doesn't amount to much more than a convenience constructor
- * for Gtk::HandleBox. Maybe this could be contributed back to Gtkmm, as
- * Gtkmm provides several convenience constructors for other widgets as well.
- */
-class HandleBox : public Gtk::HandleBox
-{
-public:
- HandleBox(Gtk::Widget *widget,
- Gtk::PositionType position = Gtk::POS_LEFT);
-
-protected:
- Gtk::Widget *_widget;
-};
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-#endif // INKSCAPE_UI_WIDGET_HANDLEBOX_H
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 83d923c15..90eb6a3fd 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -27,6 +27,9 @@
#include <string>
#include <string.h>
#include <vector>
+
+#include <glibmm/i18n.h>
+
#include <2geom/transforms.h>
#include "desktop-handles.h"
diff --git a/src/ui/widget/registry.h b/src/ui/widget/registry.h
index ed1281d79..2da29735c 100644
--- a/src/ui/widget/registry.h
+++ b/src/ui/widget/registry.h
@@ -9,10 +9,6 @@
#ifndef INKSCAPE_UI_WIDGET_REGISTRY__H
#define INKSCAPE_UI_WIDGET_REGISTRY__H
-#include <map>
-#include <glibmm/i18n.h>
-#include <glibmm/ustring.h>
-
namespace Gtk {
class Object;
}
diff --git a/src/ui/widget/ruler.cpp b/src/ui/widget/ruler.cpp
deleted file mode 100644
index b97ef4312..000000000
--- a/src/ui/widget/ruler.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/** \file
- * Gtkmm facade/wrapper around SPRuler code that formerly lived
- * in desktop-events.cpp
- */
-/*
- * Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
- * Lauris Kaplinski
- * Jon A. Cruz <jon@joncruz.org>
- * Abhishek Sharma
- *
- * Copyright (C) 2005 Ralf Stephan
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glibmm/i18n.h>
-
-#include "ui/widget/ruler.h"
-#include "widgets/ruler.h"
-#include "helper/units.h"
-
-#include "xml/repr.h"
-#include "display/sp-canvas.h"
-#include "display/guideline.h"
-#include "desktop.h"
-#include "desktop-handles.h"
-#include "document.h"
-#include "document-undo.h"
-#include "sp-namedview.h"
-#include "verbs.h"
-
-namespace Gtk {
-namespace Deprecated {
-void Ruler::set_range(double lower, double upper, double position, double max_size)
-{
-sp_ruler_set_range(gobj(), lower, upper, position, max_size);
-}
-
-void Ruler::get_range(double& lower, double& upper, double& position, double& max_size)
-{
-sp_ruler_get_range(gobj(), &(lower), &(upper), &(position), &(max_size));
-}
-}// namespace Deprecated
-}// namespace Gtk
-
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-void
-Ruler::init(SPDesktop *dt, Gtk::Widget &w)
-{
- _dt = dt;
- _canvas_widget = &w;
- _dragging = false;
- _guide = 0;
- sp_ruler_set_metric(SP_RULER(_r->gobj()), SP_PT);
- _r->set_range(-500, 500, 0, 1000);
-}
-
-void
-Ruler::get_range(double &lo, double &up, double &pos, double &max)
-{
- _r->get_range(lo, up, pos, max);
-}
-
-void
-Ruler::set_range(double lo, double up, double pos, double max)
-{
- _r->set_range(lo, up, pos, max);
-}
-
-/// Set metric from namedview
-void
-Ruler::update_metric()
-{
- if (!_dt) return;
- sp_ruler_set_metric(SP_RULER(_r->gobj()), _dt->namedview->getDefaultMetric());
-}
-
-/// Returns text to be used for tooltip for ruler.
-/// \todo incorrect
-Glib::ustring
-Ruler::get_tip()
-{
- return gettext(sp_unit_get_plural( _dt
- ? _dt->namedview->doc_units
- : &sp_unit_get_by_id(SP_UNIT_PT) ));
-}
-
-/// Helper that gets mouse coordinates relative to canvas widget.
-void
-Ruler::canvas_get_pointer(int &x, int &y)
-{
- Gdk::ModifierType mask;
- (void) _canvas_widget->get_window()->get_pointer(x, y, mask);
-}
-
-Geom::Point
-Ruler::get_event_dt()
-{
- int wx, wy;
- canvas_get_pointer(wx, wy);
- Geom::Point const event_win(wx, wy);
- Geom::Point const event_w(sp_canvas_window_to_world(_dt->canvas, event_win));
- return _dt->w2d(event_w);
-}
-
-bool
-Ruler::on_button_press_event(GdkEventButton *evb)
-{
- g_assert(_dt);
- Geom::Point const &event_dt = get_event_dt();
- Inkscape::XML::Node *repr = _dt->namedview->getRepr();
-
- if (evb->button == 1) {
- _dragging = true;
- sp_repr_set_boolean(repr, "showguides", TRUE);
- sp_repr_set_boolean(repr, "inkscape:guide-bbox", TRUE);
- _guide = sp_guideline_new(_dt->guides, NULL, event_dt, _horiz_f ? Geom::Point(0.,1.) : Geom::Point(1.,0.));
- sp_guideline_set_color(SP_GUIDELINE(_guide), _dt->namedview->guidehicolor);
-
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gdk::Device> device = Glib::wrap(gdk_event_get_device((GdkEvent*)evb));
- device->grab(get_window(),
- Gdk::OWNERSHIP_NONE, // TODO: Check that this is correct
- false,
- Gdk::BUTTON_RELEASE_MASK |
- Gdk::POINTER_MOTION_MASK |
- Gdk::POINTER_MOTION_HINT_MASK,
- evb->time);
-#else
- (void) get_window()->pointer_grab(false,
- Gdk::BUTTON_RELEASE_MASK |
- Gdk::POINTER_MOTION_MASK |
- Gdk::POINTER_MOTION_HINT_MASK,
- evb->time);
-#endif
- }
- return false;
-}
-
-bool
-Ruler::on_motion_notify_event(GdkEventMotion *)
-{
- g_assert(_dt);
- Geom::Point const &event_dt = get_event_dt();
-
- if (_dragging) {
- sp_guideline_set_position(SP_GUIDELINE(_guide), event_dt);
- _dt->set_coordinate_status(event_dt);
- _dt->setPosition(event_dt);
- }
- return false;
-}
-
-bool
-Ruler::on_button_release_event(GdkEventButton *evb)
-{
- g_assert(_dt);
- int wx, wy;
- canvas_get_pointer(wx, wy);
- Geom::Point const &event_dt = get_event_dt();
-
- if (_dragging && evb->button == 1) {
-
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gdk::Device> device = Glib::wrap(gdk_event_get_device((GdkEvent*)evb));
- device->ungrab(evb->time);
-#else
- Gdk::Window::pointer_ungrab(evb->time);
-#endif
-
- sp_canvas_item_destroy(_guide);
- _guide = 0;
- _dragging = false;
-
- if ( (_horiz_f ? wy : wx ) >= 0 ) {
- Inkscape::XML::Document *xml_doc = _dt->doc()->getReprDoc();
- Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide");
- repr->setAttribute("orientation", _horiz_f ? "horizontal" : "vertical");
- double const guide_pos_dt = event_dt[ _horiz_f ? Geom::Y : Geom::X ];
- sp_repr_set_svg_double(repr, "position", guide_pos_dt);
- _dt->namedview->getRepr()->appendChild(repr);
- Inkscape::GC::release(repr);
- DocumentUndo::done(sp_desktop_document(_dt), SP_VERB_NONE,
- /* TODO: annotate */ "ruler.cpp:157");
- }
- _dt->set_coordinate_status(event_dt);
- }
- return false;
-}
-
-//------------------------------------------------------------
-HRuler::HRuler()
-{
- _dt = 0;
- _r = static_cast<Gtk::Deprecated::HRuler*>(Glib::wrap(static_cast<GtkWidget*> (sp_ruler_new(GTK_ORIENTATION_HORIZONTAL))));
- add(*_r);
- _horiz_f = true;
-}
-
-HRuler::~HRuler()
-{
-}
-
-
-VRuler::VRuler()
-{
- _dt = 0;
- _r = static_cast<Gtk::Deprecated::VRuler*>(Glib::wrap(static_cast<GtkWidget*> (sp_ruler_new(GTK_ORIENTATION_VERTICAL))));
- add(*_r);
- _horiz_f = false;
-}
-
-VRuler::~VRuler()
-{
-}
-
-}}}
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/ui/widget/ruler.h b/src/ui/widget/ruler.h
deleted file mode 100644
index 2e22896bd..000000000
--- a/src/ui/widget/ruler.h
+++ /dev/null
@@ -1,181 +0,0 @@
-#ifndef SEEN_UI_WIDGET_RULER_H
-#define SEEN_UI_WIDGET_RULER_H
-
-/*
- * Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2005 The Authors
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#include <gtkmm/eventbox.h>
-#include <2geom/point.h>
-
-struct SPCanvasItem;
-class SPDesktop;
-namespace Glib {
- class ustring;
-}
-
-typedef struct _SPRuler SPRuler;
-
-// This is an import of the now-deprecated Gtk::Ruler API.
-namespace Gtk {
-namespace Deprecated {
-
-/** Base class for horizontal or vertical rulers.
- *
- * This is an abstract base for Gtk::HRuler and
- * Gtk::VRuler. Users should only instantiate those types.
- */
-class Ruler : public Widget
-{
-public:
- virtual ~Ruler();
-
-protected:
- explicit Ruler(const Glib::ConstructParams& construct_params);
- explicit Ruler(SPRuler* castitem);
-
-public:
- ///Provides access to the underlying C GtkObject.
- SPRuler* gobj() { return reinterpret_cast<SPRuler*>(gobject_); }
-
- ///Provides access to the underlying C GtkObject.
- const SPRuler* gobj() const { return reinterpret_cast<SPRuler*>(gobject_); }
-
-protected:
- Ruler();
-
-public:
- /** sets the range of the ruler.
- * <i>upper</i> and <i>lower</i> arguments denote the extents of the Ruler.
- * <i>max_size</i> is the largest number displayed by the ruler.
- * <i>position</i> gives the initial value of the ruler.
- * Rulers do not have sane defaults so this function should always be called.
- */
- void set_range(double lower, double upper, double position, double max_size);
-
- /** Retrieves values indicating the range and current position of a Gtk::Ruler.
- * See set_range().
- *
- * @param lower Location to store lower limit of the ruler, or <tt>0</tt>.
- * @param upper Location to store upper limit of the ruler, or <tt>0</tt>.
- * @param position Location to store the current position of the mark on the ruler, or <tt>0</tt>.
- * @param max_size Location to store the maximum size of the ruler used when calculating
- * the space to leave for the text, or <tt>0</tt>.
- */
- void get_range(double& lower, double& upper, double& position, double& max_size);
-};
-
-
-/** Vertical Ruler */
-class VRuler : public Ruler
-{
- public:
- virtual ~VRuler();
-
-public:
- ///Provides access to the underlying C GtkObject.
- SPRuler* gobj() { return reinterpret_cast<SPRuler*>(gobject_); }
-
- ///Provides access to the underlying C GtkObject.
- const SPRuler* gobj() const { return reinterpret_cast<SPRuler*>(gobject_); }
-
-public:
- VRuler();
-}; //class VRuler
-
-/** Horizontal Ruler */
-class HRuler : public Ruler
-{
- public:
- virtual ~HRuler();
-
-public:
- ///Provides access to the underlying C GtkObject.
- SPRuler* gobj() { return reinterpret_cast<SPRuler*>(gobject_); }
-
- ///Provides access to the underlying C GtkObject.
- const SPRuler* gobj() const { return reinterpret_cast<SPRuler*>(gobject_); }
-
-public:
- HRuler();
-}; // class HRuler
-} // namespace Deprecated
-} // namespace Gtk
-
-
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-/**
- * Gtkmm facade/wrapper around sp_rulers.
- */
-class Ruler : public Gtk::EventBox
-{
-public:
- void init (SPDesktop*, Gtk::Widget&);
- void get_range (double&, double&, double&, double&);
- void set_range (double, double, double, double);
- void update_metric();
- Glib::ustring get_tip();
-
-protected:
- SPDesktop *_dt;
- SPCanvasItem *_guide;
- Gtk::Widget *_canvas_widget;
- Gtk::Deprecated::Ruler *_r;
- bool _horiz_f, _dragging;
-
- virtual bool on_button_press_event (GdkEventButton *);
- virtual bool on_motion_notify_event (GdkEventMotion *);
- virtual bool on_button_release_event (GdkEventButton *);
-
-private:
- void canvas_get_pointer (int&, int&);
- Geom::Point get_event_dt();
-};
-
-/**
- * Horizontal ruler gtkmm wrapper.
- */
-class HRuler : public Ruler
-{
-public:
- HRuler();
- ~HRuler();
-};
-
-/**
- * Vertical ruler gtkmm wrapper.
- */
-class VRuler : public Ruler
-{
-public:
- VRuler();
- ~VRuler();
-};
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-
-#endif // SEEN_UI_WIDGET_RULER_H
-
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/ui/widget/svg-canvas.cpp b/src/ui/widget/svg-canvas.cpp
deleted file mode 100644
index 34724ece7..000000000
--- a/src/ui/widget/svg-canvas.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
- * Jon A. Cruz <jon@joncruz.org>
- *
- * Copyright (C) 2005 The Authors
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#include <gtkmm/widget.h>
-#include "desktop.h"
-#include "desktop-events.h"
-#include "display/sp-canvas.h"
-#include "display/canvas-arena.h"
-#include "ui/widget/svg-canvas.h"
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-SVGCanvas::SVGCanvas()
-{
- void *canvas = g_object_new(SPCanvas::getType(), NULL);
- _spcanvas = static_cast<SPCanvas*>(canvas);
- _widget = Glib::wrap (static_cast<GtkWidget*> (canvas));
- _dt = 0;
-}
-
-SVGCanvas::~SVGCanvas()
-{
-}
-
-void
-SVGCanvas::init (SPDesktop *dt)
-{
- _dt = dt;
- _widget->set_can_focus();
-
- // Set background to white
-#if WITH_GTKMM_3_0
- // TODO: Use Gtk::StyleContext instead
- GtkWidget *c_widget = _widget->gobj();
- GtkStyle *style = gtk_widget_get_style(c_widget);
- style->bg[GTK_STATE_NORMAL] = style->white;
- gtk_widget_set_style(c_widget, style);
-#else
- Glib::RefPtr<Gtk::Style> style = _widget->get_style();
- style->set_bg(Gtk::STATE_NORMAL, style->get_white());
- _widget->set_style(style);
-
- // extension_events stuff is handled internally in GTK+ 3
- // TODO: Needs testing
- _widget->set_extension_events(Gdk::EXTENSION_EVENTS_ALL);
-#endif
-
- _widget->signal_event().connect(sigc::mem_fun(*this, &SVGCanvas::onEvent));
-}
-
-bool
-SVGCanvas::onEvent (GdkEvent * ev) const
-{
- g_assert (_dt);
-
- // Gdk::Event doesn't appear to be fully usable for this atm
- if (ev->type == GDK_BUTTON_PRESS) {
- // defocus any spinbuttons
- _widget->grab_focus();
- }
-
- if ((ev->type == GDK_BUTTON_PRESS) && (ev->button.button == 3)) {
- if (ev->button.state & GDK_SHIFT_MASK) {
- sp_canvas_arena_set_sticky(SP_CANVAS_ARENA(_dt->drawing), true);
- } else {
- sp_canvas_arena_set_sticky(SP_CANVAS_ARENA(_dt->drawing), false);
- }
- }
-
- // The keypress events need to be passed to desktop handler explicitly,
- // because otherwise the event contexts only receive keypresses when the mouse cursor
- // is over the canvas. This redirection is only done for keypresses and only if there's no
- // current item on the canvas, because item events and all mouse events are caught
- // and passed on by the canvas acetate (I think). --bb
-
- if (ev->type == GDK_KEY_PRESS && !_spcanvas->current_item) {
- return sp_desktop_root_handler(0, ev, _dt);
- }
-
- return false;
-}
-
-}}}
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/ui/widget/svg-canvas.h b/src/ui/widget/svg-canvas.h
deleted file mode 100644
index c513bcf26..000000000
--- a/src/ui/widget/svg-canvas.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef SEEN_UI_WIDGET_SVGCANVAS_H
-#define SEEN_UI_WIDGET_SVGCANVAS_H
-
-/*
- * Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2005 The Authors
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-struct SPCanvas;
-struct SPDesktop;
-namespace Gtk { class Widget; }
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-/**
- * Gtkmm facade/wrapper around SPCanvas.
- */
-class SVGCanvas
-{
-public:
- SVGCanvas();
- ~SVGCanvas();
- void init (SPDesktop*);
- Gtk::Widget& widget() const { return *_widget; }
- SPCanvas* spobj() const { return _spcanvas; }
-
-protected:
- Gtk::Widget *_widget;
- SPCanvas *_spcanvas;
- SPDesktop *_dt;
-
- bool onEvent (GdkEvent *) const;
-};
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-
-#endif // SEEN_UI_WIDGET_SVGCANVAS_H
-
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/ui/widget/toolbox.cpp b/src/ui/widget/toolbox.cpp
deleted file mode 100644
index a11bd2d74..000000000
--- a/src/ui/widget/toolbox.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Author:
- * Derek P. Moore <derekm@hackunix.org>
- *
- * Copyright (C) 2004 Derek P. Moore
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm/radioaction.h>
-#include <gtkmm/orientable.h>
-#include <gtk/gtk.h>
-#include "ui/widget/toolbox.h"
-#include "path-prefix.h"
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-Toolbox::Toolbox(Gtk::Toolbar *toolbar,
- Gtk::Orientation orientation)
- : HandleBox(toolbar)
-{
- init_actions();
- init_orientation(orientation);
- init_style(toolbar->get_toolbar_style());
-}
-
-Toolbox::Toolbox(Gtk::Toolbar *toolbar,
- Gtk::ToolbarStyle style,
- Gtk::Orientation orientation)
- : HandleBox(toolbar)
-{
- init_actions();
- init_orientation(orientation);
- init_style(style);
-}
-
-Gtk::Toolbar&
-Toolbox::get_toolbar()
-{
- return static_cast<Gtk::Toolbar&>(*_widget);
-}
-
-static Glib::ustring
-get_uidir_filename(char const *basename_utf8)
-{
- char *const ret_str = g_build_filename(INKSCAPE_UIDIR, basename_utf8, NULL);
- Glib::ustring const ret(ret_str);
- g_free(ret_str);
- return ret;
-}
-
-void
-Toolbox::init_actions()
-{
- _action_grp = Gtk::ActionGroup::create();
-
- Gtk::RadioAction::Group icons;
- _action_grp->add(Gtk::RadioAction::create(icons, "Icons", "Icons Only"),
- sigc::mem_fun(*this, &Toolbox::on_change_style_icons));
- _action_grp->add(Gtk::RadioAction::create(icons, "Text", "Text Only"),
- sigc::mem_fun(*this, &Toolbox::on_change_style_text));
- _action_grp->add(Gtk::RadioAction::create(icons, "Both", "Text Below Icons"),
- sigc::mem_fun(*this, &Toolbox::on_change_style_both));
- _action_grp->add(Gtk::RadioAction::create(icons, "BothHoriz", "Text Beside Icons"),
- sigc::mem_fun(*this, &Toolbox::on_change_style_both_horiz));
-
- _detach_grp = Gtk::ActionGroup::create();
-
- Gtk::RadioAction::Group orient;
- _detach_grp->add(Gtk::RadioAction::create(orient, "OrientHoriz", "Horizontal"),
- sigc::mem_fun(*this, &Toolbox::on_change_orient_horiz));
- _detach_grp->add(Gtk::RadioAction::create(orient, "OrientVert", "Vertical"),
- sigc::mem_fun(*this, &Toolbox::on_change_orient_vert));
-
- _detach_grp->add(Gtk::ToggleAction::create("ShowArrow", "Show Arrow",
- Glib::ustring(), true),
- sigc::mem_fun(*this, &Toolbox::on_show_arrow));
-
- _ui_mgr = Gtk::UIManager::create();
- _ui_mgr->insert_action_group(_action_grp);
- _ui_mgr->insert_action_group(_detach_grp);
- _ui_mgr->add_ui_from_file(get_uidir_filename("toolbox.xml"));
-
- _context_menu = static_cast<Gtk::Menu*>(_ui_mgr->get_widget("/ToolboxMenu"));
-
- static_cast<Gtk::Toolbar*>(_widget)->signal_popup_context_menu()
- .connect(sigc::mem_fun(*this, &Toolbox::on_popup_context_menu));
-
- _detach_grp->set_sensitive(false);
-}
-
-void
-Toolbox::init_orientation(Gtk::Orientation const &orientation)
-{
- gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast<Gtk::Toolbar*>(_widget)->gobj()),
- GtkOrientation(orientation));
-
- if (orientation == Gtk::ORIENTATION_VERTICAL) {
- set_handle_position(Gtk::POS_TOP);
- }
- switch (orientation) {
- case Gtk::ORIENTATION_HORIZONTAL: {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientHoriz"))
- ->set_active();
- break;
- }
- case Gtk::ORIENTATION_VERTICAL: {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientVert"))
- ->set_active();
- break;
- }
- }
-}
-
-void
-Toolbox::init_style(Gtk::ToolbarStyle const &style)
-{
- switch (style) {
- case Gtk::TOOLBAR_ICONS: {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("Icons"))
- ->activate();
- break;
- }
- case Gtk::TOOLBAR_TEXT: {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("Text"))
- ->activate();
- break;
- }
- case Gtk::TOOLBAR_BOTH: {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("Both"))
- ->activate();
- break;
- }
- case Gtk::TOOLBAR_BOTH_HORIZ: {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("BothHoriz"))
- ->activate();
- break;
- }
- }
-}
-
-bool
-Toolbox::on_popup_context_menu(int x, int y, int button)
-{
- (void)x;
- (void)y;
- _context_menu->popup(button, gtk_get_current_event_time());
- return true;
-}
-
-void
-Toolbox::on_child_attached(Gtk::Widget *widget)
-{
- (void)widget;
- Gtk::Toolbar *toolbar = static_cast<Gtk::Toolbar*>(_widget);
-
- if (!(toolbar->get_show_arrow())) {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("ShowArrow"))
- ->activate();
- }
-
- if (get_handle_position() == Gtk::POS_LEFT
- && toolbar->get_orientation() != Gtk::ORIENTATION_HORIZONTAL) {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientHoriz"))
- ->activate();
- } else if (get_handle_position() == Gtk::POS_TOP
- && toolbar->get_orientation() != Gtk::ORIENTATION_VERTICAL) {
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientVert"))
- ->activate();
- }
-
- _detach_grp->set_sensitive(false);
-}
-
-void
-Toolbox::on_child_detached(Gtk::Widget *widget)
-{
- (void)widget;
- _detach_grp->set_sensitive(true);
-
- Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("ShowArrow"))
- ->set_active(false);
-}
-
-void
-Toolbox::on_change_style_icons()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("Icons"));
- if (action->get_active()) {
- static_cast<Gtk::Toolbar*>(_widget)->set_toolbar_style(Gtk::TOOLBAR_ICONS);
- }
-}
-
-void
-Toolbox::on_change_style_text()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("Text"));
- if (action->get_active()) {
- static_cast<Gtk::Toolbar*>(_widget)->set_toolbar_style(Gtk::TOOLBAR_TEXT);
- }
-}
-
-void
-Toolbox::on_change_style_both()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("Both"));
- if (action->get_active()) {
- static_cast<Gtk::Toolbar*>(_widget)->set_toolbar_style(Gtk::TOOLBAR_BOTH);
- }
-}
-
-void
-Toolbox::on_change_style_both_horiz()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_action_grp->get_action("BothHoriz"));
- if (action->get_active()) {
- static_cast<Gtk::Toolbar*>(_widget)->set_toolbar_style(Gtk::TOOLBAR_BOTH_HORIZ);
- }
-}
-
-void
-Toolbox::on_change_orient_horiz()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientHoriz"));
- if (action->get_active()) {
- gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast<Gtk::Toolbar*>(_widget)->gobj()),
- GTK_ORIENTATION_HORIZONTAL);
- }
-}
-
-void
-Toolbox::on_change_orient_vert()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientVert"));
- if (action->get_active()) {
- gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast<Gtk::Toolbar*>(_widget)->gobj()),
- GTK_ORIENTATION_VERTICAL);
- }
-}
-
-void
-Toolbox::on_show_arrow()
-{
- Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("ShowArrow"));
- Gtk::Toolbar *toolbar = static_cast<Gtk::Toolbar*>(_widget);
- if (action->get_active()) {
- toolbar->set_show_arrow(true);
- } else {
- toolbar->set_show_arrow(false);
- }
-}
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/ui/widget/toolbox.h b/src/ui/widget/toolbox.h
deleted file mode 100644
index f721bef8a..000000000
--- a/src/ui/widget/toolbox.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Author:
- * Derek P. Moore <derekm@hackunix.org>
- *
- * Copyright (C) 2004 Derek P. Moore
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifndef INKSCAPE_UI_WIDGET_TOOLBOX_H
-#define INKSCAPE_UI_WIDGET_TOOLBOX_H
-
-#include <gtkmm/toolbar.h>
-#include <gtkmm/menu.h>
-#include <gtkmm/action.h>
-#include <gtkmm/uimanager.h>
-#include "handlebox.h"
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-/**
- * A detachable toolbar for buttons and other widgets.
- */
-class Toolbox : public HandleBox
-{
-public:
- Toolbox(Gtk::Toolbar *toolbar,
- Gtk::Orientation orientation = Gtk::ORIENTATION_HORIZONTAL);
- Toolbox(Gtk::Toolbar *toolbar,
- Gtk::ToolbarStyle style,
- Gtk::Orientation orientation = Gtk::ORIENTATION_HORIZONTAL);
-
- Gtk::Toolbar& get_toolbar();
-
-protected:
- Gtk::Menu *_context_menu;
-
- Glib::RefPtr<Gtk::ActionGroup> _action_grp;
- Glib::RefPtr<Gtk::ActionGroup> _detach_grp;
- Glib::RefPtr<Gtk::UIManager> _ui_mgr;
-
- void init_actions();
- void init_orientation(Gtk::Orientation const &orientation);
- void init_style(Gtk::ToolbarStyle const &style);
- bool on_popup_context_menu(int x, int y, int button);
- void on_child_attached(Gtk::Widget *widget);
- void on_child_detached(Gtk::Widget *widget);
- void on_change_style_icons();
- void on_change_style_text();
- void on_change_style_both();
- void on_change_style_both_horiz();
- void on_change_orient_horiz();
- void on_change_orient_vert();
- void on_show_arrow();
-};
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-#endif // INKSCAPE_UI_WIDGET_TOOLBOX_H
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/ui/widget/zoom-status.cpp b/src/ui/widget/zoom-status.cpp
deleted file mode 100644
index aea1beb17..000000000
--- a/src/ui/widget/zoom-status.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
- * Lauris Kaplinski <lauris@kaplinski.com>
- * MenTaLguY <mental@rydia.net>
- * bulia byak <buliabyak@users.sf.net>
- *
- * Copyright (C) 2005 Ralf Stephan
- * Copyright (C) 2004 MenTaLguY
- * Copyright (C) 1999-2002 Lauris Kaplinski
- * Copyright (C) 2000-2001 Ximian, Inc.
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#include "ui/widget/zoom-status.h"
-#include "desktop.h"
-#include "desktop-handles.h"
-#include "widgets/spw-utilities.h"
-
-namespace Inkscape {
-namespace UI {
-namespace Widget {
-
-ZoomStatus::ZoomStatus()
-#if WITH_GTKMM_3_0
- : _adj(Gtk::Adjustment::create(0.0, -1.0, 1.0, 0.1, 0.1))
-#else
- : _adj(0.0, -1.0, 1.0, 0.1, 0.1)
-#endif
-{
- _dt = 0;
- _upd_f = false;
-
- property_numeric() = false;
- property_update_policy() = Gtk::UPDATE_ALWAYS;
- sp_set_font_size_smaller(static_cast<GtkWidget*>((void*)gobj()));
-}
-
-ZoomStatus::~ZoomStatus()
-{
- _dt = 0;
-}
-
-void
-ZoomStatus::init(SPDesktop *dt)
-{
- _dt = dt;
- property_digits() = 4;
-#if WITH_GTKMM_3_0
- _adj->set_value(0.0);
- _adj->set_lower(log(SP_DESKTOP_ZOOM_MIN)/log(2.0));
- _adj->set_upper(log(SP_DESKTOP_ZOOM_MAX)/log(2.0));
- _adj->set_step_increment(0.1);
- _adj->set_page_increment(0.1);
-#else
- _adj.set_value(0.0);
- _adj.set_lower(log(SP_DESKTOP_ZOOM_MIN)/log(2.0));
- _adj.set_upper(log(SP_DESKTOP_ZOOM_MAX)/log(2.0));
- _adj.set_step_increment(0.1);
- _adj.set_page_increment(0.1);
-#endif
- set_adjustment(_adj);
-}
-
-void
-ZoomStatus::update()
-{
- if (!_dt) return;
- _upd_f = true;
- set_value(log(_dt->current_zoom())/log(2.0));
- _upd_f = false;
-}
-
-inline double
-value_to_display(double value)
-{
- return floor(pow(2, value) * 100.0 + 0.5);
-}
-
-inline double
-display_to_value(double value)
-{
- return log(value / 100.0) / log(2.0);
-}
-
-int
-ZoomStatus::on_input(double *new_val)
-{
- double new_scrolled = get_value();
- double new_typed = atof(get_text().c_str());
-
- if (value_to_display(new_scrolled) == new_typed)
- { // the new value is set by scrolling
- *new_val = new_scrolled;
- } else { // the new value is typed in
- *new_val = display_to_value(new_typed);
- }
-
- return true;
-}
-
-bool
-ZoomStatus::on_output()
-{
- gchar b[64];
- g_snprintf(b, 64, "%4.0f%%", value_to_display(get_value()));
- set_text(b);
- return true;
-}
-
-void
-ZoomStatus::on_value_changed()
-{
- if (_upd_f) return;
- _upd_f = true;
- g_assert(_dt);
- double zoom_factor = pow(2, get_value());
- Geom::Rect const d = _dt->get_display_area();
- _dt->zoom_absolute(d.midpoint()[Geom::X], d.midpoint()[Geom::Y], zoom_factor);
- gtk_widget_grab_focus(static_cast<GtkWidget*>((void*)_dt->canvas));
- _upd_f = false;
-}
-
-}}}
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/ui/widget/zoom-status.h b/src/ui/widget/zoom-status.h
deleted file mode 100644
index 8f710300a..000000000
--- a/src/ui/widget/zoom-status.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef SEEN_UI_WIDGET_ZOOMSTATUS_H
-#define SEEN_UI_WIDGET_ZOOMSTATUS_H
-/*
- * Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2005 The Authors
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gtkmm/adjustment.h>
-#include "ui/widget/spinbutton.h"
-
-struct SPDesktop;
-
-namespace Gtk { class Widget; }
-namespace Inkscape {
- namespace UI {
- namespace Widget {
-
-/**
- * Enhanced spinbutton.
- */
-class ZoomStatus : public Inkscape::UI::Widget::SpinButton
-{
-public:
- ZoomStatus();
- ~ZoomStatus();
-
- void init (SPDesktop*);
- void update();
-
-protected:
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> _adj;
-#else
- Gtk::Adjustment _adj;
-#endif
- SPDesktop *_dt;
- bool _upd_f;
-
- virtual int on_input (double*);
- virtual bool on_output();
- virtual void on_value_changed();
-};
-
-} // namespace Widget
-} // namespace UI
-} // namespace Inkscape
-
-
-#endif // SEEN_UI_WIDGET_ZOOMSTATUS_H
-
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp
index a421ef481..84434c88b 100644
--- a/src/widgets/arc-toolbar.cpp
+++ b/src/widgets/arc-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#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 74359aa5c..2192ebfdc 100644
--- a/src/widgets/box3d-toolbar.cpp
+++ b/src/widgets/box3d-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#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 1ad65cfe1..a0ae136e8 100644
--- a/src/widgets/calligraphy-toolbar.cpp
+++ b/src/widgets/calligraphy-toolbar.cpp
@@ -29,6 +29,8 @@
#endif
+#include <glibmm/i18n.h>
+
#include "../ui/dialog/calligraphic-profile-rename.h"
#include "toolbox.h"
diff --git a/src/widgets/dropper-toolbar.cpp b/src/widgets/dropper-toolbar.cpp
index f38fa719b..8eeebf5c1 100644
--- a/src/widgets/dropper-toolbar.cpp
+++ b/src/widgets/dropper-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "dropper-toolbar.h"
diff --git a/src/widgets/erasor-toolbar.cpp b/src/widgets/erasor-toolbar.cpp
index e31e3aea7..740af6821 100644
--- a/src/widgets/erasor-toolbar.cpp
+++ b/src/widgets/erasor-toolbar.cpp
@@ -29,6 +29,8 @@
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "erasor-toolbar.h"
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index e114b94ea..2153aba51 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "measure-toolbar.h"
diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp
index 1be638359..7dca63ba2 100644
--- a/src/widgets/node-toolbar.cpp
+++ b/src/widgets/node-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "node-toolbar.h"
diff --git a/src/widgets/paintbucket-toolbar.cpp b/src/widgets/paintbucket-toolbar.cpp
index bedba0859..a99350a44 100644
--- a/src/widgets/paintbucket-toolbar.cpp
+++ b/src/widgets/paintbucket-toolbar.cpp
@@ -29,6 +29,8 @@
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "paintbucket-toolbar.h"
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index 61e506ebd..73ab4883c 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "pencil-toolbar.h"
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index e12e77487..8e74ff113 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "rect-toolbar.h"
diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp
index 307c75252..34996d24e 100644
--- a/src/widgets/spiral-toolbar.cpp
+++ b/src/widgets/spiral-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "spiral-toolbar.h"
diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp
index 1fd1b7f34..db4decf8e 100644
--- a/src/widgets/spray-toolbar.cpp
+++ b/src/widgets/spray-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "spray-toolbar.h"
diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp
index 9d48e8992..61d8e1000 100644
--- a/src/widgets/star-toolbar.cpp
+++ b/src/widgets/star-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "star-toolbar.h"
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 8f5be6068..13274a175 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -29,6 +29,8 @@
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "text-toolbar.h"
diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp
index d1c71db44..9b2c0bfe3 100644
--- a/src/widgets/tweak-toolbar.cpp
+++ b/src/widgets/tweak-toolbar.cpp
@@ -28,6 +28,8 @@
# include "config.h"
#endif
+#include <glibmm/i18n.h>
+
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "tweak-toolbar.h"