diff options
| author | Tannin <devnull@localhost> | 2013-11-18 20:17:14 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-11-18 20:17:14 +0100 |
| commit | c6101e34e1e142a3442c3a4543ea22dabd31fa33 (patch) | |
| tree | 0e737a47f5cec0afac715ae7f6e5fd1e5fb108b9 /src/pluginlist.cpp | |
| parent | 75475a7984466afd1cf77f2e4a9f722c0a859404 (diff) | |
- archive.dll now supports querying the crc value of files
- esptk now determines if a esp is a dummy (without records)
- hook.dll no longer creates a log file if noone wrote to it
- nexus id and installtime columns are now hidden by default
- modlist can now be refreshed without saving first (so plugins can replace the modlist.txt as a whole)
- plugins can now query more details about virtualised files
- added style options "plastique" and "cleanlooks"
- "overwrite" is no longer listed with a creation time
- a warning will now be displayed if the user has too many plugins active
- a warning will now be displayed if mods with scripts have an installation order that doesn't match the corresponding esp load order
- nmm importer now has select all/deselect all buttons
- nmm importer no longer tries to unpack missing files from archives (won't work anyway)
- initial support for importing from nmm 0.5 alpha
- removed some broken warning suppresions
- python runner now works with bundled python
- extended qbs build system (still fails to build the main gui application)
- implemented a nsis-based installer
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index b0228849..8eeed76e 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -499,6 +499,17 @@ bool PluginList::saveLoadOrder(DirectoryEntry &directoryStructure) return true; } +int PluginList::enabledCount() const +{ + int enabled = 0; + foreach (auto info, m_ESPs) { + if (info.m_Enabled) { + ++enabled; + } + } + return enabled; +} + bool PluginList::isESPLocked(int index) const { return m_LockedOrder.find(m_ESPs.at(index).m_Name.toLower()) != m_LockedOrder.end(); @@ -713,6 +724,8 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const return QIcon(":/MO/gui/warning"); } else if (m_LockedOrder.find(m_ESPs[index].m_Name.toLower()) != m_LockedOrder.end()) { return QIcon(":/MO/gui/locked"); + } else if (m_ESPs[index].m_IsDummy && m_ESPs[index].m_Enabled) { + return QIcon(":/MO/gui/edit_clear"); } else { return QVariant(); } @@ -723,6 +736,8 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const if (m_ESPs[index].m_IsMaster) { result.setItalic(true); result.setWeight(QFont::Bold); + } else if (m_ESPs[index].m_IsDummy) { + result.setItalic(true); } return result; } else if (role == Qt::TextAlignmentRole) { @@ -744,6 +759,10 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const m_ESPs[index].m_MasterUnset.begin(), m_ESPs[index].m_MasterUnset.end(), std::inserter(enabledMasters, enabledMasters.end())); text += "<br>" + tr("Enabled Masters") + ": " + SetJoin(enabledMasters, ", "); + if (m_ESPs[index].m_IsDummy) { + text += "<br>This file is a dummy! It exists only so the bsa with the same name gets loaded. With MO you don't need this: " + "If you enable the archive with the same name in the \"Archive\" tab you can disable this plugin."; + } return text; } } else { @@ -1009,6 +1028,7 @@ PluginList::ESPInfo::ESPInfo(const QString &name, bool enabled, FILETIME time, c try { ESP::File file(ToWString(fullPath)); m_IsMaster = file.isMaster(); + m_IsDummy = file.isDummy(); std::set<std::string> masters = file.masters(); for (auto iter = masters.begin(); iter != masters.end(); ++iter) { m_Masters.insert(QString(iter->c_str())); @@ -1016,5 +1036,6 @@ PluginList::ESPInfo::ESPInfo(const QString &name, bool enabled, FILETIME time, c } catch (const std::exception &e) { qCritical("failed to parse esp file %s: %s", qPrintable(fullPath), e.what()); m_IsMaster = false; + m_IsDummy = false; } } |
