AyatanaAppIndicatorGlib.Indicator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
The action group that is associated with the menu items. |
||
r/w |
When the indicator is an attention mode this should describe the icon shown |
||
r/w |
If the indicator sets it’s status to ‘attention’ then this icon is shown. |
||
r/w/co |
The type of indicator that this represents. Please don’t use ‘other’. Defaults to ‘ApplicationStatus’. |
||
r |
Pretty simple, true if we have a reasonable expectation of being displayed through this object. You should hide your TrayIcon if so. |
||
r/w |
A description of the default icon that is shown for the indicator. |
||
r/w |
The default icon that is shown for the indicator. |
||
r/w/c |
An additional place to look for icon names that may be installed by the application. |
||
r/w/co |
An ID that should be unique, but used consistently by this program and its indicator. |
||
r/w |
A label to provide dynamic information. |
||
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. |
||
r/w |
The menu that should be shown when the Application Indicator is clicked on in the panel. |
||
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. |
||
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’. |
||
r/w |
A human readable way to refer to this application indicator in the UI. |
||
r/w |
The text of the indicator’s tooltip. |
||
r/w |
The name of the tooltip’s themed icon. |
||
r/w |
The title of the indicator’s tooltip. |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Emitted when we connect to a watcher, or when it drops away. |
|
Emitted when |
|
Emitted when |
|
Emittod when there is a new icon set for the object. |
|
Emitted when either |
|
Emitted when |
|
Emitted when |
|
Signaled when the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class AyatanaAppIndicatorGlib.Indicator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
id (
str) – The unique id of the indicator to createicon_name (
str) – The icon name for this indicatorcategory (
AyatanaAppIndicatorGlib.IndicatorCategory) – The category of the indicator
- Returns:
A pointer to a new
AyatanaAppIndicatorGlib.Indicatorobject- Return type:
Creates a new
AyatanaAppIndicatorGlib.Indicatorsetting the properties:AyatanaAppIndicatorGlib.Indicator:idwith id,AyatanaAppIndicatorGlib.Indicator:categorywith category andAyatanaAppIndicatorGlib.Indicator:icon-namewith icon_name.
- classmethod new_with_path(id, icon_name, category, icon_theme_path)¶
- Parameters:
id (
str) – The unique id of the indicator to createicon_name (
str) – The icon name for this indicatorcategory (
AyatanaAppIndicatorGlib.IndicatorCategory) – The category of the indicator.icon_theme_path (
str) – A custom path for finding icons
- Returns:
A pointer to a new
AyatanaAppIndicatorGlib.Indicatorobject- Return type:
Creates a new
AyatanaAppIndicatorGlib.Indicatorsetting the properties:AyatanaAppIndicatorGlib.Indicator:idwith id,AyatanaAppIndicatorGlib.Indicator:categorywith category,AyatanaAppIndicatorGlib.Indicator:icon-namewith icon_name andAyatanaAppIndicatorGlib.Indicator:icon-theme-pathwith icon_theme_path.
- get_actions()¶
- Returns:
The
GSimpleActionGroupobject orNoneif it hasn’t been set- Return type:
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:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:attention-icon-name.
- get_attention_icon_desc()¶
- Returns:
The current attention icon description
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:attention-icon-desc.
- get_category()¶
- Returns:
The current category
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:category.
- get_icon()¶
- Returns:
The current icon name
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:icon-name.
- get_icon_desc()¶
- Returns:
The current icon description
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:icon-desc.
- get_icon_theme_path()¶
- Returns:
The current icon theme path
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:icon-theme-path.
- get_id()¶
- Returns:
The current ID
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:id.
- get_label()¶
- Returns:
The current label
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:label.
- get_label_guide()¶
- Returns:
The current label guide
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:label-guide.
-
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:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:ordering-index.
- get_secondary_activate_target()¶
-
Gets the action being activated on secondary-activate event.
- get_status()¶
- Returns:
The current status
- Return type:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:status.
- get_title()¶
- Returns:
The current title
- Return type:
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) – AGSimpleActionGroupto 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:
Wrapper function for property
AyatanaAppIndicatorGlib.Indicator:attention-icon-name
- set_icon(icon_name, icon_desc)¶
- Parameters:
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-nameandAyatanaAppIndicatorGlib.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:
This is a wrapper function for the
AyatanaAppIndicatorGlib.Indicator:labelandAyatanaAppIndicatorGlib.Indicator:label-guideproperties. This function can takeNoneas either label or guide and will clear the entries.
-
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)¶
-
Set the action to be activated when a secondary activation event (i.e. a middle-click) is emitted over the
AyatanaAppIndicatorGlib.Indicatoricon/label.For the action to get activated when a secondary activation occurs in the
AyatanaAppIndicatorGlib.Indicator, it must be defined as a statelessGio.Actionwith no parameter, it needs to be enabled and associated with an item of theAyatanaAppIndicatorGlib.Indicator:menu.Setting action to
Nonedisables 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)¶
-
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
Noneremoves the title.
- set_tooltip(icon_name, title, description)¶
- Parameters:
If icon_name is
None, the tooltip will not have an icon. If title isNone, the indicator will not have a tooltip. If description isNone, the tooltip will not have a description.Sets the
AyatanaAppIndicatorGlib.Indicator:tooltip-icon-name,AyatanaAppIndicatorGlib.Indicator:tooltip-titleandAyatanaAppIndicatorGlib.Indicator:tooltip-descriptionproperties.
- do_connection_changed(connected, *user_data) virtual¶
- do_new_icon_theme_path(icon_theme_path, *user_data) virtual¶
- do_new_label(label, guide, *user_data) virtual¶
Signal Details¶
- AyatanaAppIndicatorGlib.Indicator.signals.connection_changed(indicator, arg1)¶
- Signal Name:
connection-changed- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signalarg1 (
bool) – Whether we’re connected or not
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:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signal
Emitted when
AyatanaAppIndicatorGlib.Indicator:attention-icon-namehas changed.
- AyatanaAppIndicatorGlib.Indicator.signals.new_icon(indicator)¶
- Signal Name:
new-icon- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signal
Emitted when
AyatanaAppIndicatorGlib.Indicator:icon-namehas changed.
- AyatanaAppIndicatorGlib.Indicator.signals.new_icon_theme_path(indicator, arg1)¶
- Signal Name:
new-icon-theme-path- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signalarg1 (
str) – The icon theme path
Emittod when there is a new icon set for the object.
- AyatanaAppIndicatorGlib.Indicator.signals.new_label(indicator, arg1, arg2)¶
- Signal Name:
new-label- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signalarg1 (
str) – The string for the labelarg2 (
str) – The string for the guide
Emitted when either
AyatanaAppIndicatorGlib.Indicator:labelorAyatanaAppIndicatorGlib.Indicator:label-guidehave changed.
- AyatanaAppIndicatorGlib.Indicator.signals.new_status(indicator, arg1)¶
- Signal Name:
new-status- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signalarg1 (
str) – The string value of theAyatanaAppIndicatorGlib.IndicatorStatusenum
Emitted when
AyatanaAppIndicatorGlib.Indicator:statushas changed.
- AyatanaAppIndicatorGlib.Indicator.signals.new_tooltip(indicator)¶
- Signal Name:
new-tooltip- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signal
Emitted when
AyatanaAppIndicatorGlib.Indicator:tooltip-icon-name,AyatanaAppIndicatorGlib.Indicator:tooltip-titleorAyatanaAppIndicatorGlib.Indicator:tooltip-descriptionhave changed.
- AyatanaAppIndicatorGlib.Indicator.signals.scroll_event(indicator, arg1, arg2)¶
- Signal Name:
scroll-event- Flags:
- Parameters:
indicator (
AyatanaAppIndicatorGlib.Indicator) – The object which received the signalarg1 (
int) – How many steps the scroll wheel has takenarg2 (
int) – Which direction the wheel went in
Signaled when the
AyatanaAppIndicatorGlib.Indicatorreceives a scroll event.
Property Details¶
- AyatanaAppIndicatorGlib.Indicator.props.actions¶
-
The action group that is associated with the menu items.
- AyatanaAppIndicatorGlib.Indicator.props.attention_icon_desc¶
-
If the indicator sets its status to
AyatanaAppIndicatorGlib.IndicatorStatus.ATTENTIONthen this is the textual description of the icon shown.
- AyatanaAppIndicatorGlib.Indicator.props.attention_icon_name¶
-
If the indicator sets its status to
AyatanaAppIndicatorGlib.IndicatorStatus.ATTENTIONthen this icon is shown.
- AyatanaAppIndicatorGlib.Indicator.props.category¶
- Name:
category- Type:
- Default Value:
- Flags:
The type of indicator that this represents. Please don’t use ‘Other’. Defaults to ‘ApplicationStatus’.
- AyatanaAppIndicatorGlib.Indicator.props.connected¶
-
Whether we’re conneced to a watcher.
Trueif we have a reasonable expectation of being displayed through this object.
- AyatanaAppIndicatorGlib.Indicator.props.icon_desc¶
-
The description of the regular icon that is shown for the indicator.
- AyatanaAppIndicatorGlib.Indicator.props.icon_name¶
-
The name of the regular icon that is shown for the indicator.
- AyatanaAppIndicatorGlib.Indicator.props.icon_theme_path¶
-
An additional place to look for icon names that may be installed by the application.
- AyatanaAppIndicatorGlib.Indicator.props.id¶
- Name:
id- Type:
- Default Value:
- Flags:
The ID for this indicator, which should be unique, but used consistently by this program and its indicator.
- AyatanaAppIndicatorGlib.Indicator.props.label¶
-
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¶
-
An optional string to provide guidance to the panel on how big the
AyatanaAppIndicatorGlib.Indicator:labelstring 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” inAyatanaAppIndicatorGlib.Indicator:labelyou’d want to set this string to “100% thrust” to ensure space when Scotty can get you enough power.
-
The menu that should be shown when the Application Indicator is clicked on in the panel.
- AyatanaAppIndicatorGlib.Indicator.props.ordering_index¶
-
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¶
-
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¶
-
Provides a way to refer to this application indicator in a human readable form.
- AyatanaAppIndicatorGlib.Indicator.props.tooltip_description¶
-
The text of the indicator’s tooltip.
- AyatanaAppIndicatorGlib.Indicator.props.tooltip_icon_name¶
-
The name of the tooltip’s themed icon.