Blame docs/reference/gtk/migrating-GtkAboutDialog.sgml

Packit Service fb6fa5
Packit Service fb6fa5
Packit Service fb6fa5
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
Packit Service fb6fa5
]>
Packit Service fb6fa5
<chapter id="gtk-migrating-GtkAboutDialog">
Packit Service fb6fa5
Packit Service fb6fa5
  <title>Migrating from GnomeAbout to GtkAboutDialog</title>
Packit Service fb6fa5
Packit Service fb6fa5
  <para>
Packit Service fb6fa5
    Since version 2.6, GTK+ provides the #GtkAboutDialog widget as a 
Packit Service fb6fa5
    replacement for the <structname>GnomeAbout</structname> dialog in 
Packit Service fb6fa5
    the libgnomeui library.
Packit Service fb6fa5
  </para>
Packit Service fb6fa5
Packit Service fb6fa5
  <para>
Packit Service fb6fa5
    #GtkAboutDialog supports all features found in <structname>GnomeAbout</structname>.
Packit Service fb6fa5
    The <structname>GtkAboutDialog</structname> API is bigger, since it follows 
Packit Service fb6fa5
    the GTK+ policy to have getters and setters for all widget properties, 
Packit Service fb6fa5
    but it isn't much more complex than <structname>GnomeAbout</structname>.
Packit Service fb6fa5
  </para>
Packit Service fb6fa5
Packit Service fb6fa5
  <para>
Packit Service fb6fa5
    To convert an application that uses <structname>GnomeAbout</structname> to 
Packit Service fb6fa5
    <structname>GtkAboutDialog</structname>, as a first step, replace calls 
Packit Service fb6fa5
    like
Packit Service fb6fa5
    <informalexample><programlisting>
Packit Service fb6fa5
    const gchar *documentors[] = { 
Packit Service fb6fa5
      "Documenter 1", 
Packit Service fb6fa5
      "Documenter 2", 
Packit Service fb6fa5
      NULL 
Packit Service fb6fa5
    };
Packit Service fb6fa5
Packit Service fb6fa5
    const gchar *documentors[] = { 
Packit Service fb6fa5
      "Author 1", 
Packit Service fb6fa5
      "Author 2", 
Packit Service fb6fa5
      NULL 
Packit Service fb6fa5
    };
Packit Service fb6fa5
Packit Service fb6fa5
    GtkWidget *about = gnome_about_new ("GNOME Test Program", VERSION,
Packit Service fb6fa5
					"(C) 1998-2001 The Free Software Foundation",
Packit Service fb6fa5
					"Program to display GNOME functions.",
Packit Service fb6fa5
					authors,
Packit Service fb6fa5
					documenters,
Packit Service fb6fa5
					_("translator-credits"),
Packit Service fb6fa5
					"logo.png");
Packit Service fb6fa5
    </programlisting></informalexample>
Packit Service fb6fa5
    by something like 
Packit Service fb6fa5
    <informalexample><programlisting>
Packit Service fb6fa5
    GdkPixbuf *logo = gdk_pixbuf_new_from_file ("logo.png", NULL);
Packit Service fb6fa5
    GtkWidget *about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
Packit Service fb6fa5
                                     "name", "GNOME Test Program", 
Packit Service fb6fa5
                                     "version", VERSION,
Packit Service fb6fa5
			             "copyright", "(C) 1998-2001 The Free Software Foundation",
Packit Service fb6fa5
				     "comments", "Program to display GNOME functions.",
Packit Service fb6fa5
			             "authors", authors,
Packit Service fb6fa5
			             "documenters", documenters,
Packit Service fb6fa5
			             "translator-credits", _("translator-credits"),
Packit Service fb6fa5
				     "logo", logo,
Packit Service fb6fa5
                                     NULL);
Packit Service fb6fa5
    g_object_unref (pixbuf);
Packit Service fb6fa5
    </programlisting></informalexample>
Packit Service fb6fa5
    If the g_object_new() construction scares you, you can also use 
Packit Service fb6fa5
    gtk_about_dialog_new() to construct the dialog and then use the 
Packit Service fb6fa5
    setters for the individual properties.
Packit Service fb6fa5
  </para>
Packit Service fb6fa5
Packit Service fb6fa5
  <para>
Packit Service fb6fa5
    Once you are done with the initial conversion, you may want to look into 
Packit Service fb6fa5
    using some of the features of <structname>GtkAboutDialog</structname> 
Packit Service fb6fa5
    which are not present in <structname>GnomeAbout</structname>.
Packit Service fb6fa5
    <itemizedlist>
Packit Service fb6fa5
      <listitem><para>
Packit Service fb6fa5
        You can specify license information with the 
Packit Service fb6fa5
        #GtkAboutDialog:license property
Packit Service fb6fa5
      </para></listitem>
Packit Service fb6fa5
      <listitem><para>
Packit Service fb6fa5
        You can add separate credits for artists with the 
Packit Service fb6fa5
        #GtkAboutDialog:artists property
Packit Service fb6fa5
      </para></listitem>
Packit Service fb6fa5
      <listitem><para>
Packit Service fb6fa5
        You can add a pointer to the website of your application, using the 
Packit Service fb6fa5
        #GtkAboutDialog:website and #GtkAboutDialog:website-label properties.
Packit Service fb6fa5
      </para></listitem>
Packit Service fb6fa5
      <listitem><para>
Packit Service fb6fa5
        If your credits contain email addresses or URLs, you can turn them 
Packit Service fb6fa5
        into clickable links using gtk_about_dialog_set_email_hook() and 
Packit Service fb6fa5
        gtk_about_dialog_set_url_hook(). 
Packit Service fb6fa5
      </para></listitem>   
Packit Service fb6fa5
    </itemizedlist>
Packit Service fb6fa5
  </para>
Packit Service fb6fa5
</chapter>
Packit Service fb6fa5
Packit Service fb6fa5
Packit Service fb6fa5
Local variables:
Packit Service fb6fa5
mode: sgml
Packit Service fb6fa5
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
Packit Service fb6fa5
End:
Packit Service fb6fa5
-->