From 69db184256054798f42a26d76d10906a7f4d20a3 Mon Sep 17 00:00:00 2001 From: gouldtj Date: Sat, 1 Sep 2007 04:33:12 +0000 Subject: [PATCH] r16395@tres: ted | 2007-08-27 19:41:32 -0700 This is a good stopping point. I think things are working... more testing. --- src/extension/effect.cpp | 1 + src/extension/execution-env.cpp | 11 +++++++++-- src/extension/execution-env.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index aa702a1ae..fc8715248 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -238,6 +238,7 @@ Effect::prefs (Inkscape::UI::View::View * doc) void Effect::effect (Inkscape::UI::View::View * doc) { + printf("Execute effect\n"); if (!loaded()) set_state(Extension::STATE_LOADED); if (!loaded()) return; diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index be3abcd41..fcf60cdcb 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -71,7 +71,8 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk } ExecutionEnv::~ExecutionEnv (void) { - if (_visibleDialog != NULL) { + _dialogsig.disconnect(); + if (_visibleDialog != NULL && !_shutdown) { delete _visibleDialog; } return; @@ -101,6 +102,7 @@ ExecutionEnv::createPrefsDialog (Gtk::Widget * controls) { _visibleDialog = new PrefDialog(_effect->get_name(), _effect->get_help(), controls, this, _effect); _visibleDialog->signal_response().connect(sigc::mem_fun(this, &ExecutionEnv::preferencesResponse)); _visibleDialog->show(); + _dialogsig = _visibleDialog->signal_response().connect(sigc::mem_fun(this, &ExecutionEnv::preferencesResponse)); _prefsVisible = true; return; @@ -108,6 +110,7 @@ ExecutionEnv::createPrefsDialog (Gtk::Widget * controls) { void ExecutionEnv::createWorkingDialog (void) { + printf("Create working dialog\n"); if (_visibleDialog != NULL) { delete _visibleDialog; } @@ -118,7 +121,7 @@ ExecutionEnv::createWorkingDialog (void) { Gtk::MESSAGE_INFO, Gtk::BUTTONS_CANCEL, true); // modal - _visibleDialog->signal_response().connect(sigc::mem_fun(this, &ExecutionEnv::workingCanceled)); + _dialogsig = _visibleDialog->signal_response().connect(sigc::mem_fun(this, &ExecutionEnv::workingCanceled)); g_free(dlgmessage); _visibleDialog->show(); @@ -222,6 +225,7 @@ ExecutionEnv::run (void) { reselect(); } } + printf("Execution environment done running\n"); return; } @@ -247,6 +251,9 @@ ExecutionEnv::shutdown (void) { _visibleDialog = NULL; } + return; +} + } } /* namespace Inkscape, Extension */ diff --git a/src/extension/execution-env.h b/src/extension/execution-env.h index e46aafc07..a3938be3d 100644 --- a/src/extension/execution-env.h +++ b/src/extension/execution-env.h @@ -35,6 +35,7 @@ private: Glib::RefPtr _mainloop; Inkscape::UI::View::View * _doc; std::list _selected; + sigc::connection _dialogsig; public: Effect * _effect; -- 2.30.2