From ca96c851e8a89543a49a96f2b02cd43fe3fb124c Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Thu, 16 Jan 2014 20:43:44 +0100 Subject: Fixing edit-clear icon in the star tool (partial fix for Bug #1269698). Fixed bugs: - https://launchpad.net/bugs/1269698 (bzr r12941) --- src/widgets/star-toolbar.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp index 1691a9b25..28b2c7e0c 100644 --- a/src/widgets/star-toolbar.cpp +++ b/src/widgets/star-toolbar.cpp @@ -568,13 +568,14 @@ void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje { /* Reset */ { - GtkAction* act = gtk_action_new( "StarResetAction", + InkAction* inky = ink_action_new( "StarResetAction", _("Defaults"), _("Reset shape parameters to defaults (use Inkscape Preferences > Tools to change defaults)"), - INKSCAPE_ICON("edit-clear")); - g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_stb_defaults), holder ); - gtk_action_group_add_action( mainActions, act ); - gtk_action_set_sensitive( act, TRUE ); + INKSCAPE_ICON("edit-clear"), + Inkscape::ICON_SIZE_SMALL_TOOLBAR); + g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_stb_defaults), holder ); + gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); + gtk_action_set_sensitive( GTK_ACTION(inky), TRUE ); } } -- cgit v1.2.3 From 0eb7cf56b9229a6bcc6c79574d2ac58413c46049 Mon Sep 17 00:00:00 2001 From: kris-degussem <> Date: Fri, 17 Jan 2014 20:27:53 +0100 Subject: i18n. Fix for Bug #1269943 (Context for message Offset:). Fixed bugs: - https://launchpad.net/bugs/1269943 (bzr r12952) --- src/widgets/gradient-toolbar.cpp | 2 +- src/widgets/gradient-vector.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index 8fa29e60a..4bed3101d 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -1171,7 +1171,7 @@ void sp_gradient_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, { EgeAdjustmentAction* eact = 0; eact = create_adjustment_action( "GradientEditOffsetAction", - _("Offset"), _("Offset:"), _("Offset of selected stop"), + _("Offset"), C_("Gradient", "Offset:"), _("Offset of selected stop"), "/tools/gradient/stopoffset", 0, GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 1.0, 0.01, 0.1, diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index e9fc426f6..17ac887c4 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -923,7 +923,7 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s #endif /* Label */ - GtkWidget *l = gtk_label_new(_("Offset:")); + GtkWidget *l = gtk_label_new(C_("Gradient","Offset:")); gtk_misc_set_alignment(GTK_MISC(l), 1.0, 0.5); gtk_box_pack_start(GTK_BOX(hb),l, FALSE, FALSE, AUX_BETWEEN_BUTTON_GROUPS); gtk_widget_show(l); -- cgit v1.2.3 From 1534dc84087db1b26f1e86e79436eb63f3dffd3f Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 20 Jan 2014 20:56:38 +0100 Subject: cppcheck stuff (bzr r12963) --- src/widgets/icon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index 768a835c9..a9c30ee8f 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -1310,11 +1310,11 @@ guchar *IconImpl::load_svg_pixels(std::list const &names, } static void addToIconSet(GdkPixbuf* pb, gchar const* name, GtkIconSize lsize, unsigned psize) { - static bool dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpGtk"); Glib::RefPtr icon_theme = Gtk::IconTheme::get_default(); bool icon_found = icon_theme->has_icon(name); if ( !icon_found ) { Gtk::IconTheme::add_builtin_icon( name, psize, Glib::wrap(pb) ); + static bool dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpGtk"); if (dump) { g_message(" set in a builtin for %s:%d:%d", name, lsize, psize); } @@ -1354,7 +1354,6 @@ static std::string getDestDir( unsigned psize ) bool IconImpl::prerenderIcon(gchar const *name, GtkIconSize lsize, unsigned psize) { bool loadNeeded = false; - static bool dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpGtk"); static bool useCache = Inkscape::Preferences::get()->getBool("/debug/icons/useCache", true); static bool cacheValidated = false; if (!cacheValidated) { @@ -1366,6 +1365,7 @@ bool IconImpl::prerenderIcon(gchar const *name, GtkIconSize lsize, unsigned psiz Glib::ustring key = icon_cache_key(name, psize); if ( !get_cached_pixbuf(key) ) { + static bool dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpGtk"); if ((internalNames.find(name) != internalNames.end()) || (!gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), name))) { if (dump) { -- cgit v1.2.3 From d4ba8eaa4a621ac60d99a4aad7531d080cece2cd Mon Sep 17 00:00:00 2001 From: David Mathog Date: Sat, 8 Feb 2014 09:44:12 +0100 Subject: DrawingContext: change variable names ct to dc (bug #1272073) Fixed bugs: - https://launchpad.net/bugs/1272073 (bzr r13009) --- src/widgets/icon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index a9c30ee8f..eb16cfece 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -1190,9 +1190,9 @@ sp_icon_doc_icon( SPDocument *doc, Inkscape::Drawing &drawing, /* Render */ cairo_surface_t *s = cairo_image_surface_create_for_data(px, CAIRO_FORMAT_ARGB32, psize, psize, stride); - Inkscape::DrawingContext ct(s, ua.min()); + Inkscape::DrawingContext dc(s, ua.min()); - drawing.render(ct, ua); + drawing.render(dc, ua); cairo_surface_destroy(s); // convert to GdkPixbuf format -- cgit v1.2.3 From 21fa74799d08edc54fa6506e3f78fab04215241a Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Wed, 26 Feb 2014 20:31:49 +0100 Subject: Added template functions as a casting-macro replacement. (bzr r13061) --- src/widgets/pencil-toolbar.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp index e8296f735..7ad23bbbd 100644 --- a/src/widgets/pencil-toolbar.cpp +++ b/src/widgets/pencil-toolbar.cpp @@ -102,8 +102,16 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl) // in pen tool we have more options than in pencil tool; if one of them was chosen, we do any // preparatory work here - if (SP_IS_PEN_CONTEXT(desktop->event_context)) { - Inkscape::UI::Tools::PenTool *pc = SP_PEN_CONTEXT(desktop->event_context); + //if (SP_IS_PEN_CONTEXT(desktop->event_context)) { + // Inkscape::UI::Tools::PenTool *pc = SP_PEN_CONTEXT(desktop->event_context); + // sp_pen_context_set_polyline_mode(pc); + //} + + using namespace Inkscape::UI; + using Inkscape::UI::Tools::PenTool; + + if (Tool::is_a(desktop->event_context)) { + PenTool* pc = Tool::to(desktop->event_context); sp_pen_context_set_polyline_mode(pc); } } -- cgit v1.2.3 From e244543e8df2d19c706c349139922189f01b63f8 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Thu, 27 Feb 2014 02:01:31 +0100 Subject: Move extended input events stuff from desktop-widget.cpp to sp-canvas.cpp, where it belongs (bzr r13062) --- src/widgets/desktop-widget.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index cf6a908b6..583dbec85 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -552,11 +552,6 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) GtkStyle *style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(dtw->canvas))); style->bg[GTK_STATE_NORMAL] = style->white; gtk_widget_set_style (GTK_WIDGET (dtw->canvas), style); - - // TODO: Extension event stuff has been removed from public API in GTK+ 3 - // Need to check that this hasn't broken anything - if ( prefs->getBool("/options/useextinput/value", true) ) - gtk_widget_set_extension_events(GTK_WIDGET (dtw->canvas) , GDK_EXTENSION_EVENTS_ALL); //set extension events for tablets, unless disabled in preferences #endif g_signal_connect (G_OBJECT (dtw->canvas), "event", G_CALLBACK (sp_desktop_widget_event), dtw); -- cgit v1.2.3 From e31e8d77903bd363901723b153fe901fa2e13c8f Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Fri, 28 Feb 2014 16:24:40 +0100 Subject: Spray tool: * Partial patch (in sp_spray_dilate) for crashes explained in Bug #1274831. * Some minor style fixes (indentation). * Due to some remaining crashes, the Single path mode is disabled in Inkscape 0.91. (bzr r13077) --- src/widgets/spray-toolbar.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp index 2a8c85475..49406d564 100644 --- a/src/widgets/spray-toolbar.cpp +++ b/src/widgets/spray-toolbar.cpp @@ -60,6 +60,10 @@ using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; +// Disabled in 0.91 because of Bug #1274831 (crash, spraying an object +// with the mode: spray object in single path) +// Please enable again when working on 1.0 +//#define ENABLE_SPRAY_MODE_SINGLE_PATH //######################## //## Spray ## @@ -186,14 +190,14 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj 1, _("Spray clones of the initial selection"), 2, INKSCAPE_ICON("spray-mode-clone"), -1 ); - +#ifdef ENABLE_SPRAY_MODE_SINGLE_PATH gtk_list_store_append( model, &iter ); gtk_list_store_set( model, &iter, 0, _("Spray single path"), 1, _("Spray objects in a single path"), 2, INKSCAPE_ICON("spray-mode-union"), -1 ); - +#endif EgeSelectOneAction* act = ege_select_one_action_new( "SprayModeAction", _("Mode"), (""), NULL, GTK_TREE_MODEL(model) ); g_object_set( act, "short_label", _("Mode:"), NULL ); gtk_action_group_add_action( mainActions, GTK_ACTION(act) ); -- cgit v1.2.3 From 3aa344e9a40d97db7cd5a89671896bab70da33a4 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 2 Mar 2014 01:31:12 +0100 Subject: Added some consts. Turned functions to member functions. (bzr r13089) --- src/widgets/pencil-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp index 7ad23bbbd..eb55f9219 100644 --- a/src/widgets/pencil-toolbar.cpp +++ b/src/widgets/pencil-toolbar.cpp @@ -112,7 +112,7 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl) if (Tool::is_a(desktop->event_context)) { PenTool* pc = Tool::to(desktop->event_context); - sp_pen_context_set_polyline_mode(pc); + pc->setPolylineMode(); } } -- cgit v1.2.3 From 7825ad6d1ac979689ac79d6497079aec36c6ae4b Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 2 Mar 2014 23:58:28 +0100 Subject: Fixed includes for tools. (bzr r13097) --- src/widgets/arc-toolbar.cpp | 42 ++++++++++--------------- src/widgets/arc-toolbar.h | 4 ++- src/widgets/box3d-toolbar.cpp | 42 ++++++++----------------- src/widgets/box3d-toolbar.h | 5 ++- src/widgets/calligraphy-toolbar.cpp | 31 +++++-------------- src/widgets/calligraphy-toolbar.h | 4 ++- src/widgets/connector-toolbar.cpp | 51 +++++++++++-------------------- src/widgets/connector-toolbar.h | 4 ++- src/widgets/dropper-toolbar.cpp | 34 +++------------------ src/widgets/dropper-toolbar.h | 4 ++- src/widgets/eraser-toolbar.cpp | 39 +++++++----------------- src/widgets/eraser-toolbar.h | 4 ++- src/widgets/gradient-toolbar.cpp | 54 ++++++++++++-------------------- src/widgets/gradient-toolbar.h | 4 ++- src/widgets/lpe-toolbar.cpp | 51 +++++++++---------------------- src/widgets/lpe-toolbar.h | 4 ++- src/widgets/measure-toolbar.cpp | 31 +++++-------------- src/widgets/measure-toolbar.h | 4 ++- src/widgets/mesh-toolbar.h | 4 ++- src/widgets/node-toolbar.cpp | 47 +++++++++++----------------- src/widgets/node-toolbar.h | 4 ++- src/widgets/paintbucket-toolbar.cpp | 39 ++++++------------------ src/widgets/paintbucket-toolbar.h | 4 ++- src/widgets/pencil-toolbar.cpp | 51 +++++++------------------------ src/widgets/pencil-toolbar.h | 4 ++- src/widgets/rect-toolbar.cpp | 43 +++++++++++--------------- src/widgets/rect-toolbar.h | 4 ++- src/widgets/select-toolbar.cpp | 54 ++++++++++++++------------------ src/widgets/select-toolbar.h | 4 ++- src/widgets/spiral-toolbar.cpp | 43 ++++++++++---------------- src/widgets/spiral-toolbar.h | 4 ++- src/widgets/spray-toolbar.cpp | 34 ++++++--------------- src/widgets/spray-toolbar.h | 4 ++- src/widgets/star-toolbar.cpp | 40 ++++++++++-------------- src/widgets/star-toolbar.h | 4 ++- src/widgets/text-toolbar.cpp | 61 +++++++++++++++---------------------- src/widgets/text-toolbar.h | 4 ++- src/widgets/tweak-toolbar.cpp | 30 +++++------------- src/widgets/tweak-toolbar.h | 4 ++- src/widgets/zoom-toolbar.cpp | 30 ------------------ src/widgets/zoom-toolbar.h | 4 ++- 41 files changed, 326 insertions(+), 606 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp index 69b540762..ca6810c81 100644 --- a/src/widgets/arc-toolbar.cpp +++ b/src/widgets/arc-toolbar.cpp @@ -28,37 +28,27 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" #include "arc-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" - -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "ege-adjustment-action.h" +#include "ege-output-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "mod360.h" +#include "preferences.h" +#include "selection.h" +#include "sp-ellipse.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../sp-ellipse.h" -#include "../mod360.h" +#include "verbs.h" +#include "widgets/spinbutton-events.h" +#include "xml/node-event-vector.h" +#include "xml/repr.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; diff --git a/src/widgets/arc-toolbar.h b/src/widgets/arc-toolbar.h index dba2fcd5a..ca1319631 100644 --- a/src/widgets/arc-toolbar.h +++ b/src/widgets/arc-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_arc_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_ARC_TOOLBAR_H */ diff --git a/src/widgets/box3d-toolbar.cpp b/src/widgets/box3d-toolbar.cpp index 32516bbfb..6d6b86c4d 100644 --- a/src/widgets/box3d-toolbar.cpp +++ b/src/widgets/box3d-toolbar.cpp @@ -28,40 +28,24 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" #include "box3d-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" +#include "box3d.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" - -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "document.h" +#include "ege-adjustment-action.h" +#include "ink-action.h" +#include "inkscape.h" +#include "persp3d.h" +#include "selection.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/uxmanager.h" - -#include "../ui/icon-names.h" - -#include "ui/tools/pen-tool.h" - -#include "ui/tools/box3d-tool.h" -#include "../box3d.h" +#include "verbs.h" +#include "xml/node-event-vector.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; diff --git a/src/widgets/box3d-toolbar.h b/src/widgets/box3d-toolbar.h index d80934b01..cba9ca2d8 100644 --- a/src/widgets/box3d-toolbar.h +++ b/src/widgets/box3d-toolbar.h @@ -27,9 +27,12 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include + class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_BOX3D_TOOLBAR_H */ diff --git a/src/widgets/calligraphy-toolbar.cpp b/src/widgets/calligraphy-toolbar.cpp index 73484d1b5..9c0393cd9 100644 --- a/src/widgets/calligraphy-toolbar.cpp +++ b/src/widgets/calligraphy-toolbar.cpp @@ -30,34 +30,17 @@ #include "ui/dialog/calligraphic-profile-rename.h" #include - -#include "toolbox.h" #include "calligraphy-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" - -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "ui/widget/spinbutton.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -//#include "../xml/attribute-record.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/uxmanager.h" -#include "../ui/icon-names.h" - -#include "ui/tools/pen-tool.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; diff --git a/src/widgets/calligraphy-toolbar.h b/src/widgets/calligraphy-toolbar.h index 9650e03b1..e3caa19ee 100644 --- a/src/widgets/calligraphy-toolbar.h +++ b/src/widgets/calligraphy-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); void update_presets_list(GObject *tbl); diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp index 7230f521c..a0965721f 100644 --- a/src/widgets/connector-toolbar.cpp +++ b/src/widgets/connector-toolbar.cpp @@ -28,48 +28,33 @@ # include "config.h" #endif - -#include "ui/widget/spinbutton.h" -#include "toolbox.h" #include "connector-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" +#include "conn-avoid-ref.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" - -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../sp-namedview.h" -#include "../conn-avoid-ref.h" +#include "ege-adjustment-action.h" +#include "graphlayout.h" +#include "ink-action.h" +#include "inkscape.h" +#include "preferences.h" +#include "selection.h" +#include "sp-namedview.h" +#include "sp-path.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/tools/connector-tool.h" -#include "../graphlayout.h" -#include "../sp-path.h" - +#include "ui/uxmanager.h" +#include "verbs.h" +#include "widgets/spinbutton-events.h" +#include "xml/node-event-vector.h" +#include "xml/repr.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; - - //######################### //## Connector ## //######################### diff --git a/src/widgets/connector-toolbar.h b/src/widgets/connector-toolbar.h index 2ab26e56c..180c11e0f 100644 --- a/src/widgets/connector-toolbar.h +++ b/src/widgets/connector-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_connector_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_CONNECTOR_TOOLBAR_H */ diff --git a/src/widgets/dropper-toolbar.cpp b/src/widgets/dropper-toolbar.cpp index 991489b86..478d0c1a4 100644 --- a/src/widgets/dropper-toolbar.cpp +++ b/src/widgets/dropper-toolbar.cpp @@ -28,40 +28,16 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "dropper-toolbar.h" -#include "../desktop.h" -#include "../document-private.h" +#include "dropper-toolbar.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" +#include "ege-output-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "widgets/spinbutton-events.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../tools-switch.h" - -using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; -using Inkscape::UI::ToolboxFactory; -using Inkscape::UI::PrefPusher; - //######################## //## Dropper ## diff --git a/src/widgets/dropper-toolbar.h b/src/widgets/dropper-toolbar.h index aa2116daf..8d5ea2d0a 100644 --- a/src/widgets/dropper-toolbar.h +++ b/src/widgets/dropper-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_dropper_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_DROPPER_TOOLBAR_H */ diff --git a/src/widgets/eraser-toolbar.cpp b/src/widgets/eraser-toolbar.cpp index 5e09521c9..14e7cbf4e 100644 --- a/src/widgets/eraser-toolbar.cpp +++ b/src/widgets/eraser-toolbar.cpp @@ -28,37 +28,20 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "eraser-toolbar.h" -#include "calligraphy-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "eraser-toolbar.h" +#include "calligraphy-toolbar.h" // TODO: needed for update_presets_list +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" - - -using Inkscape::UI::UXManager; +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "toolbox.h" +#include "ui/icon-names.h" + using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; diff --git a/src/widgets/eraser-toolbar.h b/src/widgets/eraser-toolbar.h index b1bb3a3fa..3c88d344e 100644 --- a/src/widgets/eraser-toolbar.h +++ b/src/widgets/eraser-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_eraser_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_ERASOR_TOOLBAR_H */ diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index 4bed3101d..4fda44c8d 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -17,47 +17,31 @@ #endif #include "ui/widget/color-preview.h" -#include "verbs.h" - -#include "macros.h" -#include "widgets/button.h" -#include "widgets/widget-sizes.h" -#include "widgets/spw-utilities.h" -#include "widgets/spinbutton-events.h" -#include "widgets/gradient-vector.h" -#include "widgets/gradient-image.h" -#include "style.h" - -#include "preferences.h" -#include "document-private.h" -#include "document-undo.h" -#include "desktop.h" -#include "desktop-handles.h" #include - -#include "ui/tools/gradient-tool.h" +#include "desktop-handles.h" +#include "desktop.h" +#include "document-undo.h" +#include "document.h" +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "gradient-chemistry.h" #include "gradient-drag.h" +#include "gradient-toolbar.h" +#include "ink-action.h" +#include "macros.h" +#include "preferences.h" +#include "selection.h" +#include "sp-defs.h" #include "sp-linear-gradient.h" #include "sp-radial-gradient.h" -#include "gradient-chemistry.h" -#include "gradient-selector.h" -#include "selection.h" -#include "ui/icon-names.h" - -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - #include "sp-stop.h" -#include "svg/css-ostringstream.h" -#include "svg/svg-color.h" -#include "desktop-style.h" -#include "ui/tools/gradient-tool.h" -#include "gradient-toolbar.h" - +#include "style.h" #include "toolbox.h" +#include "ui/icon-names.h" +#include "ui/tools/gradient-tool.h" +#include "verbs.h" +#include "widgets/gradient-image.h" +#include "widgets/gradient-vector.h" using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; diff --git a/src/widgets/gradient-toolbar.h b/src/widgets/gradient-toolbar.h index 74cfb2886..38afb743b 100644 --- a/src/widgets/gradient-toolbar.h +++ b/src/widgets/gradient-toolbar.h @@ -12,9 +12,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_gradient_toolbox_prep(SPDesktop * /*desktop*/, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_GRADIENT_TOOLBAR_H */ diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp index 559f3fc3c..e9e5af912 100644 --- a/src/widgets/lpe-toolbar.cpp +++ b/src/widgets/lpe-toolbar.cpp @@ -29,50 +29,29 @@ #endif #include "live_effects/lpe-line_segment.h" - -#include "toolbox.h" #include "lpe-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" +#include "connection-pool.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../connection-pool.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "ui/widget/spinbutton.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "../helper/action.h" -#include "../helper/action-context.h" -#include "util/units.h" -#include "ui/widget/unit-tracker.h" -#include "ui/tools/pen-tool.h" -#include "../sp-namedview.h" -#include "../tools-switch.h" -#include "../live_effects/effect.h" -#include "../live_effects/lpe-angle_bisector.h" +#include "ege-select-one-action.h" +#include "helper/action-context.h" +#include "helper/action.h" +#include "ink-action.h" +#include "live_effects/effect.h" +#include "preferences.h" +#include "selection.h" +#include "sp-namedview.h" +#include "tools-switch.h" #include "ui/tools/lpe-tool.h" +#include "ui/widget/unit-tracker.h" +#include "util/units.h" +#include "verbs.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::Util::Unit; using Inkscape::Util::Quantity; -using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; -using Inkscape::UI::ToolboxFactory; -using Inkscape::UI::PrefPusher; using Inkscape::UI::Tools::ToolBase; using Inkscape::UI::Tools::LpeTool; diff --git a/src/widgets/lpe-toolbar.h b/src/widgets/lpe-toolbar.h index 1796f8027..3db2bcb65 100644 --- a/src/widgets/lpe-toolbar.h +++ b/src/widgets/lpe-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_LPE_TOOLBAR_H */ diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp index a75dd7600..46d3bd4e0 100644 --- a/src/widgets/measure-toolbar.cpp +++ b/src/widgets/measure-toolbar.cpp @@ -28,37 +28,20 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "measure-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "measure-toolbar.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../sp-namedview.h" +#include "ege-adjustment-action.h" +#include "ege-output-action.h" +#include "preferences.h" +#include "toolbox.h" #include "ui/widget/unit-tracker.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::Util::Unit; -using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; diff --git a/src/widgets/measure-toolbar.h b/src/widgets/measure-toolbar.h index 4b90ccb9f..aff0a209b 100644 --- a/src/widgets/measure-toolbar.h +++ b/src/widgets/measure-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_measure_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_MEASURE_TOOLBAR_H */ diff --git a/src/widgets/mesh-toolbar.h b/src/widgets/mesh-toolbar.h index f84cff59b..fd3f4b4b7 100644 --- a/src/widgets/mesh-toolbar.h +++ b/src/widgets/mesh-toolbar.h @@ -14,9 +14,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_mesh_toolbox_prep( SPDesktop * /*desktop*/, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_MESH_TOOLBAR_H */ diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp index a4ea52287..53161857a 100644 --- a/src/widgets/node-toolbar.cpp +++ b/src/widgets/node-toolbar.cpp @@ -28,45 +28,32 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" +#include "ui/tool/multi-path-manipulator.h" #include -#include "toolbox.h" #include "node-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" +#include "connection-pool.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../connection-pool.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/attribute-record.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/tool/control-point-selection.h" +#include "ege-adjustment-action.h" +#include "ink-action.h" +#include "inkscape.h" +#include "preferences.h" +#include "selection-chemistry.h" +#include "selection.h" +#include "sp-namedview.h" +#include "toolbox.h" +#include "ui/icon-names.h" +#include "ui/tool/control-point-selection.h" #include "ui/tools/node-tool.h" -#include "../ui/tool/multi-path-manipulator.h" -#include "../ui/icon-names.h" -#include "util/units.h" #include "ui/widget/unit-tracker.h" -#include "ui/tools/lpe-tool.h" -#include "../sp-namedview.h" +#include "util/units.h" +#include "verbs.h" +#include "widgets/widget-sizes.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::Util::Unit; using Inkscape::Util::Quantity; -using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; diff --git a/src/widgets/node-toolbar.h b/src/widgets/node-toolbar.h index dcccf1712..1f2a3f6b7 100644 --- a/src/widgets/node-toolbar.h +++ b/src/widgets/node-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_SELECT_TOOLBAR_H */ diff --git a/src/widgets/paintbucket-toolbar.cpp b/src/widgets/paintbucket-toolbar.cpp index a9962b209..e20811de8 100644 --- a/src/widgets/paintbucket-toolbar.cpp +++ b/src/widgets/paintbucket-toolbar.cpp @@ -28,40 +28,20 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "paintbucket-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "paintbucket-toolbar.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../connection-pool.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "preferences.h" +#include "toolbox.h" +#include "ui/icon-names.h" +#include "ui/tools/flood-tool.h" #include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "util/units.h" #include "ui/widget/unit-tracker.h" -#include "ui/tools/pen-tool.h" -#include "../sp-namedview.h" -#include "ui/tools/flood-tool.h" - -#include - +#include "util/units.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::UI::UXManager; @@ -71,7 +51,6 @@ using Inkscape::UI::PrefPusher; using Inkscape::Util::unit_table; - //######################### //## Paintbucket ## //######################### diff --git a/src/widgets/paintbucket-toolbar.h b/src/widgets/paintbucket-toolbar.h index fe25c7fe2..9e6d6194a 100644 --- a/src/widgets/paintbucket-toolbar.h +++ b/src/widgets/paintbucket-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_PAINTBUCKET_TOOLBAR_H */ diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp index eb55f9219..6598e995a 100644 --- a/src/widgets/pencil-toolbar.cpp +++ b/src/widgets/pencil-toolbar.cpp @@ -28,56 +28,27 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "pencil-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" -#include "../desktop-style.h" -#include "../document-private.h" +#include "pencil-toolbar.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -//#include "../interface.h" -//#include "../connection-pool.h" -#include "../selection-chemistry.h" -#include "../selection.h" - -#include - -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" - -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -//#include "../xml/attribute-record.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" - -//#include "../ui/tool/control-point-selection.h" -//#include "ui/tools/node-tool.h" -//#include "../ui/tool/multi-path-manipulator.h" -#include "../ui/icon-names.h" - +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "toolbox.h" +#include "tools-switch.h" +#include "ui/icon-names.h" #include "ui/tools/pen-tool.h" -//#include "../sp-namedview.h" -#include "../tools-switch.h" +#include "ui/uxmanager.h" +#include "widgets/spinbutton-events.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; - - //######################## //## Pen/Pencil ## //######################## diff --git a/src/widgets/pencil-toolbar.h b/src/widgets/pencil-toolbar.h index 14f1e8930..c01b7d591 100644 --- a/src/widgets/pencil-toolbar.h +++ b/src/widgets/pencil-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); void sp_pen_toolbox_prep(SPDesktop * /*desktop*/, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp index f5a509db3..6996786e3 100644 --- a/src/widgets/rect-toolbar.cpp +++ b/src/widgets/rect-toolbar.cpp @@ -28,36 +28,29 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "rect-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "rect-toolbar.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "ege-adjustment-action.h" +#include "ege-output-action.h" +#include "ink-action.h" +#include "inkscape.h" +#include "preferences.h" +#include "selection.h" +#include "sp-namedview.h" +#include "sp-rect.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "util/units.h" #include "ui/widget/unit-tracker.h" -#include "ui/tools/pen-tool.h" -#include "../sp-namedview.h" -#include "../sp-rect.h" +#include "util/units.h" +#include "verbs.h" +#include "widgets/widget-sizes.h" +#include "xml/node-event-vector.h" +#include "xml/repr.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::UI::UXManager; diff --git a/src/widgets/rect-toolbar.h b/src/widgets/rect-toolbar.h index e123c095b..f89903c6c 100644 --- a/src/widgets/rect-toolbar.h +++ b/src/widgets/rect-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_RECT_TOOLBAR_H */ diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 1cd4347d6..284e436bf 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -16,44 +16,36 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" -#include - -#include "widgets/button.h" -#include "widgets/spw-utilities.h" -#include "widgets/widget-sizes.h" -#include "widgets/spinbutton-events.h" -#include "widgets/icon.h" -#include "widgets/sp-widget.h" +#include <2geom/rect.h> -#include "preferences.h" -#include "selection-chemistry.h" -#include "document.h" -#include "document-undo.h" -#include "inkscape.h" -#include "desktop-style.h" -#include "desktop.h" -#include "desktop-handles.h" -#include "sp-namedview.h" -#include "toolbox.h" +#include "ui/widget/spinbutton.h" #include -#include "helper/action.h" +#include "select-toolbar.h" +#include "desktop-handles.h" +#include "desktop.h" +#include "display/sp-canvas.h" +#include "document-undo.h" +#include "document.h" +#include "ege-adjustment-action.h" #include "helper/action-context.h" -#include "util/units.h" +#include "helper/action.h" +#include "ink-action.h" #include "inkscape.h" -#include "verbs.h" -#include "selection.h" +#include "message-stack.h" +#include "preferences.h" #include "selection-chemistry.h" +#include "selection.h" #include "sp-item-transform.h" -#include "message-stack.h" -#include "display/sp-canvas.h" -#include "ui/widget/unit-tracker.h" -#include "ege-adjustment-action.h" -#include "ege-output-action.h" -#include "ink-action.h" -#include <2geom/rect.h> +#include "sp-namedview.h" +#include "toolbox.h" #include "ui/icon-names.h" -#include "select-toolbar.h" +#include "ui/widget/unit-tracker.h" +#include "util/units.h" +#include "verbs.h" +#include "widgets/icon.h" +#include "widgets/sp-widget.h" +#include "widgets/spw-utilities.h" +#include "widgets/widget-sizes.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::Util::Unit; diff --git a/src/widgets/select-toolbar.h b/src/widgets/select-toolbar.h index e3573da66..b900a0615 100644 --- a/src/widgets/select-toolbar.h +++ b/src/widgets/select-toolbar.h @@ -14,9 +14,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp index b95c1c41e..710be9440 100644 --- a/src/widgets/spiral-toolbar.cpp +++ b/src/widgets/spiral-toolbar.cpp @@ -28,43 +28,32 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "spiral-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "spiral-toolbar.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "ege-adjustment-action.h" +#include "ege-output-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "selection.h" +#include "sp-spiral.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../sp-spiral.h" +#include "verbs.h" +#include "widgets/spinbutton-events.h" +#include "xml/node-event-vector.h" +#include "xml/node.h" +#include "xml/repr.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; - - - - //######################## //## Spiral ## //######################## diff --git a/src/widgets/spiral-toolbar.h b/src/widgets/spiral-toolbar.h index 194b54bce..3372ea224 100644 --- a/src/widgets/spiral-toolbar.h +++ b/src/widgets/spiral-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_spiral_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_SPIRAL_TOOLBAR_H */ diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp index 49406d564..cf56b3255 100644 --- a/src/widgets/spray-toolbar.cpp +++ b/src/widgets/spray-toolbar.cpp @@ -28,34 +28,18 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "spray-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "spray-toolbar.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "ui/tools/spray-tool.h" - -using Inkscape::UI::UXManager; +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "toolbox.h" +#include "ui/icon-names.h" + using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; diff --git a/src/widgets/spray-toolbar.h b/src/widgets/spray-toolbar.h index 170b6bb8e..d1d5c7b4c 100644 --- a/src/widgets/spray-toolbar.h +++ b/src/widgets/spray-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_SELECT_TOOLBAR_H */ diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp index 28b2c7e0c..7a7d0dc71 100644 --- a/src/widgets/star-toolbar.cpp +++ b/src/widgets/star-toolbar.cpp @@ -28,34 +28,26 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include -#include "toolbox.h" -#include "star-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" +#include "star-toolbar.h" +#include "desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" +#include "ege-adjustment-action.h" +#include "ege-output-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "selection.h" +#include "sp-star.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../sp-star.h" - +#include "verbs.h" +#include "widgets/../preferences.h" +#include "xml/node-event-vector.h" +#include "xml/node.h" +#include "xml/repr.h" using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; diff --git a/src/widgets/star-toolbar.h b/src/widgets/star-toolbar.h index 6f91d5570..aa0db785c 100644 --- a/src/widgets/star-toolbar.h +++ b/src/widgets/star-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_SELECT_TOOLBAR_H */ diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 6d5d54871..349fefa12 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -28,48 +28,35 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" +#include "libnrtype/font-lister.h" #include -#include "toolbox.h" #include "text-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" -#include "../desktop-style.h" +#include "connection-pool.h" +#include "desktop-handles.h" +#include "desktop-style.h" +#include "desktop.h" #include "document-undo.h" -#include "../sp-root.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../connection-pool.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/node-event-vector.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "../sp-namedview.h" -#include "../svg/css-ostringstream.h" -#include "../sp-flowtext.h" -#include "../sp-text.h" -#include "../style.h" -#include "../libnrtype/font-lister.h" -#include "../libnrtype/font-instance.h" +#include "document.h" +#include "ege-adjustment-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "ink-comboboxentry-action.h" +#include "inkscape.h" +#include "preferences.h" +#include "selection-chemistry.h" +#include "selection.h" +#include "sp-flowtext.h" +#include "sp-root.h" +#include "sp-text.h" +#include "style.h" +#include "svg/css-ostringstream.h" +#include "text-editing.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/tools/text-tool.h" -#include "../text-editing.h" -#include "widgets/font-selector.h" - +#include "verbs.h" +#include "xml/repr.h" -using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; diff --git a/src/widgets/text-toolbar.h b/src/widgets/text-toolbar.h index 68158d201..86a1cad21 100644 --- a/src/widgets/text-toolbar.h +++ b/src/widgets/text-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_TEXT_TOOLBAR_H */ diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp index 6999b057d..050d7fb5e 100644 --- a/src/widgets/tweak-toolbar.cpp +++ b/src/widgets/tweak-toolbar.cpp @@ -30,32 +30,18 @@ #include "ui/widget/spinbutton.h" #include -#include "toolbox.h" #include "tweak-toolbar.h" - -#include "../desktop.h" -#include "../desktop-handles.h" +#include "desktop.h" #include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" +#include "ege-adjustment-action.h" +#include "ege-output-action.h" +#include "ege-select-one-action.h" +#include "ink-action.h" +#include "preferences.h" +#include "toolbox.h" +#include "ui/icon-names.h" #include "ui/tools/tweak-tool.h" -using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; diff --git a/src/widgets/tweak-toolbar.h b/src/widgets/tweak-toolbar.h index 6f840f2c1..1a65a0844 100644 --- a/src/widgets/tweak-toolbar.h +++ b/src/widgets/tweak-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_SELECT_TOOLBAR_H */ diff --git a/src/widgets/zoom-toolbar.cpp b/src/widgets/zoom-toolbar.cpp index a5ab6e211..79feef86d 100644 --- a/src/widgets/zoom-toolbar.cpp +++ b/src/widgets/zoom-toolbar.cpp @@ -28,38 +28,8 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" -#include "toolbox.h" #include "zoom-toolbar.h" -#include "../desktop.h" -#include "../desktop-handles.h" -#include "document-undo.h" -#include "../verbs.h" -#include "../inkscape.h" -#include "../selection-chemistry.h" -#include "../selection.h" -#include "../ege-adjustment-action.h" -#include "../ege-output-action.h" -#include "../ege-select-one-action.h" -#include "../ink-action.h" -#include "../ink-comboboxentry-action.h" -#include "../widgets/button.h" -#include "../widgets/spinbutton-events.h" -#include "../widgets/spw-utilities.h" -#include "../widgets/widget-sizes.h" -#include "../xml/repr.h" -#include "ui/uxmanager.h" -#include "../ui/icon-names.h" -#include "ui/tools/pen-tool.h" -#include "ui/tools/tweak-tool.h" - - -using Inkscape::UI::UXManager; -using Inkscape::DocumentUndo; -using Inkscape::UI::ToolboxFactory; -using Inkscape::UI::PrefPusher; - //######################## //## Zoom Toolbox ## //######################## diff --git a/src/widgets/zoom-toolbar.h b/src/widgets/zoom-toolbar.h index b8d6a42af..45d979066 100644 --- a/src/widgets/zoom-toolbar.h +++ b/src/widgets/zoom-toolbar.h @@ -27,9 +27,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include class SPDesktop; +typedef struct _GtkActionGroup GtkActionGroup; +typedef struct _GObject GObject; + void sp_zoom_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); #endif /* !SEEN_ZOOM_TOOLBAR_H */ -- cgit v1.2.3 From 7c4b51c7574844efd991df787e9be4c96fb031b3 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 3 Mar 2014 22:21:55 +0100 Subject: change 0 to NULL for pointers (bzr r13102) --- src/widgets/font-selector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 5f9098d44..0e862638c 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -295,7 +295,7 @@ static void sp_font_selector_family_select_row(GtkTreeSelection *selection, // Next get family name with its style list gchar *family; - GList *list=0; + GList *list=NULL; gtk_tree_model_get (model, &iter, 0, &family, 1, &list, -1); // Find best style match for selected family with current style (e.g. of selected text). @@ -418,7 +418,7 @@ static void sp_font_selector_emit_set (SPFontSelector *fsel) GtkTreeModel *model_style; GtkTreeIter iter_family; GtkTreeIter iter_style; - char *family=0, *style=0; + char *family=NULL, *style=NULL; //We need to check this here since most GtkTreeModel operations are not atomic //See GtkListStore documenation, Chapter "Atomic Operations" --mderezynski -- cgit v1.2.3 From 6f85c82ab5114e8cc97702ea8ab33e58b68a2163 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 9 Mar 2014 03:35:00 +0100 Subject: Fix random crashes when spraying in single path mode. Fixes LP bug #1274831 Fixed bugs: - https://launchpad.net/bugs/1274831 (bzr r13131) --- src/widgets/spray-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp index cf56b3255..788ce6475 100644 --- a/src/widgets/spray-toolbar.cpp +++ b/src/widgets/spray-toolbar.cpp @@ -47,7 +47,7 @@ using Inkscape::UI::PrefPusher; // Disabled in 0.91 because of Bug #1274831 (crash, spraying an object // with the mode: spray object in single path) // Please enable again when working on 1.0 -//#define ENABLE_SPRAY_MODE_SINGLE_PATH +#define ENABLE_SPRAY_MODE_SINGLE_PATH //######################## //## Spray ## -- cgit v1.2.3 From eb89a74bb3f220bba82de3c7ce3a73df951fab77 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 8 Mar 2014 22:44:03 -0500 Subject: Remove unused includes to tidy up the code. (bzr r13132) --- src/widgets/gradient-selector.h | 1 - src/widgets/sp-color-icc-selector.h | 1 - src/widgets/sp-color-wheel-selector.h | 1 - src/widgets/sp-xmlview-attr-list.h | 2 -- src/widgets/sp-xmlview-content.h | 5 ----- src/widgets/sp-xmlview-tree.h | 3 --- src/widgets/stroke-style.cpp | 1 + 7 files changed, 1 insertion(+), 13 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h index c88666b06..1f58de2e4 100644 --- a/src/widgets/gradient-selector.h +++ b/src/widgets/gradient-selector.h @@ -37,7 +37,6 @@ #include "sp-gradient.h" #include "sp-gradient-spread.h" #include "sp-gradient-units.h" -#include "gradient-image.h" class SPGradient; diff --git a/src/widgets/sp-color-icc-selector.h b/src/widgets/sp-color-icc-selector.h index 3eb12222c..f63ab0853 100644 --- a/src/widgets/sp-color-icc-selector.h +++ b/src/widgets/sp-color-icc-selector.h @@ -4,7 +4,6 @@ #include #include -#include "../color.h" #include "sp-color-selector.h" namespace Inkscape { diff --git a/src/widgets/sp-color-wheel-selector.h b/src/widgets/sp-color-wheel-selector.h index 8e0dc6cea..bbd377422 100644 --- a/src/widgets/sp-color-wheel-selector.h +++ b/src/widgets/sp-color-wheel-selector.h @@ -4,7 +4,6 @@ #include #include -#include "../color.h" #include "sp-color-slider.h" #include "sp-color-selector.h" diff --git a/src/widgets/sp-xmlview-attr-list.h b/src/widgets/sp-xmlview-attr-list.h index 8b1dae49b..367ef1a12 100644 --- a/src/widgets/sp-xmlview-attr-list.h +++ b/src/widgets/sp-xmlview-attr-list.h @@ -14,8 +14,6 @@ #include #include -#include "../xml/repr.h" - #define SP_TYPE_XMLVIEW_ATTR_LIST (sp_xmlview_attr_list_get_type ()) diff --git a/src/widgets/sp-xmlview-content.h b/src/widgets/sp-xmlview-content.h index 941ef0be1..8b1342c5e 100644 --- a/src/widgets/sp-xmlview-content.h +++ b/src/widgets/sp-xmlview-content.h @@ -13,16 +13,11 @@ */ #include - #include - #include -#include "../xml/repr.h" - #include - #define SP_TYPE_XMLVIEW_CONTENT (sp_xmlview_content_get_type ()) #define SP_XMLVIEW_CONTENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_XMLVIEW_CONTENT, SPXMLViewContent)) #define SP_IS_XMLVIEW_CONTENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_XMLVIEW_CONTENT)) diff --git a/src/widgets/sp-xmlview-tree.h b/src/widgets/sp-xmlview-tree.h index 50fcb3bc8..69228fa88 100644 --- a/src/widgets/sp-xmlview-tree.h +++ b/src/widgets/sp-xmlview-tree.h @@ -13,12 +13,9 @@ */ #include -#include "../xml/repr.h" - #include - #define SP_TYPE_XMLVIEW_TREE (sp_xmlview_tree_get_type ()) #define SP_XMLVIEW_TREE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_XMLVIEW_TREE, SPXMLViewTree)) #define SP_IS_XMLVIEW_TREE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_XMLVIEW_TREE)) diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index d140cfb21..dbfb1bcd2 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -24,6 +24,7 @@ #include "svg/svg-color.h" #include "util/units.h" #include "ui/widget/unit-menu.h" +#include "desktop-widget.h" using Inkscape::DocumentUndo; using Inkscape::Util::unit_table; -- cgit v1.2.3 From 1d31728fb7399f48d272560a290dc990b75a197e Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 11 Mar 2014 15:52:08 +0100 Subject: Change stroke-dasharray and stroke-dashoffset handling to match other properties. Split style.h into more manageable size files. (bzr r13135) --- src/widgets/dash-selector.cpp | 20 ++++++++++---------- src/widgets/stroke-style.cpp | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp index afc81e574..fce7a9d9f 100644 --- a/src/widgets/dash-selector.cpp +++ b/src/widgets/dash-selector.cpp @@ -39,7 +39,7 @@ static double dash_4_1[] = {4.0, 1.0, -1.0}; static double dash_1_2[] = {1.0, 2.0, -1.0}; static double dash_1_4[] = {1.0, 4.0, -1.0}; -#define bd_len 7 // must correspond to the number of entries in the next line +static size_t BD_LEN = 7; // must correspond to the number of entries in the next line static double *builtin_dashes[] = {dash_0, dash_1_1, dash_2_1, dash_4_1, dash_1_2, dash_1_4, NULL}; static double **dashes = NULL; @@ -124,12 +124,12 @@ void SPDashSelector::init_dashes() { for (std::vector::iterator i = dash_prefs.begin(); i != dash_prefs.end(); ++i) { sp_style_read_from_prefs(style, *i); - if (style->stroke_dash.n_dash > 0) { - dashes[pos] = g_new (double, style->stroke_dash.n_dash + 1); + if (!style->stroke_dasharray.values.empty()) { + dashes[pos] = g_new (double, style->stroke_dasharray.values.size() + 1); double *d = dashes[pos]; - int i = 0; - for (; i < style->stroke_dash.n_dash; i++) { - d[i] = style->stroke_dash.dash[i]; + unsigned i = 0; + for (; i < style->stroke_dasharray.values.size(); i++) { + d[i] = style->stroke_dasharray.values[i]; } d[i] = -1; } else { @@ -138,12 +138,12 @@ void SPDashSelector::init_dashes() { pos += 1; } } else { // This code may never execute - a new preferences.xml is created for a new user. Maybe if the user deletes dashes from preferences.xml? - dashes = g_new (double *, bd_len + 2); // +1 for custom slot, +1 for terminator slot - int i; - for(i=0;istroke_dash.n_dash > 0) { + if (!style->stroke_dasharray.values.empty()) { double d[64]; - int len = MIN(style->stroke_dash.n_dash, 64); - for (int i = 0; i < len; i++) { + size_t len = MIN(style->stroke_dasharray.values.size(), 64); + for (unsigned i = 0; i < len; i++) { if (style->stroke_width.computed != 0) - d[i] = style->stroke_dash.dash[i] / style->stroke_width.computed; + d[i] = style->stroke_dasharray.values[i] / style->stroke_width.computed; else - d[i] = style->stroke_dash.dash[i]; // is there a better thing to do for stroke_width==0? + d[i] = style->stroke_dasharray.values[i]; // is there a better thing to do for stroke_width==0? } dsel->set_dash(len, d, style->stroke_width.computed != 0 ? - style->stroke_dash.offset / style->stroke_width.computed : - style->stroke_dash.offset); + style->stroke_dashoffset.value / style->stroke_width.computed : + style->stroke_dashoffset.value); } else { dsel->set_dash(0, NULL, 0.0); } -- cgit v1.2.3 From 2af3266fc2db760a1c8771e5945a0c94587d18e8 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Wed, 26 Mar 2014 22:14:16 +0100 Subject: Cleaned up includes of tools / revert experimental casting macro replacements from r13061 (bzr r13216) --- src/widgets/connector-toolbar.cpp | 3 +++ src/widgets/pencil-toolbar.cpp | 12 ++---------- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp index a0965721f..9bbc1bbb4 100644 --- a/src/widgets/connector-toolbar.cpp +++ b/src/widgets/connector-toolbar.cpp @@ -28,12 +28,15 @@ # include "config.h" #endif +#include + #include "connector-toolbar.h" #include "conn-avoid-ref.h" #include "desktop-handles.h" #include "desktop.h" #include "document-undo.h" #include "ege-adjustment-action.h" +#include "enums.h" #include "graphlayout.h" #include "ink-action.h" #include "inkscape.h" diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp index 6598e995a..682de8594 100644 --- a/src/widgets/pencil-toolbar.cpp +++ b/src/widgets/pencil-toolbar.cpp @@ -73,16 +73,8 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl) // in pen tool we have more options than in pencil tool; if one of them was chosen, we do any // preparatory work here - //if (SP_IS_PEN_CONTEXT(desktop->event_context)) { - // Inkscape::UI::Tools::PenTool *pc = SP_PEN_CONTEXT(desktop->event_context); - // sp_pen_context_set_polyline_mode(pc); - //} - - using namespace Inkscape::UI; - using Inkscape::UI::Tools::PenTool; - - if (Tool::is_a(desktop->event_context)) { - PenTool* pc = Tool::to(desktop->event_context); + if (SP_IS_PEN_CONTEXT(desktop->event_context)) { + Inkscape::UI::Tools::PenTool *pc = SP_PEN_CONTEXT(desktop->event_context); pc->setPolylineMode(); } } -- cgit v1.2.3 From 1a8f0cfdf29561e9929216e0d9d6db637ab31d54 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 30 Mar 2014 23:43:02 +0200 Subject: Added "Gtk::" scope to "manage" function calls. (bzr r13236) --- src/widgets/stroke-style.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 9567f81ba..a4cca9472 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -114,7 +114,7 @@ StrokeStyle::StrokeStyleButton::StrokeStyleButton(Gtk::RadioButtonGroup &grp, show(); set_mode(false); - Gtk::Widget *px = manage(Glib::wrap(sp_icon_new(Inkscape::ICON_SIZE_LARGE_TOOLBAR, icon))); + Gtk::Widget *px = Gtk::manage(Glib::wrap(sp_icon_new(Inkscape::ICON_SIZE_LARGE_TOOLBAR, icon))); g_assert(px != NULL); px->show(); add(*px); @@ -198,7 +198,7 @@ StrokeStyle::StrokeStyle() : hb->pack_start(*widthSpin, false, false, 0); unitSelector = new Inkscape::UI::Widget::UnitMenu(); unitSelector->setUnitType(Inkscape::Util::UNIT_TYPE_LINEAR); - Gtk::Widget *us = manage(unitSelector); + Gtk::Widget *us = Gtk::manage(unitSelector); SPDesktop *desktop = SP_ACTIVE_DESKTOP; unitSelector->addUnit(*unit_table.getUnit("%")); @@ -328,7 +328,7 @@ StrokeStyle::StrokeStyle() : // implement a set_mnemonic_source function in the // SPDashSelector class, so that we do not have to // expose any of the underlying widgets? - dashSelector = manage(new SPDashSelector); + dashSelector = Gtk::manage(new SPDashSelector); dashSelector->show(); @@ -354,7 +354,7 @@ StrokeStyle::StrokeStyle() : hb = spw_hbox(table, 1, 1, i); i++; - startMarkerCombo = manage(new MarkerComboBox("marker-start", SP_MARKER_LOC_START)); + startMarkerCombo = Gtk::manage(new MarkerComboBox("marker-start", SP_MARKER_LOC_START)); startMarkerCombo->set_tooltip_text(_("Start Markers are drawn on the first node of a path or shape")); startMarkerConn = startMarkerCombo->signal_changed().connect( sigc::bind( @@ -363,7 +363,7 @@ StrokeStyle::StrokeStyle() : hb->pack_start(*startMarkerCombo, true, true, 0); - midMarkerCombo = manage(new MarkerComboBox("marker-mid", SP_MARKER_LOC_MID)); + midMarkerCombo = Gtk::manage(new MarkerComboBox("marker-mid", SP_MARKER_LOC_MID)); midMarkerCombo->set_tooltip_text(_("Mid Markers are drawn on every node of a path or shape except the first and last nodes")); midMarkerConn = midMarkerCombo->signal_changed().connect( sigc::bind( @@ -372,7 +372,7 @@ StrokeStyle::StrokeStyle() : hb->pack_start(*midMarkerCombo, true, true, 0); - endMarkerCombo = manage(new MarkerComboBox("marker-end", SP_MARKER_LOC_END)); + endMarkerCombo = Gtk::manage(new MarkerComboBox("marker-end", SP_MARKER_LOC_END)); endMarkerCombo->set_tooltip_text(_("End Markers are drawn on the last node of a path or shape")); endMarkerConn = endMarkerCombo->signal_changed().connect( sigc::bind( -- cgit v1.2.3