]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkrecentchooserdialog.sgml
Move documentation to inline comments: GtkRecentChooserMenu
[~andy/gtk] / docs / reference / gtk / tmpl / gtkrecentchooserdialog.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkRecentChooserDialog
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Displays recently used files in a dialog
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 #GtkRecentChooserDialog is a dialog box suitable for displaying the recently
10 used documents.  This widgets works by putting a #GtkRecentChooserWidget inside
11 a #GtkDialog.  It exposes the #GtkRecentChooserIface interface, so you can use
12 all the #GtkRecentChooser functions on the recent chooser dialog as well as
13 those for #GtkDialog.
14 </para>
15
16 <para>
17 Note that #GtkRecentChooserDialog does not have any methods of its own.
18 Instead, you should use the functions that work on a #GtkRecentChooser.
19 </para>
20
21 <example id="gtkrecentchooser-typical-usage">
22   <title>Typical usage</title>
23
24   <para>
25     In the simplest of cases, you can use the following code to use
26     a #GtkRecentChooserDialog to select a recently used file:
27   </para>
28
29   <programlisting>
30 GtkWidget *dialog;
31
32 dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
33                                         parent_window,
34                                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
35                                         GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
36                                         NULL);
37                                         
38 if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
39   {
40     GtkRecentInfo *info;
41
42     info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (dialog));
43     open_file (gtk_recent_info_get_uri (info));
44     gtk_recent_info_unref (info);
45   }
46
47 gtk_widget_destroy (dialog);
48   </programlisting>
49 </example>
50
51 <para>
52 Recently used files are supported since GTK+ 2.10.
53 </para>
54
55 <!-- ##### SECTION See_Also ##### -->
56 <para>
57 #GtkRecentChooser, #GtkDialog
58 </para>
59
60 <!-- ##### SECTION Stability_Level ##### -->
61
62
63 <!-- ##### SECTION Image ##### -->
64
65
66 <!-- ##### STRUCT GtkRecentChooserDialog ##### -->
67 <para>
68
69 </para>
70
71
72 <!-- ##### FUNCTION gtk_recent_chooser_dialog_new ##### -->
73 <para>
74
75 </para>
76
77 @title: 
78 @parent: 
79 @first_button_text: 
80 @Varargs: 
81 @Returns: 
82
83
84 <!-- ##### FUNCTION gtk_recent_chooser_dialog_new_for_manager ##### -->
85 <para>
86
87 </para>
88
89 @title: 
90 @parent: 
91 @manager: 
92 @first_button_text: 
93 @Varargs: 
94 @Returns: 
95
96