summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-04-18 03:25:42 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-04-18 03:25:42 +0000
commitb93c05826018abdeff80fe28be1a9fe9901ff3cf (patch)
tree43b40e8c7dce5809467074b25f1ef80c5b6f38bf /src/extension
parentprovide a parent for the working-please-wait message so it does not sink (diff)
downloadinkscape-b93c05826018abdeff80fe28be1a9fe9901ff3cf.tar.gz
inkscape-b93c05826018abdeff80fe28be1a9fe9901ff3cf.zip
allow inx to suppress live preview checkbox
(bzr r5469)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/effect.cpp4
-rw-r--r--src/extension/effect.h1
-rw-r--r--src/extension/prefdialog.cpp2
3 files changed, 6 insertions, 1 deletions
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);