Added x-attach-split-to-window command line arg (#2411)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
+18
-8
@@ -76,7 +76,8 @@ void Application::initialize(Settings &settings, Paths &paths)
|
||||
isAppInitialized = true;
|
||||
|
||||
// Show changelog
|
||||
if (getSettings()->currentVersion.getValue() != "" &&
|
||||
if (!getArgs().isFramelessEmbed &&
|
||||
getSettings()->currentVersion.getValue() != "" &&
|
||||
getSettings()->currentVersion.getValue() != CHATTERINO_VERSION)
|
||||
{
|
||||
auto box = new QMessageBox(QMessageBox::Information, "Chatterino 2",
|
||||
@@ -90,11 +91,14 @@ void Application::initialize(Settings &settings, Paths &paths)
|
||||
}
|
||||
}
|
||||
|
||||
getSettings()->currentVersion.setValue(CHATTERINO_VERSION);
|
||||
|
||||
if (getSettings()->enableExperimentalIrc)
|
||||
if (!getArgs().isFramelessEmbed)
|
||||
{
|
||||
Irc::instance().load();
|
||||
getSettings()->currentVersion.setValue(CHATTERINO_VERSION);
|
||||
|
||||
if (getSettings()->enableExperimentalIrc)
|
||||
{
|
||||
Irc::instance().load();
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &singleton : this->singletons_)
|
||||
@@ -103,7 +107,7 @@ void Application::initialize(Settings &settings, Paths &paths)
|
||||
}
|
||||
|
||||
// add crash message
|
||||
if (getArgs().crashRecovery)
|
||||
if (!getArgs().isFramelessEmbed && getArgs().crashRecovery)
|
||||
{
|
||||
if (auto selected =
|
||||
this->windows->getMainWindow().getNotebook().getSelectedPage())
|
||||
@@ -126,7 +130,10 @@ void Application::initialize(Settings &settings, Paths &paths)
|
||||
|
||||
this->windows->updateWordTypeMask();
|
||||
|
||||
this->initNm(paths);
|
||||
if (!getArgs().isFramelessEmbed)
|
||||
{
|
||||
this->initNm(paths);
|
||||
}
|
||||
this->initPubsub();
|
||||
}
|
||||
|
||||
@@ -136,7 +143,10 @@ int Application::run(QApplication &qtApp)
|
||||
|
||||
this->twitch.server->connect();
|
||||
|
||||
this->windows->getMainWindow().show();
|
||||
if (!getArgs().isFramelessEmbed)
|
||||
{
|
||||
this->windows->getMainWindow().show();
|
||||
}
|
||||
|
||||
getSettings()->betaUpdates.connect(
|
||||
[] {
|
||||
|
||||
Reference in New Issue
Block a user