From 340b2e766f5bdef4466398db2617c7077eb9c894 Mon Sep 17 00:00:00 2001 From: AL Date: Thu, 9 Jan 2020 02:00:50 +0100 Subject: List all categories flatly in filters view as nestled ones would otherwise not be accessible. (cherry picked from commit 734bd0ed20196206364d87c584dce3e1e498f4cd) --- src/filterlist.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/filterlist.cpp b/src/filterlist.cpp index 69aca4c5..4287869d 100644 --- a/src/filterlist.cpp +++ b/src/filterlist.cpp @@ -225,11 +225,9 @@ QTreeWidgetItem* FilterList::addCriteriaItem( { auto* item = new CriteriaItem(this, name, type, categoryID); - if (root != nullptr) { - root->addChild(item); - } else { - ui->filters->addTopLevelItem(item); - } + // For now list all categories flatly without nestling them as there is + // no way to espand nodes in the filter view since clicking changes state. + ui->filters->addTopLevelItem(item); item->setTextAlignment(0, Qt::AlignCenter); -- cgit v1.3.1 From da441e2b711e44a2218a0060370dd9539089babf Mon Sep 17 00:00:00 2001 From: AL Date: Thu, 9 Jan 2020 02:02:24 +0100 Subject: Add headers with tooltips to Filter view. (cherry picked from commit 3c6804c502e760f28113af06c735fb8bb804d249) --- src/filterlist.cpp | 2 +- src/mainwindow.ui | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/filterlist.cpp b/src/filterlist.cpp index 4287869d..a0928fcc 100644 --- a/src/filterlist.cpp +++ b/src/filterlist.cpp @@ -199,7 +199,7 @@ FilterList::FilterList(Ui::MainWindow* ui, CategoryFactory& factory) [&]{ onOptionsChanged(); }); ui->filters->header()->setMinimumSectionSize(0); - ui->filters->header()->setSectionResizeMode(0, QHeaderView::Fixed); + ui->filters->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents); ui->filters->header()->resizeSection(0, 30); ui->categoriesSplitter->setCollapsible(0, false); ui->categoriesSplitter->setCollapsible(1, false); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index a7e7b937..d0daafc0 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -101,19 +101,25 @@ true - false + true false - + State + + + State of the filter, can either be Disabled, Enabled or Inverted. - Category + Filter + + + Filter to apply to the modlist. -- cgit v1.3.1 From 85bb3dfbde0edfa86cf883147b8152ceb0bf6777 Mon Sep 17 00:00:00 2001 From: AL Date: Thu, 9 Jan 2020 02:09:28 +0100 Subject: Updated translations (cherry picked from commit 62a6b1ce5e2a94863b856a95c04182362de9b46d) --- src/organizer_en.ts | 293 +++++++++++++++++++++++++++------------------------- 1 file changed, 154 insertions(+), 139 deletions(-) (limited to 'src') diff --git a/src/organizer_en.ts b/src/organizer_en.ts index d30057aa..f01334fc 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -1387,7 +1387,7 @@ Right now the only case I know of where this needs to be overwritten is for the - + Contains %1 @@ -1814,54 +1814,69 @@ This is likely due to a corrupted or incompatible download or unrecognized archi - + + State + + + + + State of the filter, can either be Disabled, Enabled or Inverted. + + + + + Filter to apply to the modlist. + + + + Clear - + Edit... - + Display mods that match all selected categories. - + And - + Display mods that match at least one of the selected categories - + Or - + Filter: only show the separators that match the current filters Show: always show separators Hide: never show separators - + Profile - + Pick a module collection - + <!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; } @@ -1871,84 +1886,84 @@ p, li { white-space: pre-wrap; } - + Open list options... - + Refresh list. This is usually not necessary unless you modified data outside the program. - + Show Open Folders menu... - - + + Restore Backup... - - + + Create Backup - - + + Active: - + This provides statistics about the mod list. The total number of active mod is normally displayed. Other statistics may be accessed with the tooltip of this counter. - + This is a list of installed mods. Use the checkboxes to activate/deactivate mods and drag & drop mods to change their "installation" orders. - - - - + + + + Filter - + Clear all Filters - + No groups - + Categories - + Nexus IDs - + Pick a program to run. - + <!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; } @@ -1958,12 +1973,12 @@ p, li { white-space: pre-wrap; } - + Run program - + <!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; } @@ -1972,17 +1987,17 @@ p, li { white-space: pre-wrap; } - + Run - + Create a shortcut in your start menu or on the desktop to the specified program - + <!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; } @@ -1991,32 +2006,32 @@ p, li { white-space: pre-wrap; } - + Shortcut - + Plugins - + Sort - + This provides statistics about the plugin list. The total number of active plugins is normally displayed. Other statistics may be accessed with the tooltip of this counter. - + List of available esp/esm files - + <!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; } @@ -2025,27 +2040,27 @@ p, li { white-space: pre-wrap; } - + Archives - + <html><head/><body><p>BSAs / BA2s are bundles of game assets (textures, scripts, etc.). By default, the engine loads these bundles in a separate step from loose files. <p>Their load order is specified by the priority of the corresponding plugin (right pane, plugins tab).</p><p>If there is a matching plugin, the game will load them no matter what.</p></body></html> - + <html><head/><body><p>Currently detected archives. (<a href="#">What is an archive?</a>)</p></body></html> - + List of available BS Archives. Archives not checked here are not managed by MO and ignore installation order. - + BSA files are archives (comparable to .zip files) that contain data assets (meshes, textures, ...) to be used by the game. As such they "compete" with loose files in your data directory over which is loaded. By default, BSAs that share their base name with an enabled ESP (i.e. plugin.esp and plugin.bsa) are automatically loaded and will have precedence over all loose files, the installation order you set up to the left is then ignored! @@ -2053,72 +2068,72 @@ p, li { white-space: pre-wrap; } - + Data - + refresh data-directory overview - + Refresh the overview. This may take a moment. - - + + Refresh - + This is an overview of your data directory as visible to the game (and tools). - + File - + Mod - - + + 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; } @@ -2129,307 +2144,307 @@ 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 - + Main ToolBar - + &File - - + + &Tools - - - + + + &Help - + &View - + &Toolbars - + &Run - - + + Log - + 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 - + &Tool Plugins - + Tools - + Ctrl+I - + &Settings... - + &Settings - - + + Configure settings and workarounds - + Ctrl+S - - + + Visit &Nexus - - + + Visit the Nexus website in your browser for more mods - + Ctrl+N - - + + &Update Mod Organizer - - + + Mod Organizer is up-to-date - + &Notifications... - - + + Open the notifications dialog - + This button will be highlighted on the toolbar if MO discovered potential problems in your setup and provide tips on how to fix them. - - + + Show help options - + Ctrl+H - - + + &Endorse ModOrganizer - - + + Endorse Mod Organizer - + &Change Game... - + &Change Game - - + + Open the Instance selection dialog to manage a different Game - - + + E&xit - - + + Exits Mod Organizer - + M&ain Toolbar - + &Small Icons - + Lar&ge Icons - + &Icons Only - + &Text Only - + I&cons and Text - + M&edium Icons - + &Menu - + Status &bar -- cgit v1.3.1 From ae22b41f96529af4ac2e6c2512d8c0eb165d097b Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Thu, 9 Jan 2020 19:01:29 -0700 Subject: Update version to 2.2.2.1 --- src/version.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/version.rc b/src/version.rc index f6d89d2e..e6481a5a 100644 --- a/src/version.rc +++ b/src/version.rc @@ -3,8 +3,8 @@ // If VS_FF_PRERELEASE is not set, MO labels the build as a release and uses VER_FILEVERSION to determine version number. // Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser // Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha -#define VER_FILEVERSION 2,2,2 -#define VER_FILEVERSION_STR "2.2.2\0" +#define VER_FILEVERSION 2,2,2,1 +#define VER_FILEVERSION_STR "2.2.2.1\0" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION -- cgit v1.3.1 From c5b809b486424c79c16a7c11ead20fc202bbef9b Mon Sep 17 00:00:00 2001 From: AL Date: Fri, 10 Jan 2020 16:07:58 +0100 Subject: Fixed log timestamp size for bigger font. --- src/loglist.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/loglist.cpp b/src/loglist.cpp index c884be49..5d6710c7 100644 --- a/src/loglist.cpp +++ b/src/loglist.cpp @@ -162,12 +162,9 @@ LogList::LogList(QWidget* parent) { setModel(&LogModel::instance()); - const QFontMetrics fm(font()); - const int timestampWidth = fm.horizontalAdvance("00:00:00.000"); - header()->setMinimumSectionSize(0); header()->resizeSection(0, 20); - header()->resizeSection(1, timestampWidth + 8); + header()->setSectionResizeMode(1, QHeaderView::ResizeToContents); setAutoScroll(true); scrollToBottom(); -- cgit v1.3.1 From 08410deece846839b3e4e52e45d2d7b2264689e0 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Fri, 10 Jan 2020 16:51:41 -0700 Subject: Use the old query info logic when MD5 query is ambiguous An author accidentally uploaded a mod's files to a different mod. This resulted in querying info finding the wrong mod/file. --- src/downloadmanager.cpp | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index adfbc84d..fa2c959c 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1823,8 +1823,14 @@ void DownloadManager::nxmFileInfoFromMd5Available(QString gameName, QVariant use auto fileDetails = results["file_details"].toMap(); if (fileDetails["file_name"].toString().compare(info->m_FileName, Qt::CaseInsensitive) == 0) { - chosenIdx = i; - break; + if (chosenIdx < 0) { + chosenIdx = i; //intentional to not break in order to check other results + } + else { + log::debug("Multiple files with same name found during MD5 search."); + chosenIdx = -1; + break; + } } } } @@ -1839,7 +1845,7 @@ void DownloadManager::nxmFileInfoFromMd5Available(QString gameName, QVariant use if (chosenIdx < 0) { chosenIdx = i; //intentional to not break in order to check other results } else { - log::debug("Multiple active files found during MD5 search. Defaulting to time stamps..."); + log::debug("Multiple active files found during MD5 search."); chosenIdx = -1; break; } @@ -1847,24 +1853,14 @@ void DownloadManager::nxmFileInfoFromMd5Available(QString gameName, QVariant use } } - //Look for the most recent one + //Unable to determine the correct mod / file. Revert to the old method if (chosenIdx < 0) { - int mostRecentTime = INT_MIN; - for (int i = 0; i < resultlist.count(); i++) { - auto results = resultlist[i].toMap(); - auto fileDetails = results["file_details"].toMap(); - - int fileTime = fileDetails["uploaded_timestamp"].toInt(); - if (fileTime > mostRecentTime) { - chosenIdx = i; - mostRecentTime = fileTime; - } - } + //don't use the normal state set function as we don't want to create a meta file + info->m_State = DownloadManager::STATE_READY; + queryInfo(m_ActiveDownloads.indexOf(info)); + return; } - //If nothing is preferred, just use the first one - if (chosenIdx < 0) chosenIdx = 0; - auto results = resultlist[chosenIdx].toMap(); auto fileDetails = results["file_details"].toMap(); auto modDetails = results["mod"].toMap(); -- cgit v1.3.1 From 3cfa7bbe74e0f72a08a6f9f1c366f4ed21aca6d5 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Fri, 10 Jan 2020 16:55:19 -0700 Subject: Don't ask for the game when there's only one game --- src/downloadmanager.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index fa2c959c..34eebf0c 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -951,13 +951,20 @@ void DownloadManager::queryInfo(int index) SelectionDialog selection(tr("Please select the source game code for %1").arg(getFileName(index))); std::vector> choices = m_NexusInterface->getGameChoices(m_ManagedGame); - for (auto choice : choices) { - selection.addChoice(choice.first, choice.second, choice.first); + if (choices.size() == 1) + { + info->m_FileInfo->gameName = choices[0].first; } - if (selection.exec() == QDialog::Accepted) { - info->m_FileInfo->gameName = selection.getChoiceData().toString(); - } else { - info->m_FileInfo->gameName = m_ManagedGame->gameShortName(); + else { + for (auto choice : choices) { + selection.addChoice(choice.first, choice.second, choice.first); + } + if (selection.exec() == QDialog::Accepted) { + info->m_FileInfo->gameName = selection.getChoiceData().toString(); + } + else { + info->m_FileInfo->gameName = m_ManagedGame->gameShortName(); + } } } info->m_ReQueried = true; -- cgit v1.3.1 From 9fc7a1bf8530e76f4300d495400bba8a67ab45b1 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Sat, 11 Jan 2020 09:24:23 -0700 Subject: Fix downloading files that have no file name Somehow some mods on the Nexus have no file name in certain API responses. Previously, MO assumed the last part of the URL is the file name. This worked until the Nexus started adding URL query stuff to the URL (?md5=xxx). Now, strip out all the URL query stuff to get a valid file name. --- src/downloadmanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 34eebf0c..f5db53bf 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -432,6 +432,13 @@ bool DownloadManager::addDownload(QNetworkReply *reply, const QStringList &URLs, } } + // baseName could be a URL at this point so strip out the URL query + int queryIndex = baseName.indexOf("?"); + if (queryIndex >= 0) + { + baseName.truncate(queryIndex); + } + startDisableDirWatcher(); newDownload->setName(getDownloadFileName(baseName), false); endDisableDirWatcher(); -- cgit v1.3.1 From 6c6734fcf4f724e0e700cbce137d8b8f50da1e68 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Sun, 12 Jan 2020 14:35:40 -0700 Subject: Set version for new instances --- src/organizer_en.ts | 156 ++++++++++++++++++++++++++-------------------------- src/settings.cpp | 1 + 2 files changed, 79 insertions(+), 78 deletions(-) (limited to 'src') diff --git a/src/organizer_en.ts b/src/organizer_en.ts index f01334fc..48ed30e5 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -672,32 +672,32 @@ Are you absolutely sure you want to proceed? - + failed to download %1: could not open output file: %2 - + Download again? - + A file with the same name "%1" has already been downloaded. Do you want to download it again? The new file will receive a different name. - + Wrong Game - + The download link is for a mod for "%1" but this instance of MO has been set up for "%2". - + There is already a download queued for this file. Mod %1 @@ -705,12 +705,12 @@ File %2 - + Already Queued - + There is already a download started for this file. Mod %1: %2 @@ -718,277 +718,277 @@ File %3: %4 - + Already Started - - + + remove: invalid download index %1 - + failed to delete %1 - + failed to delete meta file for %1 - + restore: invalid download index: %1 - + cancel: invalid download index %1 - + pause: invalid download index %1 - + resume: invalid download index %1 - + resume (int): invalid download index %1 - + No known download urls. Sorry, this download can't be resumed. - - + + query: invalid download index %1 - + Please enter the nexus mod id - + Mod ID: - + Please select the source game code for %1 - + Hashing download file '%1' - + Cancel - + VisitNexus: invalid download index %1 - + Nexus ID for this Mod is unknown - + OpenFile: invalid download index %1 - + OpenFileInDownloadsFolder: invalid download index %1 - + get pending: invalid download index %1 - + get path: invalid download index %1 - + Main - + Update - + Optional - + Old - + Miscellaneous - + Deleted - + Unknown - + display name: invalid download index %1 - + file name: invalid download index %1 - + file time: invalid download index %1 - + file size: invalid download index %1 - + progress: invalid download index %1 - + state: invalid download index %1 - + infocomplete: invalid download index %1 - - - + + + mod id: invalid download index %1 - + ishidden: invalid download index %1 - + file info: invalid download index %1 - + mark installed: invalid download index %1 - + mark uninstalled: invalid download index %1 - + Memory allocation error (in processing progress event). - + Memory allocation error (in processing downloaded data). - + Information updated - - + + No matching file found on Nexus! Maybe this file is no longer available or it was renamed? - + No file on Nexus matches the selected file by name. Please manually choose the correct one. - + No download server available. Please try again later. - + Failed to request file info from nexus: %1 - + Warning: Content type is: %1 - + Download header content length: %1 downloaded file size: %2 - + Download failed: %1 (%2) - + We were unable to download the file due to errors after four retries. There may be an issue with the Nexus servers. - + failed to re-open %1 - + Unable to write download to drive (return %1). Check the drive's available storage. @@ -1642,37 +1642,37 @@ This is likely due to a corrupted or incompatible download or unrecognized archi LogList - + &Copy all - + C&lear all - + &Level - + &Debug - + &Info - + &Warnings - + &Errors @@ -6357,18 +6357,18 @@ If the folder was still in use, restart MO and try again. - - + + attempt to store setting for unknown plugin "%1" - + Failed - + Failed to start the helper application: %1 diff --git a/src/settings.cpp b/src/settings.cpp index 5170a5de..eff68aca 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -93,6 +93,7 @@ void Settings::processUpdates( const QVersionNumber& currentVersion, const QVersionNumber& lastVersion) { if (firstStart()) { + set(m_Settings, "General", "version", currentVersion.toString()); return; } -- cgit v1.3.1