summaryrefslogtreecommitdiffstats
path: root/src/extension/effect.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2007-09-01 04:36:03 +0000
committergouldtj <gouldtj@users.sourceforge.net>2007-09-01 04:36:03 +0000
commit776410582f483ba74ce1068ff0dc0e9f068fb5d7 (patch)
treed71a68250393725e3b54c691fe5939fddd625de3 /src/extension/effect.cpp
parentr16441@tres: ted | 2007-08-30 20:44:39 -0700 (diff)
downloadinkscape-776410582f483ba74ce1068ff0dc0e9f068fb5d7.tar.gz
inkscape-776410582f483ba74ce1068ff0dc0e9f068fb5d7.zip
r16442@tres: ted | 2007-08-30 21:51:42 -0700
One preference dialog per effect. Nothing crazy here. Also setting the timer to be ref counted in lock/unlock mode. This way the whole thing stays locked while the dialog is shown. (bzr r3653)
Diffstat (limited to 'src/extension/effect.cpp')
-rw-r--r--src/extension/effect.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp
index a20f1c6e9..7ac4825a3 100644
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
@@ -35,7 +35,8 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation *
_name_noprefs(Glib::ustring(get_name()) + _(" (No preferences)")),
_verb(get_id(), get_name(), NULL, NULL, this, true),
_verb_nopref(_id_noprefs.c_str(), _name_noprefs.c_str(), NULL, NULL, this, false),
- _menu_node(NULL), _workingDialog(true)
+ _menu_node(NULL), _workingDialog(true),
+ _prefDialog(NULL)
{
Inkscape::XML::Node * local_effects_menu = NULL;
@@ -206,6 +207,11 @@ Effect::check (void)
bool
Effect::prefs (Inkscape::UI::View::View * doc)
{
+ if (_prefDialog != NULL) {
+ _prefDialog->raise();
+ return true;
+ }
+
if (!loaded())
set_state(Extension::STATE_LOADED);
if (!loaded()) return false;
@@ -237,7 +243,7 @@ Effect::prefs (Inkscape::UI::View::View * doc)
void
Effect::effect (Inkscape::UI::View::View * doc)
{
- printf("Execute effect\n");
+ //printf("Execute effect\n");
if (!loaded())
set_state(Extension::STATE_LOADED);
if (!loaded()) return;
@@ -300,6 +306,18 @@ Effect::get_info_widget(void)
return Extension::get_info_widget();
}
+void
+Effect::set_pref_dialog (PrefDialog * prefdialog)
+{
+ _prefDialog = prefdialog;
+ if (_prefDialog == NULL) {
+ timer->unlock();
+ } else {
+ timer->lock();
+ }
+ return;
+}
+
/** \brief Create an action for a \c EffectVerb
\param view Which view the action should be created for
\return The built action.