Gtk.RecentChooserDialog¶
- Subclasses:
None
Methods¶
Virtual Methods¶
Properties¶
Style Properties¶
- Inherited:
Signals¶
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 |
r |
Class Details¶
- class Gtk.RecentChooserDialog(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.RecentChooserDialog
is a dialog box suitable for displaying the recently used documents. This widgets works by putting aGtk.RecentChooserWidget
inside aGtk.Dialog
. It exposes theGtk.RecentChooserIface
interface, so you can use all theGtk.RecentChooser
functions on the recent chooser dialog as well as those forGtk.Dialog
.Note that
Gtk.RecentChooserDialog
does not have any methods of its own. Instead, you should use the functions that work on aGtk.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.