diff options
Diffstat (limited to 'src/ui/dialog/export.cpp')
| -rw-r--r-- | src/ui/dialog/export.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index d878b50a4..53629a1a2 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -851,10 +851,11 @@ void Export::onProgressCancel () unsigned int Export::onProgressCallback(float value, void *dlg) { Gtk::Dialog *dlg2 = reinterpret_cast<Gtk::Dialog*>(dlg); - if (dlg2->get_data("cancel")) { - return FALSE; - } + Export *self = reinterpret_cast<Export *>(dlg2->get_data("exportPanel")); + if (self->interrupted) + return FALSE; + gint current = GPOINTER_TO_INT(dlg2->get_data("current")); gint total = GPOINTER_TO_INT(dlg2->get_data("total")); if (total > 0) { @@ -867,7 +868,6 @@ unsigned int Export::onProgressCallback(float value, void *dlg) Gtk::ProgressBar *prg = reinterpret_cast<Gtk::ProgressBar *>(dlg2->get_data("progress")); prg->set_fraction(value); - Export *self = reinterpret_cast<Export *>(dlg2->get_data("exportPanel")); if (self) { self->_prog.set_fraction(value); } @@ -901,6 +901,7 @@ void Export::setExporting(bool exporting, Glib::ustring const &text) Gtk::Dialog * Export::create_progress_dialog (Glib::ustring progress_text) { Gtk::Dialog *dlg = new Gtk::Dialog(_("Export in progress"), TRUE); + dlg->set_transient_for( *(INKSCAPE.active_desktop()->getToplevel()) ); Gtk::ProgressBar *prg = new Gtk::ProgressBar (); prg->set_text(progress_text); |
