added autostart and start minimized options

- added disabling split tunneling when selecting the wireguard protocol
- if for macos the application is minimized to tray, then now it is not displayed in the dock
This commit is contained in:
vladimir.kuznetsov 2023-08-24 14:53:52 +05:00
parent 23ad006187
commit 4c79905f5b
8 changed files with 173 additions and 44 deletions

View file

@ -4,6 +4,7 @@
#include "fileUtilites.h"
#include "logger.h"
#include "ui/qautostart.h"
#include "version.h"
SettingsController::SettingsController(const QSharedPointer<ServersModel> &serversModel,
@ -137,3 +138,23 @@ void SettingsController::toggleAutoConnect(bool enable)
{
m_settings->setAutoConnect(enable);
}
bool SettingsController::isAutoStartEnabled()
{
return Autostart::isAutostart();
}
void SettingsController::toggleAutoStart(bool enable)
{
Autostart::setAutostart(enable);
}
bool SettingsController::isStartMinimizedEnabled()
{
return m_settings->isStartMinimized();
}
void SettingsController::toggleStartMinimized(bool enable)
{
m_settings->setStartMinimized(enable);
}