views:

297

answers:

3

In Windows I can use Shell_NotifyIcon(). What is the linux equivalent of this function?

Is it different in GNOME (gtk) and KDE (qt)? Can't find any tutorials in the Internet.

+3  A: 

In Qt (KDE), you can do this in a cross platform manner using QSystemTrayIcon.

There is even a sample application in Qt.

In GTK, you do this with GtkStatusIcon. There is a sample application in this blog post.

Reed Copsey
A: 

For Gnome, there's this tutorial and the gtkmm toolkit for C++

EDIT: This is for panel applets, you asked for system tray icons. They're similar, but not quite the same. Go with Reed's answer.

Michiel Buddingh'
+2  A: 

All major desktop support the current XEmbed based systray icon specification. Qt and GTK both provide facilities to use that protocol in comfortable manner. Regardless of your toolkit choice the icons will appear on all desktop environments. If you use Qt you get even compatability with other platforms like Windows for free.

sebasgo