RecentChooserDialog


Object Hierarchy:

Gtk.RecentChooserDialog Gtk.RecentChooserDialog Gtk.RecentChooserDialog Gtk.Dialog Gtk.Dialog Gtk.Dialog->Gtk.RecentChooserDialog Gtk.Window Gtk.Window Gtk.Window->Gtk.Dialog Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Window Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.RecentChooserDialog Atk.Implementor->Gtk.Dialog Atk.Implementor->Gtk.Window Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.RecentChooserDialog Gtk.Buildable->Gtk.Dialog Gtk.Buildable->Gtk.Window Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.RecentChooser Gtk.RecentChooser Gtk.RecentChooser->Gtk.RecentChooserDialog

Description:

[ CCode ( type_id = "gtk_recent_chooser_dialog_get_type ()" ) ]
public class RecentChooserDialog : Dialog, Implementor, Buildable, RecentChooser

RecentChooserDialog is a dialog box suitable for displaying the recently used documents.

This widgets works by putting a RecentChooserWidget inside a Dialog. It exposes the RecentChooser interface, so you can use all the RecentChooser functions on the recent chooser dialog as well as those for Dialog.

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

Typical usage

In the simplest of cases, you can use the following code to use a 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.

GtkRecentChooserDialog


Namespace: Gtk
Package: gtk+-3.0

Content:

Creation methods:

Inherited Members:

All known members inherited from class Gtk.Window
All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor



2022 vala-language.org