## GtkRecentChooserDialog GtkRecentChooserDialog — Displays recently used files in a dialog |

## Synopsis

    #include <gtk/gtk.h>

    struct              GtkRecentChooserDialog;
    GtkWidget *         gtk_recent_chooser_dialog_new       (const gchar *title,
                                                             GtkWindow *parent,
                                                             const gchar *first_button_text,
                                                             ...);
    GtkWidget *         gtk_recent_chooser_dialog_new_for_manager
                                                            (const gchar *title,
                                                             GtkWindow *parent,
                                                             GtkRecentManager *manager,
                                                             const gchar *first_button_text,
                                                             ...);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkWindow
                                           +----GtkDialog
                                                 +----GtkRecentChooserDialog

## Implemented Interfaces

GtkRecentChooserDialog implements AtkImplementorIface, GtkBuildable and GtkRecentChooser.

## Description

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 60. Typical usage

In the simplest of cases, you can use the following code to use a GtkRecentChooserDialog to select a recently used file:

    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);

Recently used files are supported since GTK+ 2.10.

## Details

### struct GtkRecentChooserDialog

    struct GtkRecentChooserDialog;

### gtk_recent_chooser_dialog_new ()

    GtkWidget *         gtk_recent_chooser_dialog_new       (const gchar *title,
                                                             GtkWindow *parent,
                                                             const gchar *first_button_text,
                                                             ...);

Creates a new GtkRecentChooserDialog. This function is analogous to `gtk_dialog_new_with_buttons()`.

`title` : | Title of the dialog, or `NULL`. [allow-none]
`parent` : | Transient parent of the dialog, or `NULL`,. [allow-none]
`first_button_text` : | stock ID or text to go in the first button, or `NULL`. [allow-none]
Returns : | a new GtkRecentChooserDialog

Since 2.10

### gtk_recent_chooser_dialog_new_for_manager ()

    GtkWidget *         gtk_recent_chooser_dialog_new_for_manager
                                                            (const gchar *title,
                                                             GtkWindow *parent,
                                                             GtkRecentManager *manager,
                                                             const gchar *first_button_text,
                                                             ...);

Creates a new GtkRecentChooserDialog with a specified recent manager.

This is useful if you have implemented your own recent manager, or if you have a customized instance of a GtkRecentManager object.

`title` : | Title of the dialog, or `NULL`. [allow-none]
`parent` : | Transient parent of the dialog, or `NULL`,. [allow-none]
`manager` : | a GtkRecentManager
`first_button_text` : | stock ID or text to go in the first button, or `NULL`. [allow-none]
Returns : | a new GtkRecentChooserDialog

Since 2.10

## See Also

GtkRecentChooser, GtkDialog