From 8d6c715672023577dca5a6528ff49081dede1052 Mon Sep 17 00:00:00 2001 From: Silarn Date: Wed, 11 Apr 2018 17:46:59 -0500 Subject: Initial archive conflict parsing Squashed commit: Basic archive conflict parsing - pass 1 Merge fixes for archive parsing Basic archive conflict parsing - pass 1 Merge fixes for archive parsing Should fix conflict detection for archive files --- src/modflagicondelegate.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modflagicondelegate.cpp') diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index 1995964b..4404ce60 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -49,6 +49,9 @@ QString ModFlagIconDelegate::getFlagIcon(ModInfo::EFlag flag) const case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_REDUNDANT: return ":MO/gui/emblem_conflict_redundant"; case ModInfo::FLAG_ALTERNATE_GAME: return ":MO/gui/alternate_game"; + case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return ":/MO/gui/archive_conflict_mixed"; + case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_conflict_winner"; + case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_conflict_loser"; default: return QString(); } } -- cgit v1.3.1 From 01e1232cf85f09efde780537bbbca40fd6f0c097 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Thu, 2 Aug 2018 15:33:27 +0200 Subject: Added new "loose files overwrite archive" icon and all the flags. The logic to show it is still missing until the other issues are fixed. --- src/modflagicondelegate.cpp | 1 + src/modinfo.h | 1 + src/modlist.cpp | 7 ++++--- src/modlistsortproxy.cpp | 3 ++- src/resources.qrc | 3 ++- src/resources/conflict-overwrite-blue.png | Bin 0 -> 964 bytes 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/resources/conflict-overwrite-blue.png (limited to 'src/modflagicondelegate.cpp') diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index 4404ce60..f7f85a18 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -45,6 +45,7 @@ QString ModFlagIconDelegate::getFlagIcon(ModInfo::EFlag flag) const case ModInfo::FLAG_NOTENDORSED: return ":/MO/gui/emblem_notendorsed"; case ModInfo::FLAG_NOTES: return ":/MO/gui/emblem_notes"; case ModInfo::FLAG_CONFLICT_OVERWRITE: return ":/MO/gui/emblem_conflict_overwrite"; + case ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE: return ":/MO/gui/emblem_conflict_loose_overwrite_archive"; case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return ":/MO/gui/emblem_conflict_overwritten"; case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_REDUNDANT: return ":MO/gui/emblem_conflict_redundant"; diff --git a/src/modinfo.h b/src/modinfo.h index 15876a23..c763e69b 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -69,6 +69,7 @@ public: FLAG_NOTENDORSED, FLAG_NOTES, FLAG_CONFLICT_OVERWRITE, + FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE, FLAG_CONFLICT_OVERWRITTEN, FLAG_CONFLICT_MIXED, FLAG_CONFLICT_REDUNDANT, diff --git a/src/modlist.cpp b/src/modlist.cpp index e9a12862..876e8958 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -158,9 +158,10 @@ QString ModList::getFlagText(ModInfo::EFlag flag, ModInfo::Ptr modInfo) const output << QString("%1").arg(modInfo->notes()).replace("\n", "
"); return output.join("
"); } - case ModInfo::FLAG_CONFLICT_OVERWRITE: return tr("Overwrites files"); - case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return tr("Overwritten files"); - case ModInfo::FLAG_CONFLICT_MIXED: return tr("Overwrites & Overwritten"); + case ModInfo::FLAG_CONFLICT_OVERWRITE: return tr("Overwrites loose files"); + case ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE: return tr("Loose files overwrite another archive"); + case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return tr("Overwritten loose files"); + case ModInfo::FLAG_CONFLICT_MIXED: return tr("Loose files Overwrites & Overwritten"); case ModInfo::FLAG_CONFLICT_REDUNDANT: return tr("Redundant"); case ModInfo::FLAG_ALTERNATE_GAME: return tr("Alternate game source"); case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return tr("Overwrites another archive file"); diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 6f6983ba..c34985b6 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -243,7 +243,8 @@ bool ModListSortProxy::hasConflictFlag(const std::vector &flags) (flag == ModInfo::FLAG_CONFLICT_REDUNDANT) || (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE) || (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN) || - (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED)) { + (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED) || + (flag == ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE)) { return true; } } diff --git a/src/resources.qrc b/src/resources.qrc index 1dccce0b..dff1ad72 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -47,7 +47,8 @@ resources/conflict-mixed.png resources/conflict-overwrite.png resources/conflict-overwritten.png - resources/conflict-redundant.png + resources/conflict-redundant.png + resources/conflict-overwrite-blue.png resources/accessories-text-editor.png resources/x-office-calendar.png resources/dialog-warning_16.png diff --git a/src/resources/conflict-overwrite-blue.png b/src/resources/conflict-overwrite-blue.png new file mode 100644 index 00000000..3247e7b7 Binary files /dev/null and b/src/resources/conflict-overwrite-blue.png differ -- cgit v1.3.1 From f9f70b224e25c2d5bff017fd08d32521d39d5b08 Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 2 Aug 2018 11:54:48 -0500 Subject: Add loose file/archive conflict icons --- src/mainwindow.cpp | 9 +++ src/modflagicondelegate.cpp | 6 +- src/modinfo.h | 14 ++++- src/modinfowithconflictinfo.cpp | 86 ++++++++++++++++++++-------- src/modinfowithconflictinfo.h | 16 +++++- src/modlist.cpp | 42 +++++++++----- src/modlist.h | 3 + src/modlistsortproxy.cpp | 16 +++--- src/resources.qrc | 10 ++-- src/resources/conflict-mixed-blue.png | Bin 0 -> 692 bytes src/resources/conflict-overwritten-blue.png | Bin 0 -> 577 bytes 11 files changed, 151 insertions(+), 51 deletions(-) create mode 100644 src/resources/conflict-mixed-blue.png create mode 100644 src/resources/conflict-overwritten-blue.png (limited to 'src/modflagicondelegate.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 832f42d0..d7ae18fb 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2202,10 +2202,17 @@ void MainWindow::modorder_changed() for (int i : modInfo->getModArchiveOverwritten()) { ModInfo::getByIndex(i)->clearCaches(); } + for (int i : modInfo->getModArchiveLooseOverwrite()) { + ModInfo::getByIndex(i)->clearCaches(); + } + for (int i : modInfo->getModArchiveLooseOverwritten()) { + ModInfo::getByIndex(i)->clearCaches(); + } // update conflict check on the moved mod modInfo->doConflictCheck(); m_OrganizerCore.modList()->setOverwriteMarkers(modInfo->getModOverwrite(), modInfo->getModOverwritten()); m_OrganizerCore.modList()->setArchiveOverwriteMarkers(modInfo->getModArchiveOverwrite(), modInfo->getModArchiveOverwritten()); + m_OrganizerCore.modList()->setArchiveLooseOverwriteMarkers(modInfo->getModArchiveLooseOverwrite(), modInfo->getModArchiveLooseOverwritten()); if (m_ModListSortProxy != nullptr) { m_ModListSortProxy->invalidate(); } @@ -2442,9 +2449,11 @@ void MainWindow::modlistSelectionChanged(const QModelIndex ¤t, const QMode ModInfo::Ptr selectedMod = ModInfo::getByIndex(current.data(Qt::UserRole + 1).toInt()); m_OrganizerCore.modList()->setOverwriteMarkers(selectedMod->getModOverwrite(), selectedMod->getModOverwritten()); m_OrganizerCore.modList()->setArchiveOverwriteMarkers(selectedMod->getModArchiveOverwrite(), selectedMod->getModArchiveOverwritten()); + m_OrganizerCore.modList()->setArchiveLooseOverwriteMarkers(selectedMod->getModArchiveLooseOverwrite(), selectedMod->getModArchiveLooseOverwritten()); } else { m_OrganizerCore.modList()->setOverwriteMarkers(std::set(), std::set()); m_OrganizerCore.modList()->setArchiveOverwriteMarkers(std::set(), std::set()); + m_OrganizerCore.modList()->setArchiveLooseOverwriteMarkers(std::set(), std::set()); } /* if ((m_ModListSortProxy != nullptr) && !m_ModListSortProxy->beingInvalidated()) { diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index f7f85a18..5584dea1 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -1,4 +1,4 @@ - #include "modflagicondelegate.h" +#include "modflagicondelegate.h" #include @@ -44,15 +44,19 @@ QString ModFlagIconDelegate::getFlagIcon(ModInfo::EFlag flag) const case ModInfo::FLAG_INVALID: return ":/MO/gui/problem"; case ModInfo::FLAG_NOTENDORSED: return ":/MO/gui/emblem_notendorsed"; case ModInfo::FLAG_NOTES: return ":/MO/gui/emblem_notes"; + case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_OVERWRITE: return ":/MO/gui/emblem_conflict_overwrite"; case ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE: return ":/MO/gui/emblem_conflict_loose_overwrite_archive"; case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return ":/MO/gui/emblem_conflict_overwritten"; case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_REDUNDANT: return ":MO/gui/emblem_conflict_redundant"; case ModInfo::FLAG_ALTERNATE_GAME: return ":MO/gui/alternate_game"; + case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_loose_conflict_overwrite"; + case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_loose_conflict_overwritten"; case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return ":/MO/gui/archive_conflict_mixed"; case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_conflict_winner"; case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_conflict_loser"; + case ModInfo::FLAG_ALTERNATE_GAME: return ":MO/gui/alternate_game"; default: return QString(); } } diff --git a/src/modinfo.h b/src/modinfo.h index c763e69b..99ce35b5 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -69,10 +69,12 @@ public: FLAG_NOTENDORSED, FLAG_NOTES, FLAG_CONFLICT_OVERWRITE, - FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE, FLAG_CONFLICT_OVERWRITTEN, FLAG_CONFLICT_MIXED, FLAG_CONFLICT_REDUNDANT, + FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE, + FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN, + FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED, FLAG_ARCHIVE_CONFLICT_OVERWRITE, FLAG_ARCHIVE_CONFLICT_OVERWRITTEN, FLAG_ARCHIVE_CONFLICT_MIXED, @@ -648,6 +650,16 @@ public: */ virtual std::set getModArchiveOverwritten() { return std::set(); } + /** + * @return retrieve list of mods (as mod index) with archives that are overwritten by thos mod's loose files. Updates may be delayed + */ + virtual std::set getModArchiveLooseOverwrite() { return std::set(); } + + /** + * @return list of mods (as mod index) with loose files that overwrite this one's archive files. Updates may be delayed + */ + virtual std::set getModArchiveLooseOverwritten() { return std::set(); } + /** * @brief update conflict information */ diff --git a/src/modinfowithconflictinfo.cpp b/src/modinfowithconflictinfo.cpp index 67006261..68b5b265 100644 --- a/src/modinfowithconflictinfo.cpp +++ b/src/modinfowithconflictinfo.cpp @@ -7,7 +7,7 @@ using namespace MOBase; using namespace MOShared; ModInfoWithConflictInfo::ModInfoWithConflictInfo(PluginContainer *pluginContainer, DirectoryEntry **directoryStructure) - : ModInfo(pluginContainer), m_DirectoryStructure(directoryStructure) {} + : ModInfo(pluginContainer), m_DirectoryStructure(directoryStructure), m_HasLooseOverwrite(false) {} void ModInfoWithConflictInfo::clearCaches() { @@ -32,6 +32,18 @@ std::vector ModInfoWithConflictInfo::getFlags() const } break; default: { /* NOP */ } } + switch (isLooseArchiveConflicted()) { + case CONFLICT_MIXED: { + result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED); + } break; + case CONFLICT_OVERWRITE: { + result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE); + } break; + case CONFLICT_OVERWRITTEN: { + result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN); + } break; + default: { /* NOP */ } + } switch (isArchiveConflicted()) { case CONFLICT_MIXED: { result.push_back(ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED); @@ -54,6 +66,8 @@ void ModInfoWithConflictInfo::doConflictCheck() const m_OverwrittenList.clear(); m_ArchiveOverwriteList.clear(); m_ArchiveOverwrittenList.clear(); + m_ArchiveLooseOverwriteList.clear(); + m_ArchiveLooseOverwrittenList.clear(); bool providesAnything = false; @@ -66,6 +80,7 @@ void ModInfoWithConflictInfo::doConflictCheck() const m_CurrentConflictState = CONFLICT_NONE; m_ArchiveConflictState = CONFLICT_NONE; + m_ArchiveConflictLooseState = CONFLICT_NONE; if ((*m_DirectoryStructure)->originExists(name)) { FilesOrigin &origin = (*m_DirectoryStructure)->getOriginByName(name); @@ -77,18 +92,7 @@ void ModInfoWithConflictInfo::doConflictCheck() const // no alternatives -> no conflict providesAnything = true; } else { - if (file->getOrigin() != origin.getID()) { - FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(file->getOrigin()); - unsigned int altIndex = ModInfo::getIndex(ToQString(altOrigin.getName())); - if (file->getArchive().first.size() == 0) - m_OverwrittenList.insert(altIndex); - else - m_ArchiveOverwrittenList.insert(altIndex); - } else { - providesAnything = true; - } - - // for all non-providing alternative origins + // Get the archive data for the current mod bool found = file->getOrigin() == origin.getID(); std::pair archiveData; if (found) @@ -101,6 +105,23 @@ void ModInfoWithConflictInfo::doConflictCheck() const } } } + + // If this is not the origin then determine the correct overwrite + if (file->getOrigin() != origin.getID()) { + FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(file->getOrigin()); + unsigned int altIndex = ModInfo::getIndex(ToQString(altOrigin.getName())); + if (file->getArchive().first.size() == 0) + if (archiveData.first.size() == 0) + m_OverwrittenList.insert(altIndex); + else + m_ArchiveLooseOverwrittenList.insert(altIndex); + else + m_ArchiveOverwrittenList.insert(altIndex); + } else { + providesAnything = true; + } + + // Sort out the alternatives for (auto altInfo : alternatives) { if ((altInfo.first != dataID) && (altInfo.first != origin.getID())) { FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(altInfo.first); @@ -113,11 +134,11 @@ void ModInfoWithConflictInfo::doConflictCheck() const m_OverwrittenList.insert(altIndex); } } else { - m_ArchiveOverwrittenList.insert(altIndex); + m_ArchiveLooseOverwrittenList.insert(altIndex); } } else { if (archiveData.first.size() == 0) { - m_ArchiveOverwrittenList.insert(altIndex); + m_ArchiveLooseOverwriteList.insert(altIndex); } else { if (archiveData.second > altInfo.second.second) { m_ArchiveOverwriteList.insert(altIndex); @@ -141,14 +162,21 @@ void ModInfoWithConflictInfo::doConflictCheck() const m_CurrentConflictState = CONFLICT_OVERWRITE; else if (!m_OverwrittenList.empty()) m_CurrentConflictState = CONFLICT_OVERWRITTEN; - } - if (!m_ArchiveOverwriteList.empty() && !m_ArchiveOverwrittenList.empty()) + if (!m_ArchiveOverwriteList.empty() && !m_ArchiveOverwrittenList.empty()) m_ArchiveConflictState = CONFLICT_MIXED; - else if (!m_ArchiveOverwriteList.empty()) + else if (!m_ArchiveOverwriteList.empty()) m_ArchiveConflictState = CONFLICT_OVERWRITE; - else if (!m_ArchiveOverwrittenList.empty()) + else if (!m_ArchiveOverwrittenList.empty()) m_ArchiveConflictState = CONFLICT_OVERWRITTEN; + + if (!m_ArchiveLooseOverwrittenList.empty() && !m_ArchiveLooseOverwriteList.empty()) + m_ArchiveConflictLooseState = CONFLICT_MIXED; + else if (!m_ArchiveLooseOverwrittenList.empty()) + m_ArchiveConflictLooseState = CONFLICT_OVERWRITTEN; + else if (!m_ArchiveLooseOverwriteList.empty()) + m_ArchiveConflictLooseState = CONFLICT_OVERWRITE; + } } } @@ -165,12 +193,22 @@ ModInfoWithConflictInfo::EConflictType ModInfoWithConflictInfo::isConflicted() c ModInfoWithConflictInfo::EConflictType ModInfoWithConflictInfo::isArchiveConflicted() const { - QTime now = QTime::currentTime(); - if (m_LastConflictCheck.isNull() || (m_LastConflictCheck.secsTo(now) > 10)) { - doConflictCheck(); - } + QTime now = QTime::currentTime(); + if (m_LastConflictCheck.isNull() || (m_LastConflictCheck.secsTo(now) > 10)) { + doConflictCheck(); + } + + return m_ArchiveConflictState; +} + +ModInfoWithConflictInfo::EConflictType ModInfoWithConflictInfo::isLooseArchiveConflicted() const +{ + QTime now = QTime::currentTime(); + if (m_LastConflictCheck.isNull() || (m_LastConflictCheck.secsTo(now) > 10)) { + doConflictCheck(); + } - return m_ArchiveConflictState; + return m_ArchiveConflictLooseState; } diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h index 5cf2d24e..13d87d25 100644 --- a/src/modinfowithconflictinfo.h +++ b/src/modinfowithconflictinfo.h @@ -27,6 +27,10 @@ public: virtual std::set getModArchiveOverwritten() { return m_ArchiveOverwrittenList; } + virtual std::set getModArchiveLooseOverwrite() { return m_ArchiveLooseOverwriteList; } + + virtual std::set getModArchiveLooseOverwritten() { return m_ArchiveLooseOverwrittenList; } + virtual void doConflictCheck() const; private: @@ -36,7 +40,8 @@ private: CONFLICT_OVERWRITE, CONFLICT_OVERWRITTEN, CONFLICT_MIXED, - CONFLICT_REDUNDANT + CONFLICT_REDUNDANT, + CONFLICT_CROSS }; private: @@ -51,6 +56,11 @@ private: */ EConflictType isArchiveConflicted() const; + /** + * @return true if there are archive conflicts with loose files in this mod + */ + EConflictType isLooseArchiveConflicted() const; + /** * @return true if this mod is completely replaced by others */ @@ -62,12 +72,16 @@ private: mutable EConflictType m_CurrentConflictState; mutable EConflictType m_ArchiveConflictState; + mutable EConflictType m_ArchiveConflictLooseState; + mutable bool m_HasLooseOverwrite; mutable QTime m_LastConflictCheck; mutable std::set m_OverwriteList; // indices of mods overritten by this mod mutable std::set m_OverwrittenList; // indices of mods overwriting this mod mutable std::set m_ArchiveOverwriteList; // indices of mods with archive files overritten by this mod mutable std::set m_ArchiveOverwrittenList; // indices of mods with archive files overwriting this mod + mutable std::set m_ArchiveLooseOverwriteList; // indices of mods with archives being overwritten by this mod's loose files + mutable std::set m_ArchiveLooseOverwrittenList; // indices of mods with loose files overwriting this mod's archive files }; diff --git a/src/modlist.cpp b/src/modlist.cpp index 876e8958..fd6da43b 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -163,10 +163,13 @@ QString ModList::getFlagText(ModInfo::EFlag flag, ModInfo::Ptr modInfo) const case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return tr("Overwritten loose files"); case ModInfo::FLAG_CONFLICT_MIXED: return tr("Loose files Overwrites & Overwritten"); case ModInfo::FLAG_CONFLICT_REDUNDANT: return tr("Redundant"); - case ModInfo::FLAG_ALTERNATE_GAME: return tr("Alternate game source"); + case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED: return tr("Contains archive files overwritten by loose files and loose files overwriting an archive"); + case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return tr("Overwrites an archive with loose files"); + case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return tr("Archive is overwritten by loose files"); case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return tr("Overwrites another archive file"); case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN: return tr("Overwritten by another archive file"); case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return tr("Archive files overwrites & overwritten"); + case ModInfo::FLAG_ALTERNATE_GAME: return tr("Alternate game source"); default: return ""; } } @@ -403,20 +406,26 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const return QVariant(); } else if ((role == Qt::BackgroundRole) || (role == ViewMarkingScrollBar::DEFAULT_ROLE)) { + bool overwrite = m_Overwrite.find(modIndex) != m_Overwrite.end(); + bool archiveOverwrite = m_ArchiveOverwrite.find(modIndex) != m_ArchiveOverwrite.end(); + bool archiveLooseOverwrite = m_ArchiveLooseOverwrite.find(modIndex) != m_ArchiveLooseOverwrite.end(); + bool overwritten = m_Overwritten.find(modIndex) != m_Overwritten.end(); + bool archiveOverwritten = m_ArchiveOverwritten.find(modIndex) != m_ArchiveOverwritten.end(); + bool archiveLooseOverwritten = m_ArchiveLooseOverwritten.find(modIndex) != m_ArchiveLooseOverwritten.end(); if (modInfo->getHighlight() & ModInfo::HIGHLIGHT_PLUGIN) { return Settings::instance().modlistContainsPluginColor(); - } else if (m_Overwrite.find(modIndex) != m_Overwrite.end() && m_ArchiveOverwritten.find(modIndex) != m_ArchiveOverwritten.end()) { - return QColor(255, 0, 255, 32); //TODO: Make configurable - } else if (m_Overwrite.find(modIndex) != m_Overwrite.end() && m_ArchiveOverwritten.find(modIndex) != m_ArchiveOverwritten.end()) { - return QColor(255, 0, 255, 32); //TODO: Make configurable - } else if (m_Overwritten.find(modIndex) != m_Overwritten.end() && m_ArchiveOverwrite.find(modIndex) != m_ArchiveOverwrite.end()) { + } else if ((overwrite && (archiveOverwritten || archiveLooseOverwritten)) || + (overwritten && (archiveOverwrite || archiveLooseOverwrite)) || + (archiveOverwrite && (overwritten || archiveLooseOverwritten)) || + (archiveOverwritten && (overwrite || archiveLooseOverwrite)) || + (archiveLooseOverwrite && (overwritten || archiveOverwritten)) || + (archiveLooseOverwritten && (overwrite || archiveLooseOverwrite)) + ) { return QColor(255, 0, 255, 32); //TODO: Make configurable - } else if (m_Overwritten.find(modIndex) != m_Overwritten.end() && m_ArchiveOverwrite.find(modIndex) != m_ArchiveOverwrite.end()) { - return QColor(255, 0, 255, 32); //TODO: Make configurable - } else if (m_Overwrite.find(modIndex) != m_Overwrite.end() || m_ArchiveOverwrite.find(modIndex) != m_ArchiveOverwrite.end()) { + } else if (overwrite || archiveOverwrite || archiveLooseOverwrite) { return Settings::instance().modlistOverwrittenLooseColor(); } - } else if (m_Overwritten.find(modIndex) != m_Overwritten.end() || m_ArchiveOverwritten.find(modIndex) != m_ArchiveOverwritten.end()) { + } else if (overwritten || archiveOverwritten || archiveLooseOverwritten) { return Settings::instance().modlistOverwritingLooseColor(); } else if (modInfo->hasFlag(ModInfo::FLAG_SEPARATOR) && modInfo->getColor().isValid() @@ -767,9 +776,16 @@ void ModList::setOverwriteMarkers(const std::set &overwrite, const void ModList::setArchiveOverwriteMarkers(const std::set &overwrite, const std::set &overwritten) { - m_ArchiveOverwrite = overwrite; - m_ArchiveOverwritten = overwritten; - notifyChange(0, rowCount() - 1); + m_ArchiveOverwrite = overwrite; + m_ArchiveOverwritten = overwritten; + notifyChange(0, rowCount() - 1); +} + +void ModList::setArchiveLooseOverwriteMarkers(const std::set &overwrite, const std::set &overwritten) +{ + m_ArchiveLooseOverwrite = overwrite; + m_ArchiveLooseOverwritten = overwritten; + notifyChange(0, rowCount() - 1); } void ModList::setPluginContainer(PluginContainer *pluginContianer) diff --git a/src/modlist.h b/src/modlist.h index 5841b9f2..a8263a76 100644 --- a/src/modlist.h +++ b/src/modlist.h @@ -113,6 +113,7 @@ public: void setPluginContainer(PluginContainer *pluginContainer); void setArchiveOverwriteMarkers(const std::set &overwrite, const std::set &overwritten); + void setArchiveLooseOverwriteMarkers(const std::set &overwrite, const std::set &overwritten); void setArchiveOverwriteMarkers(const std::set &overwrite, const std::set &overwritten); @@ -337,6 +338,8 @@ private: std::set m_Overwritten; std::set m_ArchiveOverwrite; std::set m_ArchiveOverwritten; + std::set m_ArchiveLooseOverwrite; + std::set m_ArchiveLooseOverwritten; TModInfoChange m_ChangeInfo; diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index c34985b6..88a073e0 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -238,13 +238,15 @@ bool ModListSortProxy::hasConflictFlag(const std::vector &flags) { for (ModInfo::EFlag flag : flags) { if ((flag == ModInfo::FLAG_CONFLICT_MIXED) || - (flag == ModInfo::FLAG_CONFLICT_OVERWRITE) || - (flag == ModInfo::FLAG_CONFLICT_OVERWRITTEN) || - (flag == ModInfo::FLAG_CONFLICT_REDUNDANT) || - (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE) || - (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN) || - (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED) || - (flag == ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE)) { + (flag == ModInfo::FLAG_CONFLICT_OVERWRITE) || + (flag == ModInfo::FLAG_CONFLICT_OVERWRITTEN) || + (flag == ModInfo::FLAG_CONFLICT_REDUNDANT) || + (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE) || + (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN) || + (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED) || + (flag == ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED) || + (flag == ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE) || + (flag == ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN)) { return true; } } diff --git a/src/resources.qrc b/src/resources.qrc index dff1ad72..9e4c9192 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -47,8 +47,10 @@ resources/conflict-mixed.png resources/conflict-overwrite.png resources/conflict-overwritten.png - resources/conflict-redundant.png - resources/conflict-overwrite-blue.png + resources/conflict-redundant.png + resources/conflict-mixed-blue.png + resources/conflict-overwrite-blue.png + resources/conflict-overwritten-blue.png resources/accessories-text-editor.png resources/x-office-calendar.png resources/dialog-warning_16.png @@ -94,8 +96,8 @@ resources/contents/conversation.png resources/contents/locked-chest.png resources/contents/config.png - resources/contents/feather-and-scroll.png - resources/contents/xedit.png + resources/contents/feather-and-scroll.png + resources/contents/xedit.png qt.conf diff --git a/src/resources/conflict-mixed-blue.png b/src/resources/conflict-mixed-blue.png new file mode 100644 index 00000000..2afbb304 Binary files /dev/null and b/src/resources/conflict-mixed-blue.png differ diff --git a/src/resources/conflict-overwritten-blue.png b/src/resources/conflict-overwritten-blue.png new file mode 100644 index 00000000..3a032a55 Binary files /dev/null and b/src/resources/conflict-overwritten-blue.png differ -- cgit v1.3.1 From 75a663941d5a58b9676e2eb99a2a288abc19a359 Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 9 Aug 2018 02:30:06 -0500 Subject: Add flag padding for all conflict icons --- src/modflagicondelegate.cpp | 39 ++++++++++++++++++++++++++++++++++++++- src/modflagicondelegate.h | 2 ++ 2 files changed, 40 insertions(+), 1 deletion(-) (limited to 'src/modflagicondelegate.cpp') diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index 5584dea1..a0a0a86d 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -7,6 +7,14 @@ ModInfo::EFlag ModFlagIconDelegate::m_ConflictFlags[4] = { ModInfo::FLAG_CONFLIC , ModInfo::FLAG_CONFLICT_OVERWRITTEN , ModInfo::FLAG_CONFLICT_REDUNDANT }; +ModInfo::EFlag ModFlagIconDelegate::m_ArchiveLooseConflictFlags[3] = { ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED + , ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE + , ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN }; + +ModInfo::EFlag ModFlagIconDelegate::m_ArchiveConflictFlags[3] = { ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED + , ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE + , ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN }; + ModFlagIconDelegate::ModFlagIconDelegate(QObject *parent) : IconDelegate(parent) { @@ -19,7 +27,8 @@ QList ModFlagIconDelegate::getIcons(const QModelIndex &index) const { ModInfo::Ptr info = ModInfo::getByIndex(modid.toInt()); std::vector flags = info->getFlags(); - { // insert conflict icon first to provide nicer alignment + // insert conflict icons to provide nicer alignment + { // insert loose file conflicts first auto iter = std::find_first_of(flags.begin(), flags.end(), m_ConflictFlags, m_ConflictFlags + 4); if (iter != flags.end()) { @@ -30,6 +39,34 @@ QList ModFlagIconDelegate::getIcons(const QModelIndex &index) const { } } + { // insert archive vs loose conflicts second + int pad = 2; + auto iter = std::find_first_of(flags.begin(), flags.end(), + m_ArchiveLooseConflictFlags, m_ArchiveLooseConflictFlags + 4); + while (iter != flags.end()) { + result.append(getFlagIcon(*iter)); + flags.erase(iter); + pad--; + iter = std::find_first_of(flags.begin(), flags.end(), + m_ArchiveLooseConflictFlags, m_ArchiveLooseConflictFlags + 4); + } + while (pad > 0) { + result.append(QString()); + pad--; + } + } + + { // insert archive conflicts last + auto iter = std::find_first_of(flags.begin(), flags.end(), + m_ArchiveConflictFlags, m_ArchiveConflictFlags + 4); + if (iter != flags.end()) { + result.append(getFlagIcon(*iter)); + flags.erase(iter); + } else { + result.append(QString()); + } + } + for (auto iter = flags.begin(); iter != flags.end(); ++iter) { result.append(getFlagIcon(*iter)); } diff --git a/src/modflagicondelegate.h b/src/modflagicondelegate.h index b31a250b..7324d516 100644 --- a/src/modflagicondelegate.h +++ b/src/modflagicondelegate.h @@ -15,6 +15,8 @@ private: QString getFlagIcon(ModInfo::EFlag flag) const; private: static ModInfo::EFlag m_ConflictFlags[4]; + static ModInfo::EFlag m_ArchiveLooseConflictFlags[3]; + static ModInfo::EFlag m_ArchiveConflictFlags[3]; }; #endif // MODFLAGICONDELEGATE_H -- cgit v1.3.1 From 49159de5d7084bf1ac159e3e37e2b406cdd87dbf Mon Sep 17 00:00:00 2001 From: Al12rs Date: Tue, 14 Aug 2018 11:35:20 -0500 Subject: Improved refresh performance by replacing std::transform() with CharLowerBuffer(). Fixed padding to four spaces and removed references to FLAG_ARCHIVE_LOOSE_CONFLICTS_MIXED that isn't used. --- src/modflagicondelegate.cpp | 32 +++++++++++++++++++------------- src/modflagicondelegate.h | 2 +- src/modinfo.h | 1 - src/modlist.cpp | 1 - src/modlistsortproxy.cpp | 1 - src/shared/util.cpp | 12 ++++++++---- 6 files changed, 28 insertions(+), 21 deletions(-) (limited to 'src/modflagicondelegate.cpp') diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index a0a0a86d..48d71313 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -7,8 +7,7 @@ ModInfo::EFlag ModFlagIconDelegate::m_ConflictFlags[4] = { ModInfo::FLAG_CONFLIC , ModInfo::FLAG_CONFLICT_OVERWRITTEN , ModInfo::FLAG_CONFLICT_REDUNDANT }; -ModInfo::EFlag ModFlagIconDelegate::m_ArchiveLooseConflictFlags[3] = { ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED - , ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE +ModInfo::EFlag ModFlagIconDelegate::m_ArchiveLooseConflictFlags[2] = { ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE , ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN }; ModInfo::EFlag ModFlagIconDelegate::m_ArchiveConflictFlags[3] = { ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED @@ -39,26 +38,33 @@ QList ModFlagIconDelegate::getIcons(const QModelIndex &index) const { } } - { // insert archive vs loose conflicts second - int pad = 2; + { // insert loose vs archive overwrite second + auto iter = std::find(flags.begin(), flags.end(), + ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE); + if (iter != flags.end()) { + result.append(getFlagIcon(*iter)); + flags.erase(iter); + } + else { + result.append(QString()); + } + } + + { // insert loose vs archive overwritten third auto iter = std::find_first_of(flags.begin(), flags.end(), - m_ArchiveLooseConflictFlags, m_ArchiveLooseConflictFlags + 4); - while (iter != flags.end()) { + m_ArchiveLooseConflictFlags + 1, m_ArchiveLooseConflictFlags + 2); + if (iter != flags.end()) { result.append(getFlagIcon(*iter)); flags.erase(iter); - pad--; - iter = std::find_first_of(flags.begin(), flags.end(), - m_ArchiveLooseConflictFlags, m_ArchiveLooseConflictFlags + 4); } - while (pad > 0) { + else { result.append(QString()); - pad--; } } { // insert archive conflicts last auto iter = std::find_first_of(flags.begin(), flags.end(), - m_ArchiveConflictFlags, m_ArchiveConflictFlags + 4); + m_ArchiveConflictFlags, m_ArchiveConflictFlags + 3); if (iter != flags.end()) { result.append(getFlagIcon(*iter)); flags.erase(iter); @@ -87,7 +93,7 @@ QString ModFlagIconDelegate::getFlagIcon(ModInfo::EFlag flag) const case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return ":/MO/gui/emblem_conflict_overwritten"; case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_REDUNDANT: return ":MO/gui/emblem_conflict_redundant"; - case ModInfo::FLAG_ALTERNATE_GAME: return ":MO/gui/alternate_game"; + case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED: return ":/MO/gui/archive_loose_conflict_mixed"; case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_loose_conflict_overwrite"; case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_loose_conflict_overwritten"; case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return ":/MO/gui/archive_conflict_mixed"; diff --git a/src/modflagicondelegate.h b/src/modflagicondelegate.h index 7324d516..0f257c7d 100644 --- a/src/modflagicondelegate.h +++ b/src/modflagicondelegate.h @@ -15,7 +15,7 @@ private: QString getFlagIcon(ModInfo::EFlag flag) const; private: static ModInfo::EFlag m_ConflictFlags[4]; - static ModInfo::EFlag m_ArchiveLooseConflictFlags[3]; + static ModInfo::EFlag m_ArchiveLooseConflictFlags[2]; static ModInfo::EFlag m_ArchiveConflictFlags[3]; }; diff --git a/src/modinfo.h b/src/modinfo.h index 99ce35b5..00859209 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -74,7 +74,6 @@ public: FLAG_CONFLICT_REDUNDANT, FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE, FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN, - FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED, FLAG_ARCHIVE_CONFLICT_OVERWRITE, FLAG_ARCHIVE_CONFLICT_OVERWRITTEN, FLAG_ARCHIVE_CONFLICT_MIXED, diff --git a/src/modlist.cpp b/src/modlist.cpp index fd6da43b..8c070667 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -163,7 +163,6 @@ QString ModList::getFlagText(ModInfo::EFlag flag, ModInfo::Ptr modInfo) const case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return tr("Overwritten loose files"); case ModInfo::FLAG_CONFLICT_MIXED: return tr("Loose files Overwrites & Overwritten"); case ModInfo::FLAG_CONFLICT_REDUNDANT: return tr("Redundant"); - case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED: return tr("Contains archive files overwritten by loose files and loose files overwriting an archive"); case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return tr("Overwrites an archive with loose files"); case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return tr("Archive is overwritten by loose files"); case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return tr("Overwrites another archive file"); diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 88a073e0..8cf4bb9c 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -244,7 +244,6 @@ bool ModListSortProxy::hasConflictFlag(const std::vector &flags) (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE) || (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN) || (flag == ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED) || - (flag == ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED) || (flag == ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE) || (flag == ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN)) { return true; diff --git a/src/shared/util.cpp b/src/shared/util.cpp index 102565f5..b65ed071 100644 --- a/src/shared/util.cpp +++ b/src/shared/util.cpp @@ -108,27 +108,31 @@ static auto locToLower = [] (char in) -> char { std::string &ToLower(std::string &text) { - std::transform(text.begin(), text.end(), text.begin(), locToLower); + //std::transform(text.begin(), text.end(), text.begin(), locToLower); + CharLowerBuffA(const_cast(text.c_str()), static_cast(text.size())); return text; } std::string ToLower(const std::string &text) { std::string result(text); - std::transform(result.begin(), result.end(), result.begin(), locToLower); + //std::transform(result.begin(), result.end(), result.begin(), locToLower); + CharLowerBuffA(const_cast(result.c_str()), static_cast(result.size())); return result; } std::wstring &ToLower(std::wstring &text) { - std::transform(text.begin(), text.end(), text.begin(), locToLowerW); + //std::transform(text.begin(), text.end(), text.begin(), locToLowerW); + CharLowerBuffW(const_cast(text.c_str()), static_cast(text.size())); return text; } std::wstring ToLower(const std::wstring &text) { std::wstring result(text); - std::transform(result.begin(), result.end(), result.begin(), locToLowerW); + //std::transform(result.begin(), result.end(), result.begin(), locToLowerW); + CharLowerBuffW(const_cast(result.c_str()), static_cast(result.size())); return result; } -- cgit v1.3.1 From 4436d376a8d426867f217b03838570a424b09c5f Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 12 Dec 2018 20:26:35 -0600 Subject: Clean up and fix merge issues --- src/directoryrefresher.cpp | 3 +- src/mainwindow.cpp | 77 ++- src/mainwindow.ui | 15 +- src/modflagicondelegate.cpp | 3 - src/modinfo.h | 10 - src/modinfodialog.h | 3 +- src/modinfowithconflictinfo.cpp | 2 +- src/modlist.cpp | 18 +- src/modlist.h | 2 - src/organizer_en.ts | 1124 ++++++++++++++++++++------------------- src/organizercore.cpp | 18 +- src/settings.cpp | 4 +- 12 files changed, 652 insertions(+), 627 deletions(-) (limited to 'src/modflagicondelegate.cpp') diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index 82eb093b..e6e6a8e0 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -85,7 +85,6 @@ void DirectoryRefresher::addModBSAToStructure(DirectoryEntry *directoryStructure int priority, const QString &directory, const QStringList &archives) { std::wstring directoryW = ToWString(QDir::toNativeSeparators(directory)); - //QStringList loadOrder = QStringList(); IPluginGame *game = qApp->property("managed_game").value(); GamePlugins *gamePlugins = game->feature(); @@ -95,7 +94,7 @@ void DirectoryRefresher::addModBSAToStructure(DirectoryEntry *directoryStructure for (const QString &archive : archives) { QFileInfo fileInfo(archive); if (m_EnabledArchives.find(fileInfo.fileName()) != m_EnabledArchives.end()) { - + int order = -1; for (auto plugin : loadOrder) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index cdd53dc9..73a40f46 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -313,8 +313,7 @@ MainWindow::MainWindow(QSettings &initSettings ui->espList->setItemDelegateForColumn(PluginList::COL_FLAGS, new GenericIconDelegate(ui->espList)); ui->espList->installEventFilter(m_OrganizerCore.pluginList()); - //bsaList converted to normal QTreeWidget since we can't sort BSAs anymore. - //ui->bsaList->setLocalMoveOnly(true); + ui->bsaList->setLocalMoveOnly(true); bool pluginListAdjusted = registerWidgetState(ui->espList->objectName(), ui->espList->header(), "plugin_list_state"); registerWidgetState(ui->dataTree->objectName(), ui->dataTree->header()); @@ -451,15 +450,15 @@ MainWindow::MainWindow(QSettings &initSettings if (m_OrganizerCore.getArchiveParsing()) { - ui->showArchiveDataCheckBox->setCheckState(Qt::Checked); - ui->showArchiveDataCheckBox->setEnabled(true); - m_showArchiveData = true; + ui->showArchiveDataCheckBox->setCheckState(Qt::Checked); + ui->showArchiveDataCheckBox->setEnabled(true); + m_showArchiveData = true; } else { - ui->showArchiveDataCheckBox->setCheckState(Qt::Unchecked); - ui->showArchiveDataCheckBox->setEnabled(false); - m_showArchiveData = false; + ui->showArchiveDataCheckBox->setCheckState(Qt::Unchecked); + ui->showArchiveDataCheckBox->setEnabled(false); + m_showArchiveData = false; } refreshExecutablesList(); @@ -1230,7 +1229,7 @@ void MainWindow::updateTo(QTreeWidgetItem *subTree, const std::wstring &director directoryChild->setData(0, Qt::DecorationRole, (new QFileIconProvider())->icon(QFileIconProvider::Folder)); directoryChild->setData(0, Qt::UserRole + 3, isDirectory); - if (conflictsOnly) { + if (conflictsOnly || !m_showArchiveData) { updateTo(directoryChild, temp.str(), **current, conflictsOnly); if (directoryChild->childCount() != 0) { subTree->addChild(directoryChild); @@ -1264,9 +1263,9 @@ void MainWindow::updateTo(QTreeWidgetItem *subTree, const std::wstring &director if (conflictsOnly && (current->getAlternatives().size() == 0)) { continue; } - + bool isArchive = false; - int originID = current->getOrigin(isArchive); + int originID = current->getOrigin(isArchive); if (!m_showArchiveData && isArchive) { continue; } @@ -2304,10 +2303,10 @@ void MainWindow::fileMoved(const QString &filePath, const QString &oldOriginName QString fullNewPath = ToQString(newOrigin.getPath()) + "\\" + filePath; WIN32_FIND_DATAW findData; - HANDLE hFind; - hFind = ::FindFirstFileW(ToWString(fullNewPath).c_str(), &findData); + HANDLE hFind; + hFind = ::FindFirstFileW(ToWString(fullNewPath).c_str(), &findData); filePtr->addOrigin(newOrigin.getID(), findData.ftCreationTime, L"", -1); - FindClose(hFind); + FindClose(hFind); } if (m_OrganizerCore.directoryStructure()->originExists(ToWString(oldOriginName))) { FilesOrigin &oldOrigin = m_OrganizerCore.directoryStructure()->getOriginByName(ToWString(oldOriginName)); @@ -4372,22 +4371,22 @@ void MainWindow::on_actionSettings_triggered() const auto state = settings.archiveParsing(); if (state != m_OrganizerCore.getArchiveParsing()) { - m_OrganizerCore.setArchiveParsing(state); - if (!state) - { - ui->showArchiveDataCheckBox->setCheckState(Qt::Unchecked); - ui->showArchiveDataCheckBox->setEnabled(false); - m_showArchiveData = false; - } - else - { - ui->showArchiveDataCheckBox->setCheckState(Qt::Checked); - ui->showArchiveDataCheckBox->setEnabled(true); - m_showArchiveData = true; - } - m_OrganizerCore.refreshModList(); - m_OrganizerCore.refreshDirectoryStructure(); - m_OrganizerCore.refreshLists(); + m_OrganizerCore.setArchiveParsing(state); + if (!state) + { + ui->showArchiveDataCheckBox->setCheckState(Qt::Unchecked); + ui->showArchiveDataCheckBox->setEnabled(false); + m_showArchiveData = false; + } + else + { + ui->showArchiveDataCheckBox->setCheckState(Qt::Checked); + ui->showArchiveDataCheckBox->setEnabled(true); + m_showArchiveData = true; + } + m_OrganizerCore.refreshModList(); + m_OrganizerCore.refreshDirectoryStructure(); + m_OrganizerCore.refreshLists(); } if (settings.getCacheDirectory() != oldCacheDirectory) { @@ -6027,14 +6026,14 @@ void MainWindow::sendSelectedModsToSeparator_clicked() void MainWindow::on_showArchiveDataCheckBox_toggled(const bool checked) { - if (m_OrganizerCore.getArchiveParsing() && checked) - { - m_showArchiveData = checked; - } - else - { - m_showArchiveData = false; - } - refreshDataTree(); + if (m_OrganizerCore.getArchiveParsing() && checked) + { + m_showArchiveData = checked; + } + else + { + m_showArchiveData = false; + } + refreshDataTree(); } diff --git a/src/mainwindow.ui b/src/mainwindow.ui index eb88a855..c6b43be0 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -831,6 +831,9 @@ p, li { white-space: pre-wrap; } + + true + Sort @@ -1045,7 +1048,7 @@ p, li { white-space: pre-wrap; } - + Qt::CustomContextMenu @@ -1061,19 +1064,19 @@ p, li { white-space: pre-wrap; } false - + false - + false - + 20 - + true - + 1 diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index 48d71313..eb6945c4 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -89,11 +89,8 @@ QString ModFlagIconDelegate::getFlagIcon(ModInfo::EFlag flag) const case ModInfo::FLAG_NOTES: return ":/MO/gui/emblem_notes"; case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_OVERWRITE: return ":/MO/gui/emblem_conflict_overwrite"; - case ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE: return ":/MO/gui/emblem_conflict_loose_overwrite_archive"; case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return ":/MO/gui/emblem_conflict_overwritten"; - case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed"; case ModInfo::FLAG_CONFLICT_REDUNDANT: return ":MO/gui/emblem_conflict_redundant"; - case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_MIXED: return ":/MO/gui/archive_loose_conflict_mixed"; case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_loose_conflict_overwrite"; case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_loose_conflict_overwritten"; case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return ":/MO/gui/archive_conflict_mixed"; diff --git a/src/modinfo.h b/src/modinfo.h index 00859209..350b3a0d 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -639,16 +639,6 @@ public: */ virtual std::set getModArchiveOverwritten() { return std::set(); } - /** - * @return retrieve list of mods (as mod index) with archives that are overwritten by this one. Updates may be delayed - */ - virtual std::set getModArchiveOverwrite() { return std::set(); } - - /** - * @return list of mods (as mod index) with archives that overwrite this one. Updates may be delayed - */ - virtual std::set getModArchiveOverwritten() { return std::set(); } - /** * @return retrieve list of mods (as mod index) with archives that are overwritten by thos mod's loose files. Updates may be delayed */ diff --git a/src/modinfodialog.h b/src/modinfodialog.h index 6a315a93..52768649 100644 --- a/src/modinfodialog.h +++ b/src/modinfodialog.h @@ -78,7 +78,8 @@ public: * @param modInfo info structure about the mod to display * @param parent parend widget **/ - explicit ModInfoDialog(ModInfo::Ptr modInfo, const MOShared::DirectoryEntry *directory, bool unmanaged, OrganizerCore *organizerCore, PluginContainer *pluginContainer, QWidget *parent = 0); + explicit ModInfoDialog(ModInfo::Ptr modInfo, const MOShared::DirectoryEntry *directory, bool unmanaged, OrganizerCore *organizerCore, PluginContainer *pluginContainer, QWidget *parent = 0); + ~ModInfoDialog(); /** diff --git a/src/modinfowithconflictinfo.cpp b/src/modinfowithconflictinfo.cpp index 79896cc3..12cbf416 100644 --- a/src/modinfowithconflictinfo.cpp +++ b/src/modinfowithconflictinfo.cpp @@ -35,7 +35,7 @@ std::vector ModInfoWithConflictInfo::getFlags() const switch (isLooseArchiveConflicted()) { case CONFLICT_MIXED: { result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE); - result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN); + result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN); } break; case CONFLICT_OVERWRITE: { result.push_back(ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE); diff --git a/src/modlist.cpp b/src/modlist.cpp index 8c070667..757fedb2 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -159,7 +159,6 @@ QString ModList::getFlagText(ModInfo::EFlag flag, ModInfo::Ptr modInfo) const return output.join("
"); } case ModInfo::FLAG_CONFLICT_OVERWRITE: return tr("Overwrites loose files"); - case ModInfo::FLAG_CONFLICT_LOOSE_OVERWRITE_ARCHIVE: return tr("Loose files overwrite another archive"); case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return tr("Overwritten loose files"); case ModInfo::FLAG_CONFLICT_MIXED: return tr("Loose files Overwrites & Overwritten"); case ModInfo::FLAG_CONFLICT_REDUNDANT: return tr("Redundant"); @@ -420,13 +419,13 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const (archiveLooseOverwrite && (overwritten || archiveOverwritten)) || (archiveLooseOverwritten && (overwrite || archiveLooseOverwrite)) ) { - return QColor(255, 0, 255, 32); //TODO: Make configurable - } else if (overwrite || archiveOverwrite || archiveLooseOverwrite) { return Settings::instance().modlistOverwrittenLooseColor(); } - } else if (overwritten || archiveOverwritten || archiveLooseOverwritten) { + else if (overwrite || archiveOverwrite || archiveLooseOverwrite) { return Settings::instance().modlistOverwritingLooseColor(); - } else if (modInfo->hasFlag(ModInfo::FLAG_SEPARATOR) + } else if (overwritten || archiveOverwritten || archiveLooseOverwritten) { + return QColor(255, 0, 0, 64); //TODO: Make configurable + } else if (modInfo->hasFlag(ModInfo::FLAG_SEPARATOR) && modInfo->getColor().isValid() && ((role != ViewMarkingScrollBar::DEFAULT_ROLE) || Settings::instance().colorSeparatorScrollbar())) { @@ -789,14 +788,7 @@ void ModList::setArchiveLooseOverwriteMarkers(const std::set &over void ModList::setPluginContainer(PluginContainer *pluginContianer) { - m_PluginContainer = pluginContianer; -} - -void ModList::setArchiveOverwriteMarkers(const std::set &overwrite, const std::set &overwritten) -{ - m_ArchiveOverwrite = overwrite; - m_ArchiveOverwritten = overwritten; - notifyChange(0, rowCount() - 1); + m_PluginContainer = pluginContianer; } bool ModList::modInfoAboutToChange(ModInfo::Ptr info) diff --git a/src/modlist.h b/src/modlist.h index a8263a76..49627d68 100644 --- a/src/modlist.h +++ b/src/modlist.h @@ -115,8 +115,6 @@ public: void setArchiveOverwriteMarkers(const std::set &overwrite, const std::set &overwritten); void setArchiveLooseOverwriteMarkers(const std::set &overwrite, const std::set &overwritten); - void setArchiveOverwriteMarkers(const std::set &overwrite, const std::set &overwritten); - bool modInfoAboutToChange(ModInfo::Ptr info); void modInfoChanged(ModInfo::Ptr info); diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 44a386d6..550f7d5c 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -279,12 +279,12 @@ p, li { white-space: pre-wrap; } DirectoryRefresher - + failed to parse bsa %1: %2 - + failed to read mod (%1): %2 @@ -1620,7 +1620,7 @@ p, li { white-space: pre-wrap; } - + Create Backup @@ -1657,7 +1657,7 @@ p, li { white-space: pre-wrap; } - + Namefilter @@ -1783,9 +1783,9 @@ p, li { white-space: pre-wrap; } - - - + + + Refresh @@ -1805,23 +1805,34 @@ p, li { white-space: pre-wrap; } - - - Filter the above list so that only conflicts are displayed. + + + Filters the above list so that only conflicts are displayed. - + Show only conflicts - + + + Filters the above list so that files from archives are not shown + + + + + Show files from Archives + + + + Saves - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1832,160 +1843,160 @@ p, li { white-space: pre-wrap; } - + Downloads - + Refresh downloads view - + This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here. - + Show Hidden - + Tool Bar - + Install Mod - + Install &Mod - + Install a new mod from an archive - + Ctrl+M - + Profiles - + &Profiles - + Configure Profiles - + Ctrl+P - + Executables - + &Executables - + Configure the executables that can be started through Mod Organizer - + Ctrl+E - - + + Tools - + &Tools - + Ctrl+I - + Settings - + &Settings - + Configure settings and workarounds - + Ctrl+S - + Nexus - + Search nexus network for more mods - + Ctrl+N - - + + Update - + Mod Organizer is up-to-date - - + + No Problems - + This button will be highlighted if MO discovered potential problems in your setup and provide tips on how to fix them. !Work in progress! @@ -1993,830 +2004,830 @@ Right now this has very limited functionality - - + + Help - + Ctrl+H - + Endorse MO - - + + Endorse Mod Organizer - + Copy Log to Clipboard - + Change Game - + Open the Instance selection dialog to manage a different Game - + Toolbar - + Desktop - + Start Menu - + There is no supported sort mechanism for this game. You will probably have to use a third-party tool. - + Problems - + There are potential problems with your setup - + Everything seems to be in order - + Help on UI - + Documentation Wiki - + Report Issue - + Tutorials - + About - + About Qt - + Name - + Please enter a name for the new profile - + failed to create profile: %1 - + Show tutorial? - + You are starting Mod Organizer for the first time. Do you want to show a tutorial of its basic features? If you choose no you can always start the tutorial from the "Help"-menu. - + Downloads in progress - + There are still downloads in progress, do you really want to quit? - + Plugin "%1" failed: %2 - + Plugin "%1" failed - + Browse Mod Page - + Also in: <br> - + No conflict - + <Edit...> - + This bsa is enabled in the ini file so it may be required! - + Activating Network Proxy - + Notice: Your current MO version (%1) is lower than the previous version (%2).<br>The GUI may not downgrade gracefully, so you may experience oddities.<br>However, there should be no serious issues. - + Choose Mod - + Mod Archive - + Start Tutorial? - + You're about to start a tutorial. For technical reasons it's not possible to end the tutorial early. Continue? - + failed to spawn notepad.exe: %1 - + failed to change origin name: %1 - + failed to move "%1" from mod "%2" to "%3": %4 - + <Contains %1> - + <Checked> - + <Unchecked> - + <Update> - + <Mod Backup> - + <Managed by MO> - + <Managed outside MO> - + <No category> - + <Conflicted> - + <Not Endorsed> - + failed to rename mod: %1 - + Overwrite? - + This will replace the existing mod "%1". Continue? - + failed to remove mod "%1" - - - + + + failed to rename "%1" to "%2" - - - - + + + + Confirm - + Remove the following mods?<br><ul>%1</ul> - + failed to remove mod: %1 - - - + + + Failed - + Installation file no longer exists - + Mods installed with old versions of MO can't be reinstalled in this way. - + Failed to create backup. - + You need to be logged in with Nexus to resume a download - - + + You need to be logged in with Nexus to endorse - + Failed to display overwrite dialog: %1 - + Nexus ID for this Mod is unknown - + Web page for this mod is unknown - - - + + + Create Mod... - + This will create an empty mod. Please enter a name: - - + + A mod with this name already exists - + Create Separator... - + This will create a new separator. Please enter a name: - + A separator with this name already exists - + This will move all files from overwrite into a new, regular mod. Please enter a name: - - + + Are you sure? - + About to recursively delete: - + Not logged in, endorsement information will be wrong - + Continue? - + The versioning scheme decides which version is considered newer than another. This function will guess the versioning scheme under the assumption that the installed version is outdated. - - + + Sorry - + I don't know a versioning scheme where %1 is newer than %2. - + Really enable all visible mods? - + Really disable all visible mods? - + Export to csv - + CSV (Comma Separated Values) is a format that can be imported in programs like Excel to create a spreadsheet. You can also use online editors and converters instead. - + Select what mods you want export: - + All installed mods - + Only active (checked) mods from your current profile - + All currently visible mods in the mod list - + Choose what Columns to export: - + Mod_Priority - + Mod_Name - + Mod_Status - + Primary_Category - + Nexus_ID - + Mod_Nexus_URL - + Mod_Version - + Install_Date - + Download_File_Name - + export failed: %1 - + Open Game folder - + Open MyGames folder - + Open Instance folder - + Open Mods folder - + Open Profile folder - + Open Downloads folder - + Open MO2 Install folder - + Open MO2 Plugins folder - + Open MO2 Logs folder - + Install Mod... - + Create empty mod - + Create Separator - + Enable all visible - + Disable all visible - + Check all for update - + Export to csv... - - + + Send to - - + + Top - - + + Bottom - - + + Priority... - + Separator... - + All Mods - + Sync to Mods... - + Clear Overwrite... - - + + Open in Explorer - + Restore Backup - + Remove Backup... - - + + Change Categories - - + + Primary Category - + Rename Separator... - + Remove Separator... - + Select Color... - + Reset Color - + Change versioning scheme - + Un-ignore update - + Ignore update - - + + Enable selected - - + + Disable selected - + Rename Mod... - + Reinstall Mod - + Remove Mod... - + Un-Endorse - - + + Endorse - + Won't endorse - + Endorsement state unknown - + Ignore missing data - + Mark as converted/working - + Visit on Nexus - + Visit web page - + Information... - - + + Exception: - - + + Unknown exception - + <All> - + <Multiple> - + %1 more - + Are you sure you want to remove the following %n save(s)?<br><ul>%1</ul><br>Removed saves will be sent to the Recycle Bin. @@ -2824,12 +2835,12 @@ You can also use online editors and converters instead. - + Enable Mods... - + Delete %n save(s) @@ -2837,22 +2848,22 @@ You can also use online editors and converters instead. - + failed to remove %1 - + failed to create %1 - + Restarting MO - + Changing the managed game directory requires restarting MO. Any pending downloads will be paused. @@ -2860,335 +2871,335 @@ Click OK to restart MO now. - + Can't change download directory while downloads are in progress! - + failed to write to file %1 - + %1 written - + Select binary - + Binary - + Enter Name - + Please enter a name for the executable - + Not an executable - + This is not a recognized executable. - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - + There already is a visible version of this file. Replace it? - - + + Set Priority - + Set the priority of the selected plugins - + file not found: %1 - + failed to generate preview for %1 - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Update available - + Open/Execute - + Add as Executable - + Preview - + Un-Hide - + Hide - + Write To File... - + Do you want to endorse Mod Organizer on %1 now? - + Thank you! - + Thank you for your endorsement! - + Request to Nexus failed: %1 - - + + failed to read %1: %2 - - + + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + This will restart MO, continue? - + Edit Categories... - + Deselect filter - + Remove - + Enable all - + Disable all - + Unlock load order - + Lock load order - + Open Origin in Explorer - + Open Origin Info... - + depends on missing "%1" - + incompatible with "%1" - + Please wait while LOOT is running - + loot failed. Exit code was: %1 - + failed to start loot - + failed to run loot: %1 - + Errors occured - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of modlist created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file - + Set the priority of the selected mods @@ -3649,243 +3660,243 @@ p, li { white-space: pre-wrap; } - - + + Save changes? - - + + Save changes to "%1"? - + File Exists - + A file with that name exists, please enter a new one - + failed to move file - + failed to create directory "optional" - - + + Info requested, please wait - + Main - + Update - + Optional - + Old - + Misc - + Unknown - + Current Version: %1 - + No update available - + (description incomplete, please visit nexus) - + <a href="%1">Visit on Nexus</a> - + Failed to delete %1 - - - - + + + + Confirm - - + + Are sure you want to delete "%1"? - - + + Are sure you want to delete the selected files? - - + + New Folder - + Failed to create "%1" - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - - + + failed to rename %1 to %2 - + There already is a visible version of this file. Replace it? - + Select binary - + Binary - + file not found: %1 - + failed to generate preview for %1 - + Sorry - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Un-Hide - + Hide - - + + Open/Execute - - + + Preview - + Name - + Please enter a name - - + + Error - + Invalid name. Must be a valid file name - + A tweak by that name exists - + Create Tweak @@ -4037,182 +4048,197 @@ p, li { white-space: pre-wrap; } - Overwrites files + Overwrites loose files - Overwritten files + Loose files overwrite another archive - Overwrites & Overwritten + Overwritten loose files - Redundant + Loose files Overwrites & Overwritten - Alternate game source + Redundant - - Non-MO + + Overwrites an archive with loose files - - invalid + + Archive is overwritten by loose files - - installed version: "%1", newest version: "%2" + + Overwrites another archive file - - The newest version on Nexus seems to be older than the one you have installed. This could either mean the version you have has been withdrawn (i.e. due to a bug) or the author uses a non-standard versioning scheme and that newest version is actually newer. Either way you may want to "upgrade". + + Overwritten by another archive file - - Categories: <br> + + Archive files overwrites & overwritten + + + + + Alternate game source + + + + + Non-MO - + + invalid + + + + Invalid name - + Name is already in use by another mod - + drag&drop failed: %1 - + Confirm - + Are you sure you want to remove "%1"? - + Flags - + Content - + Mod Name - + Version - + Priority - + Category - + Source Game - + Nexus ID - + Installation - + Notes - - + + unknown - + Name of your mods - + Version of the mod (if available) - + Installation priority of your mod. The higher, the more "important" it is and thus overwrites files from mods with lower priority. - + Category of the mod. - + The source game which was the origin of this mod. - + Id of the mod as used on Nexus. - + Emblemes to highlight things that might require attention. - + Depicts the content of the mod:<br><table cellspacing=7><tr><td><img src=":/MO/gui/content/plugin" width=32/></td><td>Game plugins (esp/esm/esl)</td></tr><tr><td><img src=":/MO/gui/content/interface" width=32/></td><td>Interface</td></tr><tr><td><img src=":/MO/gui/content/mesh" width=32/></td><td>Meshes</td></tr><tr><td><img src=":/MO/gui/content/bsa" width=32/></td><td>BSA</td></tr><tr><td><img src=":/MO/gui/content/texture" width=32/></td><td>Textures</td></tr><tr><td><img src=":/MO/gui/content/sound" width=32/></td><td>Sounds</td></tr><tr><td><img src=":/MO/gui/content/music" width=32/></td><td>Music</td></tr><tr><td><img src=":/MO/gui/content/string" width=32/></td><td>Strings</td></tr><tr><td><img src=":/MO/gui/content/script" width=32/></td><td>Scripts (Papyrus)</td></tr><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><tr><td><img src=":/MO/gui/content/modgroup" width=32/></td><td>ModGroup files</td></tr></table> - + Time this mod was installed - + User notes about the mod @@ -4220,7 +4246,7 @@ p, li { white-space: pre-wrap; } ModListSortProxy - + Drag&Drop is only supported when sorting by priority @@ -4350,171 +4376,171 @@ p, li { white-space: pre-wrap; } - - + + Installation successful - - + + Configure Mod - - + + This mod contains ini tweaks. Do you want to configure them now? - - + + mod "%1" not found - - + + Installation cancelled - - + + The mod was not installed completely. - + Executable "%1" not found - + Start Steam? - + Steam is required to be running already to correctly start the game. Should MO try to start steam now? - + Error - + Windows Event Log Error - + The Windows Event Log service is disabled and/or not running. This prevents USVFS from running properly. Your mods may not be working in the executable that you are launching. Note that you may have to restart MO and/or your PC after the service is fixed. Continue launching %1? - + Blacklisted Executable - + The executable you are attempted to launch is blacklisted in the virtual file system. This will likely prevent the executable, and any executables that are launched by this one, from seeing any mods. This could extend to INI files, save games and any other virtualized files. Continue launching %1? - + No profile set - + Failed to refresh list of esps: %1 - + Multiple esps/esls activated, please check that they don't conflict. - + Download? - + A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue? - + failed to update mod list: %1 - - + + login successful - + Login failed - + Login failed, try again? - + login failed: %1. Download will not be associated with an account - + login failed: %1 - + login failed: %1. You need to log-in with Nexus to update MO. - + MO1 "Script Extender" load mechanism has left hook.dll in your game folder - - + + Description missing - + <a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn. - + failed to save load order: %1 - + The designated write target "%1" is not enabled. @@ -4661,94 +4687,94 @@ Continue? - + failed to update esp info for file %1 (source id: %2), error: %3 - + esp not found: %1 - - + + Confirm - + Really enable all plugins? - + Really disable all plugins? - + The file containing locked plugin indices is broken - - + + <b>Origin</b>: %1 - + <br><b><i>This plugin can't be disabled (enforced by the game).</i></b> - + Author - + Description - + Missing Masters - + Enabled Masters - + Loads Archives - + There are Archives connected to this plugin. Their assets will be added to your game, overwriting in case of conflicts following the plugin order. Loose files will always overwrite assets from Archives. (This flag only checks for Archives from the same mod as the plugin) - + Loads INI settings - + There is an ini file connected to this plugin. Its settings will be added to your game settings, overwriting in case of conflicts. - + This ESP is flagged as an ESL. It will adhere to the ESP load order but the records will be loaded in ESL space. - + failed to restore load order for %1 @@ -5490,7 +5516,7 @@ If the folder was still in use, restart MO and try again. - + Mod Organizer @@ -5505,18 +5531,18 @@ If the folder was still in use, restart MO and try again. - + Please use "Help" from the toolbar to get usage instructions to all elements - - + + <Manage...> - + failed to parse profile %1: %2 @@ -5552,12 +5578,12 @@ If the folder was still in use, restart MO and try again. - + failed to access %1 - + failed to set file time %1 @@ -5567,12 +5593,12 @@ If the folder was still in use, restart MO and try again. - + Script Extender - + Proxy DLL @@ -5763,12 +5789,12 @@ Select Show Details option to see the full change-log. - + Failed to start %1: %2 - + Error @@ -5786,28 +5812,28 @@ Select Show Details option to see the full change-log. - - + + attempt to store setting for unknown plugin "%1" - + Error - + Failed to create "%1", you may not have the necessary permission. path remains unchanged. - + Restart Mod Organizer? - + In order to reset the window geometries, MO must be restarted. Restart it now? @@ -6351,75 +6377,90 @@ programs you are intentionally running. + Enable parsing of Archives Archives, has effects on perfromance. + + + - Resets the window geometries for all windows. This can be useful if a window becomes too small or too large, if a column becomes too thin or too wide, and in similar situations. + + By default Mod Organizer will parse Archive files to calculate conflicts between themselves and loose files, this process has a noticeable cost in performance. + This feature should not be confused from the one offered by ModOrganizer 1, ModOrganizer 2 will only show conflicts with archives NOT load them into the game or program. + + If you disable this feature, MO will only display conflicts with Loose files. + - - Reset Window Geometries + + Enable parsing of Archives - - These are workarounds for problems with Mod Organizer. Please make sure you read the help text before changing anything here. + + + Resets the window geometries for all windows. This can be useful if a window becomes too small or too large, if a column becomes too thin or too wide, and in similar situations. - - Diagnostics + + Reset Window Geometries - - Log Level + + These are workarounds for problems with Mod Organizer. Please make sure you read the help text before changing anything here. - - Decides the amount of data printed to "ModOrganizer.log" + + Diagnostics - - - Decides the amount of data printed to "ModOrganizer.log". - "Debug" produces very useful information for finding problems. There is usually no noteworthy performance impact but the file may become rather large. If this is a problem you may prefer the "Info" level for regluar use. On the "Error" level the log file usually remains empty. - + + Max Dumps To Keep - - Debug + + Maximum number of crash dumps to keep on disk. Use 0 for unlimited. - - Info (recommended) + + + Maximum number of crash dumps to keep on disk. Use 0 for unlimited. + Set "Crash Dumps" above to None to disable crash dump collection. + - - Warning + + Hint: right click link and copy link location - - Error + + + Logs and crash dumps are stored under your current instance in the <a href="LOGS_FULL_PATH">LOGS_DIR</a> + and <a href="DUMPS_FULL_PATH">DUMPS_DIR</a> folders. + Sending logs and/or crash dumps to the developers can help investigate issues. + It is recommended to compress large log and dmp files before sending. + - + Crash Dumps - + Decides which type of crash dumps are collected when injected processes crash. - + Decides which type of crash dumps are collected when injected processes crash. "None" Disables the generation of crash dumps by MO. @@ -6430,56 +6471,61 @@ programs you are intentionally running. - + None - + Mini (recommended) - + Data - + Full - - Max Dumps To Keep + + Log Level - - Maximum number of crash dumps to keep on disk. Use 0 for unlimited. + + Decides the amount of data printed to "ModOrganizer.log" - + - Maximum number of crash dumps to keep on disk. Use 0 for unlimited. - Set "Crash Dumps" above to None to disable crash dump collection. + Decides the amount of data printed to "ModOrganizer.log". + "Debug" produces very useful information for finding problems. There is usually no noteworthy performance impact but the file may become rather large. If this is a problem you may prefer the "Info" level for regluar use. On the "Error" level the log file usually remains empty. - - Hint: right click link and copy link location + + Debug - - - Logs and crash dumps are stored under your current instance in the <a href="LOGS_FULL_PATH">LOGS_DIR</a> - and <a href="DUMPS_FULL_PATH">DUMPS_DIR</a> folders. - Sending logs and/or crash dumps to the developers can help investigate issues. - It is recommended to compress large log and dmp files before sending. - + + Info (recommended) + + + + + Warning + + + + + Error diff --git a/src/organizercore.cpp b/src/organizercore.cpp index d21fa844..acce25dc 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -788,12 +788,12 @@ std::wstring OrganizerCore::crashDumpsPath() { bool OrganizerCore::getArchiveParsing() const { - return m_ArchiveParsing; + return m_ArchiveParsing; } void OrganizerCore::setArchiveParsing(const bool archiveParsing) { - m_ArchiveParsing = archiveParsing; + m_ArchiveParsing = archiveParsing; } void OrganizerCore::setCurrentProfile(const QString &profileName) @@ -1936,13 +1936,13 @@ std::vector OrganizerCore::enabledArchives() { std::vector result; if (m_ArchiveParsing) { - QFile archiveFile(m_CurrentProfile->getArchivesFileName()); - if (archiveFile.open(QIODevice::ReadOnly)) { - while (!archiveFile.atEnd()) { - result.push_back(QString::fromUtf8(archiveFile.readLine()).trimmed()); - } - archiveFile.close(); - } + QFile archiveFile(m_CurrentProfile->getArchivesFileName()); + if (archiveFile.open(QIODevice::ReadOnly)) { + while (!archiveFile.atEnd()) { + result.push_back(QString::fromUtf8(archiveFile.readLine()).trimmed()); + } + archiveFile.close(); + } } return result; } diff --git a/src/settings.cpp b/src/settings.cpp index eb5b372f..74c95ebf 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -476,7 +476,7 @@ uint Settings::getMotDHash() const bool Settings::archiveParsing() const { - return m_Settings.value("Settings/archive_parsing", true).toBool(); + return m_Settings.value("Settings/archive_parsing", true).toBool(); } QVariant Settings::pluginSetting(const QString &pluginName, const QString &key) const @@ -1126,7 +1126,7 @@ Settings::WorkaroundsTab::WorkaroundsTab(Settings *m_parent, m_displayForeignBox->setChecked(m_parent->displayForeign()); m_lockGUIBox->setChecked(m_parent->lockGUI()); m_enableArchiveParsingBox->setChecked(m_parent->archiveParsing()); - + m_dialog.setExecutableBlacklist(m_parent->executablesBlacklist()); } -- cgit v1.3.1