Gtk.RecentChooserDialog

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.RecentChooser Gtk.RecentChooser GObject.GInterface->Gtk.RecentChooser GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.Window Gtk.Window Gtk.Bin->Gtk.Window Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Dialog Gtk.Dialog Gtk.RecentChooserDialog Gtk.RecentChooserDialog Gtk.Dialog->Gtk.RecentChooserDialog Gtk.RecentChooser->Gtk.RecentChooserDialog Gtk.Widget->Gtk.Container Gtk.Window->Gtk.Dialog

Subclasses:

None

Methods

Inherited:

Gtk.Dialog (14), Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.RecentChooser (31)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

Virtual Methods

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.RecentChooser (13)

Properties

Inherited:

Gtk.Dialog (1), Gtk.Window (33), Gtk.Container (3), Gtk.Widget (39), Gtk.RecentChooser (10)

Style Properties

Inherited:

Gtk.Dialog (4), Gtk.Window (2), Gtk.Widget (17)

Signals

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.RecentChooser (2)

Fields

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.RecentChooser (2)

Name

Type

Access

Description

parent_instance

Gtk.Dialog

r

Class Details

class Gtk.RecentChooserDialog(*args, **kwargs)
Bases:

Gtk.Dialog, Gtk.RecentChooser

Abstract:

No

Structure:

Gtk.RecentChooserDialogClass

Gtk.RecentChooserDialog is a dialog box suitable for displaying the recently used documents. This widgets works by putting a Gtk.RecentChooserWidget inside a Gtk.Dialog. It exposes the Gtk.RecentChooserIface interface, so you can use all the Gtk.RecentChooser functions on the recent chooser dialog as well as those for Gtk.Dialog.

Note that Gtk.RecentChooserDialog does not have any methods of its own. Instead, you should use the functions that work on a Gtk.RecentChooser.

Typical usage

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

GtkWidget *dialog;
gint res;

dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
                                        parent_window,
                                        _("_Cancel"),
                                        GTK_RESPONSE_CANCEL,
                                        _("_Open"),
                                        GTK_RESPONSE_ACCEPT,
                                        NULL);

res = gtk_dialog_run (GTK_DIALOG (dialog));
if (res == GTK_RESPONSE_ACCEPT)
  {
    GtkRecentInfo *info;
    GtkRecentChooser *chooser = GTK_RECENT_CHOOSER (dialog);

    info = gtk_recent_chooser_get_current_item (chooser);
    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.