diff options
| author | Ted Gould <ted@gould.cx> | 2007-09-01 04:35:23 +0000 |
|---|---|---|
| committer | gouldtj <gouldtj@users.sourceforge.net> | 2007-09-01 04:35:23 +0000 |
| commit | d64c2fbeeb243a7694f15874c1eff43fb655daf2 (patch) | |
| tree | 9d7d8408f91d682128994f6dbe169a84b75a4784 /src/extension/execution-env.cpp | |
| parent | (bzr r3649) (diff) | |
| download | inkscape-d64c2fbeeb243a7694f15874c1eff43fb655daf2.tar.gz inkscape-d64c2fbeeb243a7694f15874c1eff43fb655daf2.zip | |
r16430@tres: ted | 2007-08-30 20:32:23 -0700
Adding in a timer so that the preferences aren't acted on immediately.
This should give the illusion of more interactivity.
(bzr r3650)
Diffstat (limited to 'src/extension/execution-env.cpp')
| -rw-r--r-- | src/extension/execution-env.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index 9f50f0c6a..4134b71aa 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -30,7 +30,6 @@ namespace Extension { ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk::Widget * controls, sigc::signal<void> * changeSignal, Gtk::Dialog * prefDialog) : _visibleDialog(NULL), - _effect(effect), _prefsVisible(false), _finished(false), _humanWait(false), @@ -39,7 +38,8 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk _livePreview(true), _selfdelete(false), _changeSignal(changeSignal), - _doc(doc) { + _doc(doc), + _effect(effect) { SPDesktop *desktop = (SPDesktop *)_doc; sp_namedview_document_from_window(desktop); @@ -81,6 +81,7 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk ExecutionEnv::~ExecutionEnv (void) { _dialogsig.disconnect(); + _timersig.disconnect(); if (_prefsVisible) { _changesig.disconnect(); } @@ -95,6 +96,13 @@ ExecutionEnv::~ExecutionEnv (void) { void ExecutionEnv::preferencesChange (void) { + _timersig.disconnect(); + _timersig = Glib::signal_timeout().connect(sigc::mem_fun(this, &ExecutionEnv::preferencesTimer), 100, Glib::PRIORITY_DEFAULT_IDLE); + return; +} + +bool +ExecutionEnv::preferencesTimer (void) { //std::cout << "Preferences are a changin'" << std::endl; _prefsChanged = true; if (_humanWait) { @@ -105,7 +113,7 @@ ExecutionEnv::preferencesChange (void) { processingCancel(); documentCancel(); } - return; + return false; } void |
