From 678a61f9a2cc5f723f431f63b9ff235bd5bf0db0 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Fri, 18 Apr 2008 02:39:23 +0000 Subject: [PATCH] provide a parent for the working-please-wait message so it does not sink --- src/extension/execution-env.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index aa8c82171..539e0786a 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -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, -- 2.30.2