summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAl12rs <gabriel.cortesi@outlook.com>2018-07-17 13:06:38 +0200
committerAl12rs <gabriel.cortesi@outlook.com>2018-07-17 13:10:08 +0200
commit5a0b8b431c3ffd5de2f4359492854310da32405e (patch)
treeaaf92f4f207160851cc6ca8be578e4ef41d7e404 /src
parent61b33a83519d1473b6b7a62d3d571c5097572204 (diff)
Added Contains INI files content filter and checking.
Diffstat (limited to 'src')
-rw-r--r--src/modinfo.cpp1
-rw-r--r--src/modinfo.h5
-rw-r--r--src/modinforegular.cpp4
-rw-r--r--src/modlist.cpp2
4 files changed, 10 insertions, 2 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index 1f2520c9..91f3c1a1 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -102,6 +102,7 @@ QString ModInfo::getContentTypeName(int contentType)
case CONTENT_SKSE: return tr("Script Extender");
case CONTENT_SKYPROC: return tr("SkyProc Tools");
case CONTENT_MCM: return tr("MCM Data");
+ case CONTENT_INI: return tr("INI files");
default: throw MyException(tr("invalid content type %1").arg(contentType));
}
}
diff --git a/src/modinfo.h b/src/modinfo.h
index 001a78dc..4cdd7bcf 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -84,10 +84,11 @@ public:
CONTENT_SCRIPT,
CONTENT_SKSE,
CONTENT_SKYPROC,
- CONTENT_MCM
+ CONTENT_MCM,
+ CONTENT_INI
};
- static const int NUM_CONTENT_TYPES = CONTENT_MCM + 1;
+ static const int NUM_CONTENT_TYPES = CONTENT_INI + 1;
enum EHighlight {
HIGHLIGHT_NONE = 0,
diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp
index c19294f1..5b6ddcda 100644
--- a/src/modinforegular.cpp
+++ b/src/modinforegular.cpp
@@ -466,6 +466,10 @@ std::vector<ModInfo::EContent> ModInfoRegular::getContents() const
if (dir.entryList(QStringList() << "*.bsa" << "*.ba2").size() > 0) {
m_CachedContent.push_back(CONTENT_BSA);
}
+ //use >1 for ini files since there is meta.ini in all mods already.
+ if (dir.entryList(QStringList() << "*.ini").size() > 1) {
+ m_CachedContent.push_back(CONTENT_INI);
+ }
ScriptExtender *extender = qApp->property("managed_game")
.value<IPluginGame *>()
diff --git a/src/modlist.cpp b/src/modlist.cpp
index bf57ef6e..aaa4ba79 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -73,6 +73,7 @@ ModList::ModList(PluginContainer *pluginContainer, QObject *parent)
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_ContentIcons[ModInfo::CONTENT_MCM] = std::make_tuple(":/MO/gui/content/menu", tr("MCM Configuration"));
+ m_ContentIcons[ModInfo::CONTENT_INI] = std::make_tuple(":/MO/gui/content/inifile", tr("INI files"));
m_LastCheck.start();
}
@@ -1109,6 +1110,7 @@ QString ModList::getColumnToolTip(int column)
"<tr><td><img src=\":/MO/gui/content/skse\" width=32/></td><td>Script Extender plugins</td></tr>"
"<tr><td><img src=\":/MO/gui/content/skyproc\" width=32/></td><td>SkyProc Patcher</td></tr>"
"<tr><td><img src=\":/MO/gui/content/menu\" width=32/></td><td>Mod Configuration Menu</td></tr>"
+ "<tr><td><img src=\":/MO/gui/content/inifile\" width=32/></td><td>INI files</td></tr>"
"</table>");
case COL_INSTALLTIME: return tr("Time this mod was installed");
default: return tr("unknown");