The StatusIcon technology is based on the System Tray Specification [0].

Ubuntu explicitly chose to remove support for the System Tray Specification
in favor of their proprietary app indicators.

KDE and GNOME are also considering removing support for status icons
because of some of the same limitations, so consider GtkStatusIcon
deprecated.

[0]
http://standards.freedesktop.org/systemtray-spec/systemtray-spec-latest.html

On Wed, Sep 10, 2014 at 7:04 PM, Andrew Kelley <superjo...@gmail.com> wrote:

> Hi there. Below is a simple tray icon example program.
>
> It does not create an icon in Unity.
>
> Is support for this planned? If not, why? I thought part of the goal GTK+
> was to be cross-platform?
>
> Regards,
> Andrew
>
> #include <stdio.h>
> #include <gtk/gtk.h>
>
> static void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer
> user_data) {
>     printf("Clicked on tray icon\n");
> }
>
> static void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button,
>                        guint activate_time, gpointer user_data)
> {
>     printf("Popup menu\n");
> }
>
> int main(int argc, char * argv[]) {
>     gtk_init(&argc, &argv);
>
>     GtkStatusIcon *tray_icon = gtk_status_icon_new();
>
>     g_signal_connect(G_OBJECT(tray_icon), "activate",
> G_CALLBACK(tray_icon_on_click), NULL);
>     g_signal_connect(G_OBJECT(tray_icon), "popup-menu",
> G_CALLBACK(tray_icon_on_menu), NULL);
>
>     gtk_status_icon_set_from_file(tray_icon, GTK_STOCK_MEDIA_STOP);
>     gtk_status_icon_set_tooltip(tray_icon, "Blend");
>     gtk_status_icon_set_visible(tray_icon, TRUE);
>
>     gtk_main();
>
>     return 0;
> }
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>


-- 
  Jasper
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to