Ted's Blog

Happy coding

GtkStatusicon

#include <gtk/gtk.h>

int main(int argc, char **argv) {
    GtkStatusIcon *tray_icon;

    gtk_init(&argc, &argv);
    tray_icon = gtk_status_icon_new();
    gtk_status_icon_set_from_file(tray_icon, "/tmp/trayicon.png");
    gtk_status_icon_set_tooltip(tray_icon, "Hello Tray Icon!!");
    gtk_status_icon_set_visible(tray_icon, TRUE);
    gtk_main();

    return 0;
}