summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e554673)
raw | patch | inline | side by side (parent: e554673)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Wed, 27 Jun 2007 06:20:33 +0000 (06:20 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Wed, 27 Jun 2007 06:20:33 +0000 (06:20 +0000) |
Moving the dialog one step out and adding a cancel event.
index 10ac493b5a2a3b06700797c5ea4697bb02aabbf8..658861de795a0a5365d129eb629bdbb6acf90be7 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
#include "effect.h"
#include "ui/view/view.h"
+#include "gtkmm/messagedialog.h"
+
/* Inkscape::Extension::Effect */
namespace Inkscape {
set_state(Extension::STATE_LOADED);
if (!loaded()) return;
+ gchar * dlgmessage = g_strdup_printf(_("The effect '%s' is working on your document. Please wait."), get_name());
+ Gtk::MessageDialog working(dlgmessage,
+ false, // use markup
+ Gtk::MESSAGE_INFO,
+ Gtk::BUTTONS_CANCEL,
+ true); // modal
+ g_free(dlgmessage);
+ working.show();
+
set_last_effect(this);
imp->effect(this, doc);
sp_document_done(doc->doc(), SP_VERB_NONE, _(this->get_name()));
+ working.hide();
+
return;
}
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index 42eabc3adb2593558302184680dcc3be12c555f5..d01f52cb425bfa6346e4672ce2f36046d8a4124c 100644 (file)
return TRUE;
} /* Implemenation::check */
+bool
+Implementation::cancelProcessing (void) {
+ return true;
+}
+
Gtk::Widget *
Implementation::prefs_input(Inkscape::Extension::Input *module, gchar const *filename) {
return module->autogui(NULL, NULL);
diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h
index 03ade7a1620635db82dc7d7a44a55046c2ae251f..fbe84249ccded7f6525b8742f1af999b6fd479af 100644 (file)
/** Verify any dependencies. */
virtual bool check(Inkscape::Extension::Extension *module);
+ virtual bool cancelProcessing (void);
/* ----- Input functions ----- */
/** Find out information about the file. */
index 2e0dd004e237c26dbe925adea34317a43c2252bc..b5e995b65af13c935caf17599207586dc622064e 100644 (file)
@@ -789,17 +789,6 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do
return;
}
- gchar * dlgmessage = g_strdup_printf(_("The effect '%s' is working on your document. Please wait."), module->get_name());
-
- Gtk::MessageDialog working(dlgmessage,
- false, // use markup
- Gtk::MESSAGE_INFO,
- Gtk::BUTTONS_CANCEL,
- true); // modal
- g_free(dlgmessage);
- working.show();
-
-
gchar *tmpname;
// FIXME: process the GError instead of passing NULL
gint tempfd_in = g_file_open_tmp("ink_ext_XXXXXX", &tmpname, NULL);
@@ -890,7 +879,6 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do
sp_namedview_update_layers_from_document(desktop);
}
- working.hide();
return;
}