From a4d0a358424440128cd4c4fb2915ccc4b86f4587 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 5 May 2011 23:21:51 -0700 Subject: Adding initial cut of resource manager. (bzr r10198) --- src/widgets/desktop-widget.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/widgets/desktop-widget.cpp') 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) { -- cgit v1.2.3