[Kopete-devel] quit from systray
Martijn Klingens
martijn at martijn.homeip.net
Wed Apr 10 23:07:56 BST 2002
On Wednesday 10 April 2002 23:29, Andres Krapf wrote:
> +void KopeteSystemTray::showEvent ( QShowEvent *e ) {
> +/*
> + * The parent's implementation forces 2 menuitems on the right click menu:
> + * Restore/Minimize
> + * Quit, which doesn't work for us since it's connected to slot
> KopeteWindow::close() + * So we just leave an empty menu with a titlebar
> + */
> +}
Eeeeek... That's one hell of an ugly hack to get make the 'quit' action from
the systray work without closing the main window...
Isn't there a better way to use KSystemTray? The quit option from the default
menu implementation in KSysTray closes the main window. Close being
destructive this quits the app, but it's a bit ugly if you ask me. For Kopete
it has the annoying side effect that we can't use the closeQuery of the
window to simply hide into the system tray. And closing the main window
manually shouldn't quit Kopete, nobody would expect that from an app that
mostly lives in the systray...
I'd almost say that's a bug in ksystemtray, which should call kapp->quit()
instead for the quit action. Or am I missing a point here?
Martijn
More information about the kde-core-devel
mailing list