diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-05-06 06:21:51 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-05-06 06:21:51 +0000 |
| commit | a4d0a358424440128cd4c4fb2915ccc4b86f4587 (patch) | |
| tree | 818fc169950e0076d262bd8e633976afaafd7783 /src/widgets | |
| parent | symbol rendering fix bug:705345 (diff) | |
| download | inkscape-a4d0a358424440128cd4c4fb2915ccc4b86f4587.tar.gz inkscape-a4d0a358424440128cd4c4fb2915ccc4b86f4587.zip | |
Adding initial cut of resource manager.
(bzr r10198)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 19 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.h | 7 |
2 files changed, 26 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) { diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index 0102897e5..53d9dd1bc 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -200,8 +200,14 @@ struct SPDesktopWidget { { _dtw->setCoordinateStatus (p); } virtual void setMessage (Inkscape::MessageType type, gchar const* msg) { _dtw->setMessage (type, msg); } + + virtual bool showInfoDialog( Glib::ustring const &message ) { + return _dtw->showInfoDialog( message ); + } + virtual bool warnDialog (gchar* text) { return _dtw->warnDialog (text); } + virtual Inkscape::UI::Widget::Dock* getDock () { return _dtw->getDock(); } }; @@ -218,6 +224,7 @@ struct SPDesktopWidget { void setWindowSize (gint w, gint h); void setWindowTransient (void *p, int transient_policy); void presentWindow(); + bool showInfoDialog( Glib::ustring const &message ); bool warnDialog (gchar *text); void setToolboxFocusTo (gchar const *); void setToolboxAdjustmentValue (gchar const * id, double value); |
