summaryrefslogtreecommitdiffstats
path: root/MultiMC.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-11-03 00:45:25 +0000
committerSky <git@bunnies.cc>2013-11-03 00:45:25 +0000
commit09dc35688398b2dde41817828c4c657143506d3b (patch)
tree736616880b8a634e954a474ef75028998962b299 /MultiMC.cpp
parent8c7f15cefb17b036d4f55ca5283e26cb64ff2fc7 (diff)
downloadMultiMC-09dc35688398b2dde41817828c4c657143506d3b.tar
MultiMC-09dc35688398b2dde41817828c4c657143506d3b.tar.gz
MultiMC-09dc35688398b2dde41817828c4c657143506d3b.tar.lz
MultiMC-09dc35688398b2dde41817828c4c657143506d3b.tar.xz
MultiMC-09dc35688398b2dde41817828c4c657143506d3b.zip
Main window geometry and state saving/reloading
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r--MultiMC.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp
index d13d1443..bb65050f 100644
--- a/MultiMC.cpp
+++ b/MultiMC.cpp
@@ -336,6 +336,10 @@ void MultiMC::initGlobalSettings()
QUuid uuid = QUuid::createUuid();
m_settings->set("YggdrasilClientToken", uuid.toString());
}
+
+ // Window state and geometry
+ m_settings->registerSetting(new Setting("MainWindowState", ""));
+ m_settings->registerSetting(new Setting("MainWindowGeometry", ""));
}
void MultiMC::initHttpMetaCache()
@@ -398,6 +402,8 @@ int main_gui(MultiMC &app)
{
// show main window
MainWindow mainWin;
+ mainWin.restoreState(QByteArray::fromBase64(MMC->settings()->get("MainWindowState").toByteArray()));
+ mainWin.restoreGeometry(QByteArray::fromBase64(MMC->settings()->get("MainWindowGeometry").toByteArray()));
mainWin.show();
mainWin.checkSetDefaultJava();
return app.exec();