Adds 'close to tray' option in settings#140
Conversation
|
I just tested this myself and it seems to work well. @debfx, what can I do to help get this in the next release? |
|
|
||
| if (config()->get("GUI/CloseToTray").toBool()) { | ||
| event->ignore(); | ||
| QTimer::singleShot(0, this, SLOT(hide())); |
There was a problem hiding this comment.
I've never worked with QT before. Is the singleShot hide to release the event thread?
|
Working fine, but how do you actually close the application if you want it ? |
|
Send the process a |
|
Well yeah, anyway I added something to quit with a middle click on tray icon and it works. src/gui/MainWindow.cpp src/gui/MainWindow.h |
|
I think choosing the "Quit" option from the tray context-menu should actually kill the program; when would you ever want to use that (remember, from the tray...) to minimize the program? If someone did want the minimize action, it'd probably be better to add a "Minimize" entry. Oh, hah: clicking the tray icon already does this "minimize" behavior. I think that basically settles the point then: the Quit option from the tray should |
| <bool>false</bool> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Hide window to system tray when closing main window (Use Ctrl+Q or Database -> Exit to exit).</string> |
There was a problem hiding this comment.
@kajzersoze, I see what you're getting at now. This text will definitely need to change to match whatever the decided behavior is: it doesn't match even the patch it comes with. Either that, or "exit" means "hide", with this option.
|
Yeah exactly, that's how it should be. |
|
I'll try and clean this up and see if I can get it in. @plafue, are you still wanting to see this included too? |
|
I figured out actually how to add an option to the tray and it works. |
* KeePassCR -> KeePassXC in INSTALL * Added .md extension to INSTALL.
WIP
(see https://www.keepassx.org/dev/issues/364#change-1035)
I'd like to add this functionality, however i can not manually test this, as it seems like assets like icons and images are not properly loaded when i run the compiled version (e.g. i see the alternative caption "Add new entry" in the menu bar instead of its icon). The try icon is not displayed at all.
I'm not that familiar with C/Qt development, so any hints are very much appreciated.
Good work, by the way!