summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-12 23:56:19 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-12 23:56:19 +0100
commit85ff1657fd3176d41d743613589e6cc79531376f (patch)
treee805405727552b73549d9a9dc0eda24e645a8f3c /logic
parent54a9ee5eb03b6d1be6294e47179b9eb76f7a3949 (diff)
parentafd1778fd766011a968074d68241b42b1438fb18 (diff)
downloadMultiMC-85ff1657fd3176d41d743613589e6cc79531376f.tar
MultiMC-85ff1657fd3176d41d743613589e6cc79531376f.tar.gz
MultiMC-85ff1657fd3176d41d743613589e6cc79531376f.tar.lz
MultiMC-85ff1657fd3176d41d743613589e6cc79531376f.tar.xz
MultiMC-85ff1657fd3176d41d743613589e6cc79531376f.zip
Merge branch 'feature_better_launch' into develop
Diffstat (limited to 'logic')
-rw-r--r--logic/BaseInstance.cpp5
-rw-r--r--logic/BaseInstance.h3
-rw-r--r--logic/LegacyInstance.cpp2
-rw-r--r--logic/MinecraftProcess.cpp2
-rw-r--r--logic/OneSixInstance.cpp2
5 files changed, 11 insertions, 3 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index 4fc6b9dc..afe3dd03 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -256,6 +256,11 @@ QString BaseInstance::name() const
return d->m_settings->get("name").toString();
}
+QString BaseInstance::windowTitle() const
+{
+ return "MultiMC: " + name();
+}
+
QStringList BaseInstance::extraArguments() const
{
return Util::Commandline::splitArgs(settings().get("JvmArgs").toString());
diff --git a/logic/BaseInstance.h b/logic/BaseInstance.h
index c059d058..353ea58a 100644
--- a/logic/BaseInstance.h
+++ b/logic/BaseInstance.h
@@ -71,6 +71,9 @@ public:
QString name() const;
void setName(QString val);
+ /// Value used for instance window titles
+ QString windowTitle() const;
+
QString iconKey() const;
void setIconKey(QString val);
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp
index 4b650e37..2828bcbf 100644
--- a/logic/LegacyInstance.cpp
+++ b/logic/LegacyInstance.cpp
@@ -73,7 +73,7 @@ MinecraftProcess *LegacyInstance::prepareForLaunch(MojangAccountPtr account)
.absolutePath();
launchScript += "userName " + account->currentProfile()->name + "\n";
launchScript += "sessionId " + account->sessionId() + "\n";
- launchScript += "windowTitle MultiMC: " + name() + "\n";
+ launchScript += "windowTitle " + windowTitle() + "\n";
launchScript += "windowParams " + windowParams + "\n";
launchScript += "lwjgl " + lwjgl + "\n";
launchScript += "launch legacy\n";
diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp
index 9c69f1a7..18d63674 100644
--- a/logic/MinecraftProcess.cpp
+++ b/logic/MinecraftProcess.cpp
@@ -203,7 +203,7 @@ void MinecraftProcess::launch()
// OSX dock icon and name
#ifdef OSX
args << "-Xdock:icon=icon.png";
- args << QString("-Xdock:name=\"%1\"").arg(windowTitle);
+ args << QString("-Xdock:name=\"%1\"").arg(m_instance->windowTitle());
#endif
// HACK: Stupid hack for Intel drivers. See: https://mojang.atlassian.net/browse/MCL-767
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp
index a12cf047..16699a1d 100644
--- a/logic/OneSixInstance.cpp
+++ b/logic/OneSixInstance.cpp
@@ -228,7 +228,7 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(MojangAccountPtr account)
"param --height\nparam " + settings().get("MinecraftWinHeight").toString() + "\n";
}
QDir natives_dir(PathCombine(instanceRoot(), "natives/"));
- launchScript += "windowTitle MultiMC: " + name() + "\n";
+ launchScript += "windowTitle " + windowTitle() + "\n";
launchScript += "natives " + natives_dir.absolutePath() + "\n";
launchScript += "launch onesix\n";