From ffb352bbb9abfde936cbb6bbc2b1c0612e3a6c80 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Fri, 18 Apr 2008 03:25:42 +0000 Subject: [PATCH] allow inx to suppress live preview checkbox --- src/extension/effect.cpp | 4 ++++ src/extension/effect.h | 1 + src/extension/prefdialog.cpp | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index b4eeb9c9a..2010e253a 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -47,6 +47,7 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * bool hidden = false; no_doc = false; + no_live_preview = false; if (repr != NULL) { @@ -55,6 +56,9 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * if (child->attribute("needs-document") && !strcmp(child->attribute("needs-document"), "false")) { no_doc = true; } + if (child->attribute("needs-live-preview") && !strcmp(child->attribute("needs-live-preview"), "false")) { + no_live_preview = true; + } for (Inkscape::XML::Node *effect_child = sp_repr_children(child); effect_child != NULL; effect_child = effect_child->next()) { if (!strcmp(effect_child->name(), "effects-menu")) { // printf("Found local effects menu in %s\n", this->get_name()); diff --git a/src/extension/effect.h b/src/extension/effect.h index 58e39c63d..0724bd961 100644 --- a/src/extension/effect.h +++ b/src/extension/effect.h @@ -128,6 +128,7 @@ public: Gtk::VBox * get_info_widget(void); bool no_doc; // if true, the effect does not process SVG document at all, so no need to save, read, and watch for errors + bool no_live_preview; // if true, the effect does not need "live preview" checkbox in its dialog void set_pref_dialog (PrefDialog * prefdialog); private: diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 9cfa39bd5..10249049f 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -77,7 +77,7 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co set_default_response(Gtk::RESPONSE_OK); _button_ok->grab_focus(); - if (_effect != NULL) { + if (_effect != NULL && !_effect->no_live_preview) { if (_param_preview == NULL) { XML::Document * doc = sp_repr_read_mem(live_param_xml, strlen(live_param_xml), NULL); _param_preview = Parameter::make(doc->root(), _effect); -- 2.30.2