Nautilus.MenuItem: nautilus-python Reference Manual

## Nautilus.MenuItem Nautilus.MenuItem — Nautilus.MenuItem Reference |

## Synopsis

     Nautilus.MenuItem extends, gobject.GObject {
      Nautilus.MenuItem(name,
                        label);
      activate();
      set_submenu(menu);
    }

## Ancestry

    +-- gobject.GObject
        +-- Nautilus.MenuItem

## Description

`Nautilus.MenuItem` objects are appended to lists to create menus and submenus.

## Properties

> "label" | The label to display to the user. Default value: None | Read-Write
> "menu" | The Nautilus.Menu menu object belonging to this item. May be None. | Read-Write
> "name" | The name of the item. Default value: None | Read-Write-ConstructOnly
> "sensitive" | Whether or not the menu item is sensitive. Default value: True | Read-Write

## Signals

"activate" | `callback(item, user_param1, ...);`

## Constructor

    Nautilus.MenuItem(name,
                      label);

`name` : | identifier of the item
`label` : | the user-visible label for the item

Creates a new `Nautilus.MenuItem` object.

## Public Methods

### Nautilus.MenuItem.activate

    activate();

Generates the "activate" signal for this `Nautilus.MenuItem`.

### Nautilus.MenuItem.set_submenu

    set_submenu(menu);

`menu` : | a `Nautilus.Menu`

Attaches a `Nautilus.Menu` as the submenu for this `Nautilus.MenuItem`.

## Signal Details

### The "activate" Nautilus.MenuItem Signal

    callback(item,
             user_param1,
             ...);

`item` : | the `Nautilus.MenuItem` being activated
`user_param1` : | User-defined parameter the user attaches to the signal connector
`...` : | Additional parameter(s) the user attaches to the signal connector

Emits the "activate" signal.