diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/widgets | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/widgets')
53 files changed, 373 insertions, 662 deletions
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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> + 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 <glibmm/i18n.h> - -#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 <gtk/gtk.h> 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..9bbc1bbb4 100644 --- a/src/widgets/connector-toolbar.cpp +++ b/src/widgets/connector-toolbar.cpp @@ -28,48 +28,36 @@ # include "config.h" #endif +#include <glibmm/i18n.h> -#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 "enums.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 <gtk/gtk.h> 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/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<Glib::ustring>::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;i<bd_len;i++) { + dashes = g_new (double *, BD_LEN + 2); // +1 for custom slot, +1 for terminator slot + unsigned i; + for(i=0;i<BD_LEN;i++) { dashes[i] = builtin_dashes[i]; } - pos = bd_len; + pos = BD_LEN; } // make a place to hold the custom dashes, up to 15 positions long (+ terminator) dashes[pos] = g_new (double, 16); 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); 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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/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 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/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index 8fa29e60a..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 <glibmm/i18n.h> - -#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; @@ -1171,7 +1155,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-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 <gtk/gtk.h> 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/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); diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index 768a835c9..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 @@ -1310,11 +1310,11 @@ guchar *IconImpl::load_svg_pixels(std::list<Glib::ustring> 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<Gtk::IconTheme> 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) { 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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> - +#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 <gtk/gtk.h> 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 f609a007b..1e69e2f42 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 <glibmm/i18n.h> -#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 <gtk/gtk.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 "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 ## //######################## @@ -104,7 +75,7 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl) // 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); + pc->setPolylineMode(); } } 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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <gtk/gtk.h> - -#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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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/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 <glib.h> #include <gtk/gtk.h> -#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 <glib.h> #include <gtk/gtk.h> -#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 <stdio.h> #include <gtk/gtk.h> -#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 <config.h> - #include <stdio.h> - #include <gtk/gtk.h> -#include "../xml/repr.h" - #include <glib.h> - #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 <gtk/gtk.h> -#include "../xml/repr.h" - #include <glib.h> - #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/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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 2a8c85475..788ce6475 100644 --- a/src/widgets/spray-toolbar.cpp +++ b/src/widgets/spray-toolbar.cpp @@ -28,38 +28,26 @@ # include "config.h" #endif -#include "ui/widget/spinbutton.h" #include <glibmm/i18n.h> -#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; +// 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 +174,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) ); 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 <gtk/gtk.h> 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 1691a9b25..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 <glibmm/i18n.h> -#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; @@ -568,13 +560,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 ); } } 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 <gtk/gtk.h> 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/stroke-style.cpp b/src/widgets/stroke-style.cpp index d140cfb21..a4cca9472 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; @@ -113,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); @@ -197,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("%")); @@ -327,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(); @@ -353,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<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>( @@ -362,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<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>( @@ -371,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<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>( @@ -726,18 +727,18 @@ StrokeStyle::getItemColorForMarker(SPItem *item, Inkscape::PaintTarget fill_or_s void StrokeStyle::setDashSelectorFromStyle(SPDashSelector *dsel, SPStyle *style) { - if (style->stroke_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); } 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <glibmm/i18n.h> -#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 <gtk/gtk.h> 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 <gtk/gtk.h> 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 */ |
