Thunarx.MenuItem

g GObject.Object GObject.Object Thunarx.MenuItem Thunarx.MenuItem GObject.Object->Thunarx.MenuItem

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

list_free (items)

class

new (name, label, tooltip, icon)

activate ()

get_sensitive ()

set_menu (menu)

set_sensitive (sensitive)

Virtual Methods

Inherited:

GObject.Object (7)

do_activate ()

Properties

Name

Type

Flags

Short Description

icon

str

r/w

Textual representation of the icon (as returned by Gio.Icon.to_string()) to display in the menu item

label

str

r/w

Label to display to the user

menu

Thunarx.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

tooltip

str

r/w

Tooltip for the menu item

Signals

Inherited:

GObject.Object (1)

Name

Short Description

activate

Fields

Inherited:

GObject.Object (1)

Class Details

class Thunarx.MenuItem(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Thunarx.MenuItemClass

classmethod list_free(items)
Parameters:

items ([Thunarx.MenuItem]) – a list of Thunarx.MenuItem

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

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

  • tooltip (str) – tooltip of the menu item

  • icon (str) – textual representation of the icon to display in the menu item, as returned by Gio.Icon.to_string(). A path or icon name are valid representations too.

Returns:

a newly created Thunarx.MenuItem

Return type:

Thunarx.MenuItem

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

activate()
Return type:

bool

Emits the activate signal.

get_sensitive()
Return type:

bool

Returns whether the menu item is sensitive.

set_menu(menu)
Parameters:

menu (Thunarx.Menu) – pointer to a Thunarx.Menu instance

Attaches menu to menu item.

set_sensitive(sensitive)
Parameters:

sensitive (bool) – True to make the menu item sensitive

Sets the ::sensitive property of the menu item to sensitive.

do_activate() virtual

Signal Details

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

activate

Flags:

RUN_LAST

Parameters:

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

Property Details

Thunarx.MenuItem.props.icon
Name:

icon

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Textual representation of the icon (as returned by Gio.Icon.to_string()) to display in the menu item

Thunarx.MenuItem.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Label to display to the user

Thunarx.MenuItem.props.menu
Name:

menu

Type:

Thunarx.Menu

Default Value:

None

Flags:

READABLE, WRITABLE

The menu belonging to this item. May be null.

Thunarx.MenuItem.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Name of the item

Thunarx.MenuItem.props.priority
Name:

priority

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Show priority text in toolbars

Thunarx.MenuItem.props.sensitive
Name:

sensitive

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Whether the menu item is sensitive

Thunarx.MenuItem.props.tooltip
Name:

tooltip

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Tooltip for the menu item