GtkRecentAction: GTK+ 3 Reference Manual

## GtkRecentAction GtkRecentAction — An action of which represents a list of recently used files |

## Functions

GtkAction * | gtk_recent_action_new ()
GtkAction * | gtk_recent_action_new_for_manager ()
gboolean | gtk_recent_action_get_show_numbers ()
void | gtk_recent_action_set_show_numbers ()

## Properties

gboolean | show-numbers | Read / Write

## Types and Values

struct | GtkRecentAction

## Object Hierarchy

        GObject
        ╰── GtkAction
            ╰── GtkRecentAction

## Implemented Interfaces

GtkRecentAction implements GtkBuildable and GtkRecentChooser.

## Includes

    #include <gtk/gtk.h>

## Description

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.

## Functions

### gtk_recent_action_new ()

    GtkAction *
    gtk_recent_action_new (const gchar *name,
                           const gchar *label,
                           const gchar *tooltip,
                           const gchar *stock_id);

`gtk_recent_action_new` has been deprecated since version 3.10 and should not be used in newly-written code.

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()`.

#### Parameters

name | a unique name for the action |
label | the label displayed in menu items and on buttons, or `NULL`. | [allow-none]
tooltip | a tooltip for the action, or `NULL`. | [allow-none]
stock_id | the stock icon to display in widgets representing the action, or `NULL`. | [allow-none]

#### Returns

the newly created GtkRecentAction.

Since: 2.12

### gtk_recent_action_new_for_manager ()

    GtkAction *
    gtk_recent_action_new_for_manager (const gchar *name,
                                       const gchar *label,
                                       const gchar *tooltip,
                                       const gchar *stock_id,
                                       GtkRecentManager *manager);

`gtk_recent_action_new_for_manager` has been deprecated since version 3.10 and should not be used in newly-written code.

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()`.

#### Parameters

name | a unique name for the action |
label | the label displayed in menu items and on buttons, or `NULL`. | [allow-none]
tooltip | a tooltip for the action, or `NULL`. | [allow-none]
stock_id | the stock icon to display in widgets representing the action, or `NULL`. | [allow-none]
manager | a GtkRecentManager, or `NULL` for using the default GtkRecentManager. | [allow-none]

#### Returns

the newly created GtkRecentAction

Since: 2.12

### gtk_recent_action_get_show_numbers ()

    gboolean
    gtk_recent_action_get_show_numbers (GtkRecentAction *action);

`gtk_recent_action_get_show_numbers` has been deprecated since version 3.10 and should not be used in newly-written code.

Returns the value set by `gtk_recent_chooser_menu_set_show_numbers()`.

#### Parameters

action | a GtkRecentAction |

#### Returns

`TRUE` if numbers should be shown.

Since: 2.12

### gtk_recent_action_set_show_numbers ()

    void
    gtk_recent_action_set_show_numbers (GtkRecentAction *action,
                                        gboolean show_numbers);

`gtk_recent_action_set_show_numbers` has been deprecated since version 3.10 and should not be used in newly-written code.

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.

#### Parameters

action | a GtkRecentAction |
show_numbers | `TRUE` if the shown items should be numbered |

Since: 2.12

## Types and Values

### struct GtkRecentAction

    struct GtkRecentAction;

## Property Details

### The `“show-numbers”` property

      “show-numbers”             gboolean

Whether the items should be displayed with a number.

`GtkRecentAction:show-numbers` has been deprecated since version 3.10 and should not be used in newly-written code.

Owner: GtkRecentAction

Flags: Read / Write

Default value: FALSE