mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Added autorun on boot setting for windows.
This commit is contained in:
parent
a85e5821ba
commit
39f44d74b3
|
@ -5,6 +5,7 @@
|
||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "singletons/Resources.hpp"
|
#include "singletons/Resources.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
|
#include "util/WindowsHelper.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
@ -14,6 +15,12 @@ Settings::Settings(const QString &settingsDirectory)
|
||||||
: ABSettings(settingsDirectory)
|
: ABSettings(settingsDirectory)
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
|
#ifdef USEWINSDK
|
||||||
|
this->autorun = isRegisteredForStartup();
|
||||||
|
this->autorun.connect(
|
||||||
|
[](bool autorun) { setRegisteredForStartup(autorun); }, false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings &Settings::getInstance()
|
Settings &Settings::getInstance()
|
||||||
|
|
|
@ -98,6 +98,7 @@ public:
|
||||||
"/behaviour/autocompletion/smallStreamerLimit", 1000};
|
"/behaviour/autocompletion/smallStreamerLimit", 1000};
|
||||||
|
|
||||||
BoolSetting pauseChatOnHover = {"/behaviour/pauseChatHover", false};
|
BoolSetting pauseChatOnHover = {"/behaviour/pauseChatHover", false};
|
||||||
|
BoolSetting autorun = {"/behaviour/autorun", false};
|
||||||
|
|
||||||
/// Commands
|
/// Commands
|
||||||
BoolSetting allowCommandsAtEnd = {"/commands/allowCommandsAtEnd", false};
|
BoolSetting allowCommandsAtEnd = {"/commands/allowCommandsAtEnd", false};
|
||||||
|
|
|
@ -170,6 +170,9 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||||
},
|
},
|
||||||
[](auto args) { return fuzzyToFloat(args.value, 1.f); });
|
[](auto args) { return fuzzyToFloat(args.value, 1.f); });
|
||||||
layout.addCheckbox("Always on top", s.windowTopMost);
|
layout.addCheckbox("Always on top", s.windowTopMost);
|
||||||
|
#ifdef USEWINSDK
|
||||||
|
layout.addCheckbox("Start with Windows", s.autorun);
|
||||||
|
#endif
|
||||||
|
|
||||||
layout.addTitle("Interface");
|
layout.addTitle("Interface");
|
||||||
layout.addDropdown<float>(
|
layout.addDropdown<float>(
|
||||||
|
|
Loading…
Reference in a new issue