2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
5 <chapter id="gtk-migrating-GtkAboutDialog">
7 <title>Migrating from GnomeAbout to GtkAboutDialog</title>
10 Since version 2.6, GTK+ provides the #GtkAboutDialog widget as a
11 replacement for the <structname>GnomeAbout</structname> dialog in
12 the libgnomeui library.
16 #GtkAboutDialog supports all features found in <structname>GnomeAbout</structname>.
17 The <structname>GtkAboutDialog</structname> API is bigger, since it follows
18 the GTK+ policy to have getters and setters for all widget properties,
19 but it isn't much more complex than <structname>GnomeAbout</structname>.
23 To convert an application that uses <structname>GnomeAbout</structname> to
24 <structname>GtkAboutDialog</structname>, as a first step, replace calls
26 <informalexample><programlisting>
27 const gchar *documentors[] = {
33 const gchar *documentors[] = {
39 GtkWidget *about = gnome_about_new ("GNOME Test Program", VERSION,
40 "(C) 1998-2001 The Free Software Foundation",
41 "Program to display GNOME functions.",
44 _("translator-credits"),
46 </programlisting></informalexample>
48 <informalexample><programlisting>
49 GdkPixbuf *logo = gdk_pixbuf_new_from_file ("logo.png", NULL);
50 GtkWidget *about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
51 "name", "GNOME Test Program",
53 "copyright", "(C) 1998-2001 The Free Software Foundation",
54 "comments", "Program to display GNOME functions.",
56 "documenters", documenters,
57 "translator-credits", _("translator-credits"),
60 g_object_unref (pixbuf);
61 </programlisting></informalexample>
62 If the g_object_new() construction scares you, you can also use
63 gtk_about_dialog_new() to construct the dialog and then use the
64 setters for the individual properties.
68 Once you are done with the initial conversion, you may want to look into
69 using some of the features of <structname>GtkAboutDialog</structname>
70 which are not present in <structname>GnomeAbout</structname>.
73 You can specify license information with the
74 #GtkAboutDialog:license property
77 You can add separate credits for artists with the
78 #GtkAboutDialog:artists property
81 You can add a pointer to the website of your application, using the
82 #GtkAboutDialog:website and #GtkAboutDialog:website-label properties.
85 If your credits contain email addresses or URLs, you can turn them
86 into clickable links using gtk_about_dialog_set_email_hook() and
87 gtk_about_dialog_set_url_hook().
96 sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")