RecentChooserDialog

#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.

Typical usage ## {#gtkrecentchooser-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;
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.

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

self
RecentChooserDialog self()

Returns this, for use in with statements.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()
builder
RecentChooserDialogGidBuilder builder()

Get builder for gtk.recent_chooser_dialog.RecentChooserDialog

Mixed In Members

From mixin RecentChooserT!()

filter
gtk.recent_filter.RecentFilter filter [@property getter]

Get filter property.

filter
gtk.recent_filter.RecentFilter filter [@property setter]

Set filter property.

limit
int limit [@property getter]

Get limit property.

limit
int limit [@property setter]

Set limit property.

localOnly
bool localOnly [@property getter]

Get localOnly property.

localOnly
bool localOnly [@property setter]

Set localOnly property.

selectMultiple
bool selectMultiple [@property getter]

Get selectMultiple property.

selectMultiple
bool selectMultiple [@property setter]

Set selectMultiple property.

showIcons
bool showIcons [@property getter]

Get showIcons property.

showIcons
bool showIcons [@property setter]

Set showIcons property.

showNotFound
bool showNotFound [@property getter]

Get showNotFound property.

showNotFound
bool showNotFound [@property setter]

Set showNotFound property.

showPrivate
bool showPrivate [@property getter]
showPrivate
bool showPrivate [@property setter]
showTips
bool showTips [@property getter]

Get showTips property.

showTips
bool showTips [@property setter]

Set showTips property.

sortType
gtk.types.RecentSortType sortType [@property getter]

Get sortType property.

sortType
gtk.types.RecentSortType sortType [@property setter]

Set sortType property.

addFilter
void addFilter(gtk.recent_filter.RecentFilter filter)

Adds filter to the list of #GtkRecentFilter objects held by chooser.

getCurrentItem
gtk.recent_info.RecentInfo getCurrentItem()

Gets the #GtkRecentInfo currently selected by chooser.

getCurrentUri
string getCurrentUri()

Gets the URI currently selected by chooser.

getFilter
gtk.recent_filter.RecentFilter getFilter()

Gets the #GtkRecentFilter object currently used by chooser to affect the display of the recently used resources.

getItems
gtk.recent_info.RecentInfo[] getItems()

Gets the list of recently used resources in form of #GtkRecentInfo objects.

getLimit
int getLimit()

Gets the number of items returned by gtk.recent_chooser.RecentChooser.getItems and gtk.recent_chooser.RecentChooser.getUris.

getLocalOnly
bool getLocalOnly()

Gets whether only local resources should be shown in the recently used resources selector. See gtk.recent_chooser.RecentChooser.setLocalOnly

getSelectMultiple
bool getSelectMultiple()

Gets whether chooser can select multiple items.

getShowIcons
bool getShowIcons()

Retrieves whether chooser should show an icon near the resource.

getShowNotFound
bool getShowNotFound()

Retrieves whether chooser should show the recently used resources that were not found.

getShowPrivate
bool getShowPrivate()

Returns whether chooser should display recently used resources registered as private.

getShowTips
bool getShowTips()

Gets whether chooser should display tooltips containing the full path of a recently user resource.

getSortType
gtk.types.RecentSortType getSortType()

Gets the value set by gtk.recent_chooser.RecentChooser.setSortType.

getUris
string[] getUris()

Gets the URI of the recently used resources.

listFilters
gtk.recent_filter.RecentFilter[] listFilters()

Gets the #GtkRecentFilter objects held by chooser.

removeFilter
void removeFilter(gtk.recent_filter.RecentFilter filter)

Removes filter from the list of #GtkRecentFilter objects held by chooser.

selectAll
void selectAll()

Selects all the items inside chooser, if the chooser supports multiple selection.

selectUri
bool selectUri(string uri)

Selects uri inside chooser.

setCurrentUri
bool setCurrentUri(string uri)

Sets uri as the current URI for chooser.

setFilter
void setFilter(gtk.recent_filter.RecentFilter filter)

Sets filter as the current #GtkRecentFilter object used by chooser to affect the displayed recently used resources.

setLimit
void setLimit(int limit)

Sets the number of items that should be returned by gtk.recent_chooser.RecentChooser.getItems and gtk.recent_chooser.RecentChooser.getUris.

