[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KSystemTrayIcon and quitSelect problem
From:       Flavio Castelli <flavio () castelli ! name>
Date:       2009-09-14 8:39:19
Message-ID: 200909141039.20028.flavio () castelli ! name
[Download RAW message or body]

On Sunday 13 September 2009 23:21:28 David Jarvie wrote:
> KAlarm has a similar need. The way it's handled is to delete the standard
> quit action and substitute your own quit action. Then you can do whatever
> you like when quit is selected. See kdepim/kalarm/traywindow.cpp.

Thanks, in the meantime I found this solution:

1 void MainWindow::setupTrayIcon()
2 {
3   m_trayIcon = new KSystemTrayIcon(KIcon("kaveau"), this);
4   KStandardAction::quit(this, SLOT(close()),
5					  m_trayIcon->actionCollection());
6   m_trayIcon->show();
7 }

Adding lines 4 and 5 solved the issue.

Cheers
Flavio
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic