|  |  |  | GTK+ 3 Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#include <gtk/gtk.h> struct GtkRecentAction; GtkAction * gtk_recent_action_new (const gchar *name,const gchar *label,const gchar *tooltip,const gchar *stock_id); GtkAction * gtk_recent_action_new_for_manager (const gchar *name,const gchar *label,const gchar *tooltip,const gchar *stock_id,GtkRecentManager *manager); gboolean gtk_recent_action_get_show_numbers (GtkRecentAction *action); void gtk_recent_action_set_show_numbers (GtkRecentAction *action,gboolean show_numbers);
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.
GtkAction * gtk_recent_action_new (const gchar *name,const gchar *label,const gchar *tooltip,const gchar *stock_id);
Creates a new GtkRecentAction object. To add the action to
a GtkActionGroup and set the accelerator for the action,
call gtk_action_group_add_action_with_accel().
| 
 | a unique name for the action | 
| 
 | the label displayed in menu items and on buttons,
or NULL. [allow-none] | 
| 
 | a tooltip for the action, or NULL. [allow-none] | 
| 
 | the stock icon to display in widgets representing
the action, or NULL. [allow-none] | 
| Returns : | the newly created GtkRecentAction. | 
Since 2.12
GtkAction * gtk_recent_action_new_for_manager (const gchar *name,const gchar *label,const gchar *tooltip,const gchar *stock_id,GtkRecentManager *manager);
Creates a new GtkRecentAction object. To add the action to
a GtkActionGroup and set the accelerator for the action,
call gtk_action_group_add_action_with_accel().
| 
 | a unique name for the action | 
| 
 | the label displayed in menu items and on buttons,
or NULL. [allow-none] | 
| 
 | a tooltip for the action, or NULL. [allow-none] | 
| 
 | the stock icon to display in widgets representing
the action, or NULL. [allow-none] | 
| 
 | a GtkRecentManager, or NULLfor using the default
GtkRecentManager. [allow-none] | 
| Returns : | the newly created GtkRecentAction | 
Since 2.12
gboolean            gtk_recent_action_get_show_numbers  (GtkRecentAction *action);
Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
| 
 | a GtkRecentAction | 
| Returns : | TRUEif numbers should be shown. | 
Since 2.12
void gtk_recent_action_set_show_numbers (GtkRecentAction *action,gboolean show_numbers);
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.
| 
 | a GtkRecentAction | 
| 
 | TRUEif the shown items should be numbered | 
Since 2.12
"show-numbers" property"show-numbers" gboolean : Read / Write
Whether the items should be displayed with a number.
Default value: FALSE