Update docs of GtkAboutDialog and GtkLinkButton

Remove references to global hooks from the docs. Also move remaining
docs inline, and remove the templates.
This commit is contained in:
Matthias Clasen
2010-09-24 13:41:29 -04:00
parent bc6a3f8cd8
commit cc9ac5b7ea
4 changed files with 32 additions and 170 deletions

View File

@@ -1,4 +1,5 @@
gtkactiongroup.sgml
gtkaboutdialog.sgml
gtkbbox.sgml
gtkbox.sgml
gtkbuilder.sgml
@@ -10,6 +11,7 @@ gtkhbox.sgml
gtkiconview.sgml
gtkimcontextsimple.sgml
gtkimmulticontext.sgml
gtklinkbutton.sgml
gtkmessagedialog.sgml
gtkobject.sgml
gtkorientable.sgml

View File

@@ -1,139 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkLinkButton
<!-- ##### SECTION Short_Description ##### -->
Create buttons bound to a URL
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkLinkButton is a #GtkButton with a hyperlink, similar to the one
used by web browsers, which triggers an action when clicked. It is useful
to show quick links to resources.
</para>
<para>
A link button is created by calling either gtk_link_button_new() or
gtk_link_button_new_with_label(). If using the former, the URI you pass
to the constructor is used as a label for the widget.
</para>
<para>
The URI bound to a #GtkLinkButton can be set specifically using
gtk_link_button_set_uri(), and retrieved using gtk_link_button_get_uri().
</para>
<para>
#GtkLinkButton offers a global hook, which is called when the used clicks
on it: see gtk_link_button_set_uri_hook().
</para>
<para>
#GtkLinkButton was added in GTK+ 2.10.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkButton
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkLinkButton ##### -->
<para>
The #GtkLinkButton struct contains private data only, and should be
manipulated using the functions below.
</para>
<!-- ##### ARG GtkLinkButton:uri ##### -->
<para>
</para>
<!-- ##### ARG GtkLinkButton:visited ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_link_button_new ##### -->
<para>
</para>
@uri:
@Returns:
<!-- ##### FUNCTION gtk_link_button_new_with_label ##### -->
<para>
</para>
@uri:
@label:
@Returns:
<!-- ##### FUNCTION gtk_link_button_get_uri ##### -->
<para>
</para>
@link_button:
@Returns:
<!-- ##### FUNCTION gtk_link_button_set_uri ##### -->
<para>
</para>
@link_button:
@uri:
<!-- ##### USER_FUNCTION GtkLinkButtonUriFunc ##### -->
<para>
The type of a function which is called when the #GtkLinkButton is
clicked.
</para>
@button: the #GtkLinkButton which was clicked
@link_: the URI to which the clicked #GtkLinkButton points
@user_data: user data that was passed when the function was registered
with gtk_link_button_set_uri_hook()
<!-- ##### FUNCTION gtk_link_button_set_uri_hook ##### -->
<para>
</para>
@func:
@data:
@destroy:
@Returns:
<!-- ##### FUNCTION gtk_link_button_get_visited ##### -->
<para>
</para>
@link_button:
@Returns:
<!-- ##### FUNCTION gtk_link_button_set_visited ##### -->
<para>
</para>
@link_button:
@visited:

View File

@@ -60,41 +60,21 @@
* SECTION:gtkaboutdialog
* @Short_description: Display information about an application
* @Title: GtkAboutDialog
* @See_also:#GTK_STOCK_ABOUT
* @See_also: #GTK_STOCK_ABOUT
*
* The #GtkAboutDialog offers a simple way to display information about
* The GtkAboutDialog offers a simple way to display information about
* a program like its logo, name, copyright, website and license. It is
* also possible to give credits to the authors, documenters, translators
* and artists who have worked on the program. An about dialog is typically
* opened when the user selects the <literal>About</literal> option from
* the <literal>Help</literal> menu. All parts of the dialog are optional.
*
* About dialog often contain links and email addresses. #GtkAboutDialog
* supports this by offering global hooks, which are called when the user
* clicks on a link or email address, see gtk_about_dialog_set_email_hook()
* and gtk_about_dialog_set_url_hook(). Email addresses in the
* authors, documenters and artists properties are recognized by looking for
* <literal>&lt;user@<!-- -->host&gt;</literal>, URLs are
* recognized by looking for <literal>http://url</literal>, with
* <literal>url</literal> extending to the next space, tab or line break.
* About dialog often contain links and email addresses. GtkAboutDialog
* displays these as clickable links. By default, it calls gtk_show_uri()
* when a user clicks one. The behaviour can be overridden with the
* #GtkAboutDialog::activate-link signal.
*
* <para id="gtk-about-dialog-hook-setup">
* Since 2.18 #GtkAboutDialog provides default website and email hooks that
* use gtk_show_uri().
* </para>
*
* If you want provide your own hooks overriding the default ones, it is
* important to do so before setting the website and email URL properties,
* like this:
* <informalexample><programlisting>
* gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL);
* gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url);
* </programlisting></informalexample>
* To disable the default hooks, you can pass %NULL as the hook func. Then,
* the #GtkAboutDialog widget will not display the website or the
* email addresses as clickable.
*
* To make constructing a #GtkAboutDialog as convenient as possible, you can
* To make constructing a GtkAboutDialog as convenient as possible, you can
* use the function gtk_show_about_dialog() which constructs and shows a dialog
* and keeps it around so that it can be shown again.
*
@@ -102,7 +82,7 @@
* on the dialog window (where &percnt;s is replaced by the name of the
* application, but in order to ensure proper translation of the title,
* applications should set the title property explicitly when constructing
* a #GtkAboutDialog, as shown in the following example:
* a GtkAboutDialog, as shown in the following example:
* <informalexample><programlisting>
* gtk_show_about_dialog (NULL,
* "program-name", "ExampleCode",
@@ -110,9 +90,6 @@
* "title" _("About ExampleCode"),
* NULL);
* </programlisting></informalexample>
* Note that prior to GTK+ 2.12, the #GtkAboutDialog:program-name property
* was called "name". This was changed to avoid the conflict with the
* #GtkWidget:name property.
*/
static GdkColor default_link_color = { 0, 0, 0, 0xeeee };

View File

@@ -22,6 +22,28 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Cambridge, MA 02139, USA.
*/
/**
* SECTION:gtklinkbutton
* @Title: GtkLinkButton
* @Short_description: Create buttons bound to a URL
* @See_also: #GtkButton
*
* A GtkLinkButton is a #GtkButton with a hyperlink, similar to the one
* used by web browsers, which triggers an action when clicked. It is useful
* to show quick links to resources.
*
* A link button is created by calling either gtk_link_button_new() or
* gtk_link_button_new_with_label(). If using the former, the URI you pass
* to the constructor is used as a label for the widget.
*
* The URI bound to a GtkLinkButton can be set specifically using
* gtk_link_button_set_uri(), and retrieved using gtk_link_button_get_uri().
*
* By default, GtkLinkButton calls gtk_show_uri() when the button is
* clicked. This behaviour can be overridden by connecting to the
* #GtkButton::clicked signal.
*/
#include "config.h"
#include "gtklinkbutton.h"