diff options
| author | Jonathan Feenstra <26406078+JonathanFeenstra@users.noreply.github.com> | 2026-01-03 15:48:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-03 15:48:06 +0100 |
| commit | e5ac1cc82d832f0515364fdb3f02f03bdea8870e (patch) | |
| tree | 16c7499b254b75380fc9248be6a749cddf15dd04 /src/executableslist.cpp | |
| parent | d5bd9603c6ce4117cf98508616c72b702a760440 (diff) | |
Add executable setting to minimize MO2 to the system tray while running (#2313)
Diffstat (limited to 'src/executableslist.cpp')
| -rw-r--r-- | src/executableslist.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/executableslist.cpp b/src/executableslist.cpp index c683bdcb..c4563f90 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -82,6 +82,9 @@ void ExecutablesList::load(const MOBase::IPluginGame* game, const Settings& s) if (map["ownicon"].toBool()) flags |= Executable::UseApplicationIcon; + if (map["minimizeToSystemTray"].toBool()) + flags |= Executable::MinimizeToSystemTray; + if (map["hide"].toBool()) flags |= Executable::Hide; @@ -114,14 +117,15 @@ void ExecutablesList::store(Settings& s) for (const auto& item : *this) { std::map<QString, QVariant> map; - map["title"] = item.title(); - map["toolbar"] = item.isShownOnToolbar(); - map["ownicon"] = item.usesOwnIcon(); - map["hide"] = item.hide(); - map["binary"] = item.binaryInfo().filePath(); - map["arguments"] = item.arguments(); - map["workingDirectory"] = item.workingDirectory(); - map["steamAppID"] = item.steamAppID(); + map["title"] = item.title(); + map["toolbar"] = item.isShownOnToolbar(); + map["ownicon"] = item.usesOwnIcon(); + map["hide"] = item.hide(); + map["binary"] = item.binaryInfo().filePath(); + map["arguments"] = item.arguments(); + map["workingDirectory"] = item.workingDirectory(); + map["steamAppID"] = item.steamAppID(); + map["minimizeToSystemTray"] = item.minimizeToSystemTray(); v.push_back(std::move(map)); } @@ -464,6 +468,11 @@ bool Executable::usesOwnIcon() const return m_flags.testFlag(UseApplicationIcon); } +bool Executable::minimizeToSystemTray() const +{ + return m_flags.testFlag(MinimizeToSystemTray); +} + bool Executable::hide() const { return m_flags.testFlag(Hide); |
