LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Notification area (system tray) and other questions (https://www.linuxquestions.org/questions/programming-9/notification-area-system-tray-and-other-questions-437775/)

BobS0327 04-22-2006 01:59 PM

Notification area (system tray) and other questions
 
I am using Fedora 5 with a Gnome Desktop version 2.14.0, GTK+ 2.8 and Libegg 1.2 to develop an application that will reside in the notification area (system tray).

I am trying to replace the standard context menu (menu with close, minimize, maximize etc.) of the icon in the notification area with my custom menu. Unfortunately, I'm not making any progress. So, can anybody help me with replacing or overriding the standard context menu with my custom menu?

BTW, I'm using the testtray.c found in Libegg as my starting point.

Also, is there any way to prevent multiple instances of the same executable? I want to prevent the end user from starting multiple copies of my application. For example, I want to convert the following Windows code

Code:

HANDLE hMutex = CreateMutex(NULL, TRUE, UNIQUE);
if(GetLastError() == ERROR_ALREADY_EXISTS)
{
    // Application already running
    return FALSE;
}

to a Linux equivalent.

Thanx


All times are GMT -5. The time now is 11:24 AM.