GarconGtk.Menu

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GarconGtk.Menu GarconGtk.Menu Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.MenuShell Gtk.MenuShell Gtk.Container->Gtk.MenuShell Gtk.Menu Gtk.Menu Gtk.Menu->GarconGtk.Menu Gtk.MenuShell->Gtk.Menu Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Menu (31), Gtk.MenuShell (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

get_desktop_actions_menu (item)

class

new (garcon_menu)

get_menu ()

get_right_click_edits ()

get_show_desktop_actions ()

get_show_generic_names ()

get_show_menu_icons ()

get_show_tooltips ()

set_menu (garcon_menu)

set_right_click_edits (enable_right_click_edits)

set_show_desktop_actions (show_desktop_actions)

set_show_generic_names (show_generic_names)

set_show_menu_icons (show_menu_icons)

set_show_tooltips (show_tooltips)

Virtual Methods

Inherited:

Gtk.MenuShell (9), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Menu (12), Gtk.MenuShell (1), Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

menu

Garcon.Menu

r/w

menu

right-click-edits

bool

r/w

right click to edit menu items

show-desktop-actions

bool

r/w

show desktop actions in a submenu

show-generic-names

bool

r/w

show-generic-names

show-menu-icons

bool

r/w

show-menu-icons

show-tooltips

bool

r/w

show-tooltips

Child Properties

Inherited:

Gtk.Menu (4)

Style Properties

Inherited:

Gtk.Menu (7), Gtk.Widget (17)

Signals

Inherited:

Gtk.Menu (2), Gtk.MenuShell (8), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Menu (2), Gtk.MenuShell (8), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class GarconGtk.Menu(**kwargs)
Bases:

Gtk.Menu

Abstract:

No

Structure:

GarconGtk.MenuClass

classmethod get_desktop_actions_menu(item)
Parameters:

item (Garcon.MenuItem) – A Garcon.MenuItem

Returns:

a Gtk.Menu holding all actions described in the desktop file as menu items.

Return type:

Gtk.Menu

Application icons are never shown on the action menu items.

classmethod new(garcon_menu)
Parameters:

garcon_menu (Garcon.Menu or None) – The Garcon.Menu to be associated with the GarconGtk.Menu, or None.

Returns:

a new GarconGtk.Menu for garcon_menu.

Return type:

Gtk.Widget

Creates a new GarconGtk.Menu for the .menu file referred to by garcon_menu. This operation only fails if garcon_menu is invalid.

The caller is responsible to destroy the returned GarconGtk.Menu using GObject.Object.unref().

get_menu()
Returns:

the Garcon.Menu for self.

Return type:

Garcon.Menu

The Garcon.Menu used to create the Gtk.Menu.

The caller is responsible to releasing the returned Garcon.Menu using GObject.Object.unref().

get_right_click_edits()
Returns:

Whether an editor will be launched on secondary mouse clicks

Return type:

bool

get_show_desktop_actions()
Returns:

Whether desktop actions are shown in a submenu.

Return type:

bool

get_show_generic_names()
Returns:

if generic names are shown

Return type:

bool

get_show_menu_icons()
Returns:

if menu icons are shown

Return type:

bool

get_show_tooltips()
Returns:

Whether descriptions are shown in the tooltip.

Return type:

bool

set_menu(garcon_menu)
Parameters:

garcon_menu (Garcon.Menu) – The Garcon.Menu to use

set_right_click_edits(enable_right_click_edits)
Parameters:

enable_right_click_edits (bool) – Toggle showing whether to launch an editor when the menu is clicked with the secondary mouse button.

set_show_desktop_actions(show_desktop_actions)
Parameters:

show_desktop_actions (bool) – Toggle showing the desktop actions in a submenu.

set_show_generic_names(show_generic_names)
Parameters:

show_generic_names (bool) – new value

set_show_menu_icons(show_menu_icons)
Parameters:

show_menu_icons (bool) – new value

set_show_tooltips(show_tooltips)
Parameters:

show_tooltips (bool) – new value

Property Details

GarconGtk.Menu.props.menu
Name:

menu

Type:

Garcon.Menu

Default Value:

None

Flags:

READABLE, WRITABLE

menu

GarconGtk.Menu.props.right_click_edits
Name:

right-click-edits

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

right click to edit menu items

GarconGtk.Menu.props.show_desktop_actions
Name:

show-desktop-actions

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

show desktop actions in a submenu

GarconGtk.Menu.props.show_generic_names
Name:

show-generic-names

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

show-generic-names

GarconGtk.Menu.props.show_menu_icons
Name:

show-menu-icons

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

show-menu-icons

GarconGtk.Menu.props.show_tooltips
Name:

show-tooltips

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

show-tooltips