mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
36
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
179a738571 | ||
|
|
907c546842 | ||
|
|
7fbdbd8950 | ||
|
|
5f0dc90ceb | ||
|
|
65c137bf59 | ||
|
|
e9b5f78883 | ||
|
|
3061a15822 | ||
|
|
8c47ba2252 | ||
|
|
2d75be6ad7 | ||
|
|
c3d633ab7e | ||
|
|
149c38d54d | ||
|
|
0f13d9a4c0 | ||
|
|
94cd6f5349 | ||
|
|
b932416249 | ||
|
|
509def79c6 | ||
|
|
379c60375c | ||
|
|
405dfebe4d | ||
|
|
3c488a69ed | ||
|
|
5ea25f03ce | ||
|
|
81b9784615 | ||
|
|
c362199ac0 | ||
|
|
22d3f0cd3c | ||
|
|
eb9ac6ca24 | ||
|
|
e2b799bd6b | ||
|
|
185eb8e5ef | ||
|
|
ed67ac2113 | ||
|
|
2232bdfc77 | ||
|
|
364289db72 | ||
|
|
7b1821a518 | ||
|
|
fb0d4d5e5a | ||
|
|
9a3a15b1f6 | ||
|
|
886fb10288 | ||
|
|
26b946a905 | ||
|
|
5e6bb0a16e | ||
|
|
0da6af17b2 | ||
|
|
bc75009169 |
+8
-12
@@ -363,6 +363,13 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt5
|
||||
DESTINATION bin/dlls
|
||||
RENAME dlls.manifest)
|
||||
|
||||
INSTALL(FILES ${organizer_translations_qm} DESTINATION bin/translations)
|
||||
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stylesheets
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tutorials
|
||||
DESTINATION bin)
|
||||
|
||||
#We should do this last, since windeployqt.exe scans the folders in bin for required modules e.g QtQuick.2 required by tutorials.
|
||||
# use windeployqt.exe to install all required libraries
|
||||
SET(windeploy_parameters "--no-translations --plugindir qtplugins --libdir dlls --release-with-debug-info --no-compiler-runtime")
|
||||
INSTALL(
|
||||
@@ -371,11 +378,6 @@ INSTALL(
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets --websockets ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
# run it a second time because on the first run it misses some files
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets --websockets ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe uibase.dll ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
@@ -390,10 +392,4 @@ INSTALL(
|
||||
)
|
||||
|
||||
# qdds.dll needs installing manually as Qt no longer ships with it by default.
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../qdds.dll DESTINATION bin/dlls/imageformats)
|
||||
|
||||
install(FILES ${organizer_translations_qm} DESTINATION bin/translations)
|
||||
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stylesheets
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tutorials
|
||||
DESTINATION bin)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../qdds.dll DESTINATION bin/dlls/imageformats)
|
||||
@@ -453,7 +453,7 @@ void DownloadManager::removePending(QString gameName, int modID, int fileID)
|
||||
games += m_ManagedGame->gameShortName();
|
||||
for (auto game : games) {
|
||||
MOBase::IPluginGame *gamePlugin = m_OrganizerCore->getGame(game);
|
||||
if (gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
if (gamePlugin != nullptr && gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
gameShortName = gamePlugin->gameShortName();
|
||||
break;
|
||||
}
|
||||
@@ -1640,7 +1640,7 @@ void DownloadManager::nxmFileInfoAvailable(QString gameName, int modID, int file
|
||||
games += m_ManagedGame->gameShortName();
|
||||
for (auto game : games) {
|
||||
MOBase::IPluginGame *gamePlugin = m_OrganizerCore->getGame(game);
|
||||
if (gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
if (gamePlugin != nullptr && gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
info->gameName = gamePlugin->gameShortName();
|
||||
}
|
||||
}
|
||||
@@ -1815,7 +1815,7 @@ void DownloadManager::nxmFileInfoFromMd5Available(QString gameName, QVariant use
|
||||
games += m_ManagedGame->gameShortName();
|
||||
for (auto game : games) {
|
||||
MOBase::IPluginGame *gamePlugin = m_OrganizerCore->getGame(game);
|
||||
if (gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
if (gamePlugin != nullptr && gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
gameShortName = gamePlugin->gameShortName();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -83,8 +83,33 @@ void EditExecutablesDialog::refreshExecutablesWidget()
|
||||
|
||||
void EditExecutablesDialog::on_binaryEdit_textChanged(const QString &name)
|
||||
{
|
||||
QFileInfo fileInfo(name);
|
||||
ui->addButton->setEnabled(fileInfo.exists() && fileInfo.isFile());
|
||||
updateButtonStates();
|
||||
}
|
||||
|
||||
void EditExecutablesDialog::on_workingDirEdit_textChanged(const QString &dir)
|
||||
{
|
||||
updateButtonStates();
|
||||
}
|
||||
|
||||
void EditExecutablesDialog::updateButtonStates()
|
||||
{
|
||||
bool enabled = true;
|
||||
|
||||
QString filePath(ui->binaryEdit->text());
|
||||
QFileInfo fileInfo(filePath);
|
||||
if (!fileInfo.exists())
|
||||
enabled = false;
|
||||
if (!fileInfo.isFile())
|
||||
enabled = false;
|
||||
|
||||
QString dirPath(ui->workingDirEdit->text());
|
||||
if (!dirPath.isEmpty()) {
|
||||
QDir dirInfo(dirPath);
|
||||
if (!dirInfo.exists())
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
ui->addButton->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void EditExecutablesDialog::resetInput()
|
||||
@@ -293,7 +318,6 @@ bool EditExecutablesDialog::executableChanged()
|
||||
&& fileInfo.isFile();
|
||||
}
|
||||
}
|
||||
|
||||
void EditExecutablesDialog::on_executablesListBox_itemSelectionChanged()
|
||||
{
|
||||
if (ui->executablesListBox->selectedItems().size() == 0) {
|
||||
|
||||
@@ -74,6 +74,8 @@ private slots:
|
||||
|
||||
void on_binaryEdit_textChanged(const QString &arg1);
|
||||
|
||||
void on_workingDirEdit_textChanged(const QString &arg1);
|
||||
|
||||
void on_addButton_clicked();
|
||||
|
||||
void on_browseButton_clicked();
|
||||
@@ -106,6 +108,8 @@ private:
|
||||
|
||||
bool executableChanged();
|
||||
|
||||
void updateButtonStates();
|
||||
|
||||
private:
|
||||
Ui::EditExecutablesDialog *ui;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ void ExecutablesList::init(IPluginGame const *game)
|
||||
}
|
||||
ExecutableInfo explorerpp = ExecutableInfo("Explore Virtual Folder", QFileInfo(QCoreApplication::applicationDirPath() + "/explorer++/Explorer++.exe" ))
|
||||
.withArgument(QString("\"%1\"").arg(QDir::toNativeSeparators(game->dataDirectory().absolutePath())));
|
||||
|
||||
|
||||
if (explorerpp.isValid()) {
|
||||
addExecutableInternal(explorerpp.title(),
|
||||
explorerpp.binary().absoluteFilePath(),
|
||||
@@ -65,7 +65,7 @@ void ExecutablesList::init(IPluginGame const *game)
|
||||
explorerpp.workingDirectory().absolutePath(),
|
||||
explorerpp.steamAppID());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ExecutablesList::getExecutables(std::vector<Executable>::iterator &begin, std::vector<Executable>::iterator &end)
|
||||
@@ -152,6 +152,7 @@ void ExecutablesList::updateExecutable(const QString &title,
|
||||
Executable::Flags flags)
|
||||
{
|
||||
QFileInfo file(executableName);
|
||||
QDir dir(workingDirectory);
|
||||
auto existingExe = findExe(title);
|
||||
flags &= mask;
|
||||
|
||||
@@ -165,8 +166,11 @@ void ExecutablesList::updateExecutable(const QString &title,
|
||||
// don't overwrite a valid binary with an invalid one
|
||||
existingExe->m_BinaryInfo = file;
|
||||
}
|
||||
if (dir.exists()) {
|
||||
// don't overwrite a valid working directory with an invalid one
|
||||
existingExe->m_WorkingDirectory = workingDirectory;
|
||||
}
|
||||
existingExe->m_Arguments = arguments;
|
||||
existingExe->m_WorkingDirectory = workingDirectory;
|
||||
existingExe->m_SteamAppID = steamAppID;
|
||||
}
|
||||
} else {
|
||||
|
||||
+8
-9
@@ -2593,12 +2593,11 @@ void MainWindow::modlistSelectionsChanged(const QItemSelection &selected)
|
||||
{
|
||||
if (selected.count()) {
|
||||
auto selection = selected.last();
|
||||
for (auto index : selection.indexes()) {
|
||||
ModInfo::Ptr selectedMod = ModInfo::getByIndex(index.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());
|
||||
}
|
||||
auto index = selection.indexes().last();
|
||||
ModInfo::Ptr selectedMod = ModInfo::getByIndex(index.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<unsigned int>(), std::set<unsigned int>());
|
||||
m_OrganizerCore.modList()->setArchiveOverwriteMarkers(std::set<unsigned int>(), std::set<unsigned int>());
|
||||
@@ -5049,9 +5048,9 @@ void MainWindow::installTranslator(const QString &name)
|
||||
QTranslator *translator = new QTranslator(this);
|
||||
QString fileName = name + "_" + m_CurrentLanguage;
|
||||
if (!translator->load(fileName, qApp->applicationDirPath() + "/translations")) {
|
||||
if (m_CurrentLanguage.compare("en", Qt::CaseInsensitive)) {
|
||||
if (m_CurrentLanguage.contains(QRegularExpression("^.*_(EN|en)(-.*)?$"))) {
|
||||
qDebug("localization file %s not found", qUtf8Printable(fileName));
|
||||
} // we don't actually expect localization files for English
|
||||
} // we don't actually expect localization files for English (en, en-us, en-uk, and any variation thereof)
|
||||
}
|
||||
|
||||
qApp->installTranslator(translator);
|
||||
@@ -5623,7 +5622,7 @@ void MainWindow::nxmEndorsementsAvailable(QVariant userData, QVariant resultData
|
||||
}
|
||||
for (auto game : games) {
|
||||
IPluginGame *gamePlugin = m_OrganizerCore.getGame(game);
|
||||
if (gamePlugin->gameShortName().compare("SkyrimSE", Qt::CaseInsensitive) == 0)
|
||||
if (gamePlugin != nullptr && gamePlugin->gameShortName().compare("SkyrimSE", Qt::CaseInsensitive) == 0)
|
||||
searchedMO2NexusGame = true;
|
||||
auto iter = sorted.equal_range(gamePlugin->gameNexusName());
|
||||
for (auto result = iter.first; result != iter.second; ++result) {
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@ std::set<QSharedPointer<ModInfo>> ModInfo::filteredMods(QString gameName, QVaria
|
||||
QVariantMap update = result.toMap();
|
||||
std::copy_if(s_Collection.begin(), s_Collection.end(), std::inserter(finalMods, finalMods.end()), [=](QSharedPointer<ModInfo> info) -> bool {
|
||||
if (info->getNexusID() == update["mod_id"].toInt() && info->getGameName().compare(gameName, Qt::CaseInsensitive) == 0)
|
||||
if (info->getLastNexusUpdate() > QDateTime::fromSecsSinceEpoch(update["latest_file_update"].toInt(), Qt::UTC).addSecs(-3600))
|
||||
if (info->getLastNexusUpdate().addSecs(-3600) < QDateTime::fromSecsSinceEpoch(update["latest_file_update"].toInt(), Qt::UTC))
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -857,6 +857,7 @@ void ModInfoDialog::activateNexusTab()
|
||||
QLabel *visitNexusLabel = findChild<QLabel*>("visitNexusLabel");
|
||||
visitNexusLabel->setText(tr("<a href=\"%1\">Visit on Nexus</a>").arg(nexusLink));
|
||||
visitNexusLabel->setToolTip(nexusLink);
|
||||
m_ModInfo->setURL(nexusLink);
|
||||
|
||||
if (m_ModInfo->getNexusDescription().isEmpty() || QDateTime::currentDateTimeUtc() >= m_ModInfo->getLastNexusQuery().addDays(1)) {
|
||||
refreshNexusData(modID);
|
||||
|
||||
+23
-3
@@ -287,13 +287,23 @@ bool NexusInterface::isURLGameRelated(const QUrl &url) const
|
||||
QString NexusInterface::getGameURL(QString gameName) const
|
||||
{
|
||||
IPluginGame *game = getGame(gameName);
|
||||
return "https://www.nexusmods.com/" + game->gameNexusName().toLower();
|
||||
if (game != nullptr) {
|
||||
return "https://www.nexusmods.com/" + game->gameNexusName().toLower();
|
||||
} else {
|
||||
qCritical("getGameURL can't find plugin for %s", qUtf8Printable(gameName));
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
QString NexusInterface::getOldModsURL(QString gameName) const
|
||||
{
|
||||
IPluginGame *game = getGame(gameName);
|
||||
return "https://" + game->gameNexusName().toLower() + ".nexusmods.com/mods";
|
||||
if (game != nullptr) {
|
||||
return "https://" + game->gameNexusName().toLower() + ".nexusmods.com/mods";
|
||||
} else {
|
||||
qCritical("getOldModsURL can't find plugin for %s", qUtf8Printable(gameName));
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -395,6 +405,11 @@ int NexusInterface::requestUpdates(const int &modID, QObject *receiver, QVariant
|
||||
{
|
||||
if (std::max(m_RemainingDailyRequests, m_RemainingHourlyRequests) >= 200) {
|
||||
IPluginGame *game = getGame(gameName);
|
||||
if (game == nullptr) {
|
||||
qCritical("requestUpdates can't find plugin for %s", qUtf8Printable(gameName));
|
||||
return -1;
|
||||
}
|
||||
|
||||
NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_GETUPDATES, userData, subModule, game);
|
||||
m_RequestQueue.enqueue(requestInfo);
|
||||
|
||||
@@ -451,6 +466,11 @@ int NexusInterface::requestFiles(QString gameName, int modID, QObject *receiver,
|
||||
int NexusInterface::requestFileInfo(QString gameName, int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule)
|
||||
{
|
||||
IPluginGame *gamePlugin = getGame(gameName);
|
||||
if (gamePlugin == nullptr) {
|
||||
qCritical("requestFileInfo can't find plugin for %s", qUtf8Printable(gameName));
|
||||
return -1;
|
||||
}
|
||||
|
||||
NXMRequestInfo requestInfo(modID, fileID, NXMRequestInfo::TYPE_FILEINFO, userData, subModule, gamePlugin);
|
||||
m_RequestQueue.enqueue(requestInfo);
|
||||
|
||||
@@ -579,7 +599,7 @@ IPluginGame* NexusInterface::getGame(QString gameName) const
|
||||
auto gamePlugins = m_PluginContainer->plugins<IPluginGame>();
|
||||
IPluginGame *gamePlugin = qApp->property("managed_game").value<IPluginGame*>();
|
||||
for (auto plugin : gamePlugins) {
|
||||
if (plugin->gameShortName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
if (plugin != nullptr && plugin->gameShortName().compare(gameName, Qt::CaseInsensitive) == 0) {
|
||||
gamePlugin = plugin;
|
||||
break;
|
||||
}
|
||||
|
||||
+499
-473
File diff suppressed because it is too large
Load Diff
@@ -885,7 +885,7 @@ MOBase::IModInterface *OrganizerCore::getMod(const QString &name) const
|
||||
MOBase::IPluginGame *OrganizerCore::getGame(const QString &name) const
|
||||
{
|
||||
for (IPluginGame *game : m_PluginContainer->plugins<IPluginGame>()) {
|
||||
if (game->gameShortName().compare(name, Qt::CaseInsensitive) == 0)
|
||||
if (game != nullptr && game->gameShortName().compare(name, Qt::CaseInsensitive) == 0)
|
||||
return game;
|
||||
}
|
||||
return nullptr;
|
||||
@@ -1137,8 +1137,6 @@ QStringList OrganizerCore::findFiles(
|
||||
result.append(ToQString(file->getFullPath()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qWarning("directory not found: %1", qUtf8Printable(path));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1146,8 +1144,7 @@ QStringList OrganizerCore::findFiles(
|
||||
QStringList OrganizerCore::getFileOrigins(const QString &fileName) const
|
||||
{
|
||||
QStringList result;
|
||||
const FileEntry::Ptr file = m_DirectoryStructure->searchFile(
|
||||
ToWString(QFileInfo(fileName).fileName()), nullptr);
|
||||
const FileEntry::Ptr file = m_DirectoryStructure->searchFile(ToWString(fileName), nullptr);
|
||||
|
||||
if (file.get() != nullptr) {
|
||||
result.append(ToQString(
|
||||
@@ -1156,8 +1153,6 @@ QStringList OrganizerCore::getFileOrigins(const QString &fileName) const
|
||||
result.append(
|
||||
ToQString(m_DirectoryStructure->getOriginByID(i.first).getName()));
|
||||
}
|
||||
} else {
|
||||
qWarning("file not found: %1", qUtf8Printable(fileName));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-1
@@ -809,7 +809,7 @@ bool Profile::localSettingsEnabled() const
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(
|
||||
QApplication::activeModalWidget(), tr("Missing profile-specific game INI files!"),
|
||||
tr("Some of your profile-specific game INI files were missing. They will now be copied "
|
||||
"from the vanilla game folder. You might want double-check your settings.\n\n"
|
||||
"from the vanilla game folder. You might want to double-check your settings.\n\n"
|
||||
"Missing files:\n") + missingFiles.join("\n")
|
||||
);
|
||||
}
|
||||
|
||||
+22
-11
@@ -788,6 +788,25 @@ void Settings::query(PluginContainer *pluginContainer, QWidget *parent)
|
||||
}
|
||||
m_Settings.setValue(key, dialog.saveGeometry());
|
||||
|
||||
// These changes happen regardless of accepted or rejected
|
||||
bool restartNeeded = false;
|
||||
if (dialog.getApiKeyChanged()) {
|
||||
restartNeeded = true;
|
||||
}
|
||||
if (dialog.getResetGeometries()) {
|
||||
restartNeeded = true;
|
||||
m_Settings.setValue("reset_geometry", true);
|
||||
}
|
||||
if (restartNeeded) {
|
||||
if (QMessageBox::question(nullptr,
|
||||
tr("Restart Mod Organizer?"),
|
||||
tr("In order to finish configuration changes, MO must be restarted.\n"
|
||||
"Restart it now?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
qApp->exit(INT_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Settings::SettingsTab::SettingsTab(Settings *m_parent, SettingsDialog &m_dialog)
|
||||
@@ -1181,6 +1200,7 @@ Settings::WorkaroundsTab::WorkaroundsTab(Settings *m_parent,
|
||||
, m_displayForeignBox(m_dialog.findChild<QCheckBox *>("displayForeignBox"))
|
||||
, m_lockGUIBox(m_dialog.findChild<QCheckBox *>("lockGUIBox"))
|
||||
, m_enableArchiveParsingBox(m_dialog.findChild<QCheckBox *>("enableArchiveParsingBox"))
|
||||
, m_resetGeometriesBtn(m_dialog.findChild<QPushButton *>("resetGeometryBtn"))
|
||||
{
|
||||
m_appIDEdit->setText(m_parent->getSteamAppID());
|
||||
|
||||
@@ -1216,6 +1236,8 @@ Settings::WorkaroundsTab::WorkaroundsTab(Settings *m_parent,
|
||||
m_lockGUIBox->setChecked(m_parent->lockGUI());
|
||||
m_enableArchiveParsingBox->setChecked(m_parent->archiveParsing());
|
||||
|
||||
m_resetGeometriesBtn->setChecked(m_parent->directInterface().value("reset_geometry", false).toBool());
|
||||
|
||||
m_dialog.setExecutableBlacklist(m_parent->executablesBlacklist());
|
||||
|
||||
}
|
||||
@@ -1235,15 +1257,4 @@ void Settings::WorkaroundsTab::update()
|
||||
m_Settings.setValue("Settings/archive_parsing_experimental", m_enableArchiveParsingBox->isChecked());
|
||||
|
||||
m_Settings.setValue("Settings/executable_blacklist", m_dialog.getExecutableBlacklist());
|
||||
|
||||
if (m_dialog.getResetGeometries()) {
|
||||
m_Settings.setValue("reset_geometry", true);
|
||||
if (QMessageBox::question(nullptr,
|
||||
tr("Restart Mod Organizer?"),
|
||||
tr("In order to reset the window geometries, MO must be restarted.\n"
|
||||
"Restart it now?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
qApp->exit(INT_MAX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,6 +531,7 @@ private:
|
||||
QCheckBox *m_displayForeignBox;
|
||||
QCheckBox *m_lockGUIBox;
|
||||
QCheckBox *m_enableArchiveParsingBox;
|
||||
QPushButton *m_resetGeometriesBtn;
|
||||
};
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -53,6 +53,8 @@ SettingsDialog::SettingsDialog(PluginContainer *pluginContainer, QWidget *parent
|
||||
, m_PluginContainer(pluginContainer)
|
||||
, m_nexusLogin(new QWebSocket)
|
||||
, m_KeyReceived(false)
|
||||
, m_KeyCleared(false)
|
||||
, m_GeometriesReset(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->pluginSettingsList->setStyleSheet("QTreeWidget::item {padding-right: 10px;}");
|
||||
@@ -131,6 +133,11 @@ bool SettingsDialog::getResetGeometries()
|
||||
return ui->resetGeometryBtn->isChecked();
|
||||
}
|
||||
|
||||
bool SettingsDialog::getApiKeyChanged()
|
||||
{
|
||||
return m_KeyReceived || m_KeyCleared;
|
||||
}
|
||||
|
||||
void SettingsDialog::on_categoriesBtn_clicked()
|
||||
{
|
||||
CategoriesDialog dialog(this);
|
||||
@@ -476,6 +483,7 @@ void SettingsDialog::on_clearCacheButton_clicked()
|
||||
void SettingsDialog::on_revokeNexusAuthButton_clicked()
|
||||
{
|
||||
emit revokeApiKey(ui->nexusConnect);
|
||||
m_KeyCleared = true;
|
||||
}
|
||||
|
||||
void SettingsDialog::normalizePath(QLineEdit *lineEdit)
|
||||
@@ -516,3 +524,9 @@ void SettingsDialog::on_overwriteDirEdit_editingFinished()
|
||||
{
|
||||
normalizePath(ui->overwriteDirEdit);
|
||||
}
|
||||
|
||||
void SettingsDialog::on_resetGeometryBtn_clicked()
|
||||
{
|
||||
m_GeometriesReset = true;
|
||||
ui->resetGeometryBtn->setChecked(true);
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
QColor getContainedColor() { return m_ContainedColor; }
|
||||
QString getExecutableBlacklist() { return m_ExecutableBlacklist; }
|
||||
bool getResetGeometries();
|
||||
bool getApiKeyChanged();
|
||||
|
||||
void setOverwritingColor(QColor col) { m_OverwritingColor = col; }
|
||||
void setOverwrittenColor(QColor col) { m_OverwrittenColor = col; }
|
||||
@@ -165,6 +166,8 @@ private slots:
|
||||
|
||||
void completeApiConnection();
|
||||
|
||||
void on_resetGeometryBtn_clicked();
|
||||
|
||||
private:
|
||||
Ui::SettingsDialog *ui;
|
||||
PluginContainer *m_PluginContainer;
|
||||
@@ -177,6 +180,8 @@ private:
|
||||
QColor m_ContainedColor;
|
||||
|
||||
bool m_KeyReceived;
|
||||
bool m_KeyCleared;
|
||||
bool m_GeometriesReset;
|
||||
QString m_UUID;
|
||||
QString m_AuthToken;
|
||||
|
||||
|
||||
@@ -455,14 +455,14 @@ If you use pre-releases, never contact me directly by e-mail or via private mess
|
||||
<item>
|
||||
<widget class="QGroupBox" name="nexusBox">
|
||||
<property name="toolTip">
|
||||
<string>Allows automatic log-in when the Nexus-Page for the game is clicked.</string>
|
||||
<string>Allows Mod Organizer to connect to the Nexus for downloading mods, checking for updates, and other such things.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string><!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; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Allows automatic log-in when the Nexus-Page for the game is clicked. Please note that the obfuscation with which the password is stored in modorganizer.ini is not very strong. If you're worried someone might steal your password, don't store it here.</span></p></body></html></string>
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Allows Mod Organizer to connect to the Nexus for downloading mods, checking for updates, and other such things. Clicking &quot;Connect to Nexus&quot; will open a Nexus webpage to authorise Mod Organizer. You will need to be logged into your Nexus account. The authorisation is stored in the Windows Credential Manager. Your Nexus username and password are not required or stored by Mod Organizer.</p></body></html></string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Nexus</string>
|
||||
|
||||
+37
-37
@@ -1,37 +1,37 @@
|
||||
#include "Winver.h"
|
||||
|
||||
// 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,0
|
||||
#define VER_FILEVERSION_STR "2.2.0beta8\0"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS VS_FF_PRERELEASE
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE (0)
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "CompanyName", "Mod Organizer 2 Team\0"
|
||||
VALUE "FileDescription", "Mod Organizer 2 GUI\0"
|
||||
VALUE "OriginalFilename", "ModOrganizer.exe\0"
|
||||
VALUE "InternalName", "ModOrganizer2\0"
|
||||
VALUE "LegalCopyright", "Copyright 2011-2016 Sebastian Herbord\r\nCopyright 2016-2019 Mod Organizer 2 contributors\0"
|
||||
VALUE "ProductName", "Mod Organizer 2\0"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409L, 1200
|
||||
END
|
||||
END
|
||||
#include "Winver.h"
|
||||
|
||||
// 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,0
|
||||
#define VER_FILEVERSION_STR "2.2.0\0"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (0)
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE (0)
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "CompanyName", "Mod Organizer 2 Team\0"
|
||||
VALUE "FileDescription", "Mod Organizer 2 GUI\0"
|
||||
VALUE "OriginalFilename", "ModOrganizer.exe\0"
|
||||
VALUE "InternalName", "ModOrganizer2\0"
|
||||
VALUE "LegalCopyright", "Copyright 2011-2016 Sebastian Herbord\r\nCopyright 2016-2019 Mod Organizer 2 contributors\0"
|
||||
VALUE "ProductName", "Mod Organizer 2\0"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409L, 1200
|
||||
END
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user