[gtk+] Update docs of GtkAboutDialog and GtkLinkButton
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Update docs of GtkAboutDialog and GtkLinkButton
- Date: Fri, 24 Sep 2010 17:42:54 +0000 (UTC)
commit cc9ac5b7eaeb93578e9e12059648400ec76b1a3f
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Sep 24 13:41:29 2010 -0400
Update docs of GtkAboutDialog and GtkLinkButton
Remove references to global hooks from the docs. Also move remaining
docs inline, and remove the templates.
docs/reference/gtk/tmpl/.gitignore | 2 +
docs/reference/gtk/tmpl/gtklinkbutton.sgml | 139 ----------------------------
gtk/gtkaboutdialog.c | 39 ++------
gtk/gtklinkbutton.c | 22 +++++
4 files changed, 32 insertions(+), 170 deletions(-)
---
diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore
index b2a8ccb..4dd9c0c 100644
--- a/docs/reference/gtk/tmpl/.gitignore
+++ b/docs/reference/gtk/tmpl/.gitignore
@@ -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
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 4901fea..63d3cbe 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -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><user@<!-- -->host></literal>, URLs are
- * recognized by looking for <literal>http://url</literal>, with
- * <literal>url</literal> extending to the next space, tab or line break.
- *
- * <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.
+ * 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.
*
- * 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 %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 };
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 85de592..027c7ee 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]