summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bdb0bd8)
raw | patch | inline | side by side (parent: bdb0bd8)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Sat, 1 Sep 2007 04:35:23 +0000 (04:35 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Sat, 1 Sep 2007 04:35:23 +0000 (04:35 +0000) |
Adding in a timer so that the preferences aren't acted on immediately.
This should give the illusion of more interactivity.
This should give the illusion of more interactivity.
src/extension/execution-env.cpp | patch | blob | history | |
src/extension/execution-env.h | patch | blob | history |
index 9f50f0c6adae63e56c93a1e2a53327263e689fbb..4134b71aa7c242cb9177470726d118907695e51d 100644 (file)
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),
_livePreview(true),
_selfdelete(false),
_changeSignal(changeSignal),
- _doc(doc) {
+ _doc(doc),
+ _effect(effect) {
SPDesktop *desktop = (SPDesktop *)_doc;
sp_namedview_document_from_window(desktop);
ExecutionEnv::~ExecutionEnv (void) {
_dialogsig.disconnect();
+ _timersig.disconnect();
if (_prefsVisible) {
_changesig.disconnect();
}
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) {
processingCancel();
documentCancel();
}
- return;
+ return false;
}
void
index 85e97ef18b96cd333e8f006584716d7e1bd3ba9f..34b368afa26758e8b419fca4e27c6fbc79c740e1 100644 (file)
std::list<Glib::ustring> _selected;
sigc::connection _dialogsig;
sigc::connection _changesig;
+ sigc::connection _timersig;
public:
Effect * _effect;
~ExecutionEnv (void);
void run (void);
- void preferencesChange (void);
void livePreview (bool state = true);
void shutdown (bool del = false);
void createWorkingDialog (void);
void workingCanceled (const int resp);
void preferencesResponse (const int resp);
+ void preferencesChange (void);
+ bool preferencesTimer (void);
void processingCancel (void);
void processingComplete(void);
void documentCancel (void);