Garcon.MenuDirectory

g GObject.Object GObject.Object Garcon.MenuDirectory Garcon.MenuDirectory GObject.Object->Garcon.MenuDirectory

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (file)

equal (other)

get_comment ()

get_file ()

get_hidden ()

get_icon_name ()

get_name ()

get_no_display ()

get_show_in_environment ()

get_visible ()

set_comment (comment)

set_icon_name (icon_name)

set_name (name)

set_no_display (no_display)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

comment

str

r/w

Directory description

file

Gio.File

r/w/co

File

icon-name

str

r/w

Directory icon

name

str

r/w

Directory name

no-display

bool

r/w

Visibility state of the related menu

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Garcon.MenuDirectory(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Garcon.MenuDirectoryClass

classmethod new(file)
Parameters:

file (Gio.File) – a Gio.File

Returns:

a Garcon.MenuDirectory.

Return type:

Garcon.MenuDirectory

Create a new Garcon.MenuDirectory for file. You most likely never use this, but retrieve the info from Garcon.Menu.get_directory().

equal(other)
Parameters:

other (Garcon.MenuDirectory) – a Garcon.MenuDirectory

Returns:

if files are equal True, else False.

Return type:

bool

Checks if both directories point to the same file.

get_comment()
Returns:

a the description for self.

Return type:

str

Get the comment of self.

get_file()
Returns:

a Gio.File

Return type:

Gio.File

Get the Gio.File for self. The returned object should be unreffed with GObject.Object.unref() when no longer needed.

get_hidden()
Returns:

a the hidden key for self.

Return type:

bool

Whether self should be hidden. For applications you want to call Garcon.MenuDirectory.get_visible().

get_icon_name()
Returns:

a the icon-name key for self.

Return type:

str

Get the icon name of self.

get_name()
Returns:

a the name for self.

Return type:

str

Get the name of self.

get_no_display()
Returns:

a the no-display key for self.

Return type:

bool

Whether self should be displayed. For applications you want to call Garcon.MenuDirectory.get_visible().

get_show_in_environment()
Returns:

True is visible in environment, else False.

Return type:

bool

Whether self is visible in the current environment which has been set by Garcon.set_environment(). For applications you want to call Garcon.MenuDirectory.get_visible().

get_visible()
Returns:

if visible True, else False.

Return type:

bool

Check which runs the following checks: Garcon.MenuDirectory.get_show_in_environment(), Garcon.MenuDirectory.get_hidden() and Garcon.MenuDirectory.get_no_display().

set_comment(comment)
Parameters:

comment (str) – the new description for self.

Set the comment of self.

set_icon_name(icon_name)
Parameters:

icon_name (str) – the new icon name for self.

Set the icon name of self.

set_name(name)
Parameters:

name (str) – the new name for self.

Set the name of self.

set_no_display(no_display)
Parameters:

no_display (bool) – whether self should be displayed.

Set the NoDisplay key of self.

Property Details

Garcon.MenuDirectory.props.comment
Name:

comment

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Directory description (comment).

Garcon.MenuDirectory.props.file
Name:

file

Type:

Gio.File

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

File

Garcon.MenuDirectory.props.icon_name
Name:

icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Icon associated with this directory.

Garcon.MenuDirectory.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Name of the directory.

Garcon.MenuDirectory.props.no_display
Name:

no-display

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether this menu item is hidden in menus.