Gtk.StatusIcon

g GObject.Object GObject.Object Gtk.StatusIcon Gtk.StatusIcon GObject.Object->Gtk.StatusIcon

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new ()
class new_from_file (filename)
class new_from_gicon (icon)
class new_from_icon_name (icon_name)
class new_from_pixbuf (pixbuf)
class new_from_stock (stock_id)
class position_menu (menu, x, y, user_data)
  get_geometry ()
  get_gicon ()
  get_has_tooltip ()
  get_icon_name ()
  get_pixbuf ()
  get_screen ()
  get_size ()
  get_stock ()
  get_storage_type ()
  get_title ()
  get_tooltip_markup ()
  get_tooltip_text ()
  get_visible ()
  get_x11_window_id ()
  is_embedded ()
  set_from_file (filename)
  set_from_gicon (icon)
  set_from_icon_name (icon_name)
  set_from_pixbuf (pixbuf)
  set_from_stock (stock_id)
  set_has_tooltip (has_tooltip)
  set_name (name)
  set_screen (screen)
  set_title (title)
  set_tooltip_markup (markup)
  set_tooltip_text (text)
  set_visible (visible)

Virtual Methods

Inherited:GObject.Object (7)
  do_activate ()
  do_button_press_event (event)
  do_button_release_event (event)
  do_popup_menu (button, activate_time)
  do_query_tooltip (x, y, keyboard_mode, tooltip)
  do_scroll_event (event)
  do_size_changed (size)

Properties

Name Type Flags Short Description
embedded bool r Whether the status icon is embedded
file str w Filename to load and display
gicon Gio.Icon r/w The Gio.Icon being displayed
has-tooltip bool r/w/en Whether this tray icon has a tooltip
icon-name str r/w The name of the icon from the icon theme
orientation Gtk.Orientation r The orientation of the tray
pixbuf GdkPixbuf.Pixbuf r/w A GdkPixbuf.Pixbuf to display
screen Gdk.Screen r/w The screen where this status icon will be displayed
size int r The size of the icon
stock str d/r/w Stock ID for a stock image to display deprecated
storage-type Gtk.ImageType r The representation being used for image data
title str r/w The title of this tray icon
tooltip-markup str r/w The contents of the tooltip for this tray icon
tooltip-text str r/w The contents of the tooltip for this widget
visible bool r/w/en Whether the status icon is visible

Signals

Inherited:GObject.Object (1)
Name Short Description
activate Gets emitted when the user activates the status icon.
button-press-event The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.
button-release-event The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.
popup-menu Gets emitted when the user brings up the context menu of the status icon.
query-tooltip Emitted when the hover timeout has expired with the cursor hovering above status_icon; or emitted when status_icon got focus in keyboard mode.
scroll-event The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed.
size-changed Gets emitted when the size available for the image changes, e.g.

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance GObject.Object r  

Class Details

