Code

provide a parent for the working-please-wait message so it does not sink
authorbuliabyak <buliabyak@users.sourceforge.net>
Fri, 18 Apr 2008 02:39:23 +0000 (02:39 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Fri, 18 Apr 2008 02:39:23 +0000 (02:39 +0000)
src/extension/execution-env.cpp

index aa8c82171a99f2db61c6572c955a6bf9cda4f17d..539e0786ac9330eb780f551d88b2e46ce2a5c634 100644 (file)
@@ -22,6 +22,7 @@
 #include "ui/view/view.h"
 #include "sp-namedview.h"
 #include "desktop-handles.h"
+#include "display/sp-canvas.h"
 
 #include "util/glib-list-iterators.h"
 
@@ -124,8 +125,15 @@ ExecutionEnv::createWorkingDialog (void) {
         _visibleDialog = NULL;
     }
 
+    SPDesktop *desktop = (SPDesktop *)_doc;
+    GtkWidget *toplevel = gtk_widget_get_toplevel(&(desktop->canvas->widget));
+    if (!toplevel || !GTK_WIDGET_TOPLEVEL (toplevel)) 
+        return;
+    Gtk::Window *window = Glib::wrap(GTK_WINDOW(toplevel), false);
+
     gchar * dlgmessage = g_strdup_printf(_("'%s' working, please wait..."), _effect->get_name());
-    _visibleDialog = new Gtk::MessageDialog(dlgmessage,
+    _visibleDialog = new Gtk::MessageDialog(*window,
+                               dlgmessage,
                                false, // use markup
                                Gtk::MESSAGE_INFO,
                                Gtk::BUTTONS_CANCEL,