summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index a8f9f9c60..9a94113eb 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -464,7 +464,7 @@ void SelectedStyle::dragDataReceived( GtkWidget */*widget*/,
sp_repr_css_set_property( css, (tracker->item == SS_FILL) ? "fill":"stroke", c );
sp_desktop_set_style( tracker->parent->_desktop, css );
sp_repr_css_attr_unref( css );
- sp_document_done( sp_desktop_document(tracker->parent->_desktop) , SP_VERB_NONE,
+ SPDocumentUndo::done( sp_desktop_document(tracker->parent->_desktop) , SP_VERB_NONE,
_("Drop color"));
}
}
@@ -477,7 +477,7 @@ void SelectedStyle::on_fill_remove() {
sp_repr_css_set_property (css, "fill", "none");
sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Remove fill"));
}
@@ -486,7 +486,7 @@ void SelectedStyle::on_stroke_remove() {
sp_repr_css_set_property (css, "stroke", "none");
sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Remove stroke"));
}
@@ -495,7 +495,7 @@ void SelectedStyle::on_fill_unset() {
sp_repr_css_unset_property (css, "fill");
sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Unset fill"));
}
@@ -511,7 +511,7 @@ void SelectedStyle::on_stroke_unset() {
sp_repr_css_unset_property (css, "stroke-dasharray");
sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Unset stroke"));
}
@@ -520,7 +520,7 @@ void SelectedStyle::on_fill_opaque() {
sp_repr_css_set_property (css, "fill-opacity", "1");
sp_desktop_set_style (_desktop, css, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Make fill opaque"));
}
@@ -529,7 +529,7 @@ void SelectedStyle::on_stroke_opaque() {
sp_repr_css_set_property (css, "stroke-opacity", "1");
sp_desktop_set_style (_desktop, css, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Make fill opaque"));
}
@@ -541,7 +541,7 @@ void SelectedStyle::on_fill_lastused() {
sp_repr_css_set_property (css, "fill", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last set color to fill"));
}
@@ -553,7 +553,7 @@ void SelectedStyle::on_stroke_lastused() {
sp_repr_css_set_property (css, "stroke", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last set color to stroke"));
}
@@ -564,7 +564,7 @@ void SelectedStyle::on_fill_lastselected() {
sp_repr_css_set_property (css, "fill", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last selected color to fill"));
}
@@ -575,7 +575,7 @@ void SelectedStyle::on_stroke_lastselected() {
sp_repr_css_set_property (css, "stroke", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last selected color to stroke"));
}
@@ -595,7 +595,7 @@ void SelectedStyle::on_fill_invert() {
sp_repr_css_set_property (css, "fill", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Invert fill"));
}
@@ -615,7 +615,7 @@ void SelectedStyle::on_stroke_invert() {
sp_repr_css_set_property (css, "stroke", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Invert stroke"));
}
@@ -627,7 +627,7 @@ void SelectedStyle::on_fill_white() {
sp_repr_css_set_property (css, "fill-opacity", "1");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("White fill"));
}
@@ -639,7 +639,7 @@ void SelectedStyle::on_stroke_white() {
sp_repr_css_set_property (css, "stroke-opacity", "1");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("White stroke"));
}
@@ -651,7 +651,7 @@ void SelectedStyle::on_fill_black() {
sp_repr_css_set_property (css, "fill-opacity", "1.0");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Black fill"));
}
@@ -663,7 +663,7 @@ void SelectedStyle::on_stroke_black() {
sp_repr_css_set_property (css, "stroke-opacity", "1.0");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Black stroke"));
}
@@ -706,7 +706,7 @@ void SelectedStyle::on_fill_paste() {
sp_repr_css_set_property (css, "fill", text.c_str());
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Paste fill"));
}
}
@@ -724,7 +724,7 @@ void SelectedStyle::on_stroke_paste() {
sp_repr_css_set_property (css, "stroke", text.c_str());
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Paste stroke"));
}
}
@@ -778,7 +778,7 @@ void SelectedStyle::on_fillstroke_swap() {
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Swap fill and stroke"));
}
@@ -853,7 +853,7 @@ SelectedStyle::on_opacity_click(GdkEventButton *event)
sp_repr_css_set_property (css, "opacity", opacity);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document (_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::done (sp_desktop_document (_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Change opacity"));
return true;
}
@@ -888,7 +888,7 @@ void SelectedStyle::on_popup_preset(int i) {
// FIXME: update dash patterns!
sp_desktop_set_style (_desktop, css, true);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_SWATCHES,
+ SPDocumentUndo::done (sp_desktop_document(_desktop), SP_VERB_DIALOG_SWATCHES,
_("Change stroke width"));
}
@@ -1147,7 +1147,7 @@ void SelectedStyle::on_opacity_changed () {
sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(_desktop), 0);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_maybe_done (sp_desktop_document (_desktop), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE,
+ SPDocumentUndo::maybe_done (sp_desktop_document (_desktop), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE,
_("Change opacity"));
// resume interruptibility
sp_canvas_end_forced_full_redraws(sp_desktop_canvas(_desktop));
@@ -1274,19 +1274,19 @@ RotateableSwatch::do_motion(double by, guint modifier) {
if (modifier == 3) { // Alt, do nothing
} else if (modifier == 2) { // saturation
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust saturation")));
double ch = hsl[1];
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adjusting <b>saturation</b>: was %.3g, now <b>%.3g</b> (diff %.3g); with <b>Ctrl</b> to adjust lightness, without modifiers to adjust hue"), ch - diff, ch, diff);
} else if (modifier == 1) { // lightness
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust lightness")));
double ch = hsl[2];
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adjusting <b>lightness</b>: was %.3g, now <b>%.3g</b> (diff %.3g); with <b>Shift</b> to adjust saturation, without modifiers to adjust hue"), ch - diff, ch, diff);
} else { // hue
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust hue")));
double ch = hsl[0];
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adjusting <b>hue</b>: was %.3g, now <b>%.3g</b> (diff %.3g); with <b>Shift</b> to adjust saturation, with <b>Ctrl</b> to adjust lightness"), ch - diff, ch, diff);
@@ -1315,15 +1315,15 @@ RotateableSwatch::do_release(double by, guint modifier) {
if (modifier == 3) { // Alt, do nothing
} else if (modifier == 2) { // saturation
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, ("Adjust saturation"));
} else if (modifier == 1) { // lightness
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, ("Adjust lightness"));
} else { // hue
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, ("Adjust hue"));
}
@@ -1397,7 +1397,7 @@ RotateableStrokeWidth::do_motion(double by, guint modifier) {
if (modifier == 3) { // Alt, do nothing
} else {
double diff = value_adjust(startvalue, by, modifier, false);
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust stroke width")));
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adjusting <b>stroke width</b>: was %.3g, now <b>%.3g</b> (diff %.3g)"), startvalue, startvalue + diff, diff);
}
@@ -1411,7 +1411,7 @@ RotateableStrokeWidth::do_release(double by, guint modifier) {
} else {
value_adjust(startvalue, by, modifier, true);
startvalue_set = false;
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ SPDocumentUndo::maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust stroke width")));
}