AyatanaAppIndicator3.Indicator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
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. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Signaled when we connect to a watcher, or when it drops away. |
|
Emitted when |
|
when |
|
Signaled when there is a new icon set for the object. |
|
Emitted when either |
|
Emitted when |
|
Signaled when the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class AyatanaAppIndicator3.Indicator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
parent: Parent object. priv: Internal data. 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 using this. But, sometimes it is necissary.
- classmethod new(id, icon_name, category)¶
- Parameters:
id (
str
) – The unique id of the indicator to create.icon_name (
str
) – The icon name for this indicatorcategory (
AyatanaAppIndicator3.IndicatorCategory
) – The category of indicator.
- Returns:
A pointer to a new
AyatanaAppIndicator3.Indicator
object.- Return type:
Creates a new
AyatanaAppIndicator3.Indicator
setting the properties:AyatanaAppIndicator3.Indicator
:id
with id,AyatanaAppIndicator3.Indicator
:category
with category andAyatanaAppIndicator3.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 indicatorcategory (
AyatanaAppIndicator3.IndicatorCategory
) – The category of indicator.icon_theme_path (
str
) – A custom path for finding icons.
- Returns:
A pointer to a new
AyatanaAppIndicator3.Indicator
object.- Return type:
Creates a new
AyatanaAppIndicator3.Indicator
setting the properties:AyatanaAppIndicator3.Indicator
:id
with id,AyatanaAppIndicator3.Indicator
:category
with category,AyatanaAppIndicator3.Indicator
:icon-name
with icon_name andAyatanaAppIndicator3.Indicator
:icon-theme-path
with icon_theme_path.
- Parameters:
This function allows for building the Application Indicator menu from a static desktop file.
- get_attention_icon()¶
- Returns:
The current attention icon name.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:attention-icon-name
.
- get_attention_icon_desc()¶
- Returns:
The current attention icon description.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:attention-icon-desc
.
- get_category()¶
- Returns:
The current category.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:category
.
- get_icon()¶
- Returns:
The current icon name.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:icon-name
.
- get_icon_desc()¶
- Returns:
The current icon description.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:icon-desc
.
- get_icon_theme_path()¶
- Returns:
The current icon theme path.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:icon-theme-path
.
- get_id()¶
- Returns:
The current ID
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:id
.
- get_label()¶
- Returns:
The current label.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:label
.
- get_label_guide()¶
- Returns:
The current label guide.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:label-guide
.
-
Gets the menu being used for this application indicator. Wrapper function for property
AyatanaAppIndicator3.Indicator
:menu
.
- get_ordering_index()¶
- Returns:
The current ordering index.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:ordering-index
.
- get_secondary_activate_target()¶
- Returns:
A
Gtk.Widget
object orNone
if none has been set.- Return type:
Gets the menuitem being called on secondary-activate event.
- get_status()¶
- Returns:
The current status.
- Return type:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:status
.
- get_title()¶
- Returns:
The current title.
- Return type:
Gets the title of the application indicator. See the function
AyatanaAppIndicator3.Indicator.set_title
() for information on the title.New in version 0.5.
- set_attention_icon(icon_name)¶
- Parameters:
icon_name (
str
) – The name of the attention icon to set for this indicator
Wrapper for
AyatanaAppIndicator3.Indicator.set_attention_icon_full
() with aNone
description.Deprecated since version ???: Use
AyatanaAppIndicator3.Indicator.set_attention_icon_full
() instead.
- set_attention_icon_full(icon_name, icon_desc)¶
- Parameters:
Wrapper function for property
AyatanaAppIndicator3.Indicator
:attention-icon-name
.
- set_icon(icon_name)¶
- Parameters:
icon_name (
str
) – The icon name to set.
Wrapper function for
AyatanaAppIndicator3.Indicator.set_icon_full
() with aNone
description.Deprecated since version ???: Use
AyatanaAppIndicator3.Indicator.set_icon_full
()
- set_icon_full(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
AyatanaAppIndicator3.Indicator
:icon-name
andAyatanaAppIndicator3.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
AyatanaAppIndicator3.Indicator
:label
andAyatanaAppIndicator3.Indicator
:label-guide
properties. This function can takeNone
as either label or guide and will clear the entries.
-
Sets the menu that should be shown when the Application Indicator is clicked on in the panel. An application indicator will not be rendered unless it has a menu.
Wrapper function for property
AyatanaAppIndicator3.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 effects the placement of it on the panel. For almost all app indicator this is not the function you’re looking for.
Wrapper function for property
AyatanaAppIndicator3.Indicator
:ordering-index
.
- set_secondary_activate_target(menuitem)¶
- Parameters:
menuitem (
Gtk.Widget
orNone
) – AGtk.Widget
to be activated on secondary activation
Set the menuitem to be activated when a secondary activation event (i.e. a middle-click) is emitted over the
AyatanaAppIndicator3.Indicator
icon/label.The menuitem can be also a complex
Gtk.Widget
, but to get activated when a secondary activation occurs in theAyatanaAppIndicator3.Indicator
, it must be a visible and active child (or inner-child) of theAyatanaAppIndicator3.Indicator
:menu
.Setting menuitem to
None
causes to disable this feature.
- set_status(status)¶
- Parameters:
status (
AyatanaAppIndicator3.IndicatorStatus
) – The status to set for this indicator
Wrapper function for property
AyatanaAppIndicator3.Indicator
:status
.
- set_title(title)¶
-
Sets the title of the application indicator, or how it should be referred in a human readable form. This string should be UTF-8 and localized as it expected that users will set it.
In the Unity desktop the most prominent place that this is show will be in the HUD. HUD listings for this application indicator will start with the title as the first part of the line for the menu items.
Setting title to
None
removes the title.New in version 0.5.
- 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¶
- do_scroll_event(delta, direction, *user_data) virtual¶
- Parameters:
delta (
int
) –direction (
Gdk.ScrollDirection
) –
- do_unfallback(status_icon) virtual¶
- Parameters:
status_icon (
Gtk.StatusIcon
) –
Signal Details¶
- AyatanaAppIndicator3.Indicator.signals.connection_changed(indicator, arg1)¶
- Signal Name:
connection-changed
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signalarg1 (
bool
) – Whether we’re connected or not
Signaled when we connect to a watcher, or when it drops away.
- AyatanaAppIndicator3.Indicator.signals.new_attention_icon(indicator)¶
- Signal Name:
new-attention-icon
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signal
Emitted when
AyatanaAppIndicator3.Indicator
:attention-icon-name
is changed
- AyatanaAppIndicator3.Indicator.signals.new_icon(indicator)¶
- Signal Name:
new-icon
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signal
when
AyatanaAppIndicator3.Indicator
:icon-name
is changed
- AyatanaAppIndicator3.Indicator.signals.new_icon_theme_path(indicator, arg1)¶
- Signal Name:
new-icon-theme-path
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signalarg1 (
str
) – The icon theme path
Signaled when there is a new icon set for the object.
- AyatanaAppIndicator3.Indicator.signals.new_label(indicator, arg1, arg2)¶
- Signal Name:
new-label
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signalarg1 (
str
) – The string for the labelarg2 (
str
) – The string for the guide
Emitted when either
AyatanaAppIndicator3.Indicator
:label
orAyatanaAppIndicator3.Indicator
:label-guide
are changed.
- AyatanaAppIndicator3.Indicator.signals.new_status(indicator, arg1)¶
- Signal Name:
new-status
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signalarg1 (
str
) – The string value of theAyatanaAppIndicator3.IndicatorStatus
enum.
Emitted when
AyatanaAppIndicator3.Indicator
:status
is changed
- AyatanaAppIndicator3.Indicator.signals.scroll_event(indicator, arg1, arg2)¶
- Signal Name:
scroll-event
- Flags:
- Parameters:
indicator (
AyatanaAppIndicator3.Indicator
) – The object which received the signalarg1 (
int
) – How many steps the scroll wheel has takenarg2 (
Gdk.ScrollDirection
) – Which direction the wheel went in
Signaled when the
AyatanaAppIndicator3.Indicator
receives a scroll event.
Property Details¶
- AyatanaAppIndicator3.Indicator.props.attention_icon_desc¶
-
If the indicator sets it’s status to
AyatanaAppIndicator3.IndicatorStatus.ATTENTION
then this textual description of the icon shown.
- AyatanaAppIndicator3.Indicator.props.attention_icon_name¶
-
If the indicator sets it’s status to
AyatanaAppIndicator3.IndicatorStatus.ATTENTION
then this icon is shown.
- AyatanaAppIndicator3.Indicator.props.category¶
- Name:
category
- Type:
- Default Value:
- Flags:
The type of indicator that this represents. Please don’t use ‘Other’. Defaults to ‘ApplicationStatus’.
- AyatanaAppIndicator3.Indicator.props.connected¶
-
Pretty simple,
True
if we have a reasonable expectation of being displayed through this object. You should hide your TrayIcon if so.
- AyatanaAppIndicator3.Indicator.props.icon_desc¶
-
The description of the regular icon that is shown for the indicator.
- AyatanaAppIndicator3.Indicator.props.icon_name¶
-
The name of the regular icon that is shown for the indicator.
- AyatanaAppIndicator3.Indicator.props.icon_theme_path¶
-
An additional place to look for icon names that may be installed by the application.
- AyatanaAppIndicator3.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.
- AyatanaAppIndicator3.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.
- AyatanaAppIndicator3.Indicator.props.label_guide¶
-
An optional string to provide guidance to the panel on how big the
AyatanaAppIndicator3.Indicator
:label
string could get. If this is set correctly then the panel should never ‘jiggle’ as the string adjusts through out the range of options. For instance, if you were providing a percentage like “54% thrust” inAyatanaAppIndicator3.Indicator
:label
you’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.
- AyatanaAppIndicator3.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 try to place the applications in a recreatable place taking into account which category they’re in to try and group them. But, there are some cases where 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 be doing this, but in case you do, this is the way.
- AyatanaAppIndicator3.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’.
- AyatanaAppIndicator3.Indicator.props.title¶
-
Provides a way to refer to this application indicator in a human readable form. This is used in the Unity desktop in the HUD as the first part of the menu entries to distinguish them from the focused application’s entries.