From: mental Date: Tue, 1 Jan 2008 04:40:30 +0000 (+0000) Subject: separate blend history for objects versus layers X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9d2da14dec9f62765544a573f9151d83b85d0909;p=inkscape.git separate blend history for objects versus layers --- diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp index 1034cd3ff..cec32426d 100644 --- a/src/dialogs/layers-panel.cpp +++ b/src/dialogs/layers-panel.cpp @@ -672,7 +672,8 @@ LayersPanel::LayersPanel() : _desktop(0), _model(0), _pending(0), - _toggleEvent(0) + _toggleEvent(0), + _compositeSettings(SP_VERB_DIALOG_LAYERS, "layers") { _maxNestDepth = prefs_get_int_attribute_limited("dialogs.layers", "maxDepth", 20, 1, 1000); diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp index b9e1754ba..43a9bb989 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -42,7 +42,8 @@ FillAndStroke::FillAndStroke() : UI::Widget::Panel ("", "dialogs.fillstroke", SP_VERB_DIALOG_FILL_STROKE), _page_fill(1, 1, true, true), _page_stroke_paint(1, 1, true, true), - _page_stroke_style(1, 1, true, true) + _page_stroke_style(1, 1, true, true), + _composite_settings(SP_VERB_DIALOG_FILL_STROKE, "fillstroke") { Gtk::Box *contents = _getContents(); contents->set_spacing(0); diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index aeb6a263a..20fdbed03 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -41,8 +41,11 @@ void ObjectCompositeSettings::_on_desktop_switch( } } -ObjectCompositeSettings::ObjectCompositeSettings() -: _opacity_vbox(false, 0), +ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix) +: _verb_code(verb_code), + _opacity_tag(Glib::ustring(history_prefix) + ":opacity"), + _blur_tag(Glib::ustring(history_prefix) + ":blur"), + _opacity_vbox(false, 0), _opacity_label_box(false, 0), _opacity_label(_("Opacity, %"), 0.0, 1.0, true), _opacity_adjustment(100.0, 0.0, 100.0, 1.0, 1.0, 0.0), @@ -148,7 +151,7 @@ ObjectCompositeSettings::_blendBlurValueChanged() } } - sp_document_maybe_done (sp_desktop_document (desktop), "fillstroke:blur", SP_VERB_DIALOG_FILL_STROKE, _("Change blur")); + sp_document_maybe_done (sp_desktop_document (desktop), _blur_tag.c_str(), _verb_code, _("Change blur")); // resume interruptibility sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop)); @@ -187,7 +190,7 @@ ObjectCompositeSettings::_opacityValueChanged() sp_repr_css_attr_unref (css); - sp_document_maybe_done (sp_desktop_document (desktop), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE, + sp_document_maybe_done (sp_desktop_document (desktop), _opacity_tag.c_str(), _verb_code, _("Change opacity")); // resume interruptibility diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h index 801ef76af..8768157bf 100644 --- a/src/ui/widget/object-composite-settings.h +++ b/src/ui/widget/object-composite-settings.h @@ -20,6 +20,8 @@ #include #include +#include + #include "ui/widget/filter-effect-chooser.h" #include "ui/widget/style-subject.h" @@ -29,12 +31,16 @@ namespace Widget { class ObjectCompositeSettings : public Gtk::VBox { public: - ObjectCompositeSettings(); + ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix); ~ObjectCompositeSettings(); void setSubject(StyleSubject *subject); private: + unsigned int _verb_code; + Glib::ustring _blur_tag; + Glib::ustring _opacity_tag; + Gtk::VBox _opacity_vbox; Gtk::HBox _opacity_label_box; Gtk::HBox _opacity_hbox;