summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18f0fe2)
raw | patch | inline | side by side (parent: 18f0fe2)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Sat, 1 Sep 2007 04:36:12 +0000 (04:36 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Sat, 1 Sep 2007 04:36:12 +0000 (04:36 +0000) |
Pump some GTK events so that there is more interactivity.
src/extension/implementation/script.cpp | patch | blob | history |
index 98ea9fceeba115055814c2e0fc03ecc5875cac6a..7a6b5ce5afac63c7ff0c87cb68d302cab4733a42 100644 (file)
namespace Extension {
namespace Implementation {
-
+void pump_events (void) {
+ while( Gtk::Main::events_pending() )
+ Gtk::Main::iteration();
+ return;
+}
//Interpreter lookup table
struct interpreter_t {
@@ -719,6 +723,8 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do
Inkscape::Extension::db.get(SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE),
doc->doc(), tempfilename_in.c_str(), FALSE, FALSE, FALSE);
+ pump_events();
+
if (desktop != NULL) {
Inkscape::Util::GSListConstIterator<SPItem *> selected =
sp_desktop_selection(desktop)->itemList();
@@ -735,6 +741,8 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do
int data_read = execute(command, params, tempfilename_in, fileout);
fileout.toFile(tempfilename_out);
+ pump_events();
+
SPDocument * mydoc = NULL;
if (data_read > 10) {
mydoc = Inkscape::Extension::open(
@@ -742,6 +750,8 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do
tempfilename_out.c_str());
} // data_read
+ pump_events();
+
// make sure we don't leak file descriptors from g_file_open_tmp
close(tempfd_in);
close(tempfd_out);