Allow application to be started in the system tray only when started with
the `-t' command line argument.
Signed-off-by: Kel Modderman <kel@otaku42.de>
When the system tray icon is created, qApp's setQuitOnLastWindowClosed
property is set to false, therefore do _not_ ignore widget close events, or
else wpa_gui will refuse to exit when the window manager is logging out.
While at it, remove WpaGui::fileExit() and connect fileExitAction to
quit().
Signed-off-by: Kel Modderman <kel@otaku42.de>
but still show a one time tray message to indicate to the user that the
program is still running in the tray if they triggered the window manager
close button.
Signed-off-by: Kel Modderman <kel@otaku42.de>
Do not connect lastWindowClosed() to quit(), instead explicitly close the
application if File->Exit or window manager close button is activated.
This allows the tray app to avoid being closed with last visible window,
and launch scan and event history windows individually.
Signed-off-by: Kel Modderman <kel@otaku42.de>
Add system tray icon support to wpa_gui-qt4. The tray icon remains quiet
when the main dialog is visible, so it should not cause too much pain for
more conservative users of wpa_gui. The addition involves the following
changes:
* when closing wpa_gui via window manager close box, wpa_gui close event is
ignored and it is minimised to system tray. A status message is displayed
(or popup dialog box if tray messages are not supported) to provide a
visual hint that the program is still running in the background.
* add File->Exit slot handler to facilitate application quit from main
dialog
* provide a context menu with a short list of useful actions
* show/hide main dialog when icon is triggered (single click)
* ensure main dialog is visible when event handler or scan results is
chosen from tray icon context menu
* show tray messages on connected and disconnected events, display a status
message a few seconds after connected events
Signed-off-by: Kel Modderman <kel@otaku42.de>