-
Notifications
You must be signed in to change notification settings - Fork 185
Add executable setting to minimize MO2 to the system tray while running #2313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm okay with the idea but maybe this could be isolated in a dedicated class to 1) avoid adding more clutter to |
|
I could move the code from |
I don't think you need to subclass |
|
Yes, that seems to work. I also passed the log dock widget because it can be in a separate floating window which should also be minimized to the tray. |
src/systemtraymanager.cpp
Outdated
| void SystemTrayManager::minimizeToSystemTray() | ||
| { | ||
| if (!m_SystemTrayIcon) { | ||
| createSystemTrayIcon(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason not to initialize m_SystemTrayIcon in the constructor? This would avoid a lot of check everywhere, and would remove the need for a custom destructor since Qt's ownership would delete the object for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, I'll initialize it in the constructor to simplify the code.
|
Can you merge or rebase from master to fix the CI build? |
3b7682f to
0c63d61
Compare
This adds a checkbox to the executables window to minimize Mod Organizer to the system tray while the executable is running. It will automatically reappear after it finishes running, or if the user clicks on the system tray icon while it's still running. Closes #2119.