Nemo.MenuItem

g GObject.Object GObject.Object Nemo.MenuItem Nemo.MenuItem GObject.Object->Nemo.MenuItem

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

list_free (item_list)

class

new (name, label, tip, icon)

class

new_separator (name)

class

new_widget (name, widget_a, widget_b)

activate ()

set_submenu (menu)

set_widget_a (widget)

set_widget_b (widget)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

icon

str

r/w

Name of the icon to display in the menu item

label

str

r/w

Label to display to the user

menu

Nemo.Menu

r/w

The menu belonging to this item. May be null.

name

str

r/w/co

Name of the item

priority

bool

r/w

Show priority text in toolbars

sensitive

bool

r/w

Whether the menu item is sensitive

separator

bool

r/w

Is a separator

tip

str

r/w

Tooltip for the menu item

widget-a

Gtk.Widget

r/w

The custom widget to use in place of text

widget-b

Gtk.Widget

r/w

The custom widget to use in place of text

Signals

Inherited:

GObject.Object (1)

Name

Short Description

activate

Fields

Inherited:

GObject.Object (1)

Class Details

class Nemo.MenuItem(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Nemo.MenuItemClass

classmethod list_free(item_list)
Parameters:

item_list ([Nemo.MenuItem]) – a list of Nemo.MenuItem

classmethod new(name, label, tip, icon)
Parameters:
  • name (str) – the identifier for the menu item

  • label (str) – the user-visible label of the menu item

  • tip (str) – the tooltip of the menu item

  • icon (str) – the name of the icon to display in the menu item

Returns:

a newly create Nemo.MenuItem

Return type:

Nemo.MenuItem

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

classmethod new_separator(name)
Parameters:

name (str) – the identifier for the menu item

Returns:

a newly created Nemo.MenuItem

Return type:

Nemo.MenuItem

Creates a new menu item that represents a menu separator.

classmethod new_widget(name, widget_a, widget_b)
Parameters:
Returns:

a newly created Nemo.MenuItem that will pass widgets to an eventual NemoWidgetAction

Return type:

Nemo.MenuItem

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

activate()

emits the activate signal.

set_submenu(menu)
Parameters:

menu (Nemo.Menu) – pointer to a Nemo.Menu to attach to the button

Attachs a menu to the given Nemo.MenuItem.

set_widget_a(widget)
Parameters:

widget (Gtk.Widget) – pointer to a Gtk.Widget use in place of text

Sets the custom widget A for this Nemo.MenuItem

set_widget_b(widget)
Parameters:

widget (Gtk.Widget) – pointer to a Gtk.Widget use in place of text

Sets the custom widget B for this Nemo.MenuItem

Signal Details

Nemo.MenuItem.signals.activate(menu_item)
Signal Name:

activate

Flags:

RUN_LAST

Parameters:

menu_item (Nemo.MenuItem) – The object which received the signal

Property Details

Nemo.MenuItem.props.icon
Name:

icon

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Name of the icon to display in the menu item

Nemo.MenuItem.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Label to display to the user

Nemo.MenuItem.props.menu
Name:

menu

Type:

Nemo.Menu

Default Value:

None

Flags:

READABLE, WRITABLE

The menu belonging to this item. May be null.

Nemo.MenuItem.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Name of the item

Nemo.MenuItem.props.priority
Name:

priority

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Show priority text in toolbars

Nemo.MenuItem.props.sensitive
Name:

sensitive

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Whether the menu item is sensitive

Nemo.MenuItem.props.separator
Name:

separator

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Is a separator

Nemo.MenuItem.props.tip
Name:

tip

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Tooltip for the menu item

Nemo.MenuItem.props.widget_a
Name:

widget-a

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE

The custom widget to use in place of text

Nemo.MenuItem.props.widget_b
Name:

widget-b

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE

The custom widget to use in place of text