CtkRecentAction

CtkRecentAction — An action of which represents a list of recently used files

Functions

Properties

gboolean show-numbers Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── CtkAction
        ╰── CtkRecentAction

Implemented Interfaces

CtkRecentAction implements CtkBuildable and CtkRecentChooser.

Includes

#include <ctk/ctk.h>

Description

A CtkRecentAction represents a list of recently used files, which can be shown by widgets such as CtkRecentChooserDialog or CtkRecentChooserMenu.

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

Functions

ctk_recent_action_new ()

CtkAction *
ctk_recent_action_new (const gchar *name,
                       const gchar *label,
                       const gchar *tooltip,
                       const gchar *stock_id);

Creates a new CtkRecentAction object. To add the action to a CtkActionGroup and set the accelerator for the action, call ctk_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 CtkRecentAction.

Since: 2.12


ctk_recent_action_new_for_manager ()

CtkAction *
ctk_recent_action_new_for_manager (const gchar *name,
                                   const gchar *label,
                                   const gchar *tooltip,
                                   const gchar *stock_id,
                                   CtkRecentManager *manager);

Creates a new CtkRecentAction object. To add the action to a CtkActionGroup and set the accelerator for the action, call ctk_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 CtkRecentManager, or NULL for using the default CtkRecentManager.

[allow-none]

Returns

the newly created CtkRecentAction

Since: 2.12


ctk_recent_action_get_show_numbers ()

gboolean
ctk_recent_action_get_show_numbers (CtkRecentAction *action);

Returns the value set by ctk_recent_chooser_menu_set_show_numbers().

Parameters

action

a CtkRecentAction

 

Returns

TRUE if numbers should be shown.

Since: 2.12


ctk_recent_action_set_show_numbers ()

void
ctk_recent_action_set_show_numbers (CtkRecentAction *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.

Parameters

action

a CtkRecentAction

 

show_numbers

TRUE if the shown items should be numbered

 

Since: 2.12

Types and Values

struct CtkRecentAction

struct CtkRecentAction;

Property Details

The “show-numbers” property

  “show-numbers”             gboolean

Whether the items should be displayed with a number.

Owner: CtkRecentAction

Flags: Read / Write

Default value: FALSE