AyatanaAppIndicatorGlib.Indicator

g AyatanaAppIndicatorGlib.Indicator AyatanaAppIndicatorGlib.Indicator GObject.Object GObject.Object GObject.Object->AyatanaAppIndicatorGlib.Indicator

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id, icon_name, category)

class

new_with_path (id, icon_name, category, icon_theme_path)

get_actions ()

get_attention_icon ()

get_attention_icon_desc ()

get_category ()

get_icon ()

get_icon_desc ()

get_icon_theme_path ()

get_id ()

get_label ()

get_label_guide ()

get_menu ()

get_ordering_index ()

get_secondary_activate_target ()

get_status ()

get_title ()

set_actions (actions)

set_attention_icon (icon_name, icon_desc)

set_icon (icon_name, icon_desc)

set_icon_theme_path (icon_theme_path)

set_label (label, guide)

set_menu (menu)

set_ordering_index (ordering_index)

set_secondary_activate_target (action)

set_status (status)

set_title (title)

set_tooltip (icon_name, title, description)

Virtual Methods

Inherited:

GObject.Object (7)

do_connection_changed (connected, *user_data)

do_new_attention_icon (*user_data)

do_new_icon (*user_data)

do_new_icon_theme_path (icon_theme_path, *user_data)

do_new_label (label, guide, *user_data)

do_new_status (status, *user_data)

do_new_tooltip (*user_data)

do_scroll_event (delta, direction, *user_data)

Properties

Name

Type

Flags

Short Description

actions

str

r/w

The action group that is associated with the menu items.

attention-icon-desc

str

r/w

When the indicator is an attention mode this should describe the icon shown

attention-icon-name

str

r/w

If the indicator sets it’s status to ‘attention’ then this icon is shown.

category

str

r/w/co

The type of indicator that this represents. Please don’t use ‘other’. Defaults to ‘ApplicationStatus’.

connected

bool

r

Pretty simple, true if we have a reasonable expectation of being displayed through this object. You should hide your TrayIcon if so.

icon-desc

str

r/w

A description of the default icon that is shown for the indicator.

icon-name

str

r/w

The default icon that is shown for the indicator.

icon-theme-path

str

r/w/c

An additional place to look for icon names that may be installed by the application.

id

str

r/w/co

An ID that should be unique, but used consistently by this program and its indicator.

label

str

r/w

A label to provide dynamic information.

label-guide

str

r/w

To ensure that the label does not cause the panel to ‘jiggle’ this string should provide information on how much space it could take.

menu

str

r/w

The menu that should be shown when the Application Indicator is clicked on in the panel.

ordering-index

int

r/w

A way to override the default ordering of the applications by providing a very specific idea of where this entry should be placed.

status

str

r/w

Whether the indicator is shown or requests attention. Can be one of ‘Passive’ (the indicator should not be shown), ‘Active’ (the indicator should be shown in its default state), and ‘Attention’ (the indicator should now show it’s attention icon). Defaults to ‘Passive’.

title

str

r/w

A human readable way to refer to this application indicator in the UI.

tooltip-description

str

r/w

The text of the indicator’s tooltip.

tooltip-icon-name

str

r/w

The name of the tooltip’s themed icon.

tooltip-title

str

r/w

The title of the indicator’s tooltip.

Signals

Inherited:

GObject.Object (1)

Name

Short Description

connection-changed

Emitted when we connect to a watcher, or when it drops away.

new-attention-icon

Emitted when AyatanaAppIndicatorGlib.Indicator :attention-icon-name has changed.

new-icon

Emitted when AyatanaAppIndicatorGlib.Indicator :icon-name has changed.

new-icon-theme-path

Emittod when there is a new icon set for the object.

new-label

Emitted when either AyatanaAppIndicatorGlib.Indicator :label or AyatanaAppIndicatorGlib.Indicator :label-guide have changed.

new-status

Emitted when AyatanaAppIndicatorGlib.Indicator :status has changed.

new-tooltip

Emitted when AyatanaAppIndicatorGlib.Indicator :tooltip-icon-name, AyatanaAppIndicatorGlib.Indicator :tooltip-title or AyatanaAppIndicatorGlib.Indicator :tooltip-description have changed.

scroll-event

