## NautilusMenuItem

NautilusMenuItem — Menu item descriptor object

## Functions

void | nautilus_menu_item_list_free ()
GType | nautilus_menu_item_get_type ()
NautilusMenuItem * | nautilus_menu_item_new ()
void | nautilus_menu_item_activate ()
void | nautilus_menu_item_set_submenu ()

## Properties

gchar * | icon | Read / Write
gchar * | label | Read / Write
NautilusMenu * | menu | Read / Write
gchar * | name | Read / Write / Construct Only
gboolean | priority | Read / Write
gboolean | sensitive | Read / Write
gchar * | tip | Read / Write

## Signals

void | activate | Run Last

## Types and Values

struct | NautilusMenuItem

## Object Hierarchy

        GObject
        ╰── NautilusMenuItem

## Includes

    #include <libnautilus-extension/nautilus-menu-item.h>

## Description

NautilusMenuItem is an object that describes an item in a file manager menu. Extensions can provide NautilusMenuItem objects by registering a NautilusMenuProvider and returning them from `nautilus_menu_provider_get_file_items()`, or `nautilus_menu_provider_get_background_items()`, which will be called by the main application when creating menus.

## Functions

### nautilus_menu_item_list_free ()

    void
    nautilus_menu_item_list_free (GList *item_list);

#### Parameters

item_list | a list of NautilusMenuItem. | [element-type NautilusMenuItem]

### nautilus_menu_item_get_type ()

    GType
    nautilus_menu_item_get_type (void);

### nautilus_menu_item_new ()

    NautilusMenuItem *
    nautilus_menu_item_new (const char *name,
                            const char *label,
                            const char *tip,
                            const char *icon);

Creates a new menu item that can be added to the toolbar or to a contextual menu.

#### Parameters

name | the identifier for the menu item |
label | the user-visible label of the menu item |
tip | the tooltip of the menu item |
icon | the name of the icon to display in the menu item |

#### Returns

a newly create NautilusMenuItem

### nautilus_menu_item_activate ()

    void
    nautilus_menu_item_activate (NautilusMenuItem *item);

emits the activate signal.

#### Parameters

item | pointer to a NautilusMenuItem |

### nautilus_menu_item_set_submenu ()

    void
    nautilus_menu_item_set_submenu (NautilusMenuItem *item,
                                    NautilusMenu *menu);

Attachs a menu to the given NautilusMenuItem.

#### Parameters

item | pointer to a NautilusMenuItem |
menu | pointer to a NautilusMenu to attach to the button |

## Types and Values

### struct NautilusMenuItem

    struct NautilusMenuItem;

## Property Details

### The `“icon”` property

      “icon”                     gchar *

Name of the icon to display in the menu item.

Flags: Read / Write

Default value: NULL

### The `“label”` property

      “label”                    gchar *

Label to display to the user.

Flags: Read / Write

Default value: NULL

### The `“menu”` property

      “menu”                     NautilusMenu *

The menu belonging to this item. May be null.

Flags: Read / Write

### The `“name”` property

      “name”                     gchar *

Name of the item.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“priority”` property

      “priority”                 gboolean

Show priority text in toolbars.

Flags: Read / Write

Default value: TRUE

### The `“sensitive”` property

      “sensitive”                gboolean

Whether the menu item is sensitive.

Flags: Read / Write

Default value: TRUE

### The `“tip”` property

      “tip”                      gchar *

Tooltip for the menu item.

Flags: Read / Write

Default value: NULL

## Signal Details

### The `“activate”` signal

    void
    user_function (NautilusMenuItem *nautilusmenuitem,
                   gpointer          user_data)

Flags: Run Last