summaryrefslogtreecommitdiffstats
path: root/src/widgets/star-toolbar.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-12-21 21:58:32 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-12-21 21:58:32 +0000
commit3dbf9a08680c6d7252c79397dbf12082ead61bd7 (patch)
tree565cc1093ba3ec7110971e641d2f1c94b77c45a0 /src/widgets/star-toolbar.cpp
parentPurge sp_desktop_controls (diff)
downloadinkscape-3dbf9a08680c6d7252c79397dbf12082ead61bd7.tar.gz
inkscape-3dbf9a08680c6d7252c79397dbf12082ead61bd7.zip
Remove sp_desktop_document and finish cleanup of desktop-handles.h
(bzr r13820)
Diffstat (limited to 'src/widgets/star-toolbar.cpp')
-rw-r--r--src/widgets/star-toolbar.cpp22
1 files changed, 11 insertions, 11 deletions
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"));
}