summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/arc-toolbar.cpp10
-rw-r--r--src/widgets/box3d-toolbar.cpp6
-rw-r--r--src/widgets/connector-toolbar.cpp10
-rw-r--r--src/widgets/desktop-widget.cpp2
-rw-r--r--src/widgets/eraser-toolbar.cpp4
-rw-r--r--src/widgets/fill-style.cpp6
-rw-r--r--src/widgets/gradient-toolbar.cpp10
-rw-r--r--src/widgets/lpe-toolbar.cpp4
-rw-r--r--src/widgets/measure-toolbar.cpp4
-rw-r--r--src/widgets/mesh-toolbar.cpp4
-rw-r--r--src/widgets/node-toolbar.cpp4
-rw-r--r--src/widgets/rect-toolbar.cpp6
-rw-r--r--src/widgets/select-toolbar.cpp4
-rw-r--r--src/widgets/sp-xmlview-content.cpp4
-rw-r--r--src/widgets/spiral-toolbar.cpp6
-rw-r--r--src/widgets/star-toolbar.cpp22
-rw-r--r--src/widgets/stroke-marker-selector.cpp6
-rw-r--r--src/widgets/stroke-style.cpp9
-rw-r--r--src/widgets/stroke-style.h1
-rw-r--r--src/widgets/text-toolbar.cpp32
-rw-r--r--src/widgets/toolbox.cpp1
21 files changed, 76 insertions, 79 deletions
diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp
index 6dba44add..8a64854be 100644
--- a/src/widgets/arc-toolbar.cpp
+++ b/src/widgets/arc-toolbar.cpp
@@ -31,7 +31,7 @@
#include <glibmm/i18n.h>
#include "arc-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -81,7 +81,7 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *v
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setDouble(Glib::ustring("/tools/shapes/arc/") + value_name, gtk_adjustment_get_value(adj));
}
@@ -128,7 +128,7 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *v
sp_arctb_sensitivize( tbl, gtk_adjustment_get_value(adj), gtk_adjustment_get_value(other) );
if (modmade) {
- DocumentUndo::maybeDone(sp_desktop_document(desktop), value_name, SP_VERB_CONTEXT_ARC,
+ DocumentUndo::maybeDone(desktop->getDocument(), value_name, SP_VERB_CONTEXT_ARC,
_("Arc: Change start/end"));
}
@@ -150,7 +150,7 @@ static void sp_arctb_end_value_changed(GtkAdjustment *adj, GObject *tbl)
static void sp_arctb_open_state_changed( EgeSelectOneAction *act, GObject *tbl )
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setBool("/tools/shapes/arc/open", ege_select_one_action_get_active(act) != 0);
}
@@ -194,7 +194,7 @@ static void sp_arctb_open_state_changed( EgeSelectOneAction *act, GObject *tbl )
}
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ARC,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_ARC,
_("Arc: Change open/closed"));
}
diff --git a/src/widgets/box3d-toolbar.cpp b/src/widgets/box3d-toolbar.cpp
index 3181e345b..26e914070 100644
--- a/src/widgets/box3d-toolbar.cpp
+++ b/src/widgets/box3d-toolbar.cpp
@@ -32,7 +32,7 @@
#include "box3d-toolbar.h"
#include "box3d.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "document.h"
@@ -208,7 +208,7 @@ static void box3d_toolbox_selection_changed(Inkscape::Selection *selection, GObj
static void box3d_angle_value_changed(GtkAdjustment *adj, GObject *dataKludge, Proj::Axis axis)
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( dataKludge, "desktop" ));
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
// quit if run by the attr_changed or selection changed listener
if (g_object_get_data( dataKludge, "freeze" )) {
@@ -287,7 +287,7 @@ void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
EgeAdjustmentAction* eact = 0;
- SPDocument *document = sp_desktop_document (desktop);
+ SPDocument *document = desktop->getDocument();
Persp3DImpl *persp_impl = document->getCurrentPersp3DImpl();
EgeAdjustmentAction* box3d_angle_x = 0;
diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp
index 915d1e629..c906f7de4 100644
--- a/src/widgets/connector-toolbar.cpp
+++ b/src/widgets/connector-toolbar.cpp
@@ -32,7 +32,7 @@
#include "connector-toolbar.h"
#include "conn-avoid-ref.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -77,7 +77,7 @@ static void sp_connector_orthogonal_toggled( GtkToggleAction* act, GObject *tbl
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
Inkscape::Selection * selection = desktop->getSelection();
- SPDocument *doc = sp_desktop_document(desktop);
+ SPDocument *doc = desktop->getDocument();
if (!DocumentUndo::getUndoSensitive(doc)) {
return;
@@ -127,7 +127,7 @@ static void connector_curvature_changed(GtkAdjustment *adj, GObject* tbl)
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
Inkscape::Selection * selection = desktop->getSelection();
- SPDocument *doc = sp_desktop_document(desktop);
+ SPDocument *doc = desktop->getDocument();
if (!DocumentUndo::getUndoSensitive(doc)) {
return;
@@ -176,7 +176,7 @@ static void connector_curvature_changed(GtkAdjustment *adj, GObject* tbl)
static void connector_spacing_changed(GtkAdjustment *adj, GObject* tbl)
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
- SPDocument *doc = sp_desktop_document(desktop);
+ SPDocument *doc = desktop->getDocument();
if (!DocumentUndo::getUndoSensitive(doc)) {
return;
@@ -237,7 +237,7 @@ static void sp_connector_graph_layout(void)
prefs->setInt("/options/clonecompensation/value", saved_compensation);
- DocumentUndo::done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, _("Arrange connector network"));
+ DocumentUndo::done(SP_ACTIVE_DESKTOP->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, _("Arrange connector network"));
}
static void sp_directed_graph_layout_toggled( GtkToggleAction* act, GObject * /*tbl*/ )
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index e117e7f60..fd3756220 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -32,7 +32,7 @@
#include "conn-avoid-ref.h"
#include "desktop.h"
#include "desktop-events.h"
-#include "desktop-handles.h"
+
#include "desktop-widget.h"
#include "display/sp-canvas.h"
#include "display/canvas-arena.h"
diff --git a/src/widgets/eraser-toolbar.cpp b/src/widgets/eraser-toolbar.cpp
index f547cbd8b..1f79b50f2 100644
--- a/src/widgets/eraser-toolbar.cpp
+++ b/src/widgets/eraser-toolbar.cpp
@@ -32,7 +32,7 @@
#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 "widgets/ege-adjustment-action.h"
@@ -61,7 +61,7 @@ static void sp_erasertb_mode_changed( EgeSelectOneAction *act, GObject *tbl )
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
bool eraserMode = ege_select_one_action_get_active( act ) != 0;
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setBool( "/tools/eraser/mode", eraserMode );
}
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 820a20126..fcdc9a36b 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -35,7 +35,7 @@
#include "desktop.h"
#include "selection.h"
-#include "desktop-handles.h"
+
#include "desktop-style.h"
#include "display/sp-canvas.h"
#include "document-private.h"
@@ -480,7 +480,7 @@ void FillNStroke::updateFromPaint()
}
update = true;
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
Inkscape::Selection *selection = desktop->getSelection();
GSList const *items = selection->itemList();
@@ -522,7 +522,7 @@ void FillNStroke::updateFromPaint()
psel->setFlatColor( desktop,
(kind == FILL) ? "fill" : "stroke",
(kind == FILL) ? "fill-opacity" : "stroke-opacity" );
- DocumentUndo::maybeDone(sp_desktop_document(desktop), (kind == FILL) ? undo_F_label : undo_S_label, SP_VERB_DIALOG_FILL_STROKE,
+ DocumentUndo::maybeDone(desktop->getDocument(), (kind == FILL) ? undo_F_label : undo_S_label, SP_VERB_DIALOG_FILL_STROKE,
(kind == FILL) ? _("Set fill color") : _("Set stroke color"));
if (kind == FILL) {
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index 1968f87da..ea009c048 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -18,7 +18,7 @@
#include "ui/widget/color-preview.h"
#include <glibmm/i18n.h>
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "document.h"
@@ -128,7 +128,7 @@ gboolean gr_vector_list(GtkWidget *combo_box, SPDesktop *desktop, bool selection
return sensitive;
}
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
GtkTreeIter iter;
GtkListStore *store = (GtkListStore *)gtk_combo_box_get_model(GTK_COMBO_BOX(combo_box));
@@ -923,7 +923,7 @@ static void gr_gradient_combo_changed(EgeSelectOneAction *act, gpointer data)
gr_apply_gradient(selection, ev? ev->get_drag() : NULL, gr);
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_GRADIENT,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_GRADIENT,
_("Assign gradient to object"));
}
@@ -945,7 +945,7 @@ static void gr_spread_change(EgeSelectOneAction *act, GtkWidget *widget)
gradient->setSpread(spread);
gradient->updateRepr();
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_GRADIENT,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_GRADIENT,
_("Set gradient repeat"));
}
}
@@ -1247,7 +1247,7 @@ static void gradient_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::T
if (SP_IS_GRADIENT_CONTEXT(ec)) {
Inkscape::Selection *selection = desktop->getSelection();
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
// connect to selection modified and changed signals
connChanged = selection->connectChanged(sigc::bind(sigc::ptr_fun(&gr_tb_selection_changed), holder));
diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp
index c3a83be70..387bf6dee 100644
--- a/src/widgets/lpe-toolbar.cpp
+++ b/src/widgets/lpe-toolbar.cpp
@@ -30,7 +30,7 @@
#include "live_effects/lpe-line_segment.h"
#include "lpe-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-select-one-action.h"
@@ -91,7 +91,7 @@ static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl)
SP_LPETOOL_CONTEXT(desktop->event_context)->mode = type;
}
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setInt( "/tools/lpetool/mode", mode );
}
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index 1a4678332..5a4785b1f 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -31,7 +31,7 @@
#include <glibmm/i18n.h>
#include "measure-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -55,7 +55,7 @@ sp_measure_fontsize_value_changed(GtkAdjustment *adj, GObject *tbl)
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setInt(Glib::ustring("/tools/measure/fontsize"),
gtk_adjustment_get_value(adj));
diff --git a/src/widgets/mesh-toolbar.cpp b/src/widgets/mesh-toolbar.cpp
index 8c7ec33a8..e9e9fa344 100644
--- a/src/widgets/mesh-toolbar.cpp
+++ b/src/widgets/mesh-toolbar.cpp
@@ -38,7 +38,7 @@
#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"
@@ -335,7 +335,7 @@ static void mesh_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolB
if (SP_IS_MESH_CONTEXT(ec)) {
// connect to selection modified and changed signals
Inkscape::Selection *selection = desktop->getSelection();
- SPDocument *document = sp_desktop_document (desktop);
+ SPDocument *document = desktop->getDocument();
c_selection_changed = selection->connectChanged(sigc::bind(sigc::ptr_fun(&ms_tb_selection_changed), holder));
c_selection_modified = selection->connectModified(sigc::bind(sigc::ptr_fun(&ms_tb_selection_modified), holder));
diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp
index 52be03abe..113061519 100644
--- a/src/widgets/node-toolbar.cpp
+++ b/src/widgets/node-toolbar.cpp
@@ -31,7 +31,7 @@
#include "ui/tool/multi-path-manipulator.h"
#include <glibmm/i18n.h>
#include "node-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -264,7 +264,7 @@ static void sp_node_path_value_changed(GtkAdjustment *adj, GObject *tbl, Geom::D
}
Unit const *unit = tracker->getActiveUnit();
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
prefs->setDouble(Glib::ustring("/tools/nodes/") + (d == Geom::X ? "x" : "y"),
Quantity::convert(gtk_adjustment_get_value(adj), unit, "px"));
}
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index 2dc2bbb07..b78f74d94 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -31,7 +31,7 @@
#include <glibmm/i18n.h>
#include "rect-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -90,7 +90,7 @@ static void sp_rtb_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *
Unit const *unit = tracker->getActiveUnit();
g_return_if_fail(unit != NULL);
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setDouble(Glib::ustring("/tools/shapes/rect/") + value_name,
Quantity::convert(gtk_adjustment_get_value(adj), unit, "px"));
@@ -120,7 +120,7 @@ static void sp_rtb_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *
sp_rtb_sensitivize( tbl );
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_RECT,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_RECT,
_("Change rectangle"));
}
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 881de2e36..e49c4c00a 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -21,7 +21,7 @@
#include "ui/widget/spinbutton.h"
#include <glibmm/i18n.h>
#include "select-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "display/sp-canvas.h"
#include "document-undo.h"
@@ -154,7 +154,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = desktop->getSelection();
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
document->ensureUpToDate ();
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/widgets/sp-xmlview-content.cpp b/src/widgets/sp-xmlview-content.cpp
index 9243760bd..a1d8475ba 100644
--- a/src/widgets/sp-xmlview-content.cpp
+++ b/src/widgets/sp-xmlview-content.cpp
@@ -15,7 +15,7 @@
#include "xml/node-event-vector.h"
#include "sp-xmlview-content.h"
-#include "desktop-handles.h"
+#include "desktop.h"
#include "document-private.h"
#include "document-undo.h"
#include "inkscape.h"
@@ -147,7 +147,7 @@ sp_xmlview_content_changed (GtkTextBuffer *tb, SPXMLViewContent *text)
text->repr->setContent(data);
g_free (data);
text->blocked = FALSE;
- DocumentUndo::done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_XML_EDITOR,
+ DocumentUndo::done(SP_ACTIVE_DESKTOP->getDocument(), SP_VERB_DIALOG_XML_EDITOR,
_("Type text in a text node"));
}
}
diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp
index aa9c32c1a..3fb0015c1 100644
--- a/src/widgets/spiral-toolbar.cpp
+++ b/src/widgets/spiral-toolbar.cpp
@@ -31,7 +31,7 @@
#include <glibmm/i18n.h>
#include "spiral-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -62,7 +62,7 @@ static void sp_spl_tb_value_changed(GtkAdjustment *adj, GObject *tbl, Glib::ustr
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setDouble("/tools/shapes/spiral/" + value_name,
gtk_adjustment_get_value(adj));
@@ -96,7 +96,7 @@ static void sp_spl_tb_value_changed(GtkAdjustment *adj, GObject *tbl, Glib::ustr
g_free(namespaced_name);
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_SPIRAL,
_("Change spiral"));
}
diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp
index 31c67bd6f..cf12391c1 100644
--- a/src/widgets/star-toolbar.cpp
+++ b/src/widgets/star-toolbar.cpp
@@ -31,7 +31,7 @@
#include <glibmm/i18n.h>
#include "star-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
@@ -64,7 +64,7 @@ static void sp_stb_magnitude_value_changed( GtkAdjustment *adj, GObject *dataKlu
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( dataKludge, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
// do not remember prefs if this call is initiated by an undo change, because undoing object
// creation sets bogus values to its attributes before it is deleted
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -99,7 +99,7 @@ static void sp_stb_magnitude_value_changed( GtkAdjustment *adj, GObject *dataKlu
}
}
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR,
_("Star: Change number of corners"));
}
@@ -110,7 +110,7 @@ static void sp_stb_proportion_value_changed( GtkAdjustment *adj, GObject *dataKl
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( dataKludge, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
if (!IS_NAN(gtk_adjustment_get_value(adj))) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setDouble("/tools/shapes/star/proportion",
@@ -152,7 +152,7 @@ static void sp_stb_proportion_value_changed( GtkAdjustment *adj, GObject *dataKl
}
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR,
_("Star: Change spoke ratio"));
}
@@ -164,7 +164,7 @@ static void sp_stb_sides_flat_state_changed( EgeSelectOneAction *act, GObject *d
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( dataKludge, "desktop" ));
bool flat = ege_select_one_action_get_active( act ) == 0;
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setBool( "/tools/shapes/star/isflatsided", flat);
}
@@ -197,7 +197,7 @@ static void sp_stb_sides_flat_state_changed( EgeSelectOneAction *act, GObject *d
}
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR,
flat ? _("Make polygon") : _("Make star"));
}
@@ -208,7 +208,7 @@ static void sp_stb_rounded_value_changed( GtkAdjustment *adj, GObject *dataKludg
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( dataKludge, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setDouble("/tools/shapes/star/rounded", (gdouble) gtk_adjustment_get_value(adj));
}
@@ -236,7 +236,7 @@ static void sp_stb_rounded_value_changed( GtkAdjustment *adj, GObject *dataKludg
}
}
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR,
_("Star: Change rounding"));
}
@@ -247,7 +247,7 @@ static void sp_stb_randomized_value_changed( GtkAdjustment *adj, GObject *dataKl
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( dataKludge, "desktop" ));
- if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) {
+ if (DocumentUndo::getUndoSensitive(desktop->getDocument())) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setDouble("/tools/shapes/star/randomized",
(gdouble) gtk_adjustment_get_value(adj));
@@ -276,7 +276,7 @@ static void sp_stb_randomized_value_changed( GtkAdjustment *adj, GObject *dataKl
}
}
if (modmade) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR,
_("Star: Change randomization"));
}
diff --git a/src/widgets/stroke-marker-selector.cpp b/src/widgets/stroke-marker-selector.cpp
index c62262e81..d5b43d132 100644
--- a/src/widgets/stroke-marker-selector.cpp
+++ b/src/widgets/stroke-marker-selector.cpp
@@ -26,7 +26,7 @@
#include "style.h"
#include "ui/dialog-events.h"
-#include "desktop-handles.h"
+
#include "desktop-style.h"
#include "preferences.h"
#include "path-prefix.h"
@@ -65,7 +65,7 @@ MarkerComboBox::MarkerComboBox(gchar const *id, int l) :
sandbox = ink_markers_preview_doc ();
desktop = SP_ACTIVE_DESKTOP;
- doc = sp_desktop_document(desktop);
+ doc = desktop->getDocument();
modified_connection = doc->getDefs()->connectModified( sigc::hide(sigc::hide(sigc::bind(sigc::ptr_fun(&MarkerComboBox::handleDefsModified), this))) );
@@ -92,7 +92,7 @@ void MarkerComboBox::setDesktop(SPDesktop *desktop)
}
this->desktop = desktop;
- doc = sp_desktop_document(desktop);
+ doc = desktop->getDocument();
if (doc) {
modified_connection = doc->getDefs()->connectModified( sigc::hide(sigc::hide(sigc::bind(sigc::ptr_fun(&MarkerComboBox::handleDefsModified), this))) );
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 830c0580d..755489e12 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -456,7 +456,7 @@ void StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw,
spw->update = true;
- SPDocument *document = sp_desktop_document(spw->desktop);
+ SPDocument *document = spw->desktop->getDocument();
if (!document) {
return;
}
@@ -957,7 +957,7 @@ StrokeStyle::scaleLine()
update = true;
- SPDocument *document = sp_desktop_document (desktop);
+ SPDocument *document = desktop->getDocument();
Inkscape::Selection *selection = desktop->getSelection();
GSList const *items = selection->itemList();
@@ -1113,8 +1113,7 @@ void StrokeStyle::buttonToggledCB(StrokeStyleButton *tb, StrokeStyle *spw)
sp_repr_css_attr_unref(css);
css = 0;
- DocumentUndo::done(sp_desktop_document(spw->desktop), SP_VERB_DIALOG_FILL_STROKE,
- _("Set stroke style"));
+ DocumentUndo::done(spw->desktop->getDocument(), SP_VERB_DIALOG_FILL_STROKE, _("Set stroke style"));
}
}
@@ -1200,7 +1199,7 @@ StrokeStyle::updateAllMarkers(GSList const *objects)
if (update) {
setMarkerColor(marker, combo->get_loc(), SP_ITEM(object));
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *document = desktop->getDocument();
DocumentUndo::done(document, SP_VERB_DIALOG_FILL_STROKE,
_("Set marker color"));
}
diff --git a/src/widgets/stroke-style.h b/src/widgets/stroke-style.h
index 15e394097..83048cb76 100644
--- a/src/widgets/stroke-style.h
+++ b/src/widgets/stroke-style.h
@@ -33,7 +33,6 @@
#include <glibmm/i18n.h>
#include "desktop.h"
-#include "desktop-handles.h"
#include "desktop-style.h"
#include "ui/dialog-events.h"
#include "display/canvas-bpath.h" // for SP_STROKE_LINEJOIN_*
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 60ea75916..d113d5c28 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -31,7 +31,7 @@
#include "libnrtype/font-lister.h"
#include <glibmm/i18n.h>
#include "text-toolbar.h"
-#include "desktop-handles.h"
+
#include "desktop-style.h"
#include "desktop.h"
#include "document-undo.h"
@@ -165,7 +165,7 @@ static void sp_text_fontfamily_value_changed( Ink_ComboBoxEntry_Action *act, GOb
sp_desktop_set_style (desktop, css, true, true); // Results in selection change called twice.
sp_repr_css_attr_unref (css);
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT,
_("Text: Change font family"));
}
@@ -229,7 +229,7 @@ static void sp_text_fontsize_value_changed( Ink_ComboBoxEntry_Action *act, GObje
prefs->mergeStyle("/tools/text/style", css);
} else {
// Save for undo
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:size", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:size", SP_VERB_NONE,
_("Text: Change font size"));
}
@@ -267,7 +267,7 @@ static void sp_text_fontstyle_value_changed( Ink_ComboBoxEntry_Action *act, GObj
sp_desktop_set_style (desktop, css, true, true);
sp_repr_css_attr_unref (css);
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT,
_("Text: Change font style"));
}
@@ -345,7 +345,7 @@ static void sp_text_script_changed( InkToggleAction* act, GObject *tbl )
// Save for undo
if(result_baseline != QUERY_STYLE_NOTHING) {
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:script", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:script", SP_VERB_NONE,
_("Text: Change superscript or subscript"));
}
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
@@ -490,7 +490,7 @@ static void sp_text_align_mode_changed( EgeSelectOneAction *act, GObject *tbl )
sp_desktop_set_style (desktop, css, true, true);
if (result_numbers != QUERY_STYLE_NOTHING)
{
- DocumentUndo::done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT,
+ DocumentUndo::done(SP_ACTIVE_DESKTOP->getDocument(), SP_VERB_CONTEXT_TEXT,
_("Text: Change alignment"));
}
sp_repr_css_attr_unref (css);
@@ -533,7 +533,7 @@ static void sp_text_lineheight_value_changed( GtkAdjustment *adj, GObject *tbl )
// Save for undo
if(modmade) {
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:line-height", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:line-height", SP_VERB_NONE,
_("Text: Change line-height"));
}
@@ -582,7 +582,7 @@ static void sp_text_wordspacing_value_changed( GtkAdjustment *adj, GObject *tbl
prefs->mergeStyle("/tools/text/style", css);
} else {
// Save for undo
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:word-spacing", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:word-spacing", SP_VERB_NONE,
_("Text: Change word-spacing"));
}
sp_style_unref(query);
@@ -623,7 +623,7 @@ static void sp_text_letterspacing_value_changed( GtkAdjustment *adj, GObject *tb
else
{
// Save for undo
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:letter-spacing", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:letter-spacing", SP_VERB_NONE,
_("Text: Change letter-spacing"));
}
@@ -663,7 +663,7 @@ static void sp_text_dx_value_changed( GtkAdjustment *adj, GObject *tbl )
if(modmade) {
// Save for undo
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:dx", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:dx", SP_VERB_NONE,
_("Text: Change dx (kern)"));
}
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
@@ -697,7 +697,7 @@ static void sp_text_dy_value_changed( GtkAdjustment *adj, GObject *tbl )
if(modmade) {
// Save for undo
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:dy", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:dy", SP_VERB_NONE,
_("Text: Change dy"));
}
@@ -732,7 +732,7 @@ static void sp_text_rotation_value_changed( GtkAdjustment *adj, GObject *tbl )
// Save for undo
if(modmade) {
- DocumentUndo::maybeDone(sp_desktop_document(SP_ACTIVE_DESKTOP), "ttb:rotate", SP_VERB_NONE,
+ DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:rotate", SP_VERB_NONE,
_("Text: Change rotate"));
}
@@ -780,7 +780,7 @@ static void sp_text_orientation_mode_changed( EgeSelectOneAction *act, GObject *
sp_desktop_set_style (SP_ACTIVE_DESKTOP, css, true, true);
if(result_numbers != QUERY_STYLE_NOTHING)
{
- DocumentUndo::done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT,
+ DocumentUndo::done(SP_ACTIVE_DESKTOP->getDocument(), SP_VERB_CONTEXT_TEXT,
_("Text: Change orientation"));
}
sp_repr_css_attr_unref (css);
@@ -860,7 +860,7 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance();
if (!subselection) {
- fontlister->update_font_list( sp_desktop_document( SP_ACTIVE_DESKTOP ));
+ fontlister->update_font_list( SP_ACTIVE_DESKTOP->getDocument());
}
fontlister->selection_update();
@@ -1169,7 +1169,7 @@ static void sp_text_toolbox_select_cb( GtkEntry* entry, GtkEntryIconPosition /*p
GSList *selectList = NULL;
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- SPDocument *document = sp_desktop_document( desktop );
+ SPDocument *document = desktop->getDocument();
GSList *allList = get_all_items(NULL, document->getRoot(), desktop, false, false, true, NULL);
for (GSList *i = allList; i != NULL; i = i->next) {
@@ -1214,7 +1214,7 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje
{
// Font list
Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance();
- fontlister->update_font_list( sp_desktop_document( SP_ACTIVE_DESKTOP ));
+ fontlister->update_font_list( SP_ACTIVE_DESKTOP->getDocument());
Glib::RefPtr<Gtk::ListStore> store = fontlister->get_font_list();
GtkListStore* model = store->gobj();
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 555bb780f..4f5682f7a 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -40,7 +40,6 @@
#include <glibmm/i18n.h>
#include "../desktop.h"
-#include "../desktop-handles.h"
#include "../desktop-style.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"