RecentAction

A #GtkRecentAction represents a list of recently used files, which can be shown by widgets such as #GtkRecentChooserDialog or #GtkRecentChooserMenu.

To construct a submenu showing recently used files, use a #GtkRecentAction as the action for a <menuitem>. To construct a menu toolbutton showing the recently used files in the popup menu, use a #GtkRecentAction as the action for a <toolitem> element.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(string name, string label, string tooltip, string stockId)

Creates a new #GtkRecentAction object. To add the action to a #GtkActionGroup and set the accelerator for the action, call gtk.action_group.ActionGroup.addActionWithAccel.

Members

Functions

getShowNumbers
bool getShowNumbers()

Returns the value set by gtk.recent_chooser_menu.RecentChooserMenu.setShowNumbers.

self
RecentAction self()

Returns this, for use in with statements.

setShowNumbers
void setShowNumbers(bool showNumbers)

Sets whether a number should be added to the items shown by the widgets representing action. The numbers are shown to provide a unique character for a mnemonic to be used inside the menu item's label. Only the first ten items get a number to avoid clashes.

Properties

_gType
GType _gType [@property getter]
showNumbers
bool showNumbers [@property getter]

Get showNumbers property.

showNumbers
bool showNumbers [@property setter]

Set showNumbers property.

Static functions

_getGType
GType _getGType()
builder
RecentActionGidBuilder builder()

Get builder for gtk.recent_action.RecentAction

newForManager
gtk.recent_action.RecentAction newForManager(string name, string label, string tooltip, string stockId, gtk.recent_manager.RecentManager manager)

Creates a new #GtkRecentAction object. To add the action to a #GtkActionGroup and set the accelerator for the action, call gtk.action_group.ActionGroup.addActionWithAccel.

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 Action

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

Returns this, for use in with statements.

builder
ActionGidBuilder builder()

Get builder for gtk.action.Action

actionGroup
gtk.action_group.ActionGroup actionGroup [@property getter]

Get actionGroup property.

actionGroup
gtk.action_group.ActionGroup actionGroup [@property setter]

Set actionGroup property.

alwaysShowImage
bool alwaysShowImage [@property getter]

Get alwaysShowImage property.

alwaysShowImage
bool alwaysShowImage [@property setter]

Set alwaysShowImage property.

gicon
gio.icon.Icon gicon [@property getter]

Get gicon property.

gicon
gio.icon.Icon gicon [@property setter]

Set gicon property.

hideIfEmpty
bool hideIfEmpty [@property getter]

Get hideIfEmpty property.

hideIfEmpty
bool hideIfEmpty [@property setter]

Set hideIfEmpty property.

iconName
string iconName [@property getter]

Get iconName property.

iconName
string iconName [@property setter]

Set iconName property.

isImportant
bool isImportant [@property getter]

Get isImportant property.

isImportant
bool isImportant [@property setter]

Set isImportant property.

label
string label [@property getter]

Get label property.

label
string label [@property setter]

Set label property.

name
string name [@property getter]

Get name property.

sensitive
bool sensitive [@property getter]

Get sensitive property.

sensitive
bool sensitive [@property setter]

Set sensitive property.

shortLabel
string shortLabel [@property getter]

Get shortLabel property.

shortLabel
string shortLabel [@property setter]

Set shortLabel property.

stockId
string stockId [@property getter]

Get stockId property.

stockId
string stockId [@property setter]

Set stockId property.

tooltip
string tooltip [@property getter]

Get tooltip property.

tooltip
string tooltip [@property setter]

Set tooltip property.

visible
bool visible [@property getter]

Get visible property.

visible
bool visible [@property setter]

Set visible property.

visibleHorizontal
bool visibleHorizontal [@property getter]

Get visibleHorizontal property.

visibleHorizontal
bool visibleHorizontal [@property setter]

Set visibleHorizontal property.

visibleOverflown
bool visibleOverflown [@property getter]

Get visibleOverflown property.

visibleOverflown
bool visibleOverflown [@property setter]

Set visibleOverflown property.

visibleVertical
bool visibleVertical [@property getter]

Get visibleVertical property.

visibleVertical
bool visibleVertical [@property setter]

Set visibleVertical property.

