summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-04-17 10:31:47 -0400
committerGitHub <noreply@github.com>2020-04-17 10:31:47 -0400
commit855650215f5011082f6a3fa4dcfb69b040367911 (patch)
treec744c49d7c62c1051c99a12b793377ae40113e1f
parentff912b5f6199ade55a4eaff1c8e7eefb8145c970 (diff)
parent21166f820bc793111ad40a950807dc84e961fad5 (diff)
Merge pull request #1054 from isanae/bunch-of-fixes
Bunch of fixes
-rw-r--r--src/envfs.cpp6
-rw-r--r--src/envfs.h9
-rw-r--r--src/envmodule.cpp6
-rw-r--r--src/envsecurity.cpp8
-rw-r--r--src/filetreemodel.cpp4
-rw-r--r--src/main.cpp9
-rw-r--r--src/mainwindow.cpp79
-rw-r--r--src/mainwindow.h3
-rw-r--r--src/modinfoforeign.cpp3
-rw-r--r--src/modinfoforeign.h4
-rw-r--r--src/nxmaccessmanager.cpp2
-rw-r--r--src/organizercore.cpp4
-rw-r--r--src/profile.cpp96
-rw-r--r--src/profile.h2
-rw-r--r--src/sanitychecks.cpp72
-rw-r--r--src/selfupdater.cpp2
-rw-r--r--src/statusbar.cpp36
-rw-r--r--src/statusbar.h4
-rw-r--r--src/uilocker.cpp2
-rw-r--r--src/version.rc2
20 files changed, 277 insertions, 76 deletions
diff --git a/src/envfs.cpp b/src/envfs.cpp
index a67faf84..4aaef082 100644
--- a/src/envfs.cpp
+++ b/src/envfs.cpp
@@ -173,7 +173,11 @@ public:
void wakeup()
{
- m_ready = true;
+ {
+ std::unique_lock lock(m_mutex);
+ m_ready = true;
+ }
+
m_cv.notify_one();
}
diff --git a/src/envfs.h b/src/envfs.h
index 8790b071..bbc27005 100644
--- a/src/envfs.h
+++ b/src/envfs.h
@@ -128,6 +128,15 @@ private:
thread = std::thread([&]{ run(); });
}
+ ~ThreadInfo()
+ {
+ if (thread.joinable()) {
+ stop = true;
+ wakeup();
+ thread.join();
+ }
+ }
+
void wakeup()
{
{
diff --git a/src/envmodule.cpp b/src/envmodule.cpp
index 2ff5027d..5f2a5f5a 100644
--- a/src/envmodule.cpp
+++ b/src/envmodule.cpp
@@ -124,6 +124,12 @@ Module::FileInfo Module::getFileInfo() const
return {};
}
+ if (e == ERROR_RESOURCE_DATA_NOT_FOUND) {
+ // not an error, no version information built into that module;
+ // happens often in wine
+ return {};
+ }
+
log::error(
"GetFileVersionInfoSizeW() failed on '{}', {}",
m_path, formatSystemMessage(e));
diff --git a/src/envsecurity.cpp b/src/envsecurity.cpp
index 6f4826e7..8b1d25b2 100644
--- a/src/envsecurity.cpp
+++ b/src/envsecurity.cpp
@@ -108,7 +108,8 @@ private:
&rawService);
if (FAILED(res) || !rawService) {
- log::error(
+ // don't log as error, seems to happen often for some people
+ log::debug(
"locator->ConnectServer() failed for namespace '{}', {}",
ns, formatSystemMessage(res));
@@ -243,7 +244,7 @@ QString SecurityProduct::providerToString() const
}
if (ps.empty()) {
- return "doesn't provider anything";
+ return "doesn't provide anything";
}
return ps.join("|");
@@ -392,7 +393,8 @@ std::optional<SecurityProduct> getWindowsFirewall()
// testing for both because it's not clear which it is and nobody can
// reproduce it
if (hr != EPT_S_NOT_REGISTERED && hr != 0x800706d9) {
- log::error("get_FirewallEnabled failed, {}", formatSystemMessage(hr));
+ // don't log as error
+ log::debug("get_FirewallEnabled failed, {}", formatSystemMessage(hr));
}
return {};
diff --git a/src/filetreemodel.cpp b/src/filetreemodel.cpp
index a9cbeefe..282dfa73 100644
--- a/src/filetreemodel.cpp
+++ b/src/filetreemodel.cpp
@@ -855,7 +855,7 @@ void FileTreeModel::queueRemoveItem(FileTreeItem* item)
void FileTreeModel::removeItems()
{
// see comment at the top of this file
- log::debug("remove item timer: removing {} items", m_removeItems.size());
+ trace(log::debug("remove item timer: removing {} items", m_removeItems.size()));
auto copy = std::move(m_removeItems);
m_removeItems.clear();
@@ -875,7 +875,7 @@ void FileTreeModel::queueSortItem(FileTreeItem* item)
void FileTreeModel::sortItems()
{
// see comment at the top of this file
- log::debug("sort item timer: sorting {} items", m_sortItems.size());
+ trace(log::debug("sort item timer: sorting {} items", m_sortItems.size()));
auto copy = std::move(m_sortItems);
m_sortItems.clear();
diff --git a/src/main.cpp b/src/main.cpp
index ceaa59f2..eda31eb4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -266,8 +266,6 @@ QString determineProfile(QStringList &arguments, const Settings &settings)
if (!selectedProfileName) {
log::debug("no configured profile");
selectedProfileName = "Default";
- } else {
- log::debug("configured profile: {}", *selectedProfileName);
}
return *selectedProfileName;
@@ -300,7 +298,10 @@ MOBase::IPluginGame *determineCurrentGame(
if (gameConfigured) {
MOBase::IPluginGame *game = plugins.managedGame(*gameName);
if (game == nullptr) {
- reportError(QObject::tr("Plugin to handle %1 no longer installed").arg(*gameName));
+ reportError(
+ QObject::tr("Plugin to handle %1 no longer installed. An antivirus might have deleted files.")
+ .arg(*gameName));
+
return nullptr;
}
@@ -959,6 +960,8 @@ int main(int argc, char *argv[])
log::getDefault().setFile(MOBase::log::File::single(logFile.toStdWString()));
+ log::debug("command line: '{}'", QString::fromWCharArray(GetCommandLineW()));
+
QString splash = dataPath + "/splash.png";
if (!QFile::exists(dataPath + "/splash.png")) {
splash = ":/MO/gui/splash";
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b36a1df8..a359d94c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -204,6 +204,42 @@ QString UnmanagedModName()
bool runLoot(QWidget* parent, OrganizerCore& core, bool didUpdateMasterList);
+
+void setFilterShortcuts(QWidget* widget, QLineEdit* edit)
+{
+ auto activate = [=] {
+ edit->setFocus();
+ edit->selectAll();
+ };
+
+ auto reset = [=] {
+ edit->clear();
+ widget->setFocus();
+ };
+
+ auto hookActivate = [activate](auto* w) {
+ auto* s = new QShortcut(QKeySequence::Find, w);
+ s->setAutoRepeat(false);
+ s->setContext(Qt::WidgetWithChildrenShortcut);
+ QObject::connect(s, &QShortcut::activated, activate);
+ };
+
+ auto hookReset = [reset](auto* w) {
+ auto* s = new QShortcut(QKeySequence(Qt::Key_Escape), w);
+ s->setAutoRepeat(false);
+ s->setContext(Qt::WidgetWithChildrenShortcut);
+ QObject::connect(s, &QShortcut::activated, reset);
+ };
+
+
+ hookActivate(widget);
+ hookReset(widget);
+
+ hookActivate(edit);
+ hookReset(edit);
+}
+
+
MainWindow::MainWindow(Settings &settings
, OrganizerCore &organizerCore
, PluginContainer &pluginContainer
@@ -432,8 +468,9 @@ MainWindow::MainWindow(Settings &settings
new QShortcut(QKeySequence::Refresh, this, SLOT(refreshProfile_activated()));
- new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F), this, SLOT(search_activated()));
- new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(searchClear_activated()));
+ setFilterShortcuts(ui->modList, ui->modFilterEdit);
+ setFilterShortcuts(ui->espList, ui->espFilterEdit);
+ setFilterShortcuts(ui->downloadView, ui->downloadFilterEdit);
m_UpdateProblemsTimer.setSingleShot(true);
connect(&m_UpdateProblemsTimer, SIGNAL(timeout()), this, SLOT(updateProblemsButton()));
@@ -486,6 +523,7 @@ MainWindow::MainWindow(Settings &settings
updatePluginCount();
updateModCount();
processUpdates();
+ ui->statusBar->updateNormalMessage(m_OrganizerCore);
}
void MainWindow::setupModList()
@@ -1662,6 +1700,7 @@ void MainWindow::activateSelectedProfile()
m_OrganizerCore.refreshModList();
updateModCount();
updatePluginCount();
+ ui->statusBar->updateNormalMessage(m_OrganizerCore);
}
void MainWindow::on_profileBox_currentIndexChanged(int index)
@@ -3359,42 +3398,6 @@ void MainWindow::refreshProfile_activated()
m_OrganizerCore.profileRefresh();
}
-void MainWindow::search_activated()
-{
- if (ui->modList->hasFocus() || ui->modFilterEdit->hasFocus()) {
- ui->modFilterEdit->setFocus();
- ui->modFilterEdit->setSelection(0, INT_MAX);
- }
-
- else if (ui->espList->hasFocus() || ui->espFilterEdit->hasFocus()) {
- ui->espFilterEdit->setFocus();
- ui->espFilterEdit->setSelection(0, INT_MAX);
- }
-
- else if (ui->downloadView->hasFocus() || ui->downloadFilterEdit->hasFocus()) {
- ui->downloadFilterEdit->setFocus();
- ui->downloadFilterEdit->setSelection(0, INT_MAX);
- }
-}
-
-void MainWindow::searchClear_activated()
-{
- if (ui->modList->hasFocus() || ui->modFilterEdit->hasFocus()) {
- ui->modFilterEdit->clear();
- ui->modList->setFocus();
- }
-
- else if (ui->espList->hasFocus() || ui->espFilterEdit->hasFocus()) {
- ui->espFilterEdit->clear();
- ui->espList->setFocus();
- }
-
- else if (ui->downloadView->hasFocus() || ui->downloadFilterEdit->hasFocus()) {
- ui->downloadFilterEdit->clear();
- ui->downloadView->setFocus();
- }
-}
-
void MainWindow::updateModCount()
{
int activeCount = 0;
diff --git a/src/mainwindow.h b/src/mainwindow.h
index b839e85e..25d09584 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -565,9 +565,6 @@ private slots:
void modlistSelectionsChanged(const QItemSelection &current);
void esplistSelectionsChanged(const QItemSelection &current);
- void search_activated();
- void searchClear_activated();
-
void resetActionIcons();
void updateModCount();
void updatePluginCount();
diff --git a/src/modinfoforeign.cpp b/src/modinfoforeign.cpp
index 84199eae..e8f9548a 100644
--- a/src/modinfoforeign.cpp
+++ b/src/modinfoforeign.cpp
@@ -49,7 +49,8 @@ ModInfoForeign::ModInfoForeign(const QString &modName,
DirectoryEntry **directoryStructure,
PluginContainer *pluginContainer)
: ModInfoWithConflictInfo(pluginContainer, directoryStructure),
- m_ReferenceFile(referenceFile), m_Archives(archives) {
+ m_ReferenceFile(referenceFile), m_Archives(archives), m_ModType(modType)
+{
m_CreationTime = QFileInfo(referenceFile).birthTime();
switch (modType) {
case ModInfo::EModType::MOD_DLC:
diff --git a/src/modinfoforeign.h b/src/modinfoforeign.h
index 3308d42f..c5763d6b 100644
--- a/src/modinfoforeign.h
+++ b/src/modinfoforeign.h
@@ -65,6 +65,8 @@ public:
virtual bool alwaysEnabled() const { return true; }
virtual void addInstalledFile(int, int) {}
+ ModInfo::EModType modType() const { return m_ModType; }
+
protected:
ModInfoForeign(const QString &modName, const QString &referenceFile,
const QStringList &archives, ModInfo::EModType modType,
@@ -77,7 +79,7 @@ private:
QStringList m_Archives;
QDateTime m_CreationTime;
int m_Priority;
-
+ ModInfo::EModType m_ModType;
};
#endif // MODINFOFOREIGN_H
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp
index 20540593..0064f888 100644
--- a/src/nxmaccessmanager.cpp
+++ b/src/nxmaccessmanager.cpp
@@ -621,7 +621,7 @@ void NexusKeyValidator::start(const QString& key, Behaviour b)
case Retry:
{
- createAttempts({5s, 5s, 10s});
+ createAttempts({10s, 15s, 20s});
break;
}
}
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 0b3a4bfe..dacf0175 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -508,6 +508,8 @@ void OrganizerCore::setCurrentProfile(const QString &profileName)
return;
}
+ log::debug("selecting profile '{}'", profileName);
+
QDir profileBaseDir(settings().paths().profiles());
QString profileDir = profileBaseDir.absoluteFilePath(profileName);
@@ -537,6 +539,8 @@ void OrganizerCore::setCurrentProfile(const QString &profileName)
connect(m_CurrentProfile, SIGNAL(modStatusChanged(uint)), this, SLOT(modStatusChanged(uint)));
connect(m_CurrentProfile, SIGNAL(modStatusChanged(QList<uint>)), this, SLOT(modStatusChanged(QList<uint>)));
refreshDirectoryStructure();
+
+ m_CurrentProfile->debugDump();
}
MOBase::IModRepositoryBridge *OrganizerCore::createNexusBridge() const
diff --git a/src/profile.cpp b/src/profile.cpp
index e96f6702..cb99e586 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -31,6 +31,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <dataarchives.h>
#include "util.h"
#include "registry.h"
+#include "modinfoforeign.h"
#include <questionboxmemory.h>
#include <QApplication>
@@ -1069,3 +1070,98 @@ void Profile::removeForcedLibraries(const QString &executable)
{
m_Settings->remove("forced_libraries/" + executable);
}
+
+void Profile::debugDump() const
+{
+ struct Pair
+ {
+ std::size_t enabled=0;
+ std::size_t total=0;
+ };
+
+ Pair total;
+ Pair real;
+ Pair backup;
+ Pair separators;
+ Pair dlc;
+ Pair cc;
+ Pair unmanaged;
+
+ auto add = [](Pair& p, const ModStatus& status) {
+ ++p.total;
+
+ if (status.m_Enabled) {
+ ++p.enabled;
+ }
+ };
+
+
+ for (const auto& status : m_ModStatus) {
+ if (status.m_Overwrite) {
+ continue;
+ }
+
+ auto index = m_ModIndexByPriority.find(status.m_Priority);
+ if (index == m_ModIndexByPriority.end()) {
+ log::error("mod with priority {} not in priority map", status.m_Priority);
+ continue;
+ }
+
+ auto m = ModInfo::getByIndex(index->second);
+ if (!m) {
+ log::error("mod index {} with priority {} not found", index->second, status.m_Priority);
+ continue;
+ }
+
+ add(total, status);
+
+ if (m->hasFlag(ModInfo::FLAG_BACKUP)) {
+ add(backup, status);
+ }
+
+ if (m->hasFlag(ModInfo::FLAG_SEPARATOR)) {
+ add(separators, status);
+ }
+
+ if (m->hasFlag(ModInfo::FLAG_FOREIGN)) {
+ if (auto* f = dynamic_cast<ModInfoForeign*>(m.get())) {
+ switch (f->modType())
+ {
+ case ModInfo::MOD_DLC:
+ add(dlc, status);
+ break;
+
+ case ModInfo::MOD_CC:
+ add(cc, status);
+ break;
+
+ default:
+ add(unmanaged, status);
+ break;
+ }
+ }
+ }
+
+ if (!m->hasAnyOfTheseFlags({
+ ModInfo::FLAG_BACKUP, ModInfo::FLAG_FOREIGN,
+ ModInfo::FLAG_SEPARATOR, ModInfo::FLAG_OVERWRITE }))
+ {
+ add(real, status);
+ }
+ }
+
+ log::debug(
+ "profile '{}' in '{}': "
+ "mods={}/{} backup={}/{} separators={}/{} real={}/{} dlc={}/{} "
+ "cc={}/{} unmanaged={}/{} localsaves={}, localsettings={}",
+ name(), absolutePath(),
+ total.enabled, total.total,
+ backup.enabled, backup.total,
+ separators.enabled, separators.total,
+ real.enabled, real.total,
+ dlc.enabled, dlc.total,
+ cc.enabled, cc.total,
+ unmanaged.enabled, unmanaged.total,
+ localSavesEnabled() ? "yes" : "no",
+ localSettingsEnabled() ? "yes" : "no");
+}
diff --git a/src/profile.h b/src/profile.h
index d0bd4a84..c7cbc7b7 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -336,6 +336,8 @@ public:
void storeForcedLibraries(const QString &executable, const QList<MOBase::ExecutableForcedLoadSetting> &values);
void removeForcedLibraries(const QString &executable);
+ void debugDump() const;
+
signals:
/**
diff --git a/src/sanitychecks.cpp b/src/sanitychecks.cpp
index 6da42e79..5ccd7699 100644
--- a/src/sanitychecks.cpp
+++ b/src/sanitychecks.cpp
@@ -214,7 +214,7 @@ int checkMissingFiles()
return n;
}
-int checkIncompatibleModule(const env::Module& m)
+int checkBadOSDs(const env::Module& m)
{
// these dlls seems to interfere mostly with dialogs, like the mod info
// dialog: it renders dialogs fully white and makes it impossible to interact
@@ -224,11 +224,16 @@ int checkIncompatibleModule(const env::Module& m)
// where it got loaded later, so this is also called every time a new module
// is loaded into this process
+ const char* nahimic =
+ "Nahimic (also known as SonicSuite, SonicRadar, SteelSeries, etc.)";
+
static const std::map<QString, QString> names = {
- {"NahimicOSD.dll", "Nahimic"},
- {"RTSSHooks64.dll", "RivaTuner Statistics Server"},
- {"SSAudioOSD.dll", "SteelSeries Audio"},
- {"SS3DevProps.dll", "Sonic Suite 3"}
+ {"NahimicOSD.dll", nahimic},
+ {"nahimicmsiosd.dll", nahimic},
+ {"RTSSHooks64.dll", "RivaTuner Statistics Server"},
+ {"SSAudioOSD.dll", "SteelSeries Audio"},
+ {"SS3DevProps.dll", "Sonic Suite 3"},
+ {"specialk64.dll", "SpecialK"}
};
const QFileInfo file(m.path());
@@ -251,6 +256,44 @@ int checkIncompatibleModule(const env::Module& m)
return n;
}
+int checkUsvfsIncompatibilites(const env::Module& m)
+{
+ // these dlls seems to interfere with usvfs
+
+ static const std::map<QString, QString> names = {
+ {"mactype64.dll", "Mactype"}
+ };
+
+ const QFileInfo file(m.path());
+ int n = 0;
+
+ for (auto&& p : names) {
+ if (file.fileName().compare(p.first, Qt::CaseInsensitive) == 0) {
+ log::warn("{}", QObject::tr(
+ "%1 is loaded. This program is known to cause issues with "
+ "Mod Organizer and its virtual filesystem, such script extenders "
+ "refusing to run. Consider uninstalling it.")
+ .arg(p.second));
+
+ log::warn("{}", file.absoluteFilePath());
+
+ ++n;
+ }
+ }
+
+ return n;
+}
+
+int checkIncompatibleModule(const env::Module& m)
+{
+ int n = 0;
+
+ n += checkBadOSDs(m);
+ n += checkUsvfsIncompatibilites(m);
+
+ return n;
+}
+
int checkIncompatibilities(const env::Environment& e)
{
log::debug(" . incompatibilities");
@@ -268,28 +311,23 @@ std::vector<std::pair<QString, QString>> getSystemDirectories()
{
// folder ids and display names for logging
const std::vector<std::pair<GUID, QString>> systemFolderIDs = {
- {FOLDERID_ProgramFiles, "Program Files"},
- {FOLDERID_ProgramFilesX86, "Program Files"}
+ {FOLDERID_ProgramFiles, "in program files"},
+ {FOLDERID_ProgramFilesX86, "in program files"},
+ {FOLDERID_Desktop, "on the desktop"},
+ {FOLDERID_OneDrive, "in OneDrive"}
};
std::vector<std::pair<QString, QString>> systemDirs;
for (auto&& p : systemFolderIDs) {
- try
- {
- const auto dir = MOBase::getKnownFolder(p.first);
-
- auto path = QDir::toNativeSeparators(dir.absolutePath()).toLower();
+ if (const auto dir=MOBase::getOptionalKnownFolder(p.first)) {
+ auto path = QDir::toNativeSeparators(dir->absolutePath()).toLower();
if (!path.endsWith("\\")) {
path += "\\";
}
systemDirs.push_back({path, p.second});
}
- catch(std::exception&)
- {
- // ignore
- }
}
return systemDirs;
@@ -306,7 +344,7 @@ int checkProtected(const QDir& d, const QString& what)
for (auto&& sd : systemDirs) {
if (path.startsWith(sd.first)) {
log::warn(
- "{} is in {}; this may cause issues because it's a protected "
+ "{} is {}; this may cause issues because it's a special "
"system folder",
what, sd.second);
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index 5a70568e..086ae05f 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -160,7 +160,7 @@ void SelfUpdater::testForUpdate(const Settings& settings)
VersionInfo newestVer(newest["tag_name"].toString());
if (newestVer > this->m_MOVersion) {
m_UpdateCandidate = newest;
- log::debug("update available: {} -> {}",
+ log::info("update available: {} -> {}",
this->m_MOVersion.displayString(3),
newestVer.displayString(3));
emit updateAvailable();
diff --git a/src/statusbar.cpp b/src/statusbar.cpp
index 58189619..5897b6bb 100644
--- a/src/statusbar.cpp
+++ b/src/statusbar.cpp
@@ -1,12 +1,15 @@
#include "statusbar.h"
#include "nexusinterface.h"
#include "settings.h"
+#include "organizercore.h"
+#include "instancemanager.h"
#include "ui_mainwindow.h"
StatusBar::StatusBar(QWidget* parent) :
- QStatusBar(parent), ui(nullptr), m_progress(new QProgressBar),
- m_progressSpacer1(new QWidget), m_progressSpacer2(new QWidget),
- m_notifications(nullptr), m_update(nullptr), m_api(new QLabel)
+ QStatusBar(parent), ui(nullptr), m_normal(new QLabel),
+ m_progress(new QProgressBar), m_progressSpacer1(new QWidget),
+ m_progressSpacer2(new QWidget), m_notifications(nullptr), m_update(nullptr),
+ m_api(new QLabel)
{
}
@@ -16,6 +19,8 @@ void StatusBar::setup(Ui::MainWindow* mainWindowUI, const Settings& settings)
m_notifications = new StatusBarAction(ui->actionNotifications);
m_update = new StatusBarAction(ui->actionUpdate);
+ addWidget(m_normal);
+
m_progressSpacer1->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
addPermanentWidget(m_progressSpacer1, 0);
addPermanentWidget(m_progress);
@@ -138,6 +143,31 @@ void StatusBar::checkSettings(const Settings& settings)
m_api->setVisible(!settings.interface().hideAPICounter());
}
+void StatusBar::updateNormalMessage(OrganizerCore& core)
+{
+ QString game;
+
+ if (core.managedGame()) {
+ game = core.managedGame()->gameName();
+ } else {
+ game = tr("Unknown game");
+ }
+
+ QString instance = InstanceManager::instance().currentInstance();
+ if (instance.isEmpty()) {
+ instance = tr("Portable");
+ }
+
+ QString profile = core.profileName();
+
+ const auto s = QString("%1 - %2 - %3")
+ .arg(game)
+ .arg(instance)
+ .arg(profile);
+
+ m_normal->setText(s);
+}
+
void StatusBar::showEvent(QShowEvent*)
{
visibilityChanged(true);
diff --git a/src/statusbar.h b/src/statusbar.h
index 708615a1..7ff8fcbb 100644
--- a/src/statusbar.h
+++ b/src/statusbar.h
@@ -7,6 +7,8 @@
struct APIStats;
class APIUserAccount;
class Settings;
+class OrganizerCore;
+
namespace Ui { class MainWindow; }
@@ -41,6 +43,7 @@ public:
void setAPI(const APIStats& stats, const APIUserAccount& user);
void setUpdateAvailable(bool b);
void checkSettings(const Settings& settings);
+ void updateNormalMessage(OrganizerCore& core);
protected:
void showEvent(QShowEvent* e);
@@ -48,6 +51,7 @@ protected:
private:
Ui::MainWindow* ui;
+ QLabel* m_normal;
QProgressBar* m_progress;
QWidget* m_progressSpacer1;
QWidget* m_progressSpacer2;
diff --git a/src/uilocker.cpp b/src/uilocker.cpp
index 07fe7f1b..cabd7c89 100644
--- a/src/uilocker.cpp
+++ b/src/uilocker.cpp
@@ -321,7 +321,7 @@ private:
case UILocker::PreventExit:
{
m_message->setText(QObject::tr(
- "Mod Organizer is waiting on application to close before exiting."));
+ "Mod Organizer is waiting on an application to close before exiting."));
break;
}
diff --git a/src/version.rc b/src/version.rc
index 4c77bfb6..f6900cd3 100644
--- a/src/version.rc
+++ b/src/version.rc
@@ -4,7 +4,7 @@
// 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,3,0
-#define VER_FILEVERSION_STR "2.3.0alpha6\0"
+#define VER_FILEVERSION_STR "2.3.0alpha7\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION