summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a638f81)
raw | patch | inline | side by side (parent: a638f81)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Sat, 1 Sep 2007 04:31:58 +0000 (04:31 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Sat, 1 Sep 2007 04:31:58 +0000 (04:31 +0000) |
Live preview toggling is working. Pinning, not as much. But getting
there.
there.
src/extension/execution-env.cpp | patch | blob | history | |
src/extension/execution-env.h | patch | blob | history | |
src/extension/prefdialog.cpp | patch | blob | history |
index b21d7a0f571eaf6e82d0b5718600403cea772331..adcd2a3d7fddf950a40af6b28743216283220a30 100644 (file)
_humanWait(false),
_canceled(false),
_prefsChanged(false),
+ _livePreview(true),
_doc(doc) {
SPDesktop *desktop = (SPDesktop *)_doc;
ExecutionEnv::run (void) {
while (!_finished) {
_canceled = false;
- if (_humanWait) {
+ if (_humanWait || !_livePreview) {
_mainloop->run();
} else {
_prefsChanged = false;
return;
}
+void
+ExecutionEnv::livePreview (bool state) {
+ _mainloop->quit();
+ if (_livePreview && !state) {
+ _canceled = true;
+ }
+ if (!_livePreview && state) {
+ _humanWait = false;
+ }
+ _livePreview = state;
+ return;
+}
} } /* namespace Inkscape, Extension */
index a20c0ba3df6a4e680b1d2c5afe2194950d9316b8..3c4b13198efc812411bfc8a271332ac97b07d951 100644 (file)
bool _humanWait;
bool _canceled;
bool _prefsChanged;
+ bool _livePreview;
Glib::RefPtr<Glib::MainLoop> _mainloop;
Inkscape::UI::View::View * _doc;
std::list<Glib::ustring> _selected;
void run (void);
void preferencesChange (void);
+ void livePreview (bool state = true);
private:
void createPrefsDialog (Gtk::Widget * controls);
index 66a04dc1def0fb7c9b4283aaaf7fff25254eefa6..eb6cbf6fa9a8844b5c65e6db20bae65b36894b29 100644 (file)
pinned_toggle();
_signal_preview.connect(sigc::mem_fun(this, &PrefDialog::preview_toggle));
_signal_pinned.connect(sigc::mem_fun(this, &PrefDialog::pinned_toggle));
+
}
GtkWidget *dlg = GTK_WIDGET(gobj());
void
PrefDialog::preview_toggle (void) {
if(_param_preview->get_bool(NULL, NULL) && !_param_pinned->get_bool(NULL, NULL)) {
- //std::cout << "Live Preview" << std::endl;
+ _exEnv->livePreview(true);
} else {
- //std::cout << "No Preview" << std::endl;
+ _exEnv->livePreview(false);
}
}