summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorroot <root@jtx.marker.es>2013-03-17 04:32:48 +0000
committerroot <root@jtx.marker.es>2013-03-17 04:32:48 +0000
commit40e796d977e44a3b31c063af3ca841fb1daa81c6 (patch)
tree18b117e449d25b286872fa90cc760d7ba4e80c78 /src
parentwidget working not compile (diff)
parentcppcheck (diff)
downloadinkscape-40e796d977e44a3b31c063af3ca841fb1daa81c6.tar.gz
inkscape-40e796d977e44a3b31c063af3ca841fb1daa81c6.zip
Working in widgets
(bzr r11950.1.55)
Diffstat (limited to 'src')
-rw-r--r--src/common-context.h4
-rw-r--r--src/composite-undo-stack-observer.h2
-rw-r--r--src/desktop.h2
-rw-r--r--src/display/cairo-utils.cpp10
-rw-r--r--src/display/canvas-axonomgrid.h2
-rw-r--r--src/display/guideline.h2
-rw-r--r--src/display/nr-filter-diffuselighting.h8
-rw-r--r--src/display/nr-filter-flood.h2
-rw-r--r--src/display/nr-filter-specularlighting.h8
-rw-r--r--src/display/nr-style.h3
-rw-r--r--src/display/nr-svgfonts.cpp3
-rw-r--r--src/display/nr-svgfonts.h4
-rw-r--r--src/display/sp-ctrlcurve.h2
-rw-r--r--src/document-subset.h2
-rw-r--r--src/dom/events.h1
-rw-r--r--src/dropper-context.cpp1
-rw-r--r--src/dropper-context.h3
-rw-r--r--src/dyna-draw-context.h3
-rw-r--r--src/eraser-context.h3
-rw-r--r--src/event-context.h2
-rw-r--r--src/extension/internal/cairo-render-context.h6
-rw-r--r--src/extension/internal/cairo-renderer.h2
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp1
-rw-r--r--src/extension/internal/pdfinput/svg-builder.h6
-rw-r--r--src/file.cpp3
-rw-r--r--src/file.h2
-rw-r--r--src/filter-chemistry.h2
-rw-r--r--src/filters/blend.h2
-rw-r--r--src/filters/colormatrix.h2
-rw-r--r--src/filters/componenttransfer-funcnode.h6
-rw-r--r--src/filters/componenttransfer.h2
-rw-r--r--src/filters/composite.h2
-rw-r--r--src/filters/convolvematrix.h2
-rw-r--r--src/filters/diffuselighting.h4
-rw-r--r--src/filters/displacementmap.h2
-rw-r--r--src/filters/distantlight.h4
-rw-r--r--src/filters/flood.h2
-rw-r--r--src/filters/gaussian-blur.h4
-rw-r--r--src/filters/image.h2
-rw-r--r--src/filters/merge.h2
-rw-r--r--src/filters/mergenode.h3
-rw-r--r--src/filters/morphology.h2
-rw-r--r--src/filters/offset.h2
-rw-r--r--src/filters/pointlight.h6
-rw-r--r--src/filters/specularlighting.h4
-rw-r--r--src/filters/spotlight.h6
-rw-r--r--src/filters/tile.h2
-rw-r--r--src/filters/turbulence.h1
-rw-r--r--src/flood-context.h3
-rw-r--r--src/gradient-context.h3
-rw-r--r--src/gradient-drag.h6
-rw-r--r--src/inkscape-private.h2
-rw-r--r--src/inkscape.cpp2
-rw-r--r--src/libgdl/Makefile_insert8
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp1
-rw-r--r--src/libnrtype/Layout-TNG.h2
-rw-r--r--src/libnrtype/font-lister.cpp1
-rw-r--r--src/livarot/Path.h10
-rw-r--r--src/livarot/Shape.h6
-rw-r--r--src/live_effects/lpe-bspline.cpp44
-rw-r--r--src/live_effects/lpe-bspline.h31
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp3
-rw-r--r--src/lpe-tool-context.h3
-rw-r--r--src/marker.cpp12
-rw-r--r--src/marker.h4
-rw-r--r--src/measure-context.h3
-rw-r--r--src/menus-skeleton.h2
-rw-r--r--src/mesh-context.h3
-rw-r--r--src/pixmaps/cursor-dropper.xpm38
-rw-r--r--src/rect-context.h3
-rw-r--r--src/select-context.h2
-rw-r--r--src/selection.cpp1
-rw-r--r--src/seltrans-handles.h2
-rw-r--r--src/seltrans.h2
-rw-r--r--src/snap.cpp1
-rw-r--r--src/sp-clippath.h2
-rw-r--r--src/sp-desc.h3
-rw-r--r--src/sp-filter-primitive.h2
-rw-r--r--src/sp-filter.h2
-rw-r--r--src/sp-flowregion.cpp39
-rw-r--r--src/sp-font-face.cpp3
-rw-r--r--src/sp-font-face.h2
-rw-r--r--src/sp-font.cpp3
-rw-r--r--src/sp-glyph-kerning.cpp2
-rw-r--r--src/sp-glyph-kerning.h2
-rw-r--r--src/sp-glyph.cpp2
-rw-r--r--src/sp-glyph.h2
-rw-r--r--src/sp-gradient.h4
-rw-r--r--src/sp-image.h3
-rw-r--r--src/sp-item.h4
-rw-r--r--src/sp-linear-gradient-fns.h2
-rw-r--r--src/sp-mask.h4
-rw-r--r--src/sp-metadata.cpp10
-rw-r--r--src/sp-metadata.h3
-rw-r--r--src/sp-missing-glyph.cpp3
-rw-r--r--src/sp-missing-glyph.h2
-rw-r--r--src/sp-object-group.cpp4
-rw-r--r--src/sp-object-repr.cpp14
-rw-r--r--src/sp-offset.h2
-rw-r--r--src/sp-pattern.h3
-rw-r--r--src/sp-polyline.cpp11
-rw-r--r--src/sp-radial-gradient-fns.h2
-rw-r--r--src/sp-rect.h3
-rw-r--r--src/sp-spiral.h3
-rw-r--r--src/sp-star.h5
-rw-r--r--src/sp-stop.h1
-rw-r--r--src/sp-switch.h2
-rw-r--r--src/sp-symbol.cpp33
-rw-r--r--src/sp-symbol.h3
-rw-r--r--src/sp-title.h3
-rw-r--r--src/sp-tref.h3
-rw-r--r--src/sp-use.h2
-rw-r--r--src/spiral-context.h3
-rw-r--r--src/splivarot.cpp36
-rw-r--r--src/spray-context.h3
-rw-r--r--src/star-context.h3
-rw-r--r--src/style.cpp2
-rw-r--r--src/style.h4
-rw-r--r--src/svg-view-widget.h2
-rw-r--r--src/svg-view.h2
-rw-r--r--src/svg/svg-color.h2
-rw-r--r--src/text-context.h2
-rw-r--r--src/text-editing.cpp2
-rw-r--r--src/trace/siox.cpp4
-rw-r--r--src/tweak-context.h3
-rw-r--r--src/ui/dialog/dialog-manager.cpp7
-rw-r--r--src/ui/dialog/document-properties.cpp2
-rw-r--r--src/ui/dialog/export.cpp26
-rw-r--r--src/ui/dialog/export.h19
-rw-r--r--src/ui/dialog/fill-and-stroke.cpp15
-rw-r--r--src/ui/dialog/find.cpp4
-rw-r--r--src/ui/dialog/find.h6
-rw-r--r--src/ui/dialog/glyphs.h2
-rw-r--r--src/ui/dialog/icon-preview.cpp4
-rw-r--r--src/ui/dialog/input.cpp2
-rw-r--r--src/ui/dialog/layer-properties.h6
-rw-r--r--src/ui/dialog/object-properties.cpp6
-rw-r--r--src/ui/dialog/object-properties.h10
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp4
-rw-r--r--src/ui/dialog/svg-fonts-dialog.h4
-rw-r--r--src/ui/dialog/text-edit.cpp1
-rw-r--r--src/ui/dialog/text-edit.h2
-rw-r--r--src/ui/dialog/tracedialog.cpp1
-rw-r--r--src/ui/dialog/xml-tree.h2
-rw-r--r--src/ui/tool/control-point.cpp2
-rw-r--r--src/ui/tool/node-tool.h3
-rw-r--r--src/ui/tool/path-manipulator.h2
-rw-r--r--src/ui/widget/entry.cpp2
-rw-r--r--src/ui/widget/entry.h6
-rw-r--r--src/ui/widget/frame.h8
-rw-r--r--src/ui/widget/registered-widget.h2
-rw-r--r--src/ui/widget/selected-style.h2
-rw-r--r--src/ui/widget/style-swatch.h2
-rw-r--r--src/undo-stack-observer.h2
-rw-r--r--src/widgets/gradient-vector.h2
-rw-r--r--src/widgets/paint-selector.h2
-rw-r--r--src/widgets/swatch-selector.h6
-rw-r--r--src/xml/composite-node-observer.h2
-rw-r--r--src/zoom-context.h3
159 files changed, 299 insertions, 480 deletions
diff --git a/src/common-context.h b/src/common-context.h
index ae0f398b2..8903be391 100644
--- a/src/common-context.h
+++ b/src/common-context.h
@@ -29,12 +29,8 @@
#define SP_IS_COMMON_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_COMMON_CONTEXT))
#define SP_IS_COMMON_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_COMMON_CONTEXT))
-class SPCommonContext;
-class SPCommonContextClass;
-
#define SAMPLING_SIZE 8 /* fixme: ?? */
-
struct SPCommonContext : public SPEventContext {
/** accumulated shape which ultimately goes in svg:path */
SPCurve *accumulated;
diff --git a/src/composite-undo-stack-observer.h b/src/composite-undo-stack-observer.h
index c34ab7234..669c39a86 100644
--- a/src/composite-undo-stack-observer.h
+++ b/src/composite-undo-stack-observer.h
@@ -18,7 +18,7 @@
namespace Inkscape {
-class Event;
+struct Event;
/**
* Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo
diff --git a/src/desktop.h b/src/desktop.h
index d8d4e151d..56de56c65 100644
--- a/src/desktop.h
+++ b/src/desktop.h
@@ -77,7 +77,7 @@ namespace Inkscape {
}
namespace View {
- class EditWidgetInterface;
+ struct EditWidgetInterface;
}
}
namespace Whiteboard {
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp
index a55b05fe3..fc56c7b26 100644
--- a/src/display/cairo-utils.cpp
+++ b/src/display/cairo-utils.cpp
@@ -655,8 +655,8 @@ int ink_cairo_surface_srgb_to_linear(cairo_surface_t *surface)
cairo_surface_flush(surface);
int width = cairo_image_surface_get_width(surface);
int height = cairo_image_surface_get_height(surface);
- int stride = cairo_image_surface_get_stride(surface);
- unsigned char *data = cairo_image_surface_get_data(surface);
+ // int stride = cairo_image_surface_get_stride(surface);
+ // unsigned char *data = cairo_image_surface_get_data(surface);
ink_cairo_surface_filter( surface, surface, SurfaceSrgbToLinear() );
@@ -698,8 +698,8 @@ int ink_cairo_surface_linear_to_srgb(cairo_surface_t *surface)
cairo_surface_flush(surface);
int width = cairo_image_surface_get_width(surface);
int height = cairo_image_surface_get_height(surface);
- int stride = cairo_image_surface_get_stride(surface);
- unsigned char *data = cairo_image_surface_get_data(surface);
+ // int stride = cairo_image_surface_get_stride(surface);
+ // unsigned char *data = cairo_image_surface_get_data(surface);
ink_cairo_surface_filter( surface, surface, SurfaceLinearToSrgb() );
@@ -888,4 +888,4 @@ guint32 argb32_from_rgba(guint32 in)
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/display/canvas-axonomgrid.h b/src/display/canvas-axonomgrid.h
index 0e24d3f56..f58ea3aca 100644
--- a/src/display/canvas-axonomgrid.h
+++ b/src/display/canvas-axonomgrid.h
@@ -12,7 +12,7 @@
#include "line-snapper.h"
#include "canvas-grid.h"
-class SPCanvasBuf;
+struct SPCanvasBuf;
class SPDesktop;
struct SPNamedView;
diff --git a/src/display/guideline.h b/src/display/guideline.h
index 164244c46..2d9a87d9b 100644
--- a/src/display/guideline.h
+++ b/src/display/guideline.h
@@ -21,7 +21,7 @@
#define SP_GUIDELINE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_GUIDELINE, SPGuideLine))
#define SP_IS_GUIDELINE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_GUIDELINE))
-class SPCtrlPoint;
+struct SPCtrlPoint;
struct SPGuideLine {
SPCanvasItem item;
diff --git a/src/display/nr-filter-diffuselighting.h b/src/display/nr-filter-diffuselighting.h
index 315bf9f48..15cc8e1ff 100644
--- a/src/display/nr-filter-diffuselighting.h
+++ b/src/display/nr-filter-diffuselighting.h
@@ -19,10 +19,10 @@
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
-class SPFeDistantLight;
-class SPFePointLight;
-class SPFeSpotLight;
-class SVGICCColor;
+struct SPFeDistantLight;
+struct SPFePointLight;
+struct SPFeSpotLight;
+struct SVGICCColor;
namespace Inkscape {
namespace Filters {
diff --git a/src/display/nr-filter-flood.h b/src/display/nr-filter-flood.h
index 8568502ff..9a968047d 100644
--- a/src/display/nr-filter-flood.h
+++ b/src/display/nr-filter-flood.h
@@ -14,7 +14,7 @@
#include "display/nr-filter-primitive.h"
-class SVGICCColor;
+struct SVGICCColor;
namespace Inkscape {
namespace Filters {
diff --git a/src/display/nr-filter-specularlighting.h b/src/display/nr-filter-specularlighting.h
index 4f8c2d112..0d1c0644f 100644
--- a/src/display/nr-filter-specularlighting.h
+++ b/src/display/nr-filter-specularlighting.h
@@ -17,10 +17,10 @@
#include "display/nr-light-types.h"
#include "display/nr-filter-primitive.h"
-class SPFeDistantLight;
-class SPFePointLight;
-class SPFeSpotLight;
-class SVGICCColor;
+struct SPFeDistantLight;
+struct SPFePointLight;
+struct SPFeSpotLight;
+struct SVGICCColor;
namespace Inkscape {
namespace Filters {
diff --git a/src/display/nr-style.h b/src/display/nr-style.h
index 597ae7a2c..80547c43e 100644
--- a/src/display/nr-style.h
+++ b/src/display/nr-style.h
@@ -16,8 +16,7 @@
#include <2geom/rect.h>
#include "color.h"
-class SPColor;
-class SPPaintServer;
+struct SPPaintServer;
struct SPStyle;
namespace Inkscape {
diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp
index 0d1b56d54..84b4bd080 100644
--- a/src/display/nr-svgfonts.cpp
+++ b/src/display/nr-svgfonts.cpp
@@ -1,5 +1,4 @@
#include "config.h"
-#ifdef ENABLE_SVG_FONTS
/*
* SVGFonts rendering implementation
*
@@ -356,8 +355,6 @@ void SvgFont::refresh(){
this->userfont = NULL;
}
-#endif //#ifdef ENABLE_SVG_FONTS
-
/*
Local Variables:
mode:c++
diff --git a/src/display/nr-svgfonts.h b/src/display/nr-svgfonts.h
index 6138e2fbb..1101f93f2 100644
--- a/src/display/nr-svgfonts.h
+++ b/src/display/nr-svgfonts.h
@@ -18,8 +18,8 @@
class SvgFont;
struct SPFont;
-class SPGlyph;
-class SPMissingGlyph;
+struct SPGlyph;
+struct SPMissingGlyph;
struct _GdkEventExpose;
typedef _GdkEventExpose GdkEventExpose;
diff --git a/src/display/sp-ctrlcurve.h b/src/display/sp-ctrlcurve.h
index 15de20161..90936185c 100644
--- a/src/display/sp-ctrlcurve.h
+++ b/src/display/sp-ctrlcurve.h
@@ -17,7 +17,7 @@
#include "display/sp-ctrlline.h"
-struct SPItem;
+class SPItem;
#define SP_TYPE_CTRLCURVE (SPCtrlCurve::getType())
#define SP_CTRLCURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_CTRLCURVE, SPCtrlCurve))
diff --git a/src/document-subset.h b/src/document-subset.h
index 5f87e6429..298b7872d 100644
--- a/src/document-subset.h
+++ b/src/document-subset.h
@@ -51,7 +51,7 @@ private:
void _remove(SPObject *obj, bool subtree);
- class Relations;
+ struct Relations;
Relations *_relations;
};
diff --git a/src/dom/events.h b/src/dom/events.h
index 59d83afcf..e62c5d420 100644
--- a/src/dom/events.h
+++ b/src/dom/events.h
@@ -66,7 +66,6 @@ typedef dom::NodePtr NodePtr ;
//forward declarations
-class Event;
class EventTarget;
class EventListener;
class DocumentEvent;
diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp
index 66dcf4ab9..d41e4059d 100644
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -39,7 +39,6 @@
#include "document.h"
#include "document-undo.h"
-#include "pixmaps/cursor-dropper.xpm"
#include "pixmaps/cursor-dropper-f.xpm"
#include "pixmaps/cursor-dropper-s.xpm"
diff --git a/src/dropper-context.h b/src/dropper-context.h
index 68ae3df07..be4b543ae 100644
--- a/src/dropper-context.h
+++ b/src/dropper-context.h
@@ -20,9 +20,6 @@ G_BEGIN_DECLS
#define SP_DROPPER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DROPPER_CONTEXT, SPDropperContext))
#define SP_IS_DROPPER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DROPPER_CONTEXT))
-class SPDropperContext;
-class SPDropperContextClass;
-
enum {
SP_DROPPER_PICK_VISIBLE,
SP_DROPPER_PICK_ACTUAL
diff --git a/src/dyna-draw-context.h b/src/dyna-draw-context.h
index af63bf653..8509e450b 100644
--- a/src/dyna-draw-context.h
+++ b/src/dyna-draw-context.h
@@ -27,9 +27,6 @@
#define SP_IS_DYNA_DRAW_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_DYNA_DRAW_CONTEXT))
#define SP_IS_DYNA_DRAW_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_DYNA_DRAW_CONTEXT))
-class SPDynaDrawContext;
-class SPDynaDrawContextClass;
-
#define DDC_MIN_PRESSURE 0.0
#define DDC_MAX_PRESSURE 1.0
#define DDC_DEFAULT_PRESSURE 1.0
diff --git a/src/eraser-context.h b/src/eraser-context.h
index 7c147c32f..bc4268aef 100644
--- a/src/eraser-context.h
+++ b/src/eraser-context.h
@@ -29,9 +29,6 @@ G_BEGIN_DECLS
#define SP_IS_ERASER_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_ERASER_CONTEXT))
#define SP_IS_ERASER_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_ERASER_CONTEXT))
-class SPEraserContext;
-class SPEraserContextClass;
-
#define ERC_MIN_PRESSURE 0.0
#define ERC_MAX_PRESSURE 1.0
#define ERC_DEFAULT_PRESSURE 1.0
diff --git a/src/event-context.h b/src/event-context.h
index 9936aa668..e97a8ad8f 100644
--- a/src/event-context.h
+++ b/src/event-context.h
@@ -19,7 +19,7 @@
#include "2geom/forward.h"
#include "preferences.h"
-struct GrDrag;
+class GrDrag;
class SPDesktop;
class SPItem;
class ShapeEditor;
diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h
index 94c7bb294..8829940c6 100644
--- a/src/extension/internal/cairo-render-context.h
+++ b/src/extension/internal/cairo-render-context.h
@@ -29,7 +29,7 @@
#include <cairo.h>
class SPClipPath;
-class SPMask;
+struct SPMask;
namespace Inkscape {
namespace Extension {
@@ -37,8 +37,8 @@ namespace Internal {
class CairoRenderer;
class CairoRenderContext;
-class CairoRenderState;
-class CairoGlyphInfo;
+struct CairoRenderState;
+struct CairoGlyphInfo;
// Holds info for rendering a glyph
struct CairoGlyphInfo {
diff --git a/src/extension/internal/cairo-renderer.h b/src/extension/internal/cairo-renderer.h
index db3068fed..c1482d82e 100644
--- a/src/extension/internal/cairo-renderer.h
+++ b/src/extension/internal/cairo-renderer.h
@@ -28,7 +28,7 @@
#include <cairo.h>
class SPClipPath;
-class SPMask;
+struct SPMask;
namespace Inkscape {
namespace Extension {
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index 531cda20a..b04c9782f 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -32,6 +32,7 @@
#endif
#include <gtkmm/alignment.h>
+#include <gtkmm/checkbutton.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/drawingarea.h>
#include <gtkmm/frame.h>
diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
index 46cddd73b..610822959 100644
--- a/src/extension/internal/pdfinput/svg-builder.h
+++ b/src/extension/internal/pdfinput/svg-builder.h
@@ -31,10 +31,10 @@ namespace Inkscape {
#include "CharTypes.h"
class GooString;
class Function;
-struct GfxState;
-class GfxColor;
+class GfxState;
+struct GfxColor;
class GfxColorSpace;
-class GfxRGB;
+struct GfxRGB;
class GfxPath;
class GfxPattern;
class GfxTilingPattern;
diff --git a/src/file.cpp b/src/file.cpp
index 97087c1a1..5737f0a8a 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1124,9 +1124,6 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
prevent_id_clashes(doc, in_doc);
- SPObject *in_defs = in_doc->getDefs();
- Inkscape::XML::Node *last_def = in_defs->getRepr()->lastChild();
-
SPCSSAttr *style = sp_css_attr_from_object(doc->getRoot());
// Count the number of top-level items in the imported document.
diff --git a/src/file.h b/src/file.h
index b8e15bf3e..b173ca58c 100644
--- a/src/file.h
+++ b/src/file.h
@@ -24,7 +24,7 @@ class SPObject;
namespace Inkscape {
namespace Extension {
- struct Extension;
+ class Extension;
}
}
diff --git a/src/filter-chemistry.h b/src/filter-chemistry.h
index 751885ad2..b00e33bcc 100644
--- a/src/filter-chemistry.h
+++ b/src/filter-chemistry.h
@@ -20,7 +20,7 @@
class SPDocument;
struct SPFilter;
-class SPFilterPrimitive;
+struct SPFilterPrimitive;
class SPItem;
class SPObject;
diff --git a/src/filters/blend.h b/src/filters/blend.h
index e7fc410e7..5d65c92fc 100644
--- a/src/filters/blend.h
+++ b/src/filters/blend.h
@@ -22,8 +22,6 @@
#define SP_IS_FEBLEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEBLEND))
#define SP_IS_FEBLEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEBLEND))
-class SPFeBlendClass;
-
struct SPFeBlend : public SPFilterPrimitive {
Inkscape::Filters::FilterBlendMode blend_mode;
int in2;
diff --git a/src/filters/colormatrix.h b/src/filters/colormatrix.h
index 8eb750ac1..558f01070 100644
--- a/src/filters/colormatrix.h
+++ b/src/filters/colormatrix.h
@@ -21,8 +21,6 @@
#define SP_IS_FECOLORMATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FECOLORMATRIX))
#define SP_IS_FECOLORMATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FECOLORMATRIX))
-class SPFeColorMatrixClass;
-
struct SPFeColorMatrix : public SPFilterPrimitive {
Inkscape::Filters::FilterColorMatrixType type;
gdouble value;
diff --git a/src/filters/componenttransfer-funcnode.h b/src/filters/componenttransfer-funcnode.h
index d81e50577..ae1b2f8bb 100644
--- a/src/filters/componenttransfer-funcnode.h
+++ b/src/filters/componenttransfer-funcnode.h
@@ -34,11 +34,6 @@
#define SP_IS_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFUNCNODE))
-/* Component Transfer funcNode class */
-
-class SPFeFuncNode;
-class SPFeFuncNodeClass;
-
struct SPFeFuncNode : public SPObject {
Inkscape::Filters::FilterComponentTransferType type;
std::vector<double> tableValues;
@@ -49,6 +44,7 @@ struct SPFeFuncNode : public SPObject {
double offset;
};
+/* Component Transfer funcNode class */
struct SPFeFuncNodeClass {
SPObjectClass parent_class;
};
diff --git a/src/filters/componenttransfer.h b/src/filters/componenttransfer.h
index 2df64009f..deb6fb740 100644
--- a/src/filters/componenttransfer.h
+++ b/src/filters/componenttransfer.h
@@ -24,8 +24,6 @@ namespace Filters {
class FilterComponentTransfer;
} }
-class SPFeComponentTransferClass;
-
struct SPFeComponentTransfer : public SPFilterPrimitive {
Inkscape::Filters::FilterComponentTransfer *renderer;
};
diff --git a/src/filters/composite.h b/src/filters/composite.h
index 3eb62716f..4f2d1ff69 100644
--- a/src/filters/composite.h
+++ b/src/filters/composite.h
@@ -32,8 +32,6 @@ enum FeCompositeOperator {
COMPOSITE_ENDOPERATOR
};
-class SPFeCompositeClass;
-
struct SPFeComposite : public SPFilterPrimitive {
FeCompositeOperator composite_operator;
double k1, k2, k3, k4;
diff --git a/src/filters/convolvematrix.h b/src/filters/convolvematrix.h
index 4c5261e05..cb2fbfb8d 100644
--- a/src/filters/convolvematrix.h
+++ b/src/filters/convolvematrix.h
@@ -24,8 +24,6 @@
#define SP_IS_FECONVOLVEMATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FECONVOLVEMATRIX))
#define SP_IS_FECONVOLVEMATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FECONVOLVEMATRIX))
-class SPFeConvolveMatrixClass;
-
struct SPFeConvolveMatrix : public SPFilterPrimitive {
NumberOptNumber order;
std::vector<gdouble> kernelMatrix;
diff --git a/src/filters/diffuselighting.h b/src/filters/diffuselighting.h
index 99dccb394..1572385b9 100644
--- a/src/filters/diffuselighting.h
+++ b/src/filters/diffuselighting.h
@@ -21,15 +21,13 @@
#define SP_IS_FEDIFFUSELIGHTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEDIFFUSELIGHTING))
#define SP_IS_FEDIFFUSELIGHTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEDIFFUSELIGHTING))
-class SVGICCColor;
+struct SVGICCColor;
namespace Inkscape {
namespace Filters {
class FilterDiffuseLighting;
} }
-class SPFeDiffuseLightingClass;
-
struct SPFeDiffuseLighting : public SPFilterPrimitive {
gfloat surfaceScale;
guint surfaceScale_set : 1;
diff --git a/src/filters/displacementmap.h b/src/filters/displacementmap.h
index 6232f0937..93dc86d27 100644
--- a/src/filters/displacementmap.h
+++ b/src/filters/displacementmap.h
@@ -28,8 +28,6 @@ enum FilterDisplacementMapChannelSelector {
DISPLACEMENTMAP_CHANNEL_ENDTYPE
};
-class SPFeDisplacementMapClass;
-
struct SPFeDisplacementMap : public SPFilterPrimitive {
int in2;
double scale;
diff --git a/src/filters/distantlight.h b/src/filters/distantlight.h
index a68746334..b1febf5d3 100644
--- a/src/filters/distantlight.h
+++ b/src/filters/distantlight.h
@@ -25,10 +25,6 @@
/* Distant light class */
-
-class SPFeDistantLight;
-class SPFeDistantLightClass;
-
struct SPFeDistantLight : public SPObject {
/** azimuth attribute */
diff --git a/src/filters/flood.h b/src/filters/flood.h
index d60321689..ab9f061d6 100644
--- a/src/filters/flood.h
+++ b/src/filters/flood.h
@@ -23,8 +23,6 @@ G_BEGIN_DECLS
#define SP_IS_FEFLOOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFLOOD))
#define SP_IS_FEFLOOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFLOOD))
-class SPFeFloodClass;
-
struct SPFeFlood : public SPFilterPrimitive {
guint32 color;
SVGICCColor *icc;
diff --git a/src/filters/gaussian-blur.h b/src/filters/gaussian-blur.h
index 417f8a6f4..8929627ba 100644
--- a/src/filters/gaussian-blur.h
+++ b/src/filters/gaussian-blur.h
@@ -21,14 +21,12 @@
#define SP_IS_GAUSSIANBLUR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_GAUSSIANBLUR))
#define SP_IS_GAUSSIANBLUR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_GAUSSIANBLUR))
-/* GaussianBlur base class */
-class SPGaussianBlurClass;
-
struct SPGaussianBlur : public SPFilterPrimitive {
/** stdDeviation attribute */
NumberOptNumber stdDeviation;
};
+/* GaussianBlur base class */
struct SPGaussianBlurClass {
SPFilterPrimitiveClass parent_class;
};
diff --git a/src/filters/image.h b/src/filters/image.h
index b4081602a..a96e650b7 100644
--- a/src/filters/image.h
+++ b/src/filters/image.h
@@ -24,8 +24,6 @@
#define SP_IS_FEIMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEIMAGE))
#define SP_IS_FEIMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEIMAGE))
-class SPFeImageClass;
-
struct SPFeImage : public SPFilterPrimitive {
gchar *href;
diff --git a/src/filters/merge.h b/src/filters/merge.h
index 3243073ca..40a9bb848 100644
--- a/src/filters/merge.h
+++ b/src/filters/merge.h
@@ -18,8 +18,6 @@
#define SP_IS_FEMERGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEMERGE))
#define SP_IS_FEMERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEMERGE))
-class SPFeMergeClass;
-
struct SPFeMerge : public SPFilterPrimitive {
};
diff --git a/src/filters/mergenode.h b/src/filters/mergenode.h
index 8352632a6..edb35faec 100644
--- a/src/filters/mergenode.h
+++ b/src/filters/mergenode.h
@@ -21,9 +21,6 @@
#define SP_FEMERGENODE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_FEMERGENODE, SPFeMergeNode))
#define SP_IS_FEMERGENODE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_FEMERGENODE))
-class SPFeMergeNode;
-class SPFeMergeNodeClass;
-
struct SPFeMergeNode : public SPObject {
int input;
};
diff --git a/src/filters/morphology.h b/src/filters/morphology.h
index b7005a3d9..9084d1b94 100644
--- a/src/filters/morphology.h
+++ b/src/filters/morphology.h
@@ -22,8 +22,6 @@
#define SP_IS_FEMORPHOLOGY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEMORPHOLOGY))
#define SP_IS_FEMORPHOLOGY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEMORPHOLOGY))
-class SPFeMorphologyClass;
-
struct SPFeMorphology : public SPFilterPrimitive {
Inkscape::Filters::FilterMorphologyOperator Operator;
NumberOptNumber radius;
diff --git a/src/filters/offset.h b/src/filters/offset.h
index dba7ed8ef..08954a8e4 100644
--- a/src/filters/offset.h
+++ b/src/filters/offset.h
@@ -20,8 +20,6 @@
#define SP_IS_FEOFFSET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEOFFSET))
#define SP_IS_FEOFFSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEOFFSET))
-class SPFeOffsetClass;
-
struct SPFeOffset : public SPFilterPrimitive {
double dx, dy;
};
diff --git a/src/filters/pointlight.h b/src/filters/pointlight.h
index c0b272021..3ec5d5791 100644
--- a/src/filters/pointlight.h
+++ b/src/filters/pointlight.h
@@ -23,12 +23,6 @@
#define SP_IS_FEPOINTLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEPOINTLIGHT))
#define SP_IS_FEPOINTLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEPOINTLIGHT))
-/* Distant light class */
-
-
-class SPFePointLight;
-class SPFePointLightClass;
-
struct SPFePointLight : public SPObject {
/** x coordinate of the light source */
diff --git a/src/filters/specularlighting.h b/src/filters/specularlighting.h
index 44bd98c6c..4b31eb4c4 100644
--- a/src/filters/specularlighting.h
+++ b/src/filters/specularlighting.h
@@ -23,7 +23,7 @@
#define SP_IS_FESPECULARLIGHTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FESPECULARLIGHTING))
#define SP_IS_FESPECULARLIGHTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FESPECULARLIGHTING))
-class SVGICCColor;
+struct SVGICCColor;
namespace Inkscape {
namespace Filters {
@@ -31,8 +31,6 @@ class FilterSpecularLighting;
}
}
-class SPFeSpecularLightingClass;
-
struct SPFeSpecularLighting : public SPFilterPrimitive {
gfloat surfaceScale;
guint surfaceScale_set : 1;
diff --git a/src/filters/spotlight.h b/src/filters/spotlight.h
index 6e2463c08..1750ca95b 100644
--- a/src/filters/spotlight.h
+++ b/src/filters/spotlight.h
@@ -23,12 +23,6 @@
#define SP_IS_FESPOTLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FESPOTLIGHT))
#define SP_IS_FESPOTLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FESPOTLIGHT))
-/* Distant light class */
-
-
-class SPFeSpotLight;
-class SPFeSpotLightClass;
-
struct SPFeSpotLight : public SPObject {
/** x coordinate of the light source */
diff --git a/src/filters/tile.h b/src/filters/tile.h
index a376a6e10..48a552fc8 100644
--- a/src/filters/tile.h
+++ b/src/filters/tile.h
@@ -21,8 +21,6 @@
#define SP_IS_FETILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FETILE))
/* FeTile base class */
-class SPFeTileClass;
-
struct SPFeTile : public SPFilterPrimitive {
};
diff --git a/src/filters/turbulence.h b/src/filters/turbulence.h
index cbc4fb082..bad8315c1 100644
--- a/src/filters/turbulence.h
+++ b/src/filters/turbulence.h
@@ -24,7 +24,6 @@
#define SP_IS_FETURBULENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FETURBULENCE))
/* FeTurbulence base class */
-class SPFeTurbulenceClass;
struct SPFeTurbulence : public SPFilterPrimitive {
/** TURBULENCE ATTRIBUTES HERE */
diff --git a/src/flood-context.h b/src/flood-context.h
index 0cab0f7c5..3e81cd01e 100644
--- a/src/flood-context.h
+++ b/src/flood-context.h
@@ -29,9 +29,6 @@
#define FLOOD_COLOR_CHANNEL_B 4
#define FLOOD_COLOR_CHANNEL_A 8
-class SPFloodContext;
-class SPFloodContextClass;
-
struct SPFloodContext : public SPEventContext {
SPItem *item;
diff --git a/src/gradient-context.h b/src/gradient-context.h
index 9c08677ae..464b95ad4 100644
--- a/src/gradient-context.h
+++ b/src/gradient-context.h
@@ -25,9 +25,6 @@
#define SP_IS_GRADIENT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_GRADIENT_CONTEXT))
#define SP_IS_GRADIENT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_GRADIENT_CONTEXT))
-class SPGradientContext;
-class SPGradientContextClass;
-
struct SPGradientContext : public SPEventContext {
Geom::Point origin;
diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index cd76d8a3c..2a2465590 100644
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
@@ -33,12 +33,12 @@ struct SPKnot;
class SPDesktop;
class SPCSSAttr;
-class SPLinearGradient;
+struct SPLinearGradient;
struct SPMeshGradient;
class SPItem;
class SPObject;
-class SPRadialGradient;
-class SPStop;
+struct SPRadialGradient;
+struct SPStop;
namespace Inkscape {
class Selection;
diff --git a/src/inkscape-private.h b/src/inkscape-private.h
index 470a1f5bd..09bcef12b 100644
--- a/src/inkscape-private.h
+++ b/src/inkscape-private.h
@@ -22,7 +22,7 @@
#include "inkscape.h"
-class SPColor;
+struct SPColor;
namespace Inkscape { class Selection; }
GType inkscape_get_type (void);
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 449220357..491acd73e 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -91,7 +91,7 @@ enum {
################################*/
namespace Inkscape {
-class ApplicationClass;
+struct ApplicationClass;
}
static void inkscape_class_init (Inkscape::ApplicationClass *klass);
diff --git a/src/libgdl/Makefile_insert b/src/libgdl/Makefile_insert
index 3f5228a20..e92223f0b 100644
--- a/src/libgdl/Makefile_insert
+++ b/src/libgdl/Makefile_insert
@@ -44,6 +44,14 @@ libgdl/all: libgdl/libgdl.a
libgdl/clean:
rm -f libgdl/libgdl.a $(libgdl_gdl_a_OBJECTS)
+if CC_W_NO_SUPPORTED
+# Suppress some non-critical warnings for libgdl. We will drop our forked copy
+# of GDL once we upgrade to Gtk+ 3 so it's more important to minimise the number
+# of changes we make to GDL than to fix these minor issues in trunk.
+
+libgdl_libgdl_a_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-variable $(AM_CFLAGS)
+endif
+
libgdl_libgdl_a_SOURCES = \
libgdl/gdl-dock-object.h \
libgdl/gdl-dock-master.h \
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index 1d086b57b..0f853c681 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -26,7 +26,6 @@ namespace Inkscape {
namespace Extension {
namespace Internal {
class CairoRenderContext;
- class CairoGlyphInfo;
}
}
}
diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h
index 488a974ea..0f5f08a53 100644
--- a/src/libnrtype/Layout-TNG.h
+++ b/src/libnrtype/Layout-TNG.h
@@ -36,7 +36,7 @@ using Inkscape::Extension::Internal::CairoRenderContext;
struct SPStyle;
class Shape;
-class SPPrintContext;
+struct SPPrintContext;
class SVGLength;
class Path;
class SPCurve;
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 712c17915..90900baba 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#include <gtkmm.h>
#include <libnrtype/font-instance.h>
#include <libnrtype/TextWrapper.h>
#include <libnrtype/one-glyph.h>
diff --git a/src/livarot/Path.h b/src/livarot/Path.h
index cd939bf7d..a109298a2 100644
--- a/src/livarot/Path.h
+++ b/src/livarot/Path.h
@@ -14,11 +14,11 @@
#include <2geom/point.h>
struct PathDescr;
-class PathDescrLineTo;
-class PathDescrArcTo;
-class PathDescrCubicTo;
-class PathDescrBezierTo;
-class PathDescrIntermBezierTo;
+struct PathDescrLineTo;
+struct PathDescrArcTo;
+struct PathDescrCubicTo;
+struct PathDescrBezierTo;
+struct PathDescrIntermBezierTo;
struct SPStyle;
diff --git a/src/livarot/Shape.h b/src/livarot/Shape.h
index 1a804a48c..dcd172da2 100644
--- a/src/livarot/Shape.h
+++ b/src/livarot/Shape.h
@@ -21,9 +21,9 @@
class Path;
class FloatLigne;
-struct SweepTree;
-struct SweepTreeList;
-struct SweepEventQueue;
+class SweepTree;
+class SweepTreeList;
+class SweepEventQueue;
enum {
tweak_mode_grow,
diff --git a/src/live_effects/lpe-bspline.cpp b/src/live_effects/lpe-bspline.cpp
index 9e83bbb41..785c545b5 100644
--- a/src/live_effects/lpe-bspline.cpp
+++ b/src/live_effects/lpe-bspline.cpp
@@ -39,11 +39,12 @@
using Inkscape::DocumentUndo;
+
namespace Inkscape {
namespace LivePathEffect {
LPEBSpline::LPEBSpline(LivePathEffectObject *lpeobject) :
- Effect(lpeobject),scal,noCusp
+ Effect(lpeobject)
{
}
@@ -238,26 +239,25 @@ Gtk::Widget *
LPEBSpline::newWidget()
{
Gtk::VBox * vbox = dynamic_cast<Gtk::VBox*>(Effect::newWidget());
- vbox->set_border_width(5);
Glib::ustring title = Glib::ustring(_("Ignore cusp nodes"));
Glib::ustring tip = Glib::ustring(_("Ignore cusp nodes"));
- Gtk::Widget *noCuspWidget = new LPEBSpline::newCheckButton(title,tip);
- vbox->pack_start(*noCuspWidget,true,true,(guint)2);
+ this->setNoCuspWidget(this->newCheckButton(title));
title = Glib::ustring(_("Unify weights:"));
tip = Glib::ustring(_("Percent of the with for all poinrs"));
- Gtk::Widget *scalWidget = new LPEBSpline::newScalar(title,tip);
- vbox->pack_start(*scalWidget, true, true,2);
+ this->setScalWidget(this->newScalar(title,tip));
+ vbox->set_border_width(5);
+ vbox->pack_start(*this->getNoCuspWidget(), true, true,2);
+ vbox->pack_start(*this->getScalWidget(),true,true,(guint)2);
return dynamic_cast<Gtk::VBox *> (vbox);
}
Gtk::Widget *
LPEBSpline::newScalar(Glib::ustring title, Glib::ustring tip)
{
- scal = Gtk::manage( new Inkscape::UI::Widget::Scalar(title, tip));
- scal->setValue(33.);
- scal->setDigits(2);
+ Inkscape::UI::Widget::Scalar * scal = Gtk::manage( new Inkscape::UI::Widget::Scalar(title, tip, 2));
+ scal->setRange(0.01, 100.);
scal->setIncrements(1., 5.);
- scal->setRange(0, 100.);
+ scal->setValue(33.);
scal->setProgrammatically = false;
scal->addSlider();
scal->signal_value_changed().connect(sigc::mem_fun (*this,&LPEBSpline::updateAllHandles));
@@ -265,17 +265,20 @@ LPEBSpline::newScalar(Glib::ustring title, Glib::ustring tip)
}
Gtk::Widget *
-LPEBSpline::newCheckButton(Glib::ustring title, Glib::ustring tip)
+LPEBSpline::newCheckButton(Glib::ustring title)
{
- noCusp = Gtk::manage( new Gtk::CheckButton(title,tip));
+ Gtk::CheckButton * noCusp = Gtk::manage( new Gtk::CheckButton(title,true));
+ noCusp->set_alignment(1.0,0.0);
return dynamic_cast<Gtk::Widget *>(noCusp);
}
void
LPEBSpline::updateAllHandles()
{
- double value = scal->setValue(33.);
- bool noCusp = false;
+ Inkscape::UI::Widget::Scalar * scal = dynamic_cast<Inkscape::UI::Widget::Scalar *>(this->getScalWidget());
+ double value = scal->getValue()/100;
+ Gtk::CheckButton * noCusp = dynamic_cast<Gtk::CheckButton *>(this->getNoCuspWidget());
+ bool noCuspValue = noCusp->get_active();
SPDesktop *desktop = inkscape_active_desktop(); // TODO: Is there a better method to find the item's desktop?
Inkscape::Selection *selection = sp_desktop_selection(desktop);
for (GSList *items = (GSList *) selection->itemList();
@@ -288,7 +291,7 @@ LPEBSpline::updateAllHandles()
SPItem *item = (SPItem *) items->data;
SPPath *path = SP_PATH(item);
SPCurve *curve = path->get_curve_for_edit();
- LPEBSpline::doBSplineFromWidget(curve,value,noCusp);
+ LPEBSpline::doBSplineFromWidget(curve,value,noCuspValue);
gchar *str = sp_svg_write_path(curve->get_pathvector());
path->getRepr()->setAttribute("inkscape:original-d", str);
g_free(str);
@@ -310,6 +313,8 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
// Make copy of old path as it is changed during processing
Geom::PathVector const original_pathv = curve->get_pathvector();
curve->reset();
+ using Geom::X;
+ using Geom::Y;
//Recorremos todos los paths a los que queremos aplicar el efecto, hasta el penúltimo
for(Geom::PathVector::const_iterator path_it = original_pathv.begin(); path_it != original_pathv.end(); ++path_it) {
@@ -363,16 +368,20 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
if(cubic){
if(!noCusp || (*cubic)[1] != in->first_segment()->initialPoint())
pointAt1 = SBasisIn.valueAt(value);
+ pointAt1 = Geom::Point(pointAt1[X] + 0.0625,pointAt1[Y] + 0.0625);
else
pointAt1 = in->first_segment()->initialPoint();
if(!noCusp || (*cubic)[2] != in->first_segment()->finalPoint())
pointAt2 = SBasisIn.valueAt(1-value);
+ pointAt2 = Geom::Point(pointAt2[X] + 0.0625,pointAt2[Y] + 0.0625);
else
pointAt2 = in->first_segment()->finalPoint();
}else{
if(!noCusp){
pointAt1 = SBasisIn.valueAt(value);
+ pointAt1 = Geom::Point(pointAt1[X] + 0.0625,pointAt1[Y] + 0.0625);
pointAt2 = SBasisIn.valueAt(1-value);
+ pointAt2 = Geom::Point(pointAt2[X] + 0.0625,pointAt2[Y] + 0.0625);
}else{
pointAt1 = in->first_segment()->initialPoint();
pointAt2 = in->first_segment()->finalPoint();
@@ -391,16 +400,20 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
if(cubic){
if(!noCusp || (*cubic)[1] != out->first_segment()->initialPoint())
nextPointAt1 = SBasisOut.valueAt(value);
+ nextPointAt1 = Geom::Point(nextPointAt1[X] + 0.0625,nextPointAt1[Y] + 0.0625);
else
nextPointAt1 = out->first_segment()->initialPoint();
if(!noCusp || (*cubic)[2] != out->first_segment()->finalPoint())
nextPointAt2 = SBasisOut.valueAt(1-value);
+ nextPointAt2 = Geom::Point(nextPointAt2[X] + 0.0625,nextPointAt2[Y] + 0.0625);
else
nextPointAt2 = out->first_segment()->finalPoint();
}else{
if(!noCusp){
nextPointAt1 = SBasisOut.valueAt(value);
+ nextPointAt1 = Geom::Point(nextPointAt1[X] + 0.0625,nextPointAt1[Y] + 0.0625);
nextPointAt2 = SBasisOut.valueAt(1-value);
+ nextPointAt2 = Geom::Point(nextPointAt2[X] + 0.0625,nextPointAt2[Y] + 0.0625);
}else{
nextPointAt1 = out->first_segment()->initialPoint();
nextPointAt2 = out->first_segment()->finalPoint();
@@ -409,6 +422,7 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
nextPointAt3 = out->first_segment()->finalPoint();
out->reset();
delete out;
+
//La curva BSpline se forma calculando el centro del segmanto de unión
//de el punto situado en las 2/3 partes de el segmento de entrada
//con el punto situado en la posición 1/3 del segmento de salida
diff --git a/src/live_effects/lpe-bspline.h b/src/live_effects/lpe-bspline.h
index eace58837..a0f1554d0 100644
--- a/src/live_effects/lpe-bspline.h
+++ b/src/live_effects/lpe-bspline.h
@@ -8,9 +8,7 @@
*/
#include "live_effects/effect.h"
-#include "live_effects/parameter/parameter.h"
-#include "ui/widget/scalar.h"
-#include <gtkmm/checkbutton.h>
+
namespace Inkscape {
namespace LivePathEffect {
@@ -18,6 +16,13 @@ namespace LivePathEffect {
class LPEBSpline : public Effect {
+
+private:
+ double scalWidget;
+ bool noCuspWidget;
+ LPEBSpline(const LPEBSpline&);
+ LPEBSpline& operator=(const LPEBSpline&);
+
public:
LPEBSpline(LivePathEffectObject *lpeobject);
virtual ~LPEBSpline();
@@ -30,20 +35,22 @@ public:
virtual void updateAllHandles();
- virtual void newScalar(Glib::ustring title, Glib::ustring tip);
+ virtual Gtk::Widget* newScalar(Glib::ustring title, Glib::ustring tip);
- virtual void newCheckButton(Glib::ustring title, Glib::ustring tip);
+ virtual Gtk::Widget* newCheckButton(Glib::ustring title);
virtual void doBSplineFromWidget(SPCurve * curve, double value, bool noCusp);
- virtual Gtk::Widget * newWidget();
-
+ virtual double getScal(){return scal;};
+
+ virtual double setScal(double setScal){scal = setScal;};
+
+ virtual bool getNoCusp(){return noCusp;};
+
+ virtual bool setNoCusp(bool setNoCusp){noCusp = setNoCusp;};
+
+ virtual Gtk::Widget* newWidget();
-private:
- Inkscape::UI::Widget::Scalar* scal;
- Gtk::CheckButton* noCusp;
- LPEBSpline(const LPEBSpline&);
- LPEBSpline& operator=(const LPEBSpline&);
};
}; //namespace LivePathEffect
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index 452139344..ac571d963 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -91,7 +91,8 @@ LPERecursiveSkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > co
double scaling = (uskeleton.domain().extent() - toffset)/pattBndsX->extent();
// TODO investigate why pattWidth is not being used:
- double pattWidth = pattBndsX->extent() * scaling;
+ // - Doesn't appear to have been used anywhere in bzr history (Alex V: 2013-03-16)
+ // double pattWidth = pattBndsX->extent() * scaling;
if (scaling != 1.0) {
x*=scaling;
diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h
index 12e4b3838..fb3a5d4e2 100644
--- a/src/lpe-tool-context.h
+++ b/src/lpe-tool-context.h
@@ -24,9 +24,6 @@
#define SP_IS_LPETOOL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_LPETOOL_CONTEXT))
#define SP_IS_LPETOOL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_LPETOOL_CONTEXT))
-class SPLPEToolContext;
-class SPLPEToolContextClass;
-
/* This is the list of subtools from which the toolbar of the LPETool is built automatically */
extern const int num_subtools;
diff --git a/src/marker.cpp b/src/marker.cpp
index ba5cd4b05..9717160ed 100644
--- a/src/marker.cpp
+++ b/src/marker.cpp
@@ -324,13 +324,13 @@ static void sp_marker_update(SPObject *object, SPCtx *ctx, guint flags)
// Now set up viewbox transformation
// Determine actual viewbox in viewport coordinates
- double x = 0;
- double y = 0;
+ // double x = 0;
+ // double y = 0;
double width = 0;
double height = 0;
if (marker->aspect_align == SP_ASPECT_NONE) {
- x = 0.0;
- y = 0.0;
+ // x = 0.0;
+ // y = 0.0;
width = rctx.viewport.width();
height = rctx.viewport.height();
} else {
@@ -343,7 +343,7 @@ static void sp_marker_update(SPObject *object, SPCtx *ctx, guint flags)
height = (vb.height()) * scale;
// Now place viewbox to requested position
- switch (marker->aspect_align) {
+ /*switch (marker->aspect_align) {
case SP_ASPECT_XMIN_YMIN:
x = 0.0;
y = 0.0;
@@ -384,7 +384,7 @@ static void sp_marker_update(SPObject *object, SPCtx *ctx, guint flags)
x = 0.0;
y = 0.0;
break;
- }
+ }*/
}
// TODO fixme: all that work is done to figure out x and y, which are just ignored. Check why.
diff --git a/src/marker.h b/src/marker.h
index e8d2dd9a1..147fafeb8 100644
--- a/src/marker.h
+++ b/src/marker.h
@@ -22,9 +22,7 @@
#define SP_MARKER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_MARKER, SPMarker))
#define SP_IS_MARKER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_MARKER))
-class SPMarker;
-class SPMarkerClass;
-class SPMarkerView;
+struct SPMarkerView;
#include <2geom/rect.h>
#include <2geom/affine.h>
diff --git a/src/measure-context.h b/src/measure-context.h
index baf74d30e..b7673ad0d 100644
--- a/src/measure-context.h
+++ b/src/measure-context.h
@@ -18,9 +18,6 @@
#define SP_MEASURE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_MEASURE_CONTEXT, SPMeasureContext))
#define SP_IS_MEASURE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_MEASURE_CONTEXT))
-class SPMeasureContext;
-class SPMeasureContextClass;
-
struct SPMeasureContext {
SPEventContext event_context;
SPCanvasItem *grabbed;
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index 868b606a4..694619089 100644
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
@@ -252,9 +252,7 @@ static char const menus_skeleton[] =
" </submenu>\n"
" <submenu name=\"" N_("_Text") "\">\n"
" <verb verb-id=\"DialogText\" />\n"
-#ifdef ENABLE_SVG_FONTS
" <verb verb-id=\"DialogSVGFonts\" />\n"
-#endif // ENABLE_SVG_FONTS
" <verb verb-id=\"DialogGlyphs\" />\n"
" <separator/>\n"
" <verb verb-id=\"SelectionTextToPath\" />\n"
diff --git a/src/mesh-context.h b/src/mesh-context.h
index ed93e404f..e5d06ec0a 100644
--- a/src/mesh-context.h
+++ b/src/mesh-context.h
@@ -27,9 +27,6 @@
#define SP_IS_MESH_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_MESH_CONTEXT))
#define SP_IS_MESH_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_MESH_CONTEXT))
-class SPMeshContext;
-class SPMeshContextClass;
-
struct SPMeshContext : public SPEventContext {
Geom::Point origin;
diff --git a/src/pixmaps/cursor-dropper.xpm b/src/pixmaps/cursor-dropper.xpm
deleted file mode 100644
index 21f96edd0..000000000
--- a/src/pixmaps/cursor-dropper.xpm
+++ /dev/null
@@ -1,38 +0,0 @@
-/* XPM */
-static const char * cursor_dropper_xpm[] = {
-"32 32 3 1",
-" c None",
-". c #FFFFFF",
-"+ c #000000",
-" ... ",
-" .+. ",
-" .+. ",
-" .+. ",
-".... .... ",
-".+++ +++. ",
-".... .... ",
-" .+. ",
-" .+. .... ",
-" .+. .+++. ",
-" ... .+..+. ",
-" .++..+. ",
-" .++..+. ",
-" .++..+. ",
-" .++..+. . ",
-" .++..+.+. ",
-" .++..+++. ",
-" .++++.+. ",
-" .++++.+.. ",
-" .++++++.++. ",
-" .++++++..+. ",
-" ..+++++.+. ",
-" .++++++. ",
-" .+++++. ",
-" .+++. ",
-" ... ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" "};
diff --git a/src/rect-context.h b/src/rect-context.h
index b6fbb6854..5b6c5373e 100644
--- a/src/rect-context.h
+++ b/src/rect-context.h
@@ -25,9 +25,6 @@
#define SP_IS_RECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_RECT_CONTEXT))
#define SP_IS_RECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_RECT_CONTEXT))
-class SPRectContext;
-class SPRectContextClass;
-
struct SPRectContext : public SPEventContext {
SPItem *item;
Geom::Point center;
diff --git a/src/select-context.h b/src/select-context.h
index ce2039a2d..a6877f802 100644
--- a/src/select-context.h
+++ b/src/select-context.h
@@ -22,8 +22,6 @@
#define SP_IS_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SELECT_CONTEXT))
struct SPCanvasItem;
-class SPSelectContext;
-class SPSelectContextClass;
namespace Inkscape {
class MessageContext;
diff --git a/src/selection.cpp b/src/selection.cpp
index 72f50137c..564f1fdd3 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -418,7 +418,6 @@ Geom::OptRect Selection::documentBounds(SPItem::BBoxType type) const
// will be returned; this is also the case in SelTrans::centerRequest()
boost::optional<Geom::Point> Selection::center() const {
GSList *items = (GSList *) const_cast<Selection *>(this)->itemList();
- Geom::Point center;
if (items) {
SPItem *first = reinterpret_cast<SPItem*>(g_slist_last(items)->data); // from the first item in selection
if (first->isCenterSet()) { // only if set explicitly
diff --git a/src/seltrans-handles.h b/src/seltrans-handles.h
index f625ebd68..14f50d784 100644
--- a/src/seltrans-handles.h
+++ b/src/seltrans-handles.h
@@ -21,7 +21,7 @@ namespace Inkscape
class SelTrans;
}
-class SPSelTransHandle;
+struct SPSelTransHandle;
// request handlers
gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
diff --git a/src/seltrans.h b/src/seltrans.h
index 55c109ed7..effc767e3 100644
--- a/src/seltrans.h
+++ b/src/seltrans.h
@@ -30,7 +30,7 @@ struct SPKnot;
class SPDesktop;
struct SPCanvasItem;
struct SPCtrlLine;
-class SPSelTransHandle;
+struct SPSelTransHandle;
namespace Inkscape
{
diff --git a/src/snap.cpp b/src/snap.cpp
index 695424194..15f24ef53 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -500,7 +500,6 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed(
/* The current best metric for the best transformation; lower is better, Geom::infinity()
** means that we haven't snapped anything.
*/
- Geom::Point best_scale_metric(Geom::infinity(), Geom::infinity());
Inkscape::SnappedPoint best_snapped_point;
g_assert(best_snapped_point.getAlwaysSnap() == false); // Check initialization of snapped point
g_assert(best_snapped_point.getAtIntersection() == false);
diff --git a/src/sp-clippath.h b/src/sp-clippath.h
index a77383c63..17546c6d3 100644
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
@@ -21,7 +21,7 @@
#define SP_IS_CLIPPATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_CLIPPATH))
#define SP_IS_CLIPPATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_CLIPPATH))
-class SPClipPathView;
+struct SPClipPathView;
#include "sp-object-group.h"
#include "uri-references.h"
diff --git a/src/sp-desc.h b/src/sp-desc.h
index 8c5a8a663..41ef08020 100644
--- a/src/sp-desc.h
+++ b/src/sp-desc.h
@@ -17,9 +17,6 @@
#define SP_TYPE_DESC (sp_desc_get_type ())
#define SP_IS_DESC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DESC))
-class SPDesc;
-class SPDescClass;
-
struct SPDesc : public SPObject {
};
diff --git a/src/sp-filter-primitive.h b/src/sp-filter-primitive.h
index 60104047e..f06df5611 100644
--- a/src/sp-filter-primitive.h
+++ b/src/sp-filter-primitive.h
@@ -23,8 +23,6 @@
#define SP_IS_FILTER_PRIMITIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_FILTER_PRIMITIVE))
#define SP_IS_FILTER_PRIMITIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_FILTER_PRIMITIVE))
-class SPFilterPrimitive;
-class SPFilterPrimitiveClass;
namespace Inkscape {
namespace Filters {
class Filter;
diff --git a/src/sp-filter.h b/src/sp-filter.h
index a3e7cd35c..5afe47438 100644
--- a/src/sp-filter.h
+++ b/src/sp-filter.h
@@ -36,7 +36,7 @@ class Filter;
} }
class SPFilterReference;
-class SPFilterPrimitive;
+struct SPFilterPrimitive;
struct ltstr {
bool operator()(const char* s1, const char* s2) const;
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index a8de68f9b..627907cef 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -86,15 +86,13 @@ sp_flowregion_dispose(GObject *object)
group->computed.~vector<Shape*>();
}
-static void sp_flowregion_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
+static void
+sp_flowregion_child_added(SPObject *object,
+ Inkscape::XML::Node *child,
+ Inkscape::XML::Node *ref)
{
- SP_ITEM(object);
-
- if (((SPObjectClass *) (sp_flowregion_parent_class))->child_added) {
- (* ((SPObjectClass *) (sp_flowregion_parent_class))->child_added) (object, child, ref);
- }
-
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ SP_OBJECT_CLASS (sp_flowregion_parent_class)->child_added (object, child, ref);
+ object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
/* fixme: hide (Lauris) */
@@ -164,10 +162,10 @@ void SPFlowregion::UpdateComputed(void)
}
}
-static void sp_flowregion_modified(SPObject *object, guint flags)
+static void
+sp_flowregion_modified(SPObject *object,
+ guint flags)
{
- SP_FLOWREGION(object); // ensure it is the proper type.
-
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
@@ -278,15 +276,14 @@ sp_flowregionexclude_dispose(GObject *object)
}
}
-static void sp_flowregionexclude_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
+static void
+sp_flowregionexclude_child_added(SPObject *object,
+ Inkscape::XML::Node *child,
+ Inkscape::XML::Node *ref)
{
- SP_ITEM(object);
-
- if (((SPObjectClass *) (sp_flowregionexclude_parent_class))->child_added) {
- (* ((SPObjectClass *) (sp_flowregionexclude_parent_class))->child_added) (object, child, ref);
- }
+ SP_OBJECT_CLASS (sp_flowregionexclude_parent_class)->child_added (object, child, ref);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
/* fixme: hide (Lauris) */
@@ -354,10 +351,10 @@ void SPFlowregionExclude::UpdateComputed(void)
}
}
-static void sp_flowregionexclude_modified(SPObject *object, guint flags)
+static void
+sp_flowregionexclude_modified(SPObject *object,
+ guint flags)
{
- SP_FLOWREGIONEXCLUDE(object); // Ensure it is the proper type
-
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp
index 4288a5d64..0a649b17f 100644
--- a/src/sp-font-face.cpp
+++ b/src/sp-font-face.cpp
@@ -2,8 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
-
/*
* SVG <font-face> element implementation
*
@@ -849,7 +847,6 @@ static Inkscape::XML::Node *sp_fontface_write(SPObject *object, Inkscape::XML::D
return repr;
}
-#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-font-face.h b/src/sp-font-face.h
index 57702b683..968644556 100644
--- a/src/sp-font-face.h
+++ b/src/sp-font-face.h
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
#ifndef __SP_FONTFACE_H__
#define __SP_FONTFACE_H__
@@ -122,4 +121,3 @@ GType sp_fontface_get_type (void);
G_END_DECLS
#endif //#ifndef __SP_FONTFACE_H__
-#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-font.cpp b/src/sp-font.cpp
index 6ebbd5218..a03890fc7 100644
--- a/src/sp-font.cpp
+++ b/src/sp-font.cpp
@@ -2,8 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
-
/*
* SVG <font> element implementation
*
@@ -250,7 +248,6 @@ static Inkscape::XML::Node *sp_font_write(SPObject *object, Inkscape::XML::Docum
return repr;
}
-#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-glyph-kerning.cpp b/src/sp-glyph-kerning.cpp
index 652d965bb..10884fb81 100644
--- a/src/sp-glyph-kerning.cpp
+++ b/src/sp-glyph-kerning.cpp
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
#define __SP_ANCHOR_C__
/*
@@ -267,7 +266,6 @@ static Inkscape::XML::Node *sp_glyph_kerning_write(SPObject *object, Inkscape::X
return repr;
}
-#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-glyph-kerning.h b/src/sp-glyph-kerning.h
index ce9b4bb15..b7f733cad 100644
--- a/src/sp-glyph-kerning.h
+++ b/src/sp-glyph-kerning.h
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
#ifndef __SP_GLYPH_KERNING_H__
#define __SP_GLYPH_KERNING_H__
@@ -60,4 +59,3 @@ GType sp_glyph_kerning_h_get_type (void);
GType sp_glyph_kerning_v_get_type (void);
#endif //#ifndef __SP_GLYPH_KERNING_H__
-#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp
index e14ef8667..0417ea8c1 100644
--- a/src/sp-glyph.cpp
+++ b/src/sp-glyph.cpp
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
#define __SP_GLYPH_C__
/*
@@ -284,7 +283,6 @@ static Inkscape::XML::Node *sp_glyph_write(SPObject *object, Inkscape::XML::Docu
return repr;
}
-#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-glyph.h b/src/sp-glyph.h
index 316204c23..7556b0e25 100644
--- a/src/sp-glyph.h
+++ b/src/sp-glyph.h
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
#ifndef __SP_GLYPH_H__
#define __SP_GLYPH_H__
@@ -58,4 +57,3 @@ struct SPGlyphClass {
GType sp_glyph_get_type (void);
#endif //#ifndef __SP_GLYPH_H__
-#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-gradient.h b/src/sp-gradient.h
index a21a413f4..57ffa5570 100644
--- a/src/sp-gradient.h
+++ b/src/sp-gradient.h
@@ -27,8 +27,8 @@
#include <stddef.h>
#include <sigc++/connection.h>
-struct SPGradientReference;
-class SPStop;
+class SPGradientReference;
+struct SPStop;
#define SP_TYPE_GRADIENT (SPGradient::getType())
#define SP_GRADIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_GRADIENT, SPGradient))
diff --git a/src/sp-image.h b/src/sp-image.h
index c657d0a2f..d6fc82a59 100644
--- a/src/sp-image.h
+++ b/src/sp-image.h
@@ -20,9 +20,6 @@
#define SP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_IMAGE))
#define SP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_IMAGE))
-class SPImage;
-class SPImageClass;
-
/* SPImage */
#include <gdk-pixbuf/gdk-pixbuf.h>
diff --git a/src/sp-item.h b/src/sp-item.h
index a3ba1dbe2..e65ffc829 100644
--- a/src/sp-item.h
+++ b/src/sp-item.h
@@ -28,8 +28,8 @@
#include "snap-candidate.h"
class SPGuideConstraint;
-struct SPClipPathReference;
-struct SPMaskReference;
+class SPClipPathReference;
+class SPMaskReference;
class SPAvoidRef;
struct SPPrintContext;
diff --git a/src/sp-linear-gradient-fns.h b/src/sp-linear-gradient-fns.h
index 1bdf0b89e..14e575ebe 100644
--- a/src/sp-linear-gradient-fns.h
+++ b/src/sp-linear-gradient-fns.h
@@ -14,7 +14,7 @@ class Node;
}
}
-class SPLinearGradient;
+struct SPLinearGradient;
#define SP_TYPE_LINEARGRADIENT (sp_lineargradient_get_type())
#define SP_LINEARGRADIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_LINEARGRADIENT, SPLinearGradient))
diff --git a/src/sp-mask.h b/src/sp-mask.h
index e249e0c76..97cf95ae1 100644
--- a/src/sp-mask.h
+++ b/src/sp-mask.h
@@ -24,9 +24,7 @@
#define SP_IS_MASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_MASK))
#define SP_IS_MASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_MASK))
-class SPMask;
-class SPMaskClass;
-class SPMaskView;
+struct SPMaskView;
namespace Inkscape {
diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp
index 9978d0a3a..79953b708 100644
--- a/src/sp-metadata.cpp
+++ b/src/sp-metadata.cpp
@@ -116,15 +116,17 @@ static void sp_metadata_release(SPObject *object)
/**
* Sets a specific value in the SPMetadata.
*/
-static void sp_metadata_set(SPObject *object, unsigned int key, const gchar *value)
+static void
+sp_metadata_set(SPObject *object,
+ unsigned int key,
+ const gchar *value)
{
debug("0x%08x %s(%u): '%s'",(unsigned int)object,
sp_attribute_name(key),key,value);
- SP_METADATA(object); // ensures the object is of the proper type.
// see if any parents need this value
- if (reinterpret_cast<SPObjectClass *>(sp_metadata_parent_class)->set) {
- reinterpret_cast<SPObjectClass *>(sp_metadata_parent_class)->set(object, key, value);
+ if (SP_OBJECT_CLASS(sp_metadata_parent_class)->set) {
+ SP_OBJECT_CLASS(sp_metadata_parent_class)->set(object, key, value);
}
}
diff --git a/src/sp-metadata.h b/src/sp-metadata.h
index 82b7c4fc5..454fd8d18 100644
--- a/src/sp-metadata.h
+++ b/src/sp-metadata.h
@@ -21,9 +21,6 @@
#define SP_METADATA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_METADATA, SPMetadata))
#define SP_IS_METADATA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_METADATA))
-class SPMetadata;
-class SPMetadataClass;
-
struct SPMetadata : public SPObject {
};
diff --git a/src/sp-missing-glyph.cpp b/src/sp-missing-glyph.cpp
index bdf993e5b..911c9be92 100644
--- a/src/sp-missing-glyph.cpp
+++ b/src/sp-missing-glyph.cpp
@@ -2,8 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
-
/*
* SVG <missing-glyph> element implementation
*
@@ -164,7 +162,6 @@ static Inkscape::XML::Node *sp_missing_glyph_write(SPObject *object, Inkscape::X
return repr;
}
-#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-missing-glyph.h b/src/sp-missing-glyph.h
index 0b3f74360..7930df513 100644
--- a/src/sp-missing-glyph.h
+++ b/src/sp-missing-glyph.h
@@ -2,7 +2,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
#ifndef __SP_MISSING_GLYPH_H__
#define __SP_MISSING_GLYPH_H__
@@ -40,4 +39,3 @@ struct SPMissingGlyphClass {
GType sp_missing_glyph_get_type (void);
#endif //#ifndef __SP_MISSING_GLYPH_H__
-#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp
index 5158ec70a..e2b601ab9 100644
--- a/src/sp-object-group.cpp
+++ b/src/sp-object-group.cpp
@@ -93,8 +93,6 @@ sp_objectgroup_write(SPObject *object,
Inkscape::XML::Node *repr,
guint flags)
{
- SP_OBJECTGROUP(object); // Ensure we have the right type of SPObject
-
if (flags & SP_OBJECT_WRITE_BUILD) {
if (!repr) {
repr = xml_doc->createElement("svg:g");
@@ -118,7 +116,7 @@ sp_objectgroup_write(SPObject *object,
}
if ((SP_OBJECT_CLASS(sp_objectgroup_parent_class))->write) {
- (SP_OBJECT_CLASS(sp_objectgroup_parent_class))->write(object, xml_doc, repr, flags);
+ SP_OBJECT_CLASS(sp_objectgroup_parent_class)->write(object, xml_doc, repr, flags);
}
return repr;
diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp
index cd332cd34..eba38ec67 100644
--- a/src/sp-object-repr.cpp
+++ b/src/sp-object-repr.cpp
@@ -48,13 +48,11 @@
#include "sp-script.h"
#include "config.h"
-#ifdef ENABLE_SVG_FONTS
- #include "sp-font.h"
- #include "sp-font-face.h"
- #include "sp-glyph.h"
- #include "sp-missing-glyph.h"
- #include "sp-glyph-kerning.h"
-#endif
+#include "sp-font.h"
+#include "sp-font-face.h"
+#include "sp-glyph.h"
+#include "sp-missing-glyph.h"
+#include "sp-glyph-kerning.h"
#include "sp-style-elem.h"
#include "sp-switch.h"
@@ -151,14 +149,12 @@ populate_dtables()
{ "svg:flowRegionExclude", SP_TYPE_FLOWREGIONEXCLUDE },
{ "svg:flowRoot", SP_TYPE_FLOWTEXT },
{ "svg:flowSpan", SP_TYPE_FLOWTSPAN },
-#ifdef ENABLE_SVG_FONTS
{ "svg:font", SP_TYPE_FONT },
{ "svg:font-face", SP_TYPE_FONTFACE },
{ "svg:glyph", SP_TYPE_GLYPH },
{ "svg:missing-glyph", SP_TYPE_MISSING_GLYPH },
{ "svg:hkern", SP_TYPE_HKERN },
{ "svg:vkern", SP_TYPE_VKERN },
-#endif
{ "svg:g", SP_TYPE_GROUP },
{ "svg:feBlend", SP_TYPE_FEBLEND },
{ "svg:feColorMatrix", SP_TYPE_FECOLORMATRIX },
diff --git a/src/sp-offset.h b/src/sp-offset.h
index 4e245f952..904f8607c 100644
--- a/src/sp-offset.h
+++ b/src/sp-offset.h
@@ -22,8 +22,6 @@
#define SP_IS_OFFSET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_OFFSET))
#define SP_IS_OFFSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_OFFSET))
-class SPOffset;
-class SPOffsetClass;
class SPUseReference;
/**
diff --git a/src/sp-pattern.h b/src/sp-pattern.h
index e0a7dce54..bcf8dd520 100644
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
@@ -24,8 +24,7 @@
GType sp_pattern_get_type (void);
-class SPPattern;
-class SPPatternClass;
+struct SPPattern;
#include "svg/svg-length.h"
#include "sp-paint-server.h"
diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp
index e5d89a802..2922b66ed 100644
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
@@ -116,10 +116,11 @@ sp_polyline_set(SPObject *object, unsigned int key, const gchar *value)
}
static Inkscape::XML::Node*
-sp_polyline_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
+sp_polyline_write(SPObject *object,
+ Inkscape::XML::Document *xml_doc,
+ Inkscape::XML::Node *repr,
+ guint flags)
{
- SP_POLYLINE(object);
-
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:polyline");
}
@@ -128,9 +129,7 @@ sp_polyline_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::
repr->mergeFrom(object->getRepr(), "id");
}
- if (((SPObjectClass *) (sp_polyline_parent_class))->write) {
- ((SPObjectClass *) (sp_polyline_parent_class))->write (object, xml_doc, repr, flags);
- }
+ SP_OBJECT_CLASS(sp_polyline_parent_class)->write (object, xml_doc, repr, flags);
return repr;
}
diff --git a/src/sp-radial-gradient-fns.h b/src/sp-radial-gradient-fns.h
index 912508a33..43ed7bf03 100644
--- a/src/sp-radial-gradient-fns.h
+++ b/src/sp-radial-gradient-fns.h
@@ -13,7 +13,7 @@ class Node;
}
}
-class SPRadialGradient;
+struct SPRadialGradient;
#define SP_TYPE_RADIALGRADIENT (sp_radialgradient_get_type())
#define SP_RADIALGRADIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_RADIALGRADIENT, SPRadialGradient))
diff --git a/src/sp-rect.h b/src/sp-rect.h
index 5e518dcd7..1127889c1 100644
--- a/src/sp-rect.h
+++ b/src/sp-rect.h
@@ -26,9 +26,6 @@ G_BEGIN_DECLS
#define SP_IS_RECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_RECT))
#define SP_IS_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_RECT))
-class SPRect;
-class SPRectClass;
-
struct SPRect : public SPShape {
SVGLength x;
SVGLength y;
diff --git a/src/sp-spiral.h b/src/sp-spiral.h
index 6da7c38a4..64cb8521b 100644
--- a/src/sp-spiral.h
+++ b/src/sp-spiral.h
@@ -29,9 +29,6 @@
#define SP_IS_SPIRAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SPIRAL))
#define SP_IS_SPIRAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SPIRAL))
-class SPSpiral;
-class SPSpiralClass;
-
/**
* A spiral Shape.
*
diff --git a/src/sp-star.h b/src/sp-star.h
index bd271ccc0..888eeb8d2 100644
--- a/src/sp-star.h
+++ b/src/sp-star.h
@@ -16,17 +16,12 @@
#include "sp-polygon.h"
-
-
#define SP_TYPE_STAR (sp_star_get_type ())
#define SP_STAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_STAR, SPStar))
#define SP_STAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_STAR, SPStarClass))
#define SP_IS_STAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STAR))
#define SP_IS_STAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STAR))
-class SPStar;
-class SPStarClass;
-
typedef enum {
SP_STAR_POINT_KNOT1,
SP_STAR_POINT_KNOT2
diff --git a/src/sp-stop.h b/src/sp-stop.h
index c3b1e2753..b82dd0b13 100644
--- a/src/sp-stop.h
+++ b/src/sp-stop.h
@@ -14,7 +14,6 @@
#include "color.h"
class SPObjectClass;
-class SPColor;
struct SPStop;
struct SPStopClass;
diff --git a/src/sp-switch.h b/src/sp-switch.h
index f0442f27b..24a204731 100644
--- a/src/sp-switch.h
+++ b/src/sp-switch.h
@@ -35,7 +35,7 @@ public:
CSwitch(SPGroup *group);
virtual ~CSwitch();
- friend class SPSwitch;
+ friend struct SPSwitch;
virtual void onChildAdded(Inkscape::XML::Node *child);
virtual void onChildRemoved(Inkscape::XML::Node *child);
diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp
index d4db403e3..989a5b7f3 100644
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
@@ -307,19 +307,19 @@ static void sp_symbol_update(SPObject *object, SPCtx *ctx, guint flags)
}
}
-static void sp_symbol_modified(SPObject *object, guint flags)
+static void
+sp_symbol_modified(SPObject *object,
+ guint flags)
{
- SP_SYMBOL(object);
-
- if (((SPObjectClass *) (sp_symbol_parent_class))->modified) {
- (* ((SPObjectClass *) (sp_symbol_parent_class))->modified) (object, flags);
- }
+ SP_OBJECT_CLASS(sp_symbol_parent_class)->modified (object, flags);
}
-static Inkscape::XML::Node *sp_symbol_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *
+sp_symbol_write(SPObject *object,
+ Inkscape::XML::Document *xml_doc,
+ Inkscape::XML::Node *repr,
+ guint flags)
{
- SP_SYMBOL(object);
-
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:symbol");
}
@@ -330,9 +330,7 @@ static Inkscape::XML::Node *sp_symbol_write(SPObject *object, Inkscape::XML::Doc
//XML Tree being used directly here while it shouldn't be.
repr->setAttribute("preserveAspectRatio", object->getRepr()->attribute("preserveAspectRatio"));
- if (((SPObjectClass *) (sp_symbol_parent_class))->write) {
- ((SPObjectClass *) (sp_symbol_parent_class))->write (object, xml_doc, repr, flags);
- }
+ SP_OBJECT_CLASS(sp_symbol_parent_class)->write (object, xml_doc, repr, flags);
return repr;
}
@@ -404,3 +402,14 @@ static void sp_symbol_print(SPItem *item, SPPrintContext *ctx)
sp_print_release (ctx);
}
}
+
+/*
+ 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/sp-symbol.h b/src/sp-symbol.h
index 59f343285..10d642e8b 100644
--- a/src/sp-symbol.h
+++ b/src/sp-symbol.h
@@ -21,9 +21,6 @@
#define SP_SYMBOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_SYMBOL, SPSymbol))
#define SP_IS_SYMBOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_SYMBOL))
-class SPSymbol;
-class SPSymbolClass;
-
#include <2geom/affine.h>
#include "svg/svg-length.h"
#include "enums.h"
diff --git a/src/sp-title.h b/src/sp-title.h
index a5f0a2fea..d10d58188 100644
--- a/src/sp-title.h
+++ b/src/sp-title.h
@@ -17,9 +17,6 @@
#define SP_TYPE_TITLE (sp_title_get_type ())
#define SP_IS_TITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_TITLE))
-class SPTitle;
-class SPTitleClass;
-
struct SPTitle : public SPObject {
};
diff --git a/src/sp-tref.h b/src/sp-tref.h
index cc80e48a8..33a8138d1 100644
--- a/src/sp-tref.h
+++ b/src/sp-tref.h
@@ -28,9 +28,6 @@
#define SP_IS_TREF(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_TREF))
#define SP_IS_TREF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_TREF))
-class SPTRef;
-class SPTRef;
-
struct SPTRef : public SPItem {
// Attributes that are used in the same way they would be in a tspan
TextTagAttributes attributes;
diff --git a/src/sp-use.h b/src/sp-use.h
index 399f30a4c..3dd0726aa 100644
--- a/src/sp-use.h
+++ b/src/sp-use.h
@@ -25,8 +25,6 @@
#define SP_IS_USE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_USE))
#define SP_IS_USE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_USE))
-class SPUse;
-class SPUseClass;
class SPUseReference;
struct SPUse : public SPItem {
diff --git a/src/spiral-context.h b/src/spiral-context.h
index 12c0b5d68..7f696dfa2 100644
--- a/src/spiral-context.h
+++ b/src/spiral-context.h
@@ -27,9 +27,6 @@
#define SP_IS_SPIRAL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SPIRAL_CONTEXT))
#define SP_IS_SPIRAL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SPIRAL_CONTEXT))
-class SPSpiralContext;
-class SPSpiralContextClass;
-
struct SPSpiralContext : public SPEventContext {
SPItem * item;
Geom::Point center;
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 061d32554..2015ffd27 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1369,48 +1369,18 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool
Inkscape::XML::Node *parent = item->getRepr()->parent();
float o_width = 0;
- JoinType o_join = join_straight;
- ButtType o_butt = butt_straight;
- float o_miter = 0;
{
SPStyle *i_style = item->style;
- int jointype = i_style->stroke_linejoin.value;
- int captype = i_style->stroke_linecap.value;
o_width = i_style->stroke_width.computed;
- if (jointype == SP_STROKE_LINEJOIN_MITER)
- {
- o_join = join_pointy;
- }
- else if (jointype == SP_STROKE_LINEJOIN_ROUND)
- {
- o_join = join_round;
- }
- else
- {
- o_join = join_straight;
- }
- if (captype == SP_STROKE_LINECAP_SQUARE)
- {
- o_butt = butt_square;
- }
- else if (captype == SP_STROKE_LINECAP_ROUND)
- {
- o_butt = butt_round;
- }
- else
- {
- o_butt = butt_straight;
- }
-
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
o_width = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0, "px");
}
- if (o_width < 0.01)
+ if (o_width < 0.01){
o_width = 0.01;
- o_miter = i_style->stroke_miterlimit.value * o_width;
+ }
}
Path *orig = Path_for_item(item, true, false);
@@ -1508,7 +1478,7 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool
// move to the saved position
repr->setPosition(pos > 0 ? pos : 0);
- SPItem *nitem = (SPItem *) sp_desktop_document(desktop)->getObjectByRepr(repr);
+ SPItem *nitem = reinterpret_cast<SPItem *>(sp_desktop_document(desktop)->getObjectByRepr(repr));
if ( !updating ) {
// delete original, apply the transform to the offset
diff --git a/src/spray-context.h b/src/spray-context.h
index 64368c7a6..781bbcce8 100644
--- a/src/spray-context.h
+++ b/src/spray-context.h
@@ -27,9 +27,6 @@
#define SP_IS_SPRAY_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_SPRAY_CONTEXT))
#define SP_IS_SPRAY_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_SPRAY_CONTEXT))
-class SPSprayContext;
-class SPSprayContextClass;
-
namespace Inkscape {
namespace UI {
namespace Dialog {
diff --git a/src/star-context.h b/src/star-context.h
index 7bcb26c41..4daafb3e4 100644
--- a/src/star-context.h
+++ b/src/star-context.h
@@ -25,9 +25,6 @@
#define SP_IS_STAR_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STAR_CONTEXT))
#define SP_IS_STAR_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STAR_CONTEXT))
-class SPStarContext;
-class SPStarContextClass;
-
struct SPStarContext : public SPEventContext {
SPItem *item;
Geom::Point center;
diff --git a/src/style.cpp b/src/style.cpp
index 650b08aea..eef1c6ee5 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -63,7 +63,7 @@ using std::vector;
#define SP_CSS_FONT_SIZE_DEFAULT 12.0;
-class SPStyleEnum;
+struct SPStyleEnum;
/*#########################
## FORWARD DECLARATIONS
diff --git a/src/style.h b/src/style.h
index 1c8cb4774..0710f5c8e 100644
--- a/src/style.h
+++ b/src/style.h
@@ -134,8 +134,6 @@ struct SPILength {
#define SP_STYLE_FILL_SERVER(s) ((const_cast<SPStyle *> (s))->getFillPaintServer())
#define SP_STYLE_STROKE_SERVER(s) ((const_cast<SPStyle *> (s))->getStrokePaintServer())
-class SVGICCColor;
-
/// Paint type internal to SPStyle.
struct SPIPaint {
unsigned set : 1;
@@ -246,7 +244,7 @@ struct SPILengthOrNormal {
float computed;
};
-class SPTextStyle;
+struct SPTextStyle;
/// Stroke dash details.
class NRVpathDash {
diff --git a/src/svg-view-widget.h b/src/svg-view-widget.h
index d489ccbdd..eab5be75b 100644
--- a/src/svg-view-widget.h
+++ b/src/svg-view-widget.h
@@ -15,8 +15,6 @@
#include "ui/view/view-widget.h"
class SPDocument;
-class SPSVGSPViewWidget;
-class SPSVGSPViewWidgetClass;
#define SP_TYPE_SVG_VIEW_WIDGET (sp_svg_view_widget_get_type ())
#define SP_SVG_VIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SVG_VIEW_WIDGET, SPSVGSPViewWidget))
diff --git a/src/svg-view.h b/src/svg-view.h
index aaaa8a9a5..89f38ad34 100644
--- a/src/svg-view.h
+++ b/src/svg-view.h
@@ -13,7 +13,7 @@
#include "ui/view/view.h"
-class SPCanvasGroup;
+struct SPCanvasGroup;
struct SPCanvasItem;
diff --git a/src/svg/svg-color.h b/src/svg/svg-color.h
index d1c7bee03..b8e317e3b 100644
--- a/src/svg/svg-color.h
+++ b/src/svg/svg-color.h
@@ -3,7 +3,7 @@
#include <glib.h>
-class SVGICCColor;
+struct SVGICCColor;
guint32 sp_svg_read_color(gchar const *str, unsigned int dfl);
guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 def);
diff --git a/src/text-context.h b/src/text-context.h
index 9915583eb..a33c69e0a 100644
--- a/src/text-context.h
+++ b/src/text-context.h
@@ -30,8 +30,6 @@
#define SP_IS_TEXT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_TEXT_CONTEXT))
struct SPCtrlLine;
-class SPTextContext;
-class SPTextContextClass;
struct SPTextContext : public SPEventContext {
diff --git a/src/text-editing.cpp b/src/text-editing.cpp
index 47b4d35ac..401f56bb2 100644
--- a/src/text-editing.cpp
+++ b/src/text-editing.cpp
@@ -69,7 +69,7 @@ void te_update_layout_now_recursive(SPItem *item)
if (SP_IS_GROUP(item)) {
GSList *item_list = sp_item_group_item_list(SP_GROUP(item));
for(GSList* elem = item_list; elem; elem = elem->next) {
- SPItem* list_item = (SPItem*) elem->data;
+ SPItem* list_item = static_cast<SPItem*>(elem->data);
te_update_layout_now_recursive(list_item);
}
g_slist_free(item_list);
diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp
index 9376fad66..1a1426b83 100644
--- a/src/trace/siox.cpp
+++ b/src/trace/siox.cpp
@@ -591,7 +591,7 @@ bool SioxImage::writePPM(const std::string &fileName)
if (!f)
return false;
- fprintf(f, "P6 %d %d 255\n", width, height);
+ fprintf(f, "P6 %u %u 255\n", width, height);
for (unsigned int y=0 ; y<height; y++)
{
@@ -933,7 +933,7 @@ SioxImage Siox::extractForeground(const SioxImage &originalImage,
//trace("### bgSignature:%d", bgSignature.size());
- if (bgSignature.size() < 1)
+ if (bgSignature.empty())
{
// segmentation impossible
error("Signature size is < 1. Segmentation is impossible");
diff --git a/src/tweak-context.h b/src/tweak-context.h
index cb1cf301b..a4567ce6f 100644
--- a/src/tweak-context.h
+++ b/src/tweak-context.h
@@ -21,9 +21,6 @@
#define SP_IS_TWEAK_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_TWEAK_CONTEXT))
#define SP_IS_TWEAK_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_TWEAK_CONTEXT))
-class SPTweakContext;
-class SPTweakContextClass;
-
#define SAMPLING_SIZE 8 /* fixme: ?? */
#define TC_MIN_PRESSURE 0.0
diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp
index faba47769..993f48d8f 100644
--- a/src/ui/dialog/dialog-manager.cpp
+++ b/src/ui/dialog/dialog-manager.cpp
@@ -53,10 +53,7 @@
#include "ui/dialog/export.h"
#include "ui/dialog/xml-tree.h"
#include "ui/dialog/clonetiler.h"
-
-#ifdef ENABLE_SVG_FONTS
#include "ui/dialog/svg-fonts-dialog.h"
-#endif // ENABLE_SVG_FONTS
namespace Inkscape {
namespace UI {
@@ -118,9 +115,7 @@ DialogManager::DialogManager() {
registerFactory("ObjectProperties", &create<ObjectProperties, FloatingBehavior>);
// registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, FloatingBehavior>);
registerFactory("Script", &create<ScriptDialog, FloatingBehavior>);
-#ifdef ENABLE_SVG_FONTS
registerFactory("SvgFontsDialog", &create<SvgFontsDialog, FloatingBehavior>);
-#endif
registerFactory("Swatches", &create<SwatchesPanel, FloatingBehavior>);
registerFactory("Symbols", &create<SymbolsDialog, FloatingBehavior>);
registerFactory("TileDialog", &create<TileDialog, FloatingBehavior>);
@@ -154,9 +149,7 @@ DialogManager::DialogManager() {
registerFactory("ObjectProperties", &create<ObjectProperties, DockBehavior>);
// registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, DockBehavior>);
registerFactory("Script", &create<ScriptDialog, DockBehavior>);
-#ifdef ENABLE_SVG_FONTS
registerFactory("SvgFontsDialog", &create<SvgFontsDialog, DockBehavior>);
-#endif
registerFactory("Swatches", &create<SwatchesPanel, DockBehavior>);
registerFactory("Symbols", &create<SymbolsDialog, DockBehavior>);
registerFactory("TileDialog", &create<TileDialog, DockBehavior>);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 045b34814..d335fb303 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -792,8 +792,6 @@ void DocumentProperties::build_scripting()
_page_external_scripts->table().attach(_external_remove_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0);
#endif
- row++;
-
//# Set up the External Scripts box
_ExternalScriptsListStore = Gtk::ListStore::create(_ExternalScriptsListColumns);
_ExternalScriptsList.set_model(_ExternalScriptsListStore);
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 603786742..086e52a6c 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -22,14 +22,21 @@
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
-#include <gtkmm/label.h>
-#include <gtkmm/widget.h>
-#include <gtkmm/togglebutton.h>
+#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/image.h>
-#include <gtkmm/stockid.h>
+#include <gtkmm/label.h>
+#include <gtkmm/spinbutton.h>
#include <gtkmm/stock.h>
-#include <gtkmm/table.h>
+#include <gtkmm/stockid.h>
+#if WITH_GTKMM_3_0
+# include <gtkmm/grid.h>
+#else
+# include <gtkmm/table.h>
+#endif
+#include <gtkmm/togglebutton.h>
+#include <gtkmm/widget.h>
+
#ifdef WITH_GNOME_VFS
# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
#endif
@@ -126,6 +133,15 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
+/** A list of strings that is used both in the preferences, and in the
+ data fields to describe the various values of \c selection_type. */
+static const char * selection_names[SELECTION_NUMBER_OF] = {
+ "page", "drawing", "selection", "custom"};
+
+/** The names on the buttons for the various selection types. */
+static const char * selection_labels[SELECTION_NUMBER_OF] = {
+ N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
+
Export::Export (void) :
UI::Widget::Panel ("", "/dialogs/export/", SP_VERB_DIALOG_EXPORT),
current_key(SELECTION_PAGE),
diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h
index 5dca9cfa5..b10c98fd2 100644
--- a/src/ui/dialog/export.h
+++ b/src/ui/dialog/export.h
@@ -14,10 +14,12 @@
#include <gtk/gtk.h>
#include <glibmm/i18n.h>
+
+#include <gtkmm/comboboxtext.h>
#include <gtkmm/expander.h>
#include <gtkmm/frame.h>
+#include <gtkmm/progressbar.h>
#include <gtkmm/textview.h>
-#include <gtkmm/comboboxtext.h>
#include "desktop.h"
#include "ui/dialog/desktop-tracker.h"
@@ -25,11 +27,14 @@
#include "ui/widget/button.h"
#include "ui/widget/entry.h"
+namespace Gtk {
+class Dialog;
+}
+
namespace Inkscape {
namespace UI {
namespace Dialog {
-
/** What type of button is being pressed */
enum selection_type {
SELECTION_PAGE = 0, /**< Export the whole page */
@@ -39,16 +44,6 @@ enum selection_type {
SELECTION_NUMBER_OF /**< A counter for the number of these guys */
};
-/** A list of strings that is used both in the preferences, and in the
- data fields to describe the various values of \c selection_type. */
-static const char * selection_names[SELECTION_NUMBER_OF] = {
- "page", "drawing", "selection", "custom"};
-
-/** The names on the buttons for the various selection types. */
-static const char * selection_labels[SELECTION_NUMBER_OF] = {
- N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
-
-
/**
* A dialog widget to export to various image formats such as bitmap and png.
*
diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp
index 8de2da18b..19b873d54 100644
--- a/src/ui/dialog/fill-and-stroke.cpp
+++ b/src/ui/dialog/fill-and-stroke.cpp
@@ -132,14 +132,24 @@ void
FillAndStroke::_layoutPageFill()
{
fillWdgt = manage(sp_fill_style_widget_new());
+
+#if WITH_GTKMM_3_0
_page_fill->table().attach(*fillWdgt, 0, 0, 1, 1);
+#else
+ _page_fill->table().attach(*fillWdgt, 0, 1, 0, 1);
+#endif
}
void
FillAndStroke::_layoutPageStrokePaint()
{
strokeWdgt = manage(sp_stroke_style_paint_widget_new());
+
+#if WITH_GTKMM_3_0
_page_stroke_paint->table().attach(*strokeWdgt, 0, 0, 1, 1);
+#else
+ _page_stroke_paint->table().attach(*strokeWdgt, 0, 1, 0, 1);
+#endif
}
void
@@ -148,7 +158,12 @@ FillAndStroke::_layoutPageStrokeStyle()
//Gtk::Widget *strokeStyleWdgt = manage(Glib::wrap(sp_stroke_style_line_widget_new()));
//Gtk::Widget *strokeStyleWdgt = static_cast<Gtk::Widget *>(sp_stroke_style_line_widget_new());
strokeStyleWdgt = sp_stroke_style_line_widget_new();
+
+#if WITH_GTKMM_3_0
_page_stroke_style->table().attach(*strokeStyleWdgt, 0, 0, 1, 1);
+#else
+ _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 1, 0, 1);
+#endif
}
void
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index d3ce99b00..def7b5bdb 100644
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
@@ -15,7 +15,10 @@
#endif
#include "find.h"
+
+#include <gtkmm/entry.h>
#include <gtkmm/widget.h>
+
#include "verbs.h"
#include "message-stack.h"
@@ -56,6 +59,7 @@
#include "xml/attribute-record.h"
#include <glibmm/i18n.h>
+#include <glibmm/regex.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h
index 77a6c9d02..14d54b8d4 100644
--- a/src/ui/dialog/find.h
+++ b/src/ui/dialog/find.h
@@ -21,7 +21,11 @@
#include "ui/widget/entry.h"
#include "ui/widget/frame.h"
#include <glib.h>
-#include <gtkmm.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"
diff --git a/src/ui/dialog/glyphs.h b/src/ui/dialog/glyphs.h
index 6571af0a4..3d0571244 100644
--- a/src/ui/dialog/glyphs.h
+++ b/src/ui/dialog/glyphs.h
@@ -20,7 +20,7 @@ class Label;
class ListStore;
}
-class SPFontSelector;
+struct SPFontSelector;
class font_instance;
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index de213ca85..801ab2922 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -20,7 +20,11 @@
#include <gtkmm/buttonbox.h>
#include <boost/scoped_ptr.hpp>
#include <glib.h>
+
#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/timer.h>
+
#include <gtkmm/alignment.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/frame.h>
diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp
index 9c9f7faa3..82e65435d 100644
--- a/src/ui/dialog/input.cpp
+++ b/src/ui/dialog/input.cpp
@@ -17,7 +17,9 @@
#include <glib/gprintf.h>
#include <glibmm/i18n.h>
+
#include <gtkmm/alignment.h>
+#include <gtkmm/buttonbox.h>
#include <gtkmm/cellrenderercombo.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/comboboxtext.h>
diff --git a/src/ui/dialog/layer-properties.h b/src/ui/dialog/layer-properties.h
index 9de303f89..0e2f8ed94 100644
--- a/src/ui/dialog/layer-properties.h
+++ b/src/ui/dialog/layer-properties.h
@@ -80,9 +80,9 @@ protected:
void perform(LayerPropertiesDialog &dialog);
};
- friend class Rename;
- friend class Create;
- friend class Move;
+ friend struct Rename;
+ friend struct Create;
+ friend struct Move;
Strategy *_strategy;
SPDesktop *_desktop;
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index 114204961..8a2b0299a 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -38,6 +38,12 @@
#include "sp-item.h"
#include <glibmm/i18n.h>
+#if WITH_GTKMM_3_0
+# include <gtkmm/grid.h>
+#else
+# include <gtkmm/table.h>
+#endif
+
namespace Inkscape {
namespace UI {
diff --git a/src/ui/dialog/object-properties.h b/src/ui/dialog/object-properties.h
index b49293ea1..624a18246 100644
--- a/src/ui/dialog/object-properties.h
+++ b/src/ui/dialog/object-properties.h
@@ -35,6 +35,8 @@
#include "ui/widget/panel.h"
#include "ui/widget/frame.h"
+
+#include <gtkmm/checkbutton.h>
#include <gtkmm/entry.h>
#include <gtkmm/expander.h>
#include <gtkmm/frame.h>
@@ -46,6 +48,14 @@ class SPAttributeTable;
class SPDesktop;
class SPItem;
+namespace Gtk {
+#if WITH_GTKMM_3_0
+class Grid;
+#else
+class Table;
+#endif
+}
+
namespace Inkscape {
namespace UI {
namespace Dialog {
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 0da39dd73..bce63093d 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -15,8 +15,6 @@
# include <config.h>
#endif
-#ifdef ENABLE_SVG_FONTS
-
#include "svg-fonts-dialog.h"
#include "document-private.h"
#include "document-undo.h"
@@ -945,8 +943,6 @@ SvgFontsDialog::~SvgFontsDialog(){}
} // namespace UI
} // namespace Inkscape
-#endif //#ifdef ENABLE_SVG_FONTS
-
/*
Local Variables:
mode:c++
diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h
index 9be984820..01f70654a 100644
--- a/src/ui/dialog/svg-fonts-dialog.h
+++ b/src/ui/dialog/svg-fonts-dialog.h
@@ -34,8 +34,8 @@ class HScale;
#endif
}
-class SPGlyph;
-class SPGlyphKerning;
+struct SPGlyph;
+struct SPGlyphKerning;
class SvgFont;
class SvgFontDrawingArea : Gtk::DrawingArea{
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index a71227861..67c6578f9 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -57,6 +57,7 @@ extern "C" {
#include "widgets/icon.h"
#include "widgets/font-selector.h"
#include <glibmm/i18n.h>
+#include <glibmm/markup.h>
#include "unit-constants.h"
diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h
index 3fdeea05d..f27fdfc87 100644
--- a/src/ui/dialog/text-edit.h
+++ b/src/ui/dialog/text-edit.h
@@ -30,7 +30,7 @@
#include "ui/dialog/desktop-tracker.h"
class SPItem;
-class SPFontSelector;
+struct SPFontSelector;
class font_instance;
class SPCSSAttr;
diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp
index 1ad827a56..bd467555e 100644
--- a/src/ui/dialog/tracedialog.cpp
+++ b/src/ui/dialog/tracedialog.cpp
@@ -20,6 +20,7 @@
#include <gtkmm/frame.h>
#include "ui/widget/spinbutton.h"
#include "ui/widget/frame.h"
+#include <gtkmm/radiobutton.h>
#include <gtkmm/stock.h>
#include <gtk/gtk.h> //for GTK_RESPONSE* types
diff --git a/src/ui/dialog/xml-tree.h b/src/ui/dialog/xml-tree.h
index 0a6e3a786..58ef3aef8 100644
--- a/src/ui/dialog/xml-tree.h
+++ b/src/ui/dialog/xml-tree.h
@@ -29,7 +29,7 @@
#include "message.h"
class SPDesktop;
-struct SPObject;
+class SPObject;
struct SPXMLViewAttrList;
struct SPXMLViewContent;
struct SPXMLViewTree;
diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp
index 8c4924f26..069dcc67b 100644
--- a/src/ui/tool/control-point.cpp
+++ b/src/ui/tool/control-point.cpp
@@ -7,8 +7,8 @@
*/
#include <iostream>
+#include <gdk/gdkkeysyms.h>
#include <gdkmm.h>
-#include <gtkmm.h>
#include <2geom/point.h>
#include "desktop.h"
#include "desktop-handles.h"
diff --git a/src/ui/tool/node-tool.h b/src/ui/tool/node-tool.h
index 49b1496d4..bc5267bb2 100644
--- a/src/ui/tool/node-tool.h
+++ b/src/ui/tool/node-tool.h
@@ -25,9 +25,6 @@
#define INK_IS_NODE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INK_TYPE_NODE_TOOL))
#define INK_IS_NODE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INK_TYPE_NODE_TOOL))
-class InkNodeTool;
-class InkNodeToolClass;
-
namespace Inkscape {
namespace Display {
diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h
index a235a3b05..8bc097ed6 100644
--- a/src/ui/tool/path-manipulator.h
+++ b/src/ui/tool/path-manipulator.h
@@ -22,7 +22,7 @@
struct SPCanvasItem;
class SPCurve;
-struct SPPath;
+class SPPath;
namespace Inkscape {
namespace XML { class Node; }
diff --git a/src/ui/widget/entry.cpp b/src/ui/widget/entry.cpp
index 173e014d9..64d28119a 100644
--- a/src/ui/widget/entry.cpp
+++ b/src/ui/widget/entry.cpp
@@ -13,6 +13,8 @@
#include "entry.h"
+#include <gtkmm/entry.h>
+
namespace Inkscape {
namespace UI {
namespace Widget {
diff --git a/src/ui/widget/entry.h b/src/ui/widget/entry.h
index 53b848fc9..de5cceadd 100644
--- a/src/ui/widget/entry.h
+++ b/src/ui/widget/entry.h
@@ -11,10 +11,10 @@
#define INKSCAPE_UI_WIDGET_ENTRY__H
#include "labelled.h"
-#include <gtkmm.h>
-#include <gtkmm/entry.h>
-#include <gtkmm/comboboxtext.h>
+namespace Gtk {
+class Entry;
+}
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h
index cf736d8a1..a04666651 100644
--- a/src/ui/widget/frame.h
+++ b/src/ui/widget/frame.h
@@ -10,11 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_FRAME_H
#define INKSCAPE_UI_WIDGET_FRAME_H
-#include <gtkmm.h>
-
-namespace Gtk {
-class Frame;
-}
+#include <gtkmm/alignment.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/label.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h
index 2a7843a51..fa35b815e 100644
--- a/src/ui/widget/registered-widget.h
+++ b/src/ui/widget/registered-widget.h
@@ -32,7 +32,7 @@
#include <gtkmm/checkbutton.h>
-class SPUnit;
+struct SPUnit;
class SPDocument;
namespace Gtk {
diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h
index 6d5222429..9b78cb17f 100644
--- a/src/ui/widget/selected-style.h
+++ b/src/ui/widget/selected-style.h
@@ -40,7 +40,7 @@
#include "helper/units.h"
class SPDesktop;
-class SPUnit;
+struct SPUnit;
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h
index 2b9c32b2e..d7bab3732 100644
--- a/src/ui/widget/style-swatch.h
+++ b/src/ui/widget/style-swatch.h
@@ -26,7 +26,7 @@
#include "button.h"
#include "preferences.h"
-class SPUnit;
+struct SPUnit;
struct SPStyle;
class SPCSSAttr;
diff --git a/src/undo-stack-observer.h b/src/undo-stack-observer.h
index f4d67e841..1057ace8f 100644
--- a/src/undo-stack-observer.h
+++ b/src/undo-stack-observer.h
@@ -14,7 +14,7 @@
namespace Inkscape {
-class Event;
+struct Event;
/**
* Observes changes made to the undo and redo stacks.
diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h
index 1ed6c6c46..6719691d1 100644
--- a/src/widgets/gradient-vector.h
+++ b/src/widgets/gradient-vector.h
@@ -33,7 +33,7 @@
class SPDocument;
class SPObject;
class SPGradient;
-class SPStop;
+struct SPStop;
struct SPGradientVectorSelector {
GtkVBox vbox;
diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h
index d3b3f4116..a66758434 100644
--- a/src/widgets/paint-selector.h
+++ b/src/widgets/paint-selector.h
@@ -22,7 +22,7 @@
class SPGradient;
class SPDesktop;
-class SPPattern;
+struct SPPattern;
struct SPStyle;
#define SP_TYPE_PAINT_SELECTOR (sp_paint_selector_get_type ())
diff --git a/src/widgets/swatch-selector.h b/src/widgets/swatch-selector.h
index b97aac4f1..4b7aa483f 100644
--- a/src/widgets/swatch-selector.h
+++ b/src/widgets/swatch-selector.h
@@ -1,14 +1,12 @@
#ifndef SEEN_SP_SWATCH_SELECTOR_H
#define SEEN_SP_SWATCH_SELECTOR_H
-
-
#include <gtkmm/box.h>
class SPDocument;
class SPGradient;
-class SPColorSelector;
-class SPGradientSelector;
+struct SPColorSelector;
+struct SPGradientSelector;
namespace Inkscape
{
diff --git a/src/xml/composite-node-observer.h b/src/xml/composite-node-observer.h
index 96825d607..3e4b1673a 100644
--- a/src/xml/composite-node-observer.h
+++ b/src/xml/composite-node-observer.h
@@ -23,7 +23,7 @@ namespace Inkscape {
namespace XML {
-class NodeEventVector;
+struct NodeEventVector;
/**
* @brief An observer that relays notifications to multiple other observers
diff --git a/src/zoom-context.h b/src/zoom-context.h
index e36dc3fbe..c09b5a1b3 100644
--- a/src/zoom-context.h
+++ b/src/zoom-context.h
@@ -19,9 +19,6 @@
#define SP_ZOOM_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_ZOOM_CONTEXT, SPZoomContext))
#define SP_IS_ZOOM_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_ZOOM_CONTEXT))
-class SPZoomContext;
-class SPZoomContextClass;
-
struct SPZoomContext {
SPEventContext event_context;
SPCanvasItem *grabbed;