summaryrefslogtreecommitdiffstats
path: root/logic/BaseInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-31 01:24:28 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-31 01:32:51 +0100
commit952b63f68de93e8acf7aab81373661dae8d5098b (patch)
treea3be2560a2c34f8827a37998c7baa5a525dde22f /logic/BaseInstance.cpp
parentc44bcfab4bf4f25a7f39d6154fc366db4c0fcfbc (diff)
downloadMultiMC-952b63f68de93e8acf7aab81373661dae8d5098b.tar
MultiMC-952b63f68de93e8acf7aab81373661dae8d5098b.tar.gz
MultiMC-952b63f68de93e8acf7aab81373661dae8d5098b.tar.lz
MultiMC-952b63f68de93e8acf7aab81373661dae8d5098b.tar.xz
MultiMC-952b63f68de93e8acf7aab81373661dae8d5098b.zip
Refactor icon lists heavily
* Icon list now uses a filesystem watcher for updates * Icon folder is user-customizable * All the little details. ALL OF THEM.
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r--logic/BaseInstance.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index bc82fee1..b39db03b 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -27,6 +27,7 @@
#include "pathutils.h"
#include "lists/MinecraftVersionList.h"
+#include "logic/icons/IconList.h"
BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
SettingsObject *settings_obj, QObject *parent)
@@ -38,6 +39,7 @@ BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
settings().registerSetting(new Setting("name", "Unnamed Instance"));
settings().registerSetting(new Setting("iconKey", "default"));
+ connect(MMC->icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
settings().registerSetting(new Setting("notes", ""));
settings().registerSetting(new Setting("lastLaunchTime", 0));
@@ -93,6 +95,14 @@ BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
"AutoCloseConsole", globalSettings->getSetting("AutoCloseConsole")));
}
+void BaseInstance::iconUpdated(QString key)
+{
+ if(iconKey() == key)
+ {
+ emit propertiesChanged(this);
+ }
+}
+
void BaseInstance::nuke()
{
QDir(instanceRoot()).removeRecursively();