Signaled when the AyatanaAppIndicatorGlib.Indicator receives a scroll event.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class AyatanaAppIndicatorGlib.Indicator(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AyatanaAppIndicatorGlib.IndicatorClass

An application indicator represents the values that are needed to show a unique status in the panel for an application. In general, applications should try to fit in the other indicators that are available on the panel before creating a new indicator.

classmethod new(id, icon_name, category)
Parameters:
Returns:

A pointer to a new AyatanaAppIndicatorGlib.Indicator object

Return type:

AyatanaAppIndicatorGlib.Indicator

Creates a new AyatanaAppIndicatorGlib.Indicator setting the properties: AyatanaAppIndicatorGlib.Indicator :id with id, AyatanaAppIndicatorGlib.Indicator :category with category and AyatanaAppIndicatorGlib.Indicator :icon-name with icon_name.

classmethod new_with_path(id, icon_name, category, icon_theme_path)
Parameters:
  • id (str) – The unique id of the indicator to create

  • icon_name (str) – The icon name for this indicator

  • category (AyatanaAppIndicatorGlib.IndicatorCategory) – The category of the indicator.

  • icon_theme_path (str) – A custom path for finding icons

Returns:

A pointer to a new AyatanaAppIndicatorGlib.Indicator object

Return type:

AyatanaAppIndicatorGlib.Indicator

Creates a new AyatanaAppIndicatorGlib.Indicator setting the properties: AyatanaAppIndicatorGlib.Indicator :id with id, AyatanaAppIndicatorGlib.Indicator :category with category, AyatanaAppIndicatorGlib.Indicator :icon-name with icon_name and AyatanaAppIndicatorGlib.Indicator :icon-theme-path with icon_theme_path.

get_actions()
Returns:

The GSimpleActionGroup object or None if it hasn’t been set

Return type:

Gio.SimpleActionGroup

Gets the action group associated with the menu items.

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :actions.

get_attention_icon()
Returns:

The current attention icon name

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :attention-icon-name.

get_attention_icon_desc()
Returns:

The current attention icon description

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :attention-icon-desc.

get_category()
Returns:

The current category

Return type:

AyatanaAppIndicatorGlib.IndicatorCategory

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :category.

get_icon()
Returns:

The current icon name

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :icon-name.

get_icon_desc()
Returns:

The current icon description

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :icon-desc.

get_icon_theme_path()
Returns:

The current icon theme path

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :icon-theme-path.

get_id()
Returns:

The current ID

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :id.

get_label()
Returns:

The current label

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :label.

get_label_guide()
Returns:

The current label guide

Return type:

str

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :label-guide.

get_menu()
Returns:

The GMenu object or None if it hasn’t been set

Return type:

Gio.Menu

Gets the menu being used for this application indicator.

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :menu.

get_ordering_index()
Returns:

The current ordering index

Return type:

int

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :ordering-index.

get_secondary_activate_target()
Returns:

The action name or None if none has been set.

Return type:

str

Gets the action being activated on secondary-activate event.

get_status()
Returns:

The current status

Return type:

AyatanaAppIndicatorGlib.IndicatorStatus

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :status.

get_title()
Returns:

The current title

Return type:

str

Gets the title of the application indicator. See the function AyatanaAppIndicatorGlib.Indicator.set_title () for information on the title.

set_actions(actions)
Parameters:

actions (Gio.SimpleActionGroup) – A GSimpleActionGroup to set

Sets the action group that will be associated with the menu items. An application indicator will not be rendered unless it has actions.

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :actions.

set_attention_icon(icon_name, icon_desc)
Parameters:
  • icon_name (str) – The name of the attention icon to set for this indicator

  • icon_desc (str or None) – A textual description of the icon

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :attention-icon-name

set_icon(icon_name, icon_desc)
Parameters:
  • icon_name (str) – The icon name to set

  • icon_desc (str or None) – A description of the icon for accessibility

Sets the default icon to use when the status is active but not set to attention. In most cases, this should be the application icon for the program.

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :icon-name and AyatanaAppIndicatorGlib.Indicator :icon-desc

set_icon_theme_path(icon_theme_path)
Parameters:

icon_theme_path (str) – The icon theme path to set

Sets the path to use when searching for icons.

set_label(label, guide)
Parameters:
  • label (str) – The label to show next to the icon

  • guide (str) – A guide to size the label correctly

This is a wrapper function for the AyatanaAppIndicatorGlib.Indicator :label and AyatanaAppIndicatorGlib.Indicator :label-guide properties. This function can take None as either label or guide and will clear the entries.

set_menu(menu)
Parameters:

menu (Gio.Menu or None) – A GMenu to set

Sets the menu that should be shown when the Application Indicator is activated in the panel. An application indicator will not be rendered unless it has a menu.

::: important All menu item actions must be prefixed with the indicator. namespace:

GSimpleaction *pAction = Gio.SimpleAction.new (“newimage”, None);

Gio.MenuItem *pItem = Gio.MenuItem.new (“New Image”, “indicator.newimage”);

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :menu.

set_ordering_index(ordering_index)
Parameters:

ordering_index (int) – A value for the ordering of this app indicator

Sets the ordering index for the app indicator which affects its placement on the panel. For almost all app indicators this is not the function you’re looking for.

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :ordering-index.

set_secondary_activate_target(action)
Parameters:

action (str or None) – The action to be activated on secondary activation

Set the action to be activated when a secondary activation event (i.e. a middle-click) is emitted over the AyatanaAppIndicatorGlib.Indicator icon/label.

For the action to get activated when a secondary activation occurs in the AyatanaAppIndicatorGlib.Indicator, it must be defined as a stateless Gio.Action with no parameter, it needs to be enabled and associated with an item of the AyatanaAppIndicatorGlib.Indicator :menu.

Setting action to None disables this feature.

set_status(status)
Parameters:

status (AyatanaAppIndicatorGlib.IndicatorStatus) – The status to set for this indicator

Wrapper function for property AyatanaAppIndicatorGlib.Indicator :status

set_title(title)
Parameters:

title (str or None) – Title of the app indicator

Sets the title of the application indicator, or how it should be referred to in a human readable form. This string should be UTF-8 and localized, as it is expected that users will set it.

Setting title to None removes the title.

set_tooltip(icon_name, title, description)
Parameters:
  • icon_name (str or None) – The name of the tooltip’s themed icon

  • title (str) – The tooltip’s title

  • description (str or None) – The tooltip’s detailed description

If icon_name is None, the tooltip will not have an icon. If title is None, the indicator will not have a tooltip. If description is None, the tooltip will not have a description.

Sets the AyatanaAppIndicatorGlib.Indicator :tooltip-icon-name, AyatanaAppIndicatorGlib.Indicator :tooltip-title and AyatanaAppIndicatorGlib.Indicator :tooltip-description properties.

do_connection_changed(connected, *user_data) virtual
Parameters:
do_new_attention_icon(*user_data) virtual
Parameters:

user_data (object or None) –

do_new_icon(*user_data) virtual
Parameters:

user_data (object or None) –

do_new_icon_theme_path(icon_theme_path, *user_data) virtual
Parameters:
do_new_label(label, guide, *user_data) virtual
Parameters:
do_new_status(status, *user_data) virtual
Parameters:
do_new_tooltip(*user_data) virtual
Parameters:

user_data (object or None) –

do_scroll_event(delta, direction, *user_data) virtual
Parameters:

Signal Details

AyatanaAppIndicatorGlib.Indicator.signals.connection_changed(indicator, arg1)
Signal Name:

connection-changed

Flags:

RUN_LAST

Parameters:

Emitted when we connect to a watcher, or when it drops away.

AyatanaAppIndicatorGlib.Indicator.signals.new_attention_icon(indicator)
Signal Name:

new-attention-icon

Flags:

RUN_LAST

Parameters:

indicator (AyatanaAppIndicatorGlib.Indicator) – The object which received the signal

Emitted when AyatanaAppIndicatorGlib.Indicator :attention-icon-name has changed.

AyatanaAppIndicatorGlib.Indicator.signals.new_icon(indicator)
Signal Name:

new-icon

Flags:

RUN_LAST

Parameters:

indicator (AyatanaAppIndicatorGlib.Indicator) – The object which received the signal

Emitted when AyatanaAppIndicatorGlib.Indicator :icon-name has changed.

AyatanaAppIndicatorGlib.Indicator.signals.new_icon_theme_path(indicator, arg1)
Signal Name:

new-icon-theme-path

Flags:

RUN_LAST

Parameters:

Emittod when there is a new icon set for the object.

AyatanaAppIndicatorGlib.Indicator.signals.new_label(indicator, arg1, arg2)
Signal Name:

new-label

Flags:

RUN_LAST

Parameters:

Emitted when either AyatanaAppIndicatorGlib.Indicator :label or AyatanaAppIndicatorGlib.Indicator :label-guide have changed.

AyatanaAppIndicatorGlib.Indicator.signals.new_status(indicator, arg1)
Signal Name:

new-status

Flags:

RUN_LAST

Parameters:

Emitted when AyatanaAppIndicatorGlib.Indicator :status has changed.

AyatanaAppIndicatorGlib.Indicator.signals.new_tooltip(indicator)
Signal Name:

new-tooltip

Flags:

RUN_LAST

Parameters:

indicator (AyatanaAppIndicatorGlib.Indicator) – The object which received the signal

Emitted when AyatanaAppIndicatorGlib.Indicator :tooltip-icon-name, AyatanaAppIndicatorGlib.Indicator :tooltip-title or AyatanaAppIndicatorGlib.Indicator :tooltip-description have changed.

AyatanaAppIndicatorGlib.Indicator.signals.scroll_event(indicator, arg1, arg2)
Signal Name:

scroll-event

Flags:

RUN_LAST

Parameters:

Signaled when the AyatanaAppIndicatorGlib.Indicator receives a scroll event.

Property Details

AyatanaAppIndicatorGlib.Indicator.props.actions
Name:

actions

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The action group that is associated with the menu items.

AyatanaAppIndicatorGlib.Indicator.props.attention_icon_desc
Name:

attention-icon-desc

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

If the indicator sets its status to AyatanaAppIndicatorGlib.IndicatorStatus.ATTENTION then this is the textual description of the icon shown.

AyatanaAppIndicatorGlib.Indicator.props.attention_icon_name
Name:

attention-icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

If the indicator sets its status to AyatanaAppIndicatorGlib.IndicatorStatus.ATTENTION then this icon is shown.

AyatanaAppIndicatorGlib.Indicator.props.category
Name:

category

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The type of indicator that this represents. Please don’t use ‘Other’. Defaults to ‘ApplicationStatus’.

AyatanaAppIndicatorGlib.Indicator.props.connected
Name:

connected

Type:

bool

Default Value:

False

Flags:

READABLE

Whether we’re conneced to a watcher. True if we have a reasonable expectation of being displayed through this object.

AyatanaAppIndicatorGlib.Indicator.props.icon_desc
Name:

icon-desc

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The description of the regular icon that is shown for the indicator.

AyatanaAppIndicatorGlib.Indicator.props.icon_name
Name:

icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The name of the regular icon that is shown for the indicator.

AyatanaAppIndicatorGlib.Indicator.props.icon_theme_path
Name:

icon-theme-path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

An additional place to look for icon names that may be installed by the application.

AyatanaAppIndicatorGlib.Indicator.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The ID for this indicator, which should be unique, but used consistently by this program and its indicator.

AyatanaAppIndicatorGlib.Indicator.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A label that can be shown next to the string in the application indicator. The label will not be shown unless there is an icon as well. The label is useful for numerical and other frequently updated information. In general, it shouldn’t be shown unless a user requests it as it can take up a significant amount of space on the user’s panel. This may not be shown in all visualizations.

AyatanaAppIndicatorGlib.Indicator.props.label_guide
Name:

label-guide

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

An optional string to provide guidance to the panel on how big the AyatanaAppIndicatorGlib.Indicator :label string could get. If this is set correctly then the panel should never ‘jiggle’ as the string adjusts throughout the range of options. For instance, if you were providing a percentage like “54% thrust” in AyatanaAppIndicatorGlib.Indicator :label you’d want to set this string to “100% thrust” to ensure space when Scotty can get you enough power.

AyatanaAppIndicatorGlib.Indicator.props.menu
Name:

menu

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The menu that should be shown when the Application Indicator is clicked on in the panel.

AyatanaAppIndicatorGlib.Indicator.props.ordering_index
Name:

ordering-index

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The ordering index is an odd parameter, and if you think you don’t need it you’re probably right. In general, the application indicator service will try to place the indicators in a recreatable place taking into account which category they’re in to try and group them. But, there are some cases when you’d want to ensure indicators are next to each other. To do that you can override the generated ordering index and replace it with a new one. Again, you probably don’t want to do this, but in case you do, this is the way.

AyatanaAppIndicatorGlib.Indicator.props.status
Name:

status

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Whether the indicator is shown or requests attention. Can be one of ‘Passive’ (the indicator should not be shown), ‘Active’ (the indicator should be shown in its default state), and ‘Attention’ (the indicator should now show it’s attention icon). Defaults to ‘Passive’.

AyatanaAppIndicatorGlib.Indicator.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Provides a way to refer to this application indicator in a human readable form.

AyatanaAppIndicatorGlib.Indicator.props.tooltip_description
Name:

tooltip-description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The text of the indicator’s tooltip.

AyatanaAppIndicatorGlib.Indicator.props.tooltip_icon_name
Name:

tooltip-icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The name of the tooltip’s themed icon.

AyatanaAppIndicatorGlib.Indicator.props.tooltip_title
Name:

tooltip-title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The title of the indicator’s tooltip.