activate
void activate()

Emits the “activate” signal on the specified action, if it isn't insensitive. This gets called by the proxy widgets when they get activated.

blockActivate
void blockActivate()

Disable activation signals from the action

connectAccelerator
void connectAccelerator()

Installs the accelerator for action if action has an accel path and group. See gtk.action.Action.setAccelPath and gtk.action.Action.setAccelGroup

createIcon
gtk.widget.Widget createIcon(gtk.types.IconSize iconSize)

This function is intended for use by action implementations to create icons displayed in the proxy widgets.

createMenu
gtk.widget.Widget createMenu()

If action provides a #GtkMenu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.

createMenuItem
gtk.widget.Widget createMenuItem()

Creates a menu item widget that proxies for the given action.

createToolItem
gtk.widget.Widget createToolItem()

Creates a toolbar item widget that proxies for the given action.

disconnectAccelerator
void disconnectAccelerator()

Undoes the effect of one call to gtk.action.Action.connectAccelerator.

getAccelClosure
gobject.closure.Closure getAccelClosure()

Returns the accel closure for this action.

getAccelPath
string getAccelPath()

Returns the accel path for this action.

getAlwaysShowImage
bool getAlwaysShowImage()

Returns whether action's menu item proxies will always show their image, if available.

getGicon
gio.icon.Icon getGicon()

Gets the gicon of action.

getIconName
string getIconName()

Gets the icon name of action.

getIsImportant
bool getIsImportant()

Checks whether action is important or not

getLabel
string getLabel()

Gets the label text of action.

getName
string getName()

Returns the name of the action.

getProxies
gtk.widget.Widget[] getProxies()

Returns the proxy widgets for an action. See also gtk.activatable.Activatable.getRelatedAction.

getSensitive
bool getSensitive()

Returns whether the action itself is sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk.action.Action.isSensitive for that.

getShortLabel
string getShortLabel()

Gets the short label text of action.

getStockId
string getStockId()

Gets the stock id of action.

getTooltip
string getTooltip()

Gets the tooltip text of action.

getVisible
bool getVisible()

Returns whether the action itself is visible. Note that this doesn’t necessarily mean effective visibility. See gtk.action.Action.isSensitive for that.

getVisibleHorizontal
bool getVisibleHorizontal()

Checks whether action is visible when horizontal

getVisibleVertical
bool getVisibleVertical()

Checks whether action is visible when horizontal

isSensitive
bool isSensitive()

Returns whether the action is effectively sensitive.

isVisible
bool isVisible()

Returns whether the action is effectively visible.

setAccelGroup
void setAccelGroup(gtk.accel_group.AccelGroup accelGroup)

Sets the #GtkAccelGroup in which the accelerator for this action will be installed.

setAccelPath
void setAccelPath(string accelPath)

Sets the accel path for this action. All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent.

setAlwaysShowImage
void setAlwaysShowImage(bool alwaysShow)

Sets whether action's menu item proxies will ignore the #GtkSettings:gtk-menu-images setting and always show their image, if available.

setGicon
void setGicon(gio.icon.Icon icon)

Sets the icon of action.

setIconName
void setIconName(string iconName)

Sets the icon name on action

setIsImportant
void setIsImportant(bool isImportant)

Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.

setLabel
void setLabel(string label)

Sets the label of action.

setSensitive
void setSensitive(bool sensitive)

Sets the :sensitive property of the action to sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk.action.Action.isSensitive

for that.

setShortLabel
void setShortLabel(string shortLabel)

Sets a shorter label text on action.

setStockId
void setStockId(string stockId)

Sets the stock id on action

setTooltip
void setTooltip(string tooltip)

Sets the tooltip text on action

setVisible
void setVisible(bool visible)

Sets the :visible property of the action to visible. Note that this doesn’t necessarily mean effective visibility. See gtk.action.Action.isVisible

for that.

setVisibleHorizontal
void setVisibleHorizontal(bool visibleHorizontal)

Sets whether action is visible when horizontal

setVisibleVertical
void setVisibleVertical(bool visibleVertical)

Sets whether action is visible when vertical

unblockActivate
void unblockActivate()

Reenable activation signals from the action

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

Connect to Activate 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.