mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
add runtime option to hide console on windows
This commit is contained in:
@@ -252,6 +252,12 @@ int Abaddon::StartGTK() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
if (m_settings.GetSettings().HideConsole) {
|
||||
ShowWindow(GetConsoleWindow(), SW_HIDE);
|
||||
}
|
||||
#endif
|
||||
|
||||
// store must be checked before this can be called
|
||||
m_main_window->UpdateComponents();
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ void SettingsManager::ReadSettings() {
|
||||
SMSTR("style", "unreadcolor", UnreadIndicatorColor);
|
||||
SMBOOL("notifications", "enabled", NotificationsEnabled);
|
||||
SMBOOL("notifications", "playsound", NotificationsPlaySound);
|
||||
SMBOOL("windows", "hideconsole", HideConsole);
|
||||
|
||||
#ifdef WITH_KEYCHAIN
|
||||
keychain::Error error {};
|
||||
@@ -153,6 +154,7 @@ void SettingsManager::Close() {
|
||||
SMSTR("style", "unreadcolor", UnreadIndicatorColor);
|
||||
SMBOOL("notifications", "enabled", NotificationsEnabled);
|
||||
SMBOOL("notifications", "playsound", NotificationsPlaySound);
|
||||
SMBOOL("windows", "hideconsole", HideConsole);
|
||||
|
||||
#ifdef WITH_KEYCHAIN
|
||||
keychain::Error error {};
|
||||
|
||||
@@ -52,6 +52,9 @@ public:
|
||||
bool NotificationsEnabled { true };
|
||||
#endif
|
||||
bool NotificationsPlaySound { true };
|
||||
|
||||
// [windows]
|
||||
bool HideConsole { false };
|
||||
};
|
||||
|
||||
SettingsManager(const std::string &filename);
|
||||
|
||||
Reference in New Issue
Block a user