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.
This commit is contained in:
Petr Mrázek
2013-12-31 01:24:28 +01:00
parent c44bcfab4b
commit 952b63f68d
19 changed files with 616 additions and 306 deletions

View File

@ -28,7 +28,7 @@
#include "MultiMC.h"
#include "logic/lists/InstanceList.h"
#include "logic/lists/IconList.h"
#include "logic/icons/IconList.h"
#include "logic/lists/MinecraftVersionList.h"
#include "logic/BaseInstance.h"
#include "logic/InstanceFactory.h"
@ -356,12 +356,13 @@ void InstanceList::loadForgeInstances(QMap<QString, QString> groupMap)
QString iconKey = record.logo;
iconKey.remove(QRegularExpression("\\..*"));
MMC->icons()->addIcon(iconKey, iconKey, PathCombine(templateDir, record.logo), true);
MMC->icons()->addIcon(iconKey, iconKey, PathCombine(templateDir, record.logo),
MMCIcon::Transient);
if (!QFileInfo(PathCombine(instanceDir, "instance.cfg")).exists())
{
BaseInstance *instPtr = NULL;
auto & factory = InstanceFactory::get();
auto &factory = InstanceFactory::get();
auto version = MMC->minecraftlist()->findVersion(record.mcVersion);
if (!version)
{