summaryrefslogtreecommitdiffstats
path: root/src/widgets/desktop-widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
-rw-r--r--src/widgets/desktop-widget.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 63fdc5930..87ce9053f 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -1150,6 +1150,25 @@ SPDesktopWidget::presentWindow()
gtk_window_present (w);
}
+bool SPDesktopWidget::showInfoDialog( Glib::ustring const &message )
+{
+ bool result = false;
+ GtkWindow *window = GTK_WINDOW( gtk_widget_get_toplevel( GTK_WIDGET(this) ) );
+ if (window)
+ {
+ GtkWidget *dialog = gtk_message_dialog_new(
+ window,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_OK,
+ "%s", message.c_str());
+ gtk_window_set_title( GTK_WINDOW(dialog), _("Note:")); // probably want to take this as a parameter.
+ gint response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ }
+ return result;
+}
+
bool
SPDesktopWidget::warnDialog (gchar* text)
{