From cd83f4e7324966c9387dad19e8b15b12d902e182 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 19 Jun 2016 16:01:15 +0200 Subject: reduced number of mod content icons a bit because they take too much space --- src/modflagicondelegate.cpp | 6 +++--- src/modinfo.cpp | 2 -- src/modinfo.h | 6 ++---- src/modinforegular.cpp | 30 ++++++++++++++++++------------ src/modlist.cpp | 4 +--- 5 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index 5c4167ad..61df0a0d 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -12,8 +12,7 @@ ModFlagIconDelegate::ModFlagIconDelegate(QObject *parent) { } -QList ModFlagIconDelegate::getIcons(const QModelIndex &index) const -{ +QList ModFlagIconDelegate::getIcons(const QModelIndex &index) const { QList result; QVariant modid = index.data(Qt::UserRole + 1); if (modid.isValid()) { @@ -21,7 +20,8 @@ QList ModFlagIconDelegate::getIcons(const QModelIndex &index) const std::vector flags = info->getFlags(); { // insert conflict icon first to provide nicer alignment - auto iter = std::find_first_of(flags.begin(), flags.end(), m_ConflictFlags, m_ConflictFlags + 4); + auto iter = std::find_first_of(flags.begin(), flags.end(), + m_ConflictFlags, m_ConflictFlags + 4); if (iter != flags.end()) { result.append(getFlagIcon(*iter)); flags.erase(iter); diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 3c97ca85..53b74244 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -92,12 +92,10 @@ QString ModInfo::getContentTypeName(int contentType) case CONTENT_MESH: return tr("Meshes"); case CONTENT_BSA: return tr("BSA"); case CONTENT_INTERFACE: return tr("UI Changes"); - case CONTENT_MUSIC: return tr("Music"); case CONTENT_SOUND: return tr("Sound Effects"); case CONTENT_SCRIPT: return tr("Scripts"); case CONTENT_SKSE: return tr("SKSE Plugins"); case CONTENT_SKYPROC: return tr("SkyProc Tools"); - case CONTENT_STRING: return tr("Strings"); default: throw MyException(tr("invalid content type %1").arg(contentType)); } } diff --git a/src/modinfo.h b/src/modinfo.h index c10232da..69a3434a 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -76,15 +76,13 @@ public: CONTENT_MESH, CONTENT_BSA, CONTENT_INTERFACE, - CONTENT_MUSIC, CONTENT_SOUND, CONTENT_SCRIPT, CONTENT_SKSE, - CONTENT_SKYPROC, - CONTENT_STRING + CONTENT_SKYPROC }; - static const int NUM_CONTENT_TYPES = CONTENT_STRING + 1; + static const int NUM_CONTENT_TYPES = CONTENT_SKYPROC + 1; enum EHighlight { HIGHLIGHT_NONE = 0, diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index b1f73a37..231e5497 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -433,25 +433,31 @@ std::vector ModInfoRegular::getContents() const if (dir.entryList(QStringList() << "*.esp" << "*.esm").size() > 0) { m_CachedContent.push_back(CONTENT_PLUGIN); } - if (dir.entryList(QStringList() << "*.bsa").size() > 0) { + if (dir.entryList(QStringList() << "*.bsa" << "*.ba2").size() > 0) { m_CachedContent.push_back(CONTENT_BSA); } - ScriptExtender *extender = qApp->property("managed_game").value()->feature(); + ScriptExtender *extender = qApp->property("managed_game") + .value() + ->feature(); if (extender != nullptr) { QString sePluginPath = extender->name() + "/plugins"; - if (dir.exists(sePluginPath)) m_CachedContent.push_back(CONTENT_SKSE); + if (dir.exists(sePluginPath)) + m_CachedContent.push_back(CONTENT_SKSE); } - if (dir.exists("textures")) m_CachedContent.push_back(CONTENT_TEXTURE); - if (dir.exists("meshes")) m_CachedContent.push_back(CONTENT_MESH); - if (dir.exists("interface") - || dir.exists("menus")) m_CachedContent.push_back(CONTENT_INTERFACE); - if (dir.exists("music")) m_CachedContent.push_back(CONTENT_MUSIC); - if (dir.exists("sound")) m_CachedContent.push_back(CONTENT_SOUND); - if (dir.exists("scripts")) m_CachedContent.push_back(CONTENT_SCRIPT); - if (dir.exists("strings")) m_CachedContent.push_back(CONTENT_STRING); - if (dir.exists("SkyProc Patchers")) m_CachedContent.push_back(CONTENT_SKYPROC); + if (dir.exists("textures")) + m_CachedContent.push_back(CONTENT_TEXTURE); + if (dir.exists("meshes")) + m_CachedContent.push_back(CONTENT_MESH); + if (dir.exists("interface") || dir.exists("menus")) + m_CachedContent.push_back(CONTENT_INTERFACE); + if (dir.exists("music") || dir.exists("sound")) + m_CachedContent.push_back(CONTENT_SOUND); + if (dir.exists("scripts")) + m_CachedContent.push_back(CONTENT_SCRIPT); + if (dir.exists("SkyProc Patchers")) + m_CachedContent.push_back(CONTENT_SKYPROC); m_LastContentCheck = QTime::currentTime(); } diff --git a/src/modlist.cpp b/src/modlist.cpp index 9d7f32c8..fca98aac 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -64,12 +64,10 @@ ModList::ModList(QObject *parent) m_ContentIcons[ModInfo::CONTENT_INTERFACE] = std::make_tuple(":/MO/gui/content/interface", tr("Interface")); m_ContentIcons[ModInfo::CONTENT_MESH] = std::make_tuple(":/MO/gui/content/mesh", tr("Meshes")); m_ContentIcons[ModInfo::CONTENT_BSA] = std::make_tuple(":/MO/gui/content/bsa", tr("BSA")); - m_ContentIcons[ModInfo::CONTENT_MUSIC] = std::make_tuple(":/MO/gui/content/music", tr("Music")); m_ContentIcons[ModInfo::CONTENT_SCRIPT] = std::make_tuple(":/MO/gui/content/script", tr("Scripts (Papyrus)")); m_ContentIcons[ModInfo::CONTENT_SKSE] = std::make_tuple(":/MO/gui/content/skse", tr("Script Extender Plugin")); m_ContentIcons[ModInfo::CONTENT_SKYPROC] = std::make_tuple(":/MO/gui/content/skyproc", tr("SkyProc Patcher")); - m_ContentIcons[ModInfo::CONTENT_SOUND] = std::make_tuple(":/MO/gui/content/sound", tr("Sound")); - m_ContentIcons[ModInfo::CONTENT_STRING] = std::make_tuple(":/MO/gui/content/string", tr("Strings")); + m_ContentIcons[ModInfo::CONTENT_SOUND] = std::make_tuple(":/MO/gui/content/sound", tr("Sound or Music")); m_ContentIcons[ModInfo::CONTENT_TEXTURE] = std::make_tuple(":/MO/gui/content/texture", tr("Textures")); m_LastCheck.start(); -- cgit v1.3.1