[gtk+] Move documentation to inline comments: GtkRecentChooserDialog
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Move documentation to inline comments: GtkRecentChooserDialog
- Date: Fri, 21 May 2010 02:15:57 +0000 (UTC)
commit 280b01a8db434736053a39b5a3106c6593fbcb01
Author: Javier Jardón <jjardon gnome org>
Date: Fri May 21 03:24:05 2010 +0200
Move documentation to inline comments: GtkRecentChooserDialog
docs/reference/gtk/tmpl/.gitignore | 1 +
.../reference/gtk/tmpl/gtkrecentchooserdialog.sgml | 96 --------------------
gtk/gtkrecentchooserdialog.c | 46 ++++++++++
3 files changed, 47 insertions(+), 96 deletions(-)
---
diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore
index d602664..0d0be57 100644
--- a/docs/reference/gtk/tmpl/.gitignore
+++ b/docs/reference/gtk/tmpl/.gitignore
@@ -12,6 +12,7 @@ gtkradiobutton.sgml
gtkrange.sgml
gtkrecentaction.sgml
gtkrecentchooser.sgml
+gtkrecentchooserdialog.sgml
gtkrecentchoosermenu.sgml
gtkrecentchooserwidget.sgml
gtkscalebutton.sgml
diff --git a/gtk/gtkrecentchooserdialog.c b/gtk/gtkrecentchooserdialog.c
index 058439a..c86910f 100644
--- a/gtk/gtkrecentchooserdialog.c
+++ b/gtk/gtkrecentchooserdialog.c
@@ -29,6 +29,52 @@
#include <stdarg.h>
+
+/**
+ * SECTION:gtkrecentchooserdialog
+ * @Short_description: Displays recently used files in a dialog
+ * @Title: GtkRecentChooserDialog
+ * @See_also:#GtkRecentChooser, #GtkDialog
+ *
+ * #GtkRecentChooserDialog is a dialog box suitable for displaying the recently
+ * used documents. This widgets works by putting a #GtkRecentChooserWidget inside
+ * a #GtkDialog. It exposes the #GtkRecentChooserIface interface, so you can use
+ * all the #GtkRecentChooser functions on the recent chooser dialog as well as
+ * those for #GtkDialog.
+ *
+ * Note that #GtkRecentChooserDialog does not have any methods of its own.
+ * Instead, you should use the functions that work on a #GtkRecentChooser.
+ *
+ * <example id="gtkrecentchooser-typical-usage">
+ * <title>Typical usage</title>
+ * In the simplest of cases, you can use the following code to use
+ * a #GtkRecentChooserDialog to select a recently used file:
+ * <programlisting>
+ * GtkWidget *dialog;
+ *
+ * dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
+ * parent_window,
+ * GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ * GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ * NULL);
+ *
+ * if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+ * {
+ * GtkRecentInfo *info;
+ *
+ * info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (dialog));
+ * open_file (gtk_recent_info_get_uri (info));
+ * gtk_recent_info_unref (info);
+ * }
+ *
+ * gtk_widget_destroy (dialog);
+ * </programlisting>
+ * </example>
+ *
+ * Recently used files are supported since GTK+ 2.10.
+ */
+
+
struct _GtkRecentChooserDialogPrivate
{
GtkRecentManager *manager;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]