diff options
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4137c456..90c7dec7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -60,8 +60,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "problemsdialog.h" #include "profile.h" #include "profilesdialog.h" -#include "report.h" -#include "savegameinfo.h" #include "savestab.h" #include "selectiondialog.h" #include "serverinfo.h" @@ -69,15 +67,17 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "shared/appconfig.h" #include "spawn.h" #include "statusbar.h" -#include "tutorialmanager.h" -#include "versioninfo.h" #include <bsainvalidation.h> #include <dataarchives.h> #include <safewritefile.h> #include <scopeguard.h> #include <taskprogressmanager.h> +#include <uibase/game_features/savegameinfo.h> +#include <uibase/report.h> +#include <uibase/tutorialmanager.h> +#include <uibase/utility.h> +#include <uibase/versioninfo.h> #include <usvfs/usvfs.h> -#include <utility.h> #include "directoryrefresher.h" #include "shared/directoryentry.h" @@ -639,9 +639,10 @@ MainWindow::~MainWindow() void MainWindow::updateWindowTitle(const APIUserAccount& user) { //"\xe2\x80\x93" is an "em dash", a longer "-" - QString title = QString("%1 \xe2\x80\x93 Mod Organizer v%2") - .arg(m_OrganizerCore.managedGame()->displayGameName(), - m_OrganizerCore.getVersion().displayString(3)); + QString title = + QString("%1 \xe2\x80\x93 Mod Organizer v%2") + .arg(m_OrganizerCore.managedGame()->displayGameName(), + m_OrganizerCore.getVersion().string(Version::FormatCondensed)); if (!user.name().isEmpty()) { const QString premium = (user.type() == APIUserAccountTypes::Premium ? "*" : ""); @@ -1039,7 +1040,8 @@ void MainWindow::checkForProblemsImpl() void MainWindow::about() { - AboutDialog(m_OrganizerCore.getVersion().displayString(3), this).exec(); + AboutDialog(m_OrganizerCore.getVersion().string(Version::FormatCondensed), this) + .exec(); } void MainWindow::createEndorseMenu() @@ -2169,8 +2171,9 @@ void MainWindow::processUpdates() auto& settings = m_OrganizerCore.settings(); const auto earliest = QVersionNumber::fromString("2.1.2").normalized(); - const auto lastVersion = settings.version().value_or(earliest); - const auto currentVersion = m_OrganizerCore.getVersion().asQVersionNumber(); + const auto lastVersion = settings.version().value_or(earliest); + const auto currentVersion = + QVersionNumber::fromString(m_OrganizerCore.getVersion().string()).normalized(); m_LastVersion = lastVersion; @@ -2891,6 +2894,12 @@ void MainWindow::languageChange(const QString& newLanguage) installTranslator("qt"); installTranslator("qtbase"); installTranslator(ToQString(AppConfig::translationPrefix())); + installTranslator("uibase"); + + // TODO: this will probably be changed once extension come out + installTranslator("game_gamebryo"); + installTranslator("game_creation"); + for (const QString& fileName : m_PluginContainer.pluginFileNames()) { installTranslator(QFileInfo(fileName).baseName()); } @@ -2971,8 +2980,7 @@ void MainWindow::actionEndorseMO() QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { NexusInterface::instance().requestToggleEndorsement( game->gameShortName(), game->nexusModOrganizerID(), - m_OrganizerCore.getVersion().canonicalString(), true, this, QVariant(), - QString()); + m_OrganizerCore.getVersion().string(), true, this, QVariant(), QString()); } } @@ -2993,8 +3001,7 @@ void MainWindow::actionWontEndorseMO() QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { NexusInterface::instance().requestToggleEndorsement( game->gameShortName(), game->nexusModOrganizerID(), - m_OrganizerCore.getVersion().canonicalString(), false, this, QVariant(), - QString()); + m_OrganizerCore.getVersion().string(), false, this, QVariant(), QString()); } } |
