1 <chapter id="gtk-migrating-GtkAboutDialog">
3 <title>Migrating from GnomeAbout to GtkAboutDialog</title>
6 Since version 2.6, GTK+ provides the #GtkAboutDialog widget as a replacement for
7 the <structname>GnomeAbout</structname> dialog in the libgnomeui library.
11 #GtkAboutDialog supports all features found in <structname>GnomeAbout</structname>.
12 The <structname>GtkAboutDialog</structname> API is bigger, since it follows
13 the GTK+ policy to have getters and setters for all widget properties,
14 but it isn't much more complex than <structname>GnomeAbout</structname>.
18 To convert an application that uses <structname>GnomeAbout</structname> to
19 <structname>GtkAboutDialog</structname>, as a first step, replace calls
21 <informalexample><programlisting>
22 const gchar *documentors[] = {
28 const gchar *documentors[] = {
34 GtkWidget *about = gnome_about_new ("GNOME Test Program", VERSION,
35 "(C) 1998-2001 The Free Software Foundation",
36 "Program to display GNOME functions.",
39 _("translator-credits"),
41 </programlisting></informalexample>
43 <informalexample><programlisting>
44 GdkPixbuf *logo = gdk_pixbuf_new_from_file ("logo.png", NULL);
45 GtkWidget *about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
46 "name", "GNOME Test Program",
48 "copyright", "(C) 1998-2001 The Free Software Foundation",
49 "comments", "Program to display GNOME functions.",
51 "documenters", documenters,
52 "translator-credits", _("translator-credits"),
55 g_object_unref (pixbuf);
56 </programlisting></informalexample>
57 If the g_object_new() construction scares you, you can also use
58 gtk_about_dialog_new() to construct the dialog and then use the setters for
59 the individual properties.
63 Once you are done with the initial conversion, you may want to look into
64 using some of the features of <structname>GtkAboutDialog</structname>
65 which are not present in <structname>GnomeAbout</structname>.
68 You can specify license information with the
69 <link linkend="GtkAboutDialog--license">license</link> property
72 You can add separate credits for artists with the
73 <link linkend="GtkAboutDialog--artists">artists</link> property
76 You can add a pointer to the website of your application, using the
77 <link linkend="GtkAboutDialog--website">website</link> and
78 <link linkend="GtkAboutDialog--website-label">website-label</link>
82 If your credits contain email addresses or URLs, you can turn them
83 into clickable links using gtk_about_dialog_set_email_hook() and
84 gtk_about_dialog_set_url_hook().
93 sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")