mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7665d9dd61 | ||
|
|
12104ed988 | ||
|
|
87d0f2eeb6 | ||
|
|
455b5075f1 | ||
|
|
39210af3e5 | ||
|
|
3a8ea3ccce | ||
|
|
5d766e94a7 | ||
|
|
a823d2aa88 | ||
|
|
b531bbff39 | ||
|
|
3ef0db4cca | ||
|
|
15f3d2ba05 | ||
|
|
48f1f600de | ||
|
|
a41028fafc | ||
|
|
eddc30a47f | ||
|
|
52b37a760c | ||
|
|
bff386d277 | ||
|
|
d2832ec9c3 | ||
|
|
62ccbb1d02 | ||
|
|
6299be28e1 | ||
|
|
9049e65c5e | ||
|
|
f8340e1620 | ||
|
|
110014bf5e | ||
|
|
91912f5fef | ||
|
|
f42a9f1cef |
@@ -7,7 +7,7 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**This template is useful to add basic support using https://github.com/ModOrganizer2/modorganizer-basic_games.**
|
||||
**This template is useful to add basic support using https://github.com/ModOrganizer2/modorganizer-basic_games.**
|
||||
|
||||
**If you are vaguely familiar with programming you can try following the instructions on that link to get something working yourself. If you have trouble with that please fill in this template.**
|
||||
|
||||
|
||||
+11
-30
@@ -2,51 +2,32 @@ name: Build ModOrganizer 2
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
branches: [master]
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
env:
|
||||
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
# https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
|
||||
- name: Export GitHub Actions cache environment variables
|
||||
uses: actions/github-script@v7
|
||||
- name: Build ModOrganizer
|
||||
id: build-modorganizer
|
||||
uses: ModOrganizer2/build-with-mob-action@master
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
qt-modules: qtpositioning qtwebchannel qtwebengine qtwebsockets
|
||||
mo2-dependencies: usvfs uibase bsatk esptk archive lootcli
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: 6.7.1
|
||||
modules: qtpositioning qtwebchannel qtwebengine qtwebsockets
|
||||
cache: true
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: "Set environmental variables"
|
||||
shell: bash
|
||||
run: |
|
||||
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure ModOrganizer
|
||||
- name: Install ModOrganizer
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake --preset vs2022-windows-standalone `
|
||||
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
|
||||
"-DCMAKE_INSTALL_PREFIX=install"
|
||||
|
||||
- name: Build ModOrganizer
|
||||
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
|
||||
cmake --install vsbuild --config RelWithDebInfo
|
||||
working-directory: ./build/${{ github.event.repository.name }}
|
||||
|
||||
- name: Package ModOrganizer
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: modorganizer
|
||||
path: ./install
|
||||
path: ./install/bin
|
||||
|
||||
@@ -12,6 +12,5 @@ edit
|
||||
/msbuild.log
|
||||
/*std*.log
|
||||
/*build
|
||||
.vscode
|
||||
|
||||
/src/version.aps
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-merge-conflict
|
||||
- id: check-case-conflict
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v19.1.5
|
||||
hooks:
|
||||
- id: clang-format
|
||||
'types_or': [c++, c]
|
||||
|
||||
ci:
|
||||
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
|
||||
autofix_prs: true
|
||||
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
|
||||
autoupdate_schedule: quarterly
|
||||
submodules: false
|
||||
+9
-3
@@ -7,11 +7,17 @@ project(organizer)
|
||||
|
||||
find_package(mo2-cmake CONFIG REQUIRED)
|
||||
|
||||
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
|
||||
# if MO2_INSTALL_IS_BIN is set, this means that we should install directly into the
|
||||
# installation prefix, without the bin/ subfolder, typically for a standalone build
|
||||
# to update an existing install
|
||||
if (MO2_INSTALL_IS_BIN)
|
||||
set(_bin ".")
|
||||
else()
|
||||
set(_bin bin)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(themes)
|
||||
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT organizer)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dump_running_process.bat DESTINATION ${MO2_INSTALL_BIN})
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dump_running_process.bat DESTINATION ${_bin})
|
||||
|
||||
+13
-1
@@ -29,7 +29,7 @@
|
||||
"value": "x64"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_CXX_FLAGS": "/EHsc /MP /W3",
|
||||
"CMAKE_CXX_FLAGS": "/EHsc /MP /W4",
|
||||
"VCPKG_TARGET_TRIPLET": {
|
||||
"type": "STRING",
|
||||
"value": "x64-windows-static-md"
|
||||
@@ -55,5 +55,17 @@
|
||||
"name": "vs2022-windows-standalone"
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "vs2022-windows",
|
||||
"resolvePackageReferences": "on",
|
||||
"configurePreset": "vs2022-windows"
|
||||
},
|
||||
{
|
||||
"name": "vs2022-windows-standalone",
|
||||
"resolvePackageReferences": "on",
|
||||
"configurePreset": "vs2022-windows-standalone"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
|
||||
@@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
@@ -12,8 +12,8 @@ The project took up speed again after a few more coders showed up in late 2017,
|
||||
## Help Wanted!
|
||||
Mod Organizer 2 is an open project in the hands of the community, there are problems that need to be solved and things that could be added. MO2 really needs developers and if you have the programming skills and some free time you can really improve the experience of the modding community.
|
||||
|
||||
To have more information, please join the open MO2 Development discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX)
|
||||
If you want to help translate MO2 to your language you should join the discord server too and head to the #translation channel.
|
||||
To have more information, please join the open MO2 Development Discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX)
|
||||
If you want to help translate MO2 to your language you should join the Discord server too and head to the #translation channel.
|
||||
To setup a development environment on your machine, there is the [mob project](https://github.com/modorganizer2/mob) that handles that.
|
||||
If you want to submit your code changes, please use a good formatting style like the default one in Visual Studio.
|
||||
|
||||
@@ -22,7 +22,7 @@ Through the work of a few people of the community MO2 has come quite far, now it
|
||||
## Reporting Issues:
|
||||
Issues should be reported to the GitHub page or on the open discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX). Here is also where dev builds are tested, bugs are reported and investigated, suggestions are discussed and a lot more.
|
||||
|
||||
Credits to Tannin, LePresidente, Silarn, erasmux, AL12, LostDragonist, AnyOldName3, isa, Holt59 and many others for the development.
|
||||
Credits to Tannin, LePresidente, Silarn, erasmux, AL12, LostDragonist, AnyOldName3, isa, Holt59, Project579, przester, Qudix, RJ, Jonathan Feenstra and many others for the development.
|
||||
|
||||
## Download Location
|
||||
|
||||
@@ -39,7 +39,7 @@ Please refer to [Modorganizer2/mob](https://github.com/modorganizer2/mob) for bu
|
||||
|
||||
## Other Repositories
|
||||
|
||||
MO2 consists of multiple repositories on github. The mob project will download them automatically as required. They should however also be buildable individually.
|
||||
MO2 consists of multiple repositories on GitHub. The mob project will download them automatically as required. They should however also be buildable individually.
|
||||
Here is a complete list:
|
||||
|
||||
* https://github.com/LePresidente/cpython-1
|
||||
@@ -67,6 +67,7 @@ Here is a complete list:
|
||||
* https://github.com/ModOrganizer2/modorganizer-game_skyrim
|
||||
* https://github.com/ModOrganizer2/modorganizer-game_skyrimSE
|
||||
* https://github.com/ModOrganizer2/modorganizer-game_skyrimVR
|
||||
* https://github.com/ModOrganizer2/modorganizer-game_starfield
|
||||
* https://github.com/ModOrganizer2/modorganizer-game_ttw
|
||||
* https://github.com/ModOrganizer2/modorganizer-installer_bain
|
||||
* https://github.com/ModOrganizer2/modorganizer-installer_wizard
|
||||
|
||||
+22
-31
@@ -1,6 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
find_package(mo2-cmake CONFIG REQUIRED)
|
||||
|
||||
find_package(usvfs CONFIG REQUIRED)
|
||||
|
||||
@@ -25,16 +24,16 @@ set_target_properties(organizer PROPERTIES
|
||||
|
||||
# disable translations because we want to be able to install somewhere else if
|
||||
# required
|
||||
mo2_configure_target(organizer WARNINGS 3 TRANSLATIONS OFF)
|
||||
mo2_configure_target(organizer WARNINGS 4 TRANSLATIONS OFF)
|
||||
|
||||
# we add translations "manually" to handle MO2_INSTALL_IS_BIN
|
||||
mo2_add_translations(organizer
|
||||
INSTALL_RELEASE
|
||||
INSTALL_DIRECTORY "${MO2_INSTALL_BIN}/translations"
|
||||
INSTALL_DIRECTORY "${_bin}/translations"
|
||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
mo2_set_project_to_run_from_install(
|
||||
organizer EXECUTABLE ${CMAKE_INSTALL_PREFIX}/${MO2_INSTALL_BIN}/ModOrganizer.exe)
|
||||
organizer EXECUTABLE ${CMAKE_INSTALL_PREFIX}/${_bin}/ModOrganizer.exe)
|
||||
|
||||
target_link_libraries(organizer PRIVATE
|
||||
Shlwapi Bcrypt
|
||||
@@ -44,30 +43,35 @@ target_link_libraries(organizer PRIVATE
|
||||
Qt6::WebEngineWidgets Qt6::WebSockets Version Dbghelp)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt6"
|
||||
DESTINATION ${MO2_INSTALL_BIN}/dlls
|
||||
DESTINATION ${_bin}/dlls
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
RENAME dlls.manifest)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.debug.qt6"
|
||||
DESTINATION ${MO2_INSTALL_BIN}/dlls
|
||||
DESTINATION ${_bin}/dlls
|
||||
CONFIGURATIONS Debug
|
||||
RENAME dlls.manifest)
|
||||
|
||||
if (NOT MO2_SKIP_STYLESHEETS_INSTALL)
|
||||
install(
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/stylesheets"
|
||||
DESTINATION ${_bin})
|
||||
endif()
|
||||
|
||||
if (NOT MO2_SKIP_TUTORIALS_INSTALL)
|
||||
install(
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tutorials"
|
||||
DESTINATION ${MO2_INSTALL_BIN})
|
||||
DESTINATION ${_bin})
|
||||
endif()
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/markdown.html"
|
||||
DESTINATION ${MO2_INSTALL_BIN}/resources)
|
||||
DESTINATION ${_bin}/resources)
|
||||
|
||||
# install ModOrganizer.exe itself
|
||||
install(FILES $<TARGET_FILE:organizer> DESTINATION ${MO2_INSTALL_BIN})
|
||||
install(FILES $<TARGET_FILE:organizer> DESTINATION ${_bin})
|
||||
|
||||
# install dependencies DLLs
|
||||
install(FILES $<TARGET_FILE:mo2::libbsarch> DESTINATION ${MO2_INSTALL_BIN}/dlls)
|
||||
install(FILES $<TARGET_FILE:mo2::archive> DESTINATION ${MO2_INSTALL_BIN}/dlls)
|
||||
install(FILES $<TARGET_FILE:7zip::7zip> DESTINATION ${MO2_INSTALL_BIN}/dlls)
|
||||
install(FILES $<TARGET_FILE:mo2::libbsarch> DESTINATION ${_bin}/dlls)
|
||||
install(FILES $<TARGET_FILE:7zip::7zip> DESTINATION ${_bin}/dlls)
|
||||
|
||||
# this may copy over the ones from uibase/usvfs
|
||||
# - when building with mob, this should not matter as the files should be identical
|
||||
@@ -83,7 +87,7 @@ install(FILES
|
||||
$<TARGET_FILE:usvfs_x86::usvfs_dll>
|
||||
$<TARGET_FILE:usvfs_x64::usvfs_proxy>
|
||||
$<TARGET_FILE:usvfs_x86::usvfs_proxy>
|
||||
DESTINATION ${MO2_INSTALL_BIN})
|
||||
DESTINATION ${_bin})
|
||||
|
||||
# do not install PDB if CMAKE_INSTALL_PREFIX is "bin"
|
||||
if (NOT MO2_INSTALL_IS_BIN)
|
||||
@@ -91,7 +95,7 @@ if (NOT MO2_INSTALL_IS_BIN)
|
||||
endif()
|
||||
|
||||
mo2_deploy_qt(
|
||||
DIRECTORY ${MO2_INSTALL_BIN}
|
||||
DIRECTORY ${_bin}
|
||||
BINARIES ModOrganizer.exe $<TARGET_FILE_NAME:mo2::uibase>)
|
||||
|
||||
# set source groups for VS
|
||||
@@ -121,12 +125,13 @@ mo2_add_filter(NAME src/categories GROUPS
|
||||
|
||||
mo2_add_filter(NAME src/core GROUPS
|
||||
archivefiletree
|
||||
github
|
||||
inibakery
|
||||
githubpp
|
||||
installationmanager
|
||||
nexusinterface
|
||||
nxmaccessmanager
|
||||
organizercore
|
||||
game_features
|
||||
plugincontainer
|
||||
apiuseraccount
|
||||
processrunner
|
||||
qdirfiletree
|
||||
@@ -134,16 +139,6 @@ mo2_add_filter(NAME src/core GROUPS
|
||||
uilocker
|
||||
)
|
||||
|
||||
mo2_add_filter(NAME src/extensions GROUPS
|
||||
game_features
|
||||
thememanager
|
||||
translationmanager
|
||||
extensionmanager
|
||||
extensionwatcher
|
||||
pluginmanager
|
||||
proxyqt
|
||||
)
|
||||
|
||||
mo2_add_filter(NAME src/dialogs GROUPS
|
||||
aboutdialog
|
||||
activatemodsdialog
|
||||
@@ -279,7 +274,6 @@ mo2_add_filter(NAME src/proxies GROUPS
|
||||
downloadmanagerproxy
|
||||
gamefeaturesproxy
|
||||
modlistproxy
|
||||
extensionlistproxy
|
||||
organizerproxy
|
||||
pluginlistproxy
|
||||
proxyutils
|
||||
@@ -296,7 +290,6 @@ mo2_add_filter(NAME src/register GROUPS
|
||||
)
|
||||
|
||||
mo2_add_filter(NAME src/settings GROUPS
|
||||
extensionsettings
|
||||
settings
|
||||
settingsutilities
|
||||
)
|
||||
@@ -307,9 +300,7 @@ mo2_add_filter(NAME src/settingsdialog GROUPS
|
||||
settingsdialoggeneral
|
||||
settingsdialognexus
|
||||
settingsdialogpaths
|
||||
settingsdialogextensions
|
||||
settingsdialogextensionrow
|
||||
settingsdialogextensioninfo
|
||||
settingsdialogplugins
|
||||
settingsdialogworkarounds
|
||||
settingsdialogmodlist
|
||||
settingsdialogtheme
|
||||
|
||||
-2331
File diff suppressed because it is too large
Load Diff
+27
-2
@@ -127,7 +127,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string notr="true"><html><head/><body><p>Copyright © 2011-2016 Sebastian Herbord<br/>Copyright © 2016-2023 Mod Organizer 2 Contributors</p></body></html></string>
|
||||
<string notr="true"><html><head/><body><p>Copyright © 2011-2016 Sebastian Herbord<br/>Copyright © 2016-2025 Mod Organizer 2 Contributors</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -266,6 +266,16 @@
|
||||
<string notr="true">Qudix</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">RJ</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Jonathan Feenstra</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -402,7 +412,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>zDas (Portuguese)</string>
|
||||
<string>Dasinho (Portuguese)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -634,6 +644,21 @@
|
||||
<string notr="true">z929669</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Eddoursul</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Twinki</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">ashemedai</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -97,6 +97,11 @@ public:
|
||||
int pos = 0;
|
||||
QString editText = edit->text();
|
||||
if (m_Validator->validate(editText, pos) == QValidator::Acceptable) {
|
||||
// Set ID and Parent ID as ints so sorting works as expected
|
||||
if (index.column() == 0 || index.column() == 2) {
|
||||
model->setData(index, editText.toInt());
|
||||
return;
|
||||
}
|
||||
QItemDelegate::setModelData(editor, model, index);
|
||||
}
|
||||
}
|
||||
@@ -198,8 +203,8 @@ void CategoriesDialog::fillTable()
|
||||
table->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||
table->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Fixed);
|
||||
table->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch);
|
||||
table->verticalHeader()->setSectionsMovable(true);
|
||||
table->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
table->verticalHeader()->setVisible(false);
|
||||
table->setItemDelegateForColumn(
|
||||
0, new ValidatingDelegate(this, new NewIDValidator(m_IDs)));
|
||||
table->setItemDelegateForColumn(
|
||||
@@ -217,7 +222,6 @@ void CategoriesDialog::fillTable()
|
||||
}
|
||||
++row;
|
||||
table->insertRow(row);
|
||||
// table->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
|
||||
|
||||
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem());
|
||||
idItem->setData(Qt::DisplayRole, category.ID());
|
||||
@@ -254,19 +258,26 @@ void CategoriesDialog::fillTable()
|
||||
}
|
||||
}
|
||||
|
||||
table->setSortingEnabled(true);
|
||||
refreshIDs();
|
||||
}
|
||||
|
||||
void CategoriesDialog::addCategory_clicked()
|
||||
{
|
||||
int row = m_ContextRow >= 0 ? m_ContextRow : 0;
|
||||
ui->categoriesTable->setSortingEnabled(false);
|
||||
ui->categoriesTable->insertRow(row);
|
||||
ui->categoriesTable->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
|
||||
ui->categoriesTable->setItem(row, 0,
|
||||
new QTableWidgetItem(QString::number(++m_HighestID)));
|
||||
|
||||
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem());
|
||||
idItem->setData(Qt::DisplayRole, ++m_HighestID);
|
||||
QScopedPointer<QTableWidgetItem> parentIDItem(new QTableWidgetItem());
|
||||
parentIDItem->setData(Qt::DisplayRole, 0);
|
||||
|
||||
ui->categoriesTable->setItem(row, 0, idItem.take());
|
||||
ui->categoriesTable->setItem(row, 1, new QTableWidgetItem("new"));
|
||||
ui->categoriesTable->setItem(row, 2, new QTableWidgetItem("0"));
|
||||
ui->categoriesTable->setItem(row, 2, parentIDItem.take());
|
||||
ui->categoriesTable->setItem(row, 3, new QTableWidgetItem(""));
|
||||
ui->categoriesTable->setSortingEnabled(true);
|
||||
}
|
||||
|
||||
void CategoriesDialog::removeCategory_clicked()
|
||||
@@ -300,6 +311,7 @@ void CategoriesDialog::nexusImport_clicked()
|
||||
m_HighestID = 0;
|
||||
}
|
||||
int row = 0;
|
||||
table->setSortingEnabled(false);
|
||||
for (int i = 0; i < list->count(); ++i) {
|
||||
QString name = list->item(i)->data(Qt::DisplayRole).toString();
|
||||
int nexusID = list->item(i)->data(Qt::UserRole).toInt();
|
||||
@@ -316,7 +328,6 @@ void CategoriesDialog::nexusImport_clicked()
|
||||
if (!table->findItems(name, Qt::MatchExactly).size()) {
|
||||
row = table->rowCount();
|
||||
table->insertRow(table->rowCount());
|
||||
// table->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
|
||||
|
||||
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem());
|
||||
idItem->setData(Qt::DisplayRole, ++m_HighestID);
|
||||
@@ -344,6 +355,7 @@ void CategoriesDialog::nexusImport_clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
table->setSortingEnabled(true);
|
||||
refreshIDs();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define CATEGORIESDIALOG_H
|
||||
|
||||
#include "categories.h"
|
||||
#include "plugincontainer.h"
|
||||
#include "tutorabledialog.h"
|
||||
#include <set>
|
||||
|
||||
@@ -70,6 +71,7 @@ private:
|
||||
|
||||
private:
|
||||
Ui::CategoriesDialog* ui;
|
||||
PluginContainer* m_PluginContainer;
|
||||
int m_ContextRow;
|
||||
|
||||
int m_HighestID;
|
||||
|
||||
@@ -79,9 +79,6 @@
|
||||
<property name="gridStyle">
|
||||
<enum>Qt::DashLine</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
||||
+3
-3
@@ -233,12 +233,12 @@ void ColorTable::load(Settings& s)
|
||||
});
|
||||
|
||||
addColor(
|
||||
QObject::tr("Mod contains selected plugin"), QColor(0, 0, 255, 64),
|
||||
QObject::tr("Mod contains selected file"), QColor(0, 0, 255, 64),
|
||||
[this] {
|
||||
return m_settings->colors().modlistContainsPlugin();
|
||||
return m_settings->colors().modlistContainsFile();
|
||||
},
|
||||
[this](auto&& v) {
|
||||
m_settings->colors().setModlistContainsPlugin(v);
|
||||
m_settings->colors().setModlistContainsFile(v);
|
||||
});
|
||||
|
||||
addColor(
|
||||
|
||||
+1
-2
@@ -828,9 +828,8 @@ std::optional<int> ReloadPluginCommand::runPostOrganizer(OrganizerCore& core)
|
||||
QDir(qApp->applicationDirPath() + "/" + ToQString(AppConfig::pluginPath()))
|
||||
.absoluteFilePath(name);
|
||||
|
||||
// TODO: reload extension, not plugin
|
||||
log::debug("reloading plugin from {}", filepath);
|
||||
// core.pluginManager().reloadPlugin(filepath);
|
||||
core.pluginContainer().reloadPlugin(filepath);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ private:
|
||||
std::vector<QDir> m_created;
|
||||
};
|
||||
|
||||
CreateInstanceDialog::CreateInstanceDialog(const PluginManager& pc, Settings* s,
|
||||
CreateInstanceDialog::CreateInstanceDialog(const PluginContainer& pc, Settings* s,
|
||||
QWidget* parent)
|
||||
: QDialog(parent), ui(new Ui::CreateInstanceDialog), m_pc(pc), m_settings(s),
|
||||
m_switching(false), m_singlePage(false)
|
||||
@@ -133,13 +133,13 @@ CreateInstanceDialog::CreateInstanceDialog(const PluginManager& pc, Settings* s,
|
||||
|
||||
addShortcutAction(QKeySequence::Find, Actions::Find);
|
||||
|
||||
addShortcut(Qt::ALT | Qt::Key_Left, [&] {
|
||||
addShortcut(Qt::ALT + Qt::Key_Left, [&] {
|
||||
back();
|
||||
});
|
||||
addShortcut(Qt::ALT | Qt::Key_Right, [&] {
|
||||
addShortcut(Qt::ALT + Qt::Key_Right, [&] {
|
||||
next(false);
|
||||
});
|
||||
addShortcut(Qt::CTRL | Qt::Key_Return, [&] {
|
||||
addShortcut(Qt::CTRL + Qt::Key_Return, [&] {
|
||||
next();
|
||||
});
|
||||
|
||||
@@ -161,7 +161,7 @@ Ui::CreateInstanceDialog* CreateInstanceDialog::getUI()
|
||||
return ui.get();
|
||||
}
|
||||
|
||||
const PluginManager& CreateInstanceDialog::pluginManager()
|
||||
const PluginContainer& CreateInstanceDialog::pluginContainer()
|
||||
{
|
||||
return m_pc;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace cid
|
||||
class Page;
|
||||
}
|
||||
|
||||
class PluginManager;
|
||||
class PluginContainer;
|
||||
class Settings;
|
||||
|
||||
// this is a wizard for creating a new instance, it is made out of Page objects,
|
||||
@@ -90,12 +90,13 @@ public:
|
||||
ProfileSettings profileSettings;
|
||||
};
|
||||
|
||||
CreateInstanceDialog(const PluginManager& pc, Settings* s, QWidget* parent = nullptr);
|
||||
CreateInstanceDialog(const PluginContainer& pc, Settings* s,
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
~CreateInstanceDialog();
|
||||
|
||||
Ui::CreateInstanceDialog* getUI();
|
||||
const PluginManager& pluginManager();
|
||||
const PluginContainer& pluginContainer();
|
||||
Settings* settings();
|
||||
|
||||
// disables all the pages except for the given one, used on startup when some
|
||||
@@ -184,7 +185,7 @@ public:
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::CreateInstanceDialog> ui;
|
||||
const PluginManager& m_pc;
|
||||
const PluginContainer& m_pc;
|
||||
Settings* m_settings;
|
||||
std::vector<std::unique_ptr<cid::Page>> m_pages;
|
||||
QString m_originalNext;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "createinstancedialogpages.h"
|
||||
#include "filesystemutilities.h"
|
||||
#include "instancemanager.h"
|
||||
#include "pluginmanager.h"
|
||||
#include "plugincontainer.h"
|
||||
#include "settings.h"
|
||||
#include "settingsdialognexus.h"
|
||||
#include "shared/appconfig.h"
|
||||
@@ -55,7 +55,7 @@ void PlaceholderLabel::setVisible(bool b)
|
||||
}
|
||||
|
||||
Page::Page(CreateInstanceDialog& dlg)
|
||||
: ui(dlg.getUI()), m_dlg(dlg), m_pc(dlg.pluginManager()), m_skip(false),
|
||||
: ui(dlg.getUI()), m_dlg(dlg), m_pc(dlg.pluginContainer()), m_skip(false),
|
||||
m_firstActivation(true)
|
||||
{}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
protected:
|
||||
Ui::CreateInstanceDialog* ui;
|
||||
CreateInstanceDialog& m_dlg;
|
||||
const PluginManager& m_pc;
|
||||
const PluginContainer& m_pc;
|
||||
bool m_skip;
|
||||
bool m_firstActivation;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user