class Gtk.StatusIcon(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:Gtk.StatusIconClass

The “system tray” or notification area is normally used for transient icons that indicate some special state. For example, a system tray icon might appear to tell the user that they have new mail, or have an incoming instant message, or something along those lines. The basic idea is that creating an icon in the notification area is less annoying than popping up a dialog.

A Gtk.StatusIcon object can be used to display an icon in a “system tray”. The icon can have a tooltip, and the user can interact with it by activating it or popping up a context menu.

It is very important to notice that status icons depend on the existence of a notification area being available to the user; you should not use status icons as the only way to convey critical information regarding your application, as the notification area may not exist on the user’s environment, or may have been removed. You should always check that a status icon has been embedded into a notification area by using Gtk.StatusIcon.is_embedded(), and gracefully recover if the function returns False.

On X11, the implementation follows the FreeDesktop System Tray Specification. Implementations of the “tray” side of this specification can be found e.g. in the GNOME 2 and KDE panel applications.

Note that a Gtk.StatusIcon is not a widget, but just a GObject.Object. Making it a widget would be impractical, since the system tray on Windows doesn’t allow to embed arbitrary widgets.

Gtk.StatusIcon has been deprecated in 3.14. You should consider using notifications or more modern platform-specific APIs instead. GLib provides the Gio.Notification API which works well with Gtk.Application on multiple platforms and environments, and should be the preferred mechanism to notify the users of transient status updates. See this HowDoI for code examples.

classmethod new()[source]
Returns:a new Gtk.StatusIcon
Return type:Gtk.StatusIcon

Creates an empty status icon object.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications

classmethod new_from_file(filename)[source]
Parameters:filename (str) – a filename
Returns:a new Gtk.StatusIcon
Return type:Gtk.StatusIcon

Creates a status icon displaying the file filename.

The image will be scaled down to fit in the available space in the notification area, if necessary.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications

classmethod new_from_gicon(icon)[source]
Parameters:icon (Gio.Icon) – a Gio.Icon
Returns:a new Gtk.StatusIcon
Return type:Gtk.StatusIcon

Creates a status icon displaying a Gio.Icon. If the icon is a themed icon, it will be updated when the theme changes.

New in version 2.14.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications

classmethod new_from_icon_name(icon_name)[source]
Parameters:icon_name (str) – an icon name
Returns:a new Gtk.StatusIcon
Return type:Gtk.StatusIcon

Creates a status icon displaying an icon from the current icon theme. If the current icon theme is changed, the icon will be updated appropriately.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications

classmethod new_from_pixbuf(pixbuf)[source]
Parameters:pixbuf (GdkPixbuf.Pixbuf) – a GdkPixbuf.Pixbuf
Returns:a new Gtk.StatusIcon
Return type:Gtk.StatusIcon

Creates a status icon displaying pixbuf.

The image will be scaled down to fit in the available space in the notification area, if necessary.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications

classmethod new_from_stock(stock_id)[source]
Parameters:stock_id (str) – a stock icon id
Returns:a new Gtk.StatusIcon
Return type:Gtk.StatusIcon

Creates a status icon displaying a stock icon. Sample stock icon names are Gtk.STOCK_OPEN, Gtk.STOCK_QUIT. You can register your own stock icon names, see Gtk.IconFactory.add_default() and Gtk.IconFactory.add().

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications

classmethod position_menu(menu, x, y, user_data)[source]
Parameters:
  • menu (Gtk.Menu) – the Gtk.Menu
  • x (int) – return location for the x position
  • y (int) – return location for the y position
  • user_data (Gtk.StatusIcon) – the status icon to position the menu on
Returns:

x:return location for the x position
y:return location for the y position
push_in:whether the first menu item should be offset (pushed in) to be aligned with the menu popup position (only useful for GtkOptionMenu).

Return type:

(x: int, y: int, push_in: bool)

Menu positioning function to use with Gtk.Menu.popup() to position menu aligned to the status icon user_data.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; notifications do not have menus, but can have buttons, and actions associated with each button

get_geometry()[source]
Returns:True if the location information has been filled in
screen:return location for the screen, or None if the information is not needed
area:return location for the area occupied by the status icon, or None
orientation:return location for the orientation of the panel in which the status icon is embedded, or None. A panel at the top or bottom of the screen is horizontal, a panel at the left or right is vertical.
Return type:(bool, screen: Gdk.Screen, area: Gdk.Rectangle, orientation: Gtk.Orientation)

Obtains information about the location of the status icon on screen. This information can be used to e.g. position popups like notification bubbles.

See Gtk.StatusIcon.position_menu() for a more convenient alternative for positioning menus.

Note that some platforms do not allow GTK+ to provide this information, and even on platforms that do allow it, the information is not reliable unless the status icon is embedded in a notification area, see Gtk.StatusIcon.is_embedded().

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, as the platform is responsible for the presentation of notifications

get_gicon()[source]
Returns:the displayed icon, or None if the image is empty
Return type:Gio.Icon or None

Retrieves the Gio.Icon being displayed by the Gtk.StatusIcon. The storage type of the status icon must be Gtk.ImageType.EMPTY or Gtk.ImageType.GICON (see Gtk.StatusIcon.get_storage_type()). The caller of this function does not own a reference to the returned Gio.Icon.

If this function fails, icon is left unchanged;

New in version 2.14.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_has_tooltip()[source]
Returns:current value of has-tooltip on self.
Return type:bool

Returns the current value of the has-tooltip property. See Gtk.StatusIcon :has-tooltip for more information.

New in version 2.16.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_icon_name()[source]
Returns:name of the displayed icon, or None if the image is empty.
Return type:str or None

Gets the name of the icon being displayed by the Gtk.StatusIcon. The storage type of the status icon must be Gtk.ImageType.EMPTY or Gtk.ImageType.ICON_NAME (see Gtk.StatusIcon.get_storage_type()). The returned string is owned by the Gtk.StatusIcon and should not be freed or modified.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_pixbuf()[source]
Returns:the displayed pixbuf, or None if the image is empty.
Return type:GdkPixbuf.Pixbuf or None

Gets the GdkPixbuf.Pixbuf being displayed by the Gtk.StatusIcon. The storage type of the status icon must be Gtk.ImageType.EMPTY or Gtk.ImageType.PIXBUF (see Gtk.StatusIcon.get_storage_type()). The caller of this function does not own a reference to the returned pixbuf.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_screen()[source]
Returns:a Gdk.Screen.
Return type:Gdk.Screen

Returns the Gdk.Screen associated with self.

New in version 2.12.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, as notifications are managed by the platform

get_size()[source]
Returns:the size that is available for the image
Return type:int

Gets the size in pixels that is available for the image. Stock icons and named icons adapt their size automatically if the size of the notification area changes. For other storage types, the size-changed signal can be used to react to size changes.

Note that the returned size is only meaningful while the status icon is embedded (see Gtk.StatusIcon.is_embedded()).

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, as the representation of a notification is left to the platform

get_stock()[source]
Returns:stock id of the displayed stock icon, or None if the image is empty.
Return type:str or None

Gets the id of the stock icon being displayed by the Gtk.StatusIcon. The storage type of the status icon must be Gtk.ImageType.EMPTY or Gtk.ImageType.STOCK (see Gtk.StatusIcon.get_storage_type()). The returned string is owned by the Gtk.StatusIcon and should not be freed or modified.

New in version 2.10.

Deprecated since version 3.10: Use Gtk.StatusIcon.get_icon_name() instead.

get_storage_type()[source]
Returns:the image representation being used
Return type:Gtk.ImageType

Gets the type of representation being used by the Gtk.StatusIcon to store image data. If the Gtk.StatusIcon has no image data, the return value will be Gtk.ImageType.EMPTY.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, and Gio.Notification only supports Gio.Icon instances

get_title()[source]
Returns:the title of the status icon
Return type:str

Gets the title of this tray icon. See Gtk.StatusIcon.set_title().

New in version 2.18.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_tooltip_markup()[source]
Returns:the tooltip text, or None. You should free the returned string with GLib.free() when done.
Return type:str or None

Gets the contents of the tooltip for self.

New in version 2.16.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_tooltip_text()[source]
Returns:the tooltip text, or None. You should free the returned string with GLib.free() when done.
Return type:str or None

Gets the contents of the tooltip for self.

New in version 2.16.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_visible()[source]
Returns:True if the status icon is visible
Return type:bool

Returns whether the status icon is visible or not. Note that being visible does not guarantee that the user can actually see the icon, see also Gtk.StatusIcon.is_embedded().

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

get_x11_window_id()[source]
Returns:An 32 bit unsigned integer identifier for the underlying X11 Window
Return type:int

This function is only useful on the X11/freedesktop.org platform.

It returns a window ID for the widget in the underlying status icon implementation. This is useful for the Galago notification service, which can send a window ID in the protocol in order for the server to position notification windows pointing to a status icon reliably.

This function is not intended for other use cases which are more likely to be met by one of the non-X11 specific methods, such as Gtk.StatusIcon.position_menu().

New in version 2.14.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

is_embedded()[source]
Returns:True if the status icon is embedded in a notification area.
Return type:bool

Returns whether the status icon is embedded in a notification area.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

set_from_file(filename)[source]
Parameters:filename (str) – a filename

Makes self display the file filename. See Gtk.StatusIcon.new_from_file() for details.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; you can use Gio.Notification.set_icon() to associate a Gio.Icon with a notification

set_from_gicon(icon)[source]
Parameters:icon (Gio.Icon) – a Gio.Icon

Makes self display the Gio.Icon. See Gtk.StatusIcon.new_from_gicon() for details.

New in version 2.14.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; you can use Gio.Notification.set_icon() to associate a Gio.Icon with a notification

set_from_icon_name(icon_name)[source]
Parameters:icon_name (str) – an icon name

Makes self display the icon named icon_name from the current icon theme. See Gtk.StatusIcon.new_from_icon_name() for details.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; you can use Gio.Notification.set_icon() to associate a Gio.Icon with a notification

set_from_pixbuf(pixbuf)[source]
Parameters:pixbuf (GdkPixbuf.Pixbuf or None) – a GdkPixbuf.Pixbuf or None

Makes self display pixbuf. See Gtk.StatusIcon.new_from_pixbuf() for details.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; you can use Gio.Notification.set_icon() to associate a Gio.Icon with a notification

set_from_stock(stock_id)[source]
Parameters:stock_id (str) – a stock icon id

Makes self display the stock icon with the id stock_id. See Gtk.StatusIcon.new_from_stock() for details.

New in version 2.10.

Deprecated since version 3.10: Use Gtk.StatusIcon.set_from_icon_name() instead.

set_has_tooltip(has_tooltip)[source]
Parameters:has_tooltip (bool) – whether or not self has a tooltip

Sets the has-tooltip property on self to has_tooltip. See Gtk.StatusIcon :has-tooltip for more information.

New in version 2.16.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, but notifications can display an arbitrary amount of text using Gio.Notification.set_body()

set_name(name)[source]
Parameters:name (str) – the name

Sets the name of this tray icon. This should be a string identifying this icon. It is may be used for sorting the icons in the tray and will not be shown to the user.

New in version 2.20.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, as notifications are associated with a unique application identifier by Gio.Application

set_screen(screen)[source]
Parameters:screen (Gdk.Screen) – a Gdk.Screen

Sets the Gdk.Screen where self is displayed; if the icon is already mapped, it will be unmapped, and then remapped on the new screen.

New in version 2.12.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, as GTK typically only has one Gdk.Screen and notifications are managed by the platform

set_title(title)[source]
Parameters:title (str) – the title

Sets the title of this tray icon. This should be a short, human-readable, localized string describing the tray icon. It may be used by tools like screen readers to render the tray icon.

New in version 2.18.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; you should use Gio.Notification.set_title() and Gio.Notification.set_body() to present text inside your notification

set_tooltip_markup(markup)[source]
Parameters:markup (str or None) – the contents of the tooltip for self, or None

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

This function will take care of setting Gtk.StatusIcon :has-tooltip to True and of the default handler for the Gtk.StatusIcon ::query-tooltip signal.

See also the Gtk.StatusIcon :tooltip-markup property and Gtk.Tooltip.set_markup().

New in version 2.16.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

set_tooltip_text(text)[source]
Parameters:text (str) – the contents of the tooltip for self

Sets text as the contents of the tooltip.

This function will take care of setting Gtk.StatusIcon :has-tooltip to True and of the default handler for the Gtk.StatusIcon ::query-tooltip signal.

See also the Gtk.StatusIcon :tooltip-text property and Gtk.Tooltip.set_text().

New in version 2.16.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function

set_visible(visible)[source]
Parameters:visible (bool) – True to show the status icon, False to hide it

Shows or hides a status icon.

New in version 2.10.

Deprecated since version 3.14: Use Gio.Notification and Gtk.Application to provide status notifications; there is no direct replacement for this function, as notifications are managed by the platform

do_activate() virtual
do_button_press_event(event) virtual
Parameters:event (Gdk.EventButton) –
Return type:bool
do_button_release_event(event) virtual
Parameters:event (Gdk.EventButton) –
Return type:bool
do_popup_menu(button, activate_time) virtual
Parameters:
  • button (int) –
  • activate_time (int) –
do_query_tooltip(x, y, keyboard_mode, tooltip) virtual
Parameters:
Return type:

bool

do_scroll_event(event) virtual
Parameters:event (Gdk.EventScroll) –
Return type:bool
do_size_changed(size) virtual
Parameters:size (int) –
Return type:bool

Signal Details

Gtk.StatusIcon.signals.activate(status_icon)
Signal Name:activate
Flags:RUN_FIRST, ACTION
Parameters:status_icon (Gtk.StatusIcon) – The object which received the signal

Gets emitted when the user activates the status icon. If and how status icons can activated is platform-dependent.

Unlike most GObject.SignalFlags.ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.

New in version 2.10.

Gtk.StatusIcon.signals.button_press_event(status_icon, event)
Signal Name:

button-press-event

Flags:

RUN_LAST

Parameters:
Returns:

True to stop other handlers from being invoked for the event. False to propagate the event further.

Return type:

bool

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.

Whether this event is emitted is platform-dependent. Use the ::activate and ::popup-menu signals in preference.

New in version 2.14.

Gtk.StatusIcon.signals.button_release_event(status_icon, event)
Signal Name:

button-release-event

Flags:

RUN_LAST

Parameters:
Returns:

True to stop other handlers from being invoked for the event. False to propagate the event further.

Return type:

bool

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.

Whether this event is emitted is platform-dependent. Use the ::activate and ::popup-menu signals in preference.

New in version 2.14.

Gtk.StatusIcon.signals.popup_menu(status_icon, button, activate_time)
Signal Name:

popup-menu

Flags:

RUN_FIRST, ACTION

Parameters:
  • status_icon (Gtk.StatusIcon) – The object which received the signal
  • button (int) – the button that was pressed, or 0 if the signal is not emitted in response to a button press event
  • activate_time (int) – the timestamp of the event that triggered the signal emission

Gets emitted when the user brings up the context menu of the status icon. Whether status icons can have context menus and how these are activated is platform-dependent.

The button and activate_time parameters should be passed as the last to arguments to Gtk.Menu.popup().

Unlike most GObject.SignalFlags.ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.

New in version 2.10.

Gtk.StatusIcon.signals.query_tooltip(status_icon, x, y, keyboard_mode, tooltip)
Signal Name:

query-tooltip

Flags:

RUN_LAST

Parameters:
  • status_icon (Gtk.StatusIcon) – The object which received the signal
  • x (int) – the x coordinate of the cursor position where the request has been emitted, relative to status_icon
  • y (int) – the y coordinate of the cursor position where the request has been emitted, relative to status_icon
  • keyboard_mode (bool) – True if the tooltip was trigged using the keyboard
  • tooltip (Gtk.Tooltip) – a Gtk.Tooltip
Returns:

True if tooltip should be shown right now, False otherwise.

Return type:

bool

Emitted when the hover timeout has expired with the cursor hovering above status_icon; or emitted when status_icon got focus in keyboard mode.

Using the given coordinates, the signal handler should determine whether a tooltip should be shown for status_icon. If this is the case True should be returned, False otherwise. Note that if keyboard_mode is True, the values of x and y are undefined and should not be used.

The signal handler is free to manipulate tooltip with the therefore destined function calls.

Whether this signal is emitted is platform-dependent. For plain text tooltips, use Gtk.StatusIcon :tooltip-text in preference.

New in version 2.16.

Gtk.StatusIcon.signals.scroll_event(status_icon, event)
Signal Name:

scroll-event

Flags:

RUN_LAST

Parameters:
Returns:

True to stop other handlers from being invoked for the event. False to propagate the event further.

Return type:

bool

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

Whether this event is emitted is platform-dependent.

New in version 2.16.

Gtk.StatusIcon.signals.size_changed(status_icon, size)
Signal Name:

size-changed

Flags:

RUN_LAST

Parameters:
  • status_icon (Gtk.StatusIcon) – The object which received the signal
  • size (int) – the new size
Returns:

True if the icon was updated for the new size. Otherwise, GTK+ will scale the icon as necessary.

Return type:

bool

Gets emitted when the size available for the image changes, e.g. because the notification area got resized.

New in version 2.10.

Property Details

Gtk.StatusIcon.props.embedded
Name:embedded
Type:bool
Default Value:False
Flags:READABLE

True if the statusicon is embedded in a notification area.

New in version 2.12.

Gtk.StatusIcon.props.file
Name:file
Type:str
Default Value:None
Flags:WRITABLE

Filename to load and display

Gtk.StatusIcon.props.gicon
Name:gicon
Type:Gio.Icon
Default Value:None
Flags:READABLE, WRITABLE

The Gio.Icon displayed in the Gtk.StatusIcon. For themed icons, the image will be updated automatically if the theme changes.

New in version 2.14.

Gtk.StatusIcon.props.has_tooltip
Name:has-tooltip
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Enables or disables the emission of Gtk.StatusIcon ::query-tooltip on status_icon. A value of True indicates that status_icon can have a tooltip, in this case the status icon will be queried using Gtk.StatusIcon ::query-tooltip to determine whether it will provide a tooltip or not.

Note that setting this property to True for the first time will change the event masks of the windows of this status icon to include leave-notify and motion-notify events. This will not be undone when the property is set to False again.

Whether this property is respected is platform dependent. For plain text tooltips, use Gtk.StatusIcon :tooltip-text in preference.

New in version 2.16.

Gtk.StatusIcon.props.icon_name
Name:icon-name
Type:str
Default Value:None
Flags:READABLE, WRITABLE

The name of the icon from the icon theme

Gtk.StatusIcon.props.orientation
Name:orientation
Type:Gtk.Orientation
Default Value:Gtk.Orientation.HORIZONTAL
Flags:READABLE

The orientation of the tray in which the statusicon is embedded.

New in version 2.12.

Gtk.StatusIcon.props.pixbuf
Name:pixbuf
Type:GdkPixbuf.Pixbuf
Default Value:None
Flags:READABLE, WRITABLE

A GdkPixbuf.Pixbuf to display

Gtk.StatusIcon.props.screen
Name:screen
Type:Gdk.Screen
Default Value:None
Flags:READABLE, WRITABLE

The screen where this status icon will be displayed

Gtk.StatusIcon.props.size
Name:size
Type:int
Default Value:0
Flags:READABLE

The size of the icon

Gtk.StatusIcon.props.stock
Name:stock
Type:str
Default Value:None
Flags:DEPRECATED, READABLE, WRITABLE

Stock ID for a stock image to display

Deprecated since version 3.10: Use Gtk.StatusIcon :icon-name instead.

Gtk.StatusIcon.props.storage_type
Name:storage-type
Type:Gtk.ImageType
Default Value:Gtk.ImageType.EMPTY
Flags:READABLE

The representation being used for image data

Gtk.StatusIcon.props.title
Name:title
Type:str
Default Value:None
Flags:READABLE, WRITABLE

The title of this tray icon. This should be a short, human-readable, localized string describing the tray icon. It may be used by tools like screen readers to render the tray icon.

New in version 2.18.

Gtk.StatusIcon.props.tooltip_markup
Name:tooltip-markup
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Sets the text of tooltip to be the given string, which is marked up with the Pango text markup language. Also see Gtk.Tooltip.set_markup().

This is a convenience property which will take care of getting the tooltip shown if the given string is not None. Gtk.StatusIcon :has-tooltip will automatically be set to True and the default handler for the Gtk.StatusIcon ::query-tooltip signal will take care of displaying the tooltip.

On some platforms, embedded markup will be ignored.

New in version 2.16.

Gtk.StatusIcon.props.tooltip_text
Name:tooltip-text
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Sets the text of tooltip to be the given string.

Also see Gtk.Tooltip.set_text().

This is a convenience property which will take care of getting the tooltip shown if the given string is not None. Gtk.StatusIcon :has-tooltip will automatically be set to True and the default handler for the Gtk.StatusIcon ::query-tooltip signal will take care of displaying the tooltip.

Note that some platforms have limitations on the length of tooltips that they allow on status icons, e.g. Windows only shows the first 64 characters.

New in version 2.16.

Gtk.StatusIcon.props.visible
Name:visible
Type:bool
Default Value:True
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the status icon is visible