diff options
| author | Ted Gould <ted@gould.cx> | 2007-09-01 04:36:12 +0000 |
|---|---|---|
| committer | gouldtj <gouldtj@users.sourceforge.net> | 2007-09-01 04:36:12 +0000 |
| commit | 0446759c3db67ace8a2f93dbc8d5cc777210d123 (patch) | |
| tree | b3e299caadb95d16386834fc868d409e9b0ab293 /src/extension/implementation/script.cpp | |
| parent | r16442@tres: ted | 2007-08-30 21:51:42 -0700 (diff) | |
| download | inkscape-0446759c3db67ace8a2f93dbc8d5cc777210d123.tar.gz inkscape-0446759c3db67ace8a2f93dbc8d5cc777210d123.zip | |
r16443@tres: ted | 2007-08-30 22:22:32 -0700
Pump some GTK events so that there is more interactivity.
(bzr r3654)
Diffstat (limited to 'src/extension/implementation/script.cpp')
| -rw-r--r-- | src/extension/implementation/script.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 98ea9fcee..7a6b5ce5a 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -75,7 +75,11 @@ namespace Inkscape { 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); |
