diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2009-03-01 05:19:42 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2009-03-01 05:19:42 +0000 |
commit | f3f4fec8db1742ed54aa8217b19f77a3771bf1a3 (patch) | |
tree | 93a0e4ce66bf7194bc60a137793fb3fb073ee30d /docs/tools | |
parent | 7ab372c6cafd2cac572128d389a1b732f540b6bb (diff) | |
download | gtk+-f3f4fec8db1742ed54aa8217b19f77a3771bf1a3.tar.gz |
Set the program-name property of the about dialog.
* demos/gtk-demo/appwindow.c: Set the program-name property
of the about dialog.
* docs/tools/widgets.c: Add GtkAboutDialog
svn path=/trunk/; revision=22427
Diffstat (limited to 'docs/tools')
-rw-r--r-- | docs/tools/widgets.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index ae75f3104b..3f512fb69b 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -1,10 +1,11 @@ +#include "config.h" + #include <gtk/gtkunixprint.h> #include <gdk/gdkkeysyms.h> #include <X11/Xatom.h> #include <gdkx.h> #include "widgets.h" - #define SMALL_WIDTH 240 #define SMALL_HEIGHT 75 #define MEDIUM_WIDTH 240 @@ -765,9 +766,37 @@ create_message_dialog (void) GTK_MESSAGE_INFO, GTK_BUTTONS_OK, NULL); + gtk_window_set_icon_name (GTK_WINDOW (widget), "gtk-copy"); gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (widget), "<b>Message Dialog</b>\n\nWith secondary text"); - return new_widget_info ("messagedialog", widget, MEDIUM); + return new_widget_info ("messagedialog", widget, ASIS); +} + +static WidgetInfo * +create_about_dialog (void) +{ + GtkWidget *widget; + const gchar *authors[] = { + "Peter Mattis", + "Spencer Kimball", + "Josh MacDonald", + "and many more...", + NULL + }; + + widget = gtk_about_dialog_new (); + g_object_set (widget, + "program-name", "GTK+ Code Demos", + "version", PACKAGE_VERSION, + "copyright", "(C) 1997-2009 The GTK+ Team", + "website", "http://www.gtk.org", + "comments", "Program to demonstrate GTK+ functions.", + "logo-icon-name", "gtk-about", + "title", "About GTK+ Code Demos", + "authors", authors, + NULL); + gtk_window_set_icon_name (GTK_WINDOW (widget), "gtk-about"); + return new_widget_info ("aboutdialog", widget, ASIS); } static WidgetInfo * @@ -956,6 +985,7 @@ get_all_widgets (void) { GList *retval = NULL; + retval = g_list_prepend (retval, create_about_dialog ()); retval = g_list_prepend (retval, create_accel_label ()); retval = g_list_prepend (retval, create_button ()); retval = g_list_prepend (retval, create_check_button ()); |