setLocalOnly
void setLocalOnly(bool localOnly)

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If local_only is true (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.

setSelectMultiple
void setSelectMultiple(bool selectMultiple)

Sets whether chooser can select multiple items.

setShowIcons
void setShowIcons(bool showIcons)

Sets whether chooser should show an icon near the resource when displaying it.

setShowNotFound
void setShowNotFound(bool showNotFound)

Sets whether chooser should display the recently used resources that it didn’t find. This only applies to local resources.

setShowPrivate
void setShowPrivate(bool showPrivate)

Whether to show recently used resources marked registered as private.

setShowTips
void setShowTips(bool showTips)

Sets whether to show a tooltips containing the full path of each recently used resource in a #GtkRecentChooser widget.

setSortFunc
void setSortFunc(gtk.types.RecentSortFunc sortFunc)

Sets the comparison function used when sorting to be sort_func. If the chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then the chooser will sort using this function.

setSortType
void setSortType(gtk.types.RecentSortType sortType)

Changes the sorting order of the recently used resources list displayed by chooser.

unselectAll
void unselectAll()

Unselects all the items inside chooser.

unselectUri
void unselectUri(string uri)

Unselects uri inside chooser.

connectItemActivated
gulong connectItemActivated(T callback, Flag!"After" after)

Connect to ItemActivated signal.

connectSelectionChanged
gulong connectSelectionChanged(T callback, Flag!"After" after)

Connect to SelectionChanged signal.

Inherited Members

From Dialog

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Dialog self()

Returns this, for use in with statements.

builder
DialogGidBuilder builder()

Get builder for gtk.dialog.Dialog

useHeaderBar
int useHeaderBar [@property getter]

Get useHeaderBar property.

addActionWidget
void addActionWidget(gtk.widget.Widget child, int responseId)

Adds an activatable widget to the action area of a #GtkDialog, connecting a signal handler that will emit the #GtkDialog::response signal on the dialog when the widget is activated. The widget is appended to the end of the dialog’s action area. If you want to add a non-activatable widget, simply pack it into the action_area field of the #GtkDialog struct.

addButton
gtk.widget.Widget addButton(string buttonText, int responseId)

Adds a button with the given text and sets things up so that clicking the button will emit the #GtkDialog::response signal with the given response_id. The button is appended to the end of the dialog’s action area. The button widget is returned, but usually you don’t need it.

getActionArea
gtk.box.Box getActionArea()

Returns the action area of dialog.

getContentArea
gtk.box.Box getContentArea()

Returns the content area of dialog.

getHeaderBar
gtk.header_bar.HeaderBar getHeaderBar()

Returns the header bar of dialog. Note that the headerbar is only used by the dialog if the #GtkDialog:use-header-bar property is true.

getResponseForWidget
int getResponseForWidget(gtk.widget.Widget widget)

Gets the response id of a widget in the action area of a dialog.

getWidgetForResponse
gtk.widget.Widget getWidgetForResponse(int responseId)

Gets the widget button that uses the given response ID in the action area of a dialog.

response
void response(int responseId)

Emits the #GtkDialog::response signal with the given response ID. Used to indicate that the user has responded to the dialog in some way; typically either you or gtk.dialog.Dialog.run will be monitoring the ::response signal and take appropriate action.

run
int run()

Blocks in a recursive main loop until the dialog either emits the #GtkDialog::response signal, or is destroyed. If the dialog is destroyed during the call to gtk.dialog.Dialog.run, gtk.dialog.Dialog.run returns #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the ::response signal emission.

setAlternativeButtonOrderFromArray
void setAlternativeButtonOrderFromArray(int[] newOrder)

Sets an alternative button order. If the #GtkSettings:gtk-alternative-button-order setting is set to true, the dialog buttons are reordered according to the order of the response ids in new_order.

setDefaultResponse
void setDefaultResponse(int responseId)

Sets the last widget in the dialog’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.

setResponseSensitive
void setResponseSensitive(int responseId, bool setting)

Calls gtk_widget_set_sensitive (widget, setting) for each widget in the dialog’s action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.

connectClose
gulong connectClose(T callback, Flag!"After" after)

Connect to Close signal.

connectResponse
gulong connectResponse(T callback, Flag!"After" after)

Connect to Response signal.

From RecentChooser

_getGType
GType _getGType()
filter
gtk.recent_filter.RecentFilter filter [@property getter]

Get filter property.

filter
gtk.recent_filter.RecentFilter filter [@property setter]

Set filter property.

limit
int limit [@property getter]

Get limit property.

limit
int limit [@property setter]

Set limit property.

localOnly
bool localOnly [@property getter]

Get localOnly property.

localOnly
bool localOnly [@property setter]

Set localOnly property.

selectMultiple
bool selectMultiple [@property getter]

Get selectMultiple property.

selectMultiple
bool selectMultiple [@property setter]

Set selectMultiple property.

showIcons
bool showIcons [@property getter]

Get showIcons property.

showIcons
bool showIcons [@property setter]

Set showIcons property.

showNotFound
bool showNotFound [@property getter]

Get showNotFound property.

showNotFound
bool showNotFound [@property setter]

Set showNotFound property.

showPrivate
bool showPrivate [@property getter]
showPrivate
bool showPrivate [@property setter]
showTips
bool showTips [@property getter]

Get showTips property.

showTips
bool showTips [@property setter]

Set showTips property.

sortType
gtk.types.RecentSortType sortType [@property getter]

Get sortType property.

sortType
gtk.types.RecentSortType sortType [@property setter]

Set sortType property.

addFilter
void addFilter(gtk.recent_filter.RecentFilter filter)

Adds filter to the list of #GtkRecentFilter objects held by chooser.

getCurrentItem
gtk.recent_info.RecentInfo getCurrentItem()

Gets the #GtkRecentInfo currently selected by chooser.

getCurrentUri
string getCurrentUri()

Gets the URI currently selected by chooser.

getFilter
gtk.recent_filter.RecentFilter getFilter()

Gets the #GtkRecentFilter object currently used by chooser to affect the display of the recently used resources.

getItems
gtk.recent_info.RecentInfo[] getItems()

Gets the list of recently used resources in form of #GtkRecentInfo objects.

getLimit
int getLimit()

Gets the number of items returned by gtk.recent_chooser.RecentChooser.getItems and gtk.recent_chooser.RecentChooser.getUris.

getLocalOnly
bool getLocalOnly()

Gets whether only local resources should be shown in the recently used resources selector. See gtk.recent_chooser.RecentChooser.setLocalOnly

getSelectMultiple
bool getSelectMultiple()

Gets whether chooser can select multiple items.

getShowIcons
bool getShowIcons()

Retrieves whether chooser should show an icon near the resource.

getShowNotFound
bool getShowNotFound()

Retrieves whether chooser should show the recently used resources that were not found.

getShowPrivate
bool getShowPrivate()

Returns whether chooser should display recently used resources registered as private.

getShowTips
bool getShowTips()

Gets whether chooser should display tooltips containing the full path of a recently user resource.

getSortType
gtk.types.RecentSortType getSortType()

Gets the value set by gtk.recent_chooser.RecentChooser.setSortType.

getUris
string[] getUris()

Gets the URI of the recently used resources.

listFilters
gtk.recent_filter.RecentFilter[] listFilters()

Gets the #GtkRecentFilter objects held by chooser.

removeFilter
void removeFilter(gtk.recent_filter.RecentFilter filter)

Removes filter from the list of #GtkRecentFilter objects held by chooser.

selectAll
void selectAll()

Selects all the items inside chooser, if the chooser supports multiple selection.

selectUri
bool selectUri(string uri)

Selects uri inside chooser.

setCurrentUri
bool setCurrentUri(string uri)

Sets uri as the current URI for chooser.

setFilter
void setFilter(gtk.recent_filter.RecentFilter filter)

Sets filter as the current #GtkRecentFilter object used by chooser to affect the displayed recently used resources.

setLimit
void setLimit(int limit)

Sets the number of items that should be returned by gtk.recent_chooser.RecentChooser.getItems and gtk.recent_chooser.RecentChooser.getUris.

setLocalOnly
void setLocalOnly(bool localOnly)

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If local_only is true (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.

setSelectMultiple
void setSelectMultiple(bool selectMultiple)

Sets whether chooser can select multiple items.

setShowIcons
void setShowIcons(bool showIcons)

Sets whether chooser should show an icon near the resource when displaying it.

setShowNotFound
void setShowNotFound(bool showNotFound)

Sets whether chooser should display the recently used resources that it didn’t find. This only applies to local resources.

setShowPrivate
void setShowPrivate(bool showPrivate)

Whether to show recently used resources marked registered as private.

setShowTips
void setShowTips(bool showTips)

Sets whether to show a tooltips containing the full path of each recently used resource in a #GtkRecentChooser widget.

setSortFunc
void setSortFunc(gtk.types.RecentSortFunc sortFunc)

Sets the comparison function used when sorting to be sort_func. If the chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then the chooser will sort using this function.

setSortType
void setSortType(gtk.types.RecentSortType sortType)

Changes the sorting order of the recently used resources list displayed by chooser.

unselectAll
void unselectAll()

Unselects all the items inside chooser.

unselectUri
void unselectUri(string uri)

Unselects uri inside chooser.

connectItemActivated
gulong connectItemActivated(T callback, Flag!"After" after)

Connect to ItemActivated signal.

connectSelectionChanged
gulong connectSelectionChanged(T callback, Flag!"After" after)

Connect to SelectionChanged signal.