Compare commits

...
468 Commits
Author SHA1 Message Date
Chris Bessent 6c6734fcf4 Set version for new instances 2020-01-12 14:35:40 -07:00
Chris Bessent 9fc7a1bf85 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.
2020-01-11 09:24:23 -07:00
Chris Bessent 3cfa7bbe74 Don't ask for the game when there's only one game 2020-01-10 17:18:45 -07:00
Chris Bessent 08410deece 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.
2020-01-10 17:18:45 -07:00
Chris Bessent 07e5ce1e0e Merge pull request #967 from Al12rs/master
Fixed log timestamp size for bigger font.
2020-01-10 08:41:10 -07:00
AL c5b809b486 Fixed log timestamp size for bigger font. 2020-01-10 16:07:58 +01:00
Chris Bessent ae22b41f96 Update version to 2.2.2.1 2020-01-09 19:01:42 -07:00
AL 85bb3dfbde Updated translations
(cherry picked from commit 62a6b1ce5e)
2020-01-09 18:43:12 -07:00
AL da441e2b71 Add headers with tooltips to Filter view.
(cherry picked from commit 3c6804c502)
2020-01-09 18:43:11 -07:00
AL 340b2e766f List all categories flatly in filters view as nestled ones would otherwise not be accessible.
(cherry picked from commit 734bd0ed20)
2020-01-09 18:43:11 -07:00
Chris Bessent dfa600996c Merge pull request #954 from ModOrganizer2/Develop
Stage for release 2.2.2
2020-01-06 05:17:01 -07:00
Chris Bessent d1a788dfad Merge branch 'master' into Develop 2020-01-06 05:16:02 -07:00
isanae 076d11292f Merge pull request #958 from isanae/dracula-background-color
Dracula theme fix for redrawing the images tab
2020-01-06 04:37:37 -05:00
isanae 72e99f7c5c changed widget background color to opaque, fixes redrawing problems in the images tab 2020-01-06 04:34:43 -05:00
LostDragonist 19a20159a5 Fix the API counter not being translated 2020-01-01 21:38:18 -07:00
Chris Bessent 4d6cee82f4 Update version to 2.2.2rc7 2020-01-01 12:05:26 -07:00
isanae 57b049b6d7 Merge pull request #953 from isanae/rc6-fixes
rc6 fixes
2019-12-29 07:30:07 -05:00
isanae 52cc3a41c7 refresh after manually unlocking the ui
fixed nexus connect button staying as "cancel" in case of errors
fixed logging of duplicate dll loading
bumped to rc6
2019-12-29 07:16:09 -05:00
Silarn dc6653e100 Fix conflict filter 2019-12-19 10:52:45 -06:00
isanae e797640a00 Merge pull request #945 from isanae/w7-wait-fix
Windows 7 wait fix
2019-12-18 17:25:05 -05:00
isanae 31cd5531d0 windows 7 doesn't play well with job objects, so just wait on individual handles
fixed getProcessTreeFromProcess() not behaving like getProcessTreeFromJob()
2019-12-18 17:21:52 -05:00
isanae c2d23bb34a Merge pull request #943 from isanae/bump-rc5
Bumped to rc5
2019-12-17 15:15:27 -05:00
isanae 932d321956 bumped to rc5
added reedts to contributors
2019-12-17 15:14:23 -05:00
isanae a4a0e59d8c Merge pull request #942 from isanae/lock-fixes
Lock fixes
2019-12-17 07:47:29 -05:00
isanae 2c7e0e7cb4 Merge pull request #941 from isanae/loot-errors
Loot errors
2019-12-17 06:35:10 -05:00
isanae ca6f9990c6 added text in when running loot
stop indeterminate progress bar on errors
add errors and warnings to report
2019-12-17 06:32:08 -05:00
isanae 05231eab45 temporary fix to keep MO locked for all processes when closing
save main window settings in closeEvent()
2019-12-15 22:35:02 -05:00
isanae f3c5cebb6e fixed exiting before QThread joins when pressing the X twice 2019-12-15 21:56:50 -05:00
isanae dcf88361d4 don't display the overlay on dialog boxes
handle non-modal windows too
fixed crash when closing an overlayed dialog
2019-12-15 21:54:27 -05:00
Silarn c9d33dad46 Allow content tooltip to translate 2019-12-14 19:05:42 -06:00
Chris Djali 9f54f554f5 Add Script Extender Plugin Checker to main readme 2019-12-15 00:52:36 +00:00
Silarn 51e3e078be Fix problem with translated unmanaged mods and origin names
- (Also adds translatable strings to directoryentry.cpp)
2019-12-14 18:11:57 -06:00
Silarn fde5fa2797 Streamline manual install fix, bump RC 2019-12-14 14:12:00 -06:00
isanae a912be4c6b Merge pull request #939 from isanae/data-root-activate
Double-click on root item in the Data tab
2019-12-14 13:52:08 -05:00
isanae 7af0e164f7 don't activate the root data item 2019-12-14 13:49:26 -05:00
LostDragonist 4c7b626e77 Fix requesting a manual install 2019-12-14 06:52:34 -07:00
Silarn db59ebdba0 Fix tutorial targets 2019-12-14 02:23:40 -06:00
Al 99fe545ff4 Merge pull request #937 from ModOrganizer2/filetree_doubleclick_fix
Filetree double-click fix
2019-12-13 13:43:37 +01:00
Al 909e8254f7 Avoid opening folders in explorer when double-clicking on them in the filetree.
As a side effect Enter and Return no longer do anything on folders either.
2019-12-13 13:36:12 +01:00
isanae 8cf24923bb Merge pull request #936 from isanae/rc3-fixes
rc3 fixes
2019-12-12 22:50:01 -05:00
isanae 0f67ee4fcd bumped to rc3 2019-12-12 15:07:02 -05:00
isanae 26158687a8 added SS3DevProps.dll to checks 2019-12-12 14:51:42 -05:00
isanae c3c1183308 fixed alt colors in saves list for dark.qss
translated some sanity checks warnings
fixed filter list not refreshing selection correctly
2019-12-12 14:47:35 -05:00
Silarn 1d0b202ee6 Check the enum 2019-12-11 14:28:42 -06:00
Silarn 19bb86a870 Update installer status handling 2019-12-11 14:02:33 -06:00
Silarn 5a266b8e26 When cancelling a fomod extraction, don't generate an error. 2019-12-11 12:06:36 -06:00
Silarn 2001f26757 Rework filter labels to separate bracket from translation 2019-12-10 15:25:31 -06:00
Silarn 923e514b0f Change the modinfo image preview button to a toolbutton 2019-12-10 14:56:56 -06:00
isanae 29d16f879d Merge pull request #935 from isanae/default-window-size
Set default window size to 1300x800
2019-12-09 13:28:38 -05:00
isanae 930087ea92 set default window size to 1300x800 2019-12-09 13:25:04 -05:00
isanae 1769d3c1a5 Merge pull request #934 from isanae/revert-conflicts-column
Revert conflicts column compatibility code
2019-12-09 13:13:16 -05:00
isanae 8d9a62a87d moved the conflicts column back to its proper position in the enum
removed unnecessary compat code
2019-12-09 13:08:58 -05:00
isanae b9fd1092c6 Merge pull request #933 from isanae/conflicts-position-on-reset
Move the conflicts column when resetting geometries
2019-12-09 12:53:29 -05:00
Al 292cee7f6a Update readme.md 2019-12-09 18:35:51 +01:00
isanae ea6c793ce6 move the conflicts column when resetting geometries 2019-12-09 12:32:17 -05:00
isanae 2cf33e59eb Merge pull request #932 from isanae/mod-list-columns-reset
Incorrect column sizes in mod list when resetting geometries
2019-12-09 11:47:40 -05:00
isanae e1d6f6380d use paintEvent() to allow interactive resize because showEvent() is too early
bumped to rc2
2019-12-09 11:40:54 -05:00
isanae 8cf3c4a367 Merge pull request #931 from isanae/double-click-unhooked
Double click unhooked
2019-12-09 10:12:12 -05:00
isanae 37891f29ca removed dead setDefaultActivationActionForFile() 2019-12-09 10:10:41 -05:00
isanae 2bc544509c disable run hooked in filetree when mod is disabled 2019-12-09 10:07:11 -05:00
isanae 5521b12fb3 data tab: run exes unhooked by default 2019-12-09 09:52:29 -05:00
isanae 852afd1263 filetree tab: run exes unhooked by default 2019-12-09 09:34:18 -05:00
Silarn 44084bfa41 Rework column insertion to move to the intended position post-facto 2019-12-08 20:48:14 -06:00
Al a4db0db94f Add alternatingRowColors to saves and data tab. 2019-12-09 01:17:27 +01:00
Al 27c05cebd5 Change compact size for the conflicts column to be shorter since there are less flags here. 2019-12-09 00:56:10 +01:00
Silarn df54f972ff Rework logic to parse by visual index 2019-12-08 16:16:10 -06:00
Al 8c3a3e8257 Changed default behavior for "Open Previews on double click" to true
since it's probably the most desirable option.
2019-12-08 21:05:58 +01:00
isanae c9049bb072 conflicts tab: run exes unhooked by default 2019-12-08 11:33:03 -05:00
Silarn 2c59d13be6 Update transifex location 2019-12-07 19:31:20 -06:00
LostDragonist f18e4db4fb Add Xahtax as a German translator 2019-12-07 14:30:35 -07:00
isanae 31fe42a1da Merge pull request #928 from isanae/bump-rc1
Bumped to RC1
2019-12-07 04:51:28 -05:00
isanae 9d8861d92b bumped to rc1 2019-12-07 04:47:28 -05:00
LostDragonist fbe0e8008a Do not translate isa's name 2019-12-07 02:12:39 -07:00
LostDragonist eb55bea357 Move isa to lead developers 2019-12-07 02:08:57 -07:00
isanae 931fd78284 Merge pull request #927 from isanae/clickBlank
Remove unused on_clickBlankButton_clicked()
2019-12-07 02:30:17 -05:00
isanae 267985a62d removed unused on_clickBlankButton_clicked() 2019-12-07 02:29:39 -05:00
Silarn d13ea08be8 Fix mistakenly added modinfo tab ID 2019-12-06 23:18:37 -06:00
Silarn b3331ef2c0 Separate conflict flags and render them in separate columns 2019-12-06 23:12:18 -06:00
LostDragonist d42bca5bc0 Merge pull request #925 from LostDragonist/Develop
Add source game column to the download list
2019-12-06 15:49:27 -07:00
LostDragonist 2c5603092a Add source game column to the download list 2019-12-06 12:40:41 -07:00
isanae 5327974825 Merge pull request #922 from isanae/open-folders-order
Move logs back to the bottom of the list
2019-12-04 21:54:48 -05:00
isanae 317730054d moved logs back to the bottom of the list, they're not game related 2019-12-04 21:53:41 -05:00
isanae d3be45e79e Merge pull request #921 from isanae/6788-stylesheets
Deleted 6788 stylesheets, they're now dependencies in umbrella
2019-12-04 16:32:28 -05:00
isanae dd28b85ad0 deleted 6788 stylesheets, they're now dependencies in umbrella 2019-12-04 15:42:13 -05:00
isanae 9b8488fad3 Merge pull request #920 from isanae/double-click-previews
Double click previews
2019-12-04 13:30:46 -05:00
isanae 91b95d00a6 implemented previews on double-click for the data and conflicts tabs 2019-12-04 13:24:31 -05:00
isanae a0fa896e68 added open previews on double-click option
implemented for filetree
2019-12-04 13:23:02 -05:00
isanae b209a8e47f Merge pull request #919 from isanae/explore-stylesheets
Explore stylesheets
2019-12-04 13:22:29 -05:00
isanae dd6f0fed10 added explore button in the settings to open stylesheets folder
added stylesheets folder to the open folders button
moved "Open MO2 Logs folder" up to be with instance folders, removed "MO2" in the name
2019-12-04 12:00:54 -05:00
isanae 00adf2b551 Merge pull request #918 from isanae/filters-keyboard-nav
Keyboard nav for filter list, alternating row colors
2019-12-04 11:46:13 -05:00
isanae e263d3049a keyboard nav for filter list, alternating row colors 2019-12-04 11:43:36 -05:00
isanae 472aa02068 Merge pull request #917 from isanae/download-crash
Crash when starting multiple downloads with dialog boxes opened
2019-12-02 17:11:23 -05:00
isanae 8fb970faa3 fixed crash when starting multiple downloads with dialog boxes opened
fixed download manager dialog boxes not having a parent
2019-12-02 16:59:30 -05:00
isanae 3d434856ae Merge pull request #916 from isanae/tracked-filter
added "tracked on nexus" filter
2019-12-02 15:35:01 -05:00
isanae 2de015815c added "tracked on nexus" filter 2019-12-02 15:34:29 -05:00
isanae d5a4077a43 Merge pull request #915 from isanae/lock-hook-shell
Lock, hook, shell
2019-12-02 15:29:23 -05:00
isanae 3b78e436db double-click now opens files for the data tab, filetree and conflict lists 2019-12-02 15:18:55 -05:00
isanae 48fd9fd080 added "open with vfs" to the data tab
uniform order for file context menus
2019-12-02 14:50:01 -05:00
isanae 47b767ef2f added "open with vfs" to filetree 2019-12-02 14:36:09 -05:00
isanae d4172dc5f8 added "open with vfs" option to conflicts tab 2019-12-02 13:51:46 -05:00
isanae 2b4d792976 don't show the lock overlay for processes that are not hooked
starting exe from filetree is now hooked
usvfs progress dialog now on top of dialogs
2019-12-02 11:06:10 -05:00
isanae eabca00c35 Merge pull request #913 from isanae/negative-filters
Negative filters
2019-12-02 10:43:52 -05:00
isanae 3c25117fe1 three modes for separators, save state
renamed enumerators
2019-12-02 10:41:52 -05:00
isanae d2073ef2bd made all categories positive
fixed context menu sometimes appearing
2019-11-30 05:37:34 -05:00
isanae 7f4fce35f9 fixed separators option being used even without filters
changed filter list to use tristate items without selection
2019-11-30 05:23:22 -05:00
isanae 38d56ef831 fixed setting selection when checking for updates 2019-11-30 04:04:40 -05:00
isanae f080e2e25d always enable clear filter button, made it so it also removes not flags
removed "deselect filters" context menu, redundant
disable not flag menu items without selection
2019-11-30 03:39:12 -05:00
isanae 507d29a0fc fixed bad label for content categories 2019-11-30 03:29:54 -05:00
isanae a38d1723bf removed redundant categories now that there's a not filter
disabled collapsing for filter, there's already a button to hide it
2019-11-30 03:21:23 -05:00
isanae f463c54943 added context menu items so set/unset inverted flag 2019-11-30 03:02:11 -05:00
isanae ed14d5510d implemented not flag
moved stuff to CriteriaItem
fixed jumbled names in getSpecialCategoryName()
2019-11-30 02:20:18 -05:00
isanae e99dfe153c renamed filters to criteria
merged categories and content, they can be distinguished using the type
added a not flag for criteria, not used yet
2019-11-30 01:53:09 -05:00
isanae 93318a1474 moved all remaining filter stuff to FilterList
renamed some widgets
2019-11-29 23:50:33 -05:00
isanae 4bbdbb000f split filter list 2019-11-27 19:14:37 -05:00
isanae 8ea346183f renamed "Categories" frame to "Filters" 2019-11-27 17:53:26 -05:00
isanae 06bb9870dd fixed tooltips 2019-11-27 17:45:52 -05:00
isanae 9134ae6111 implemented not filter 2019-11-27 17:41:04 -05:00
isanae 17452071c9 added separators filter
changed notendorsed filter to include anything else than true
2019-11-27 17:30:30 -05:00
isanae ecaf75c453 refactored matching into one function instead of repeating them for OR and AND 2019-11-27 17:14:44 -05:00
isanae d5e38fca6b added not filter, not functional yet
fixed no mods being displayed for OR with no conditions
2019-11-27 17:05:20 -05:00
isanae fb3c15094f Merge pull request #911 from isanae/relative-path-in-exe
Allow relative paths for binaries in the executables settings
2019-11-27 16:39:27 -05:00
isanae d47fc5c973 allow relative paths for binaries in the executables settings
added SSAudioOSD.dll to checks
2019-11-27 16:37:58 -05:00
isanae aab91226b8 Merge pull request #910 from isanae/system-dir-checks
Added checks on startup for directories in program files
2019-11-27 16:06:03 -05:00
isanae 05759c4abc added checks on startup for directories in program files 2019-11-27 16:03:42 -05:00
isanae 23bfe4e9ff Merge pull request #909 from isanae/change-category-crash
Fix crash when changing categories on mods while a filter is selected
2019-11-27 15:16:58 -05:00
isanae 7f2d0e6722 fix crash when changing categories on mods when the "no categories" filter is selected 2019-11-27 15:15:27 -05:00
isanae 454c550b15 Merge pull request #908 from isanae/translate-link
Added transifex link in the settings
2019-11-27 14:24:14 -05:00
isanae 376f835edd added transifex link in the settings 2019-11-27 14:23:11 -05:00
isanae e18afba893 Merge pull request #907 from isanae/link-colors
Link colors
2019-11-27 14:19:20 -05:00
isanae 70e66802a2 changed labels that have links to new LinkLabel, removed hardcoded colors
changed the link colors on dark themes to something saner
2019-11-27 14:10:50 -05:00
isanae 892a19bfc6 Merge pull request #906 from isanae/various-fixes
Collection of small fixes
2019-11-27 12:45:55 -05:00
isanae 21cddd0ad3 changed mod name of unmanaged files from "data" to "<Unmanaged>" in the data tab and for the root item in the archives tab
log error when trying to open mod info for a managed file but the mod isn't found
2019-11-27 12:05:11 -05:00
isanae a5bd29f111 only default sort file trees if no setting was saved 2019-11-27 11:25:53 -05:00
isanae 146360542d Merge pull request #905 from isanae/cwd-fix
Fix zedit not starting
2019-11-27 10:30:02 -05:00
isanae a87874497a cwd was MO instead of binary if non was specified in the exe settings 2019-11-26 16:04:21 -05:00
isanae 9519bd6219 added open mod info to data tab context menu 2019-11-26 10:31:26 -05:00
isanae b8e1a45840 sortable filetree, remember settings 2019-11-26 10:05:48 -05:00
isanae f85478a5b4 fix sort in overwrite, remember settings
remove useless header in archives list
2019-11-26 10:00:37 -05:00
isanae 4db719a3bb don't log EPT_S_NOT_REGISTERED errors, treat it as firewall disabled 2019-11-26 09:19:36 -05:00
isanae c65fbcdb37 ignore some instance folders like "cache" and "qtwebengine" 2019-11-26 09:07:43 -05:00
isanae cde6137ca5 added loot to missing files check 2019-11-26 08:59:15 -05:00
isanae 9194bfa16b added option to hide confirmation when switching instances 2019-11-26 08:59:04 -05:00
isanae c3068ce50a added rivatuner to sanity checks
now also checks modules loaded after startup
fixed crash on w7 when checking some modules
2019-11-26 08:39:22 -05:00
isanae 2c2c47c215 log new modules being loaded after startup 2019-11-26 07:06:20 -05:00
isanae 08bf03854d removed useless logging about servers 2019-11-26 06:27:56 -05:00
isanae 637188a58b don't log md5 for any system file 2019-11-26 06:21:16 -05:00
isanae 7e1403dd28 simplified security products: don't log guids, remove duplicate entries 2019-11-26 06:18:13 -05:00
isanae e67381b4b8 log timezone 2019-11-26 06:14:13 -05:00
isanae 255f96ce7e only log crash dumps message on startup 2019-11-26 05:47:11 -05:00
isanae e845126e09 Merge pull request #904 from isanae/lock-job
Use a Job to capture all child processes
2019-11-26 04:57:20 -05:00
isanae 5fb785acee bumped to 2.2.2-alpha8 2019-11-26 04:05:11 -05:00
isanae 42fb0c6bfc ignore loot reports about disabled plugins 2019-11-26 03:50:15 -05:00
isanae a99dd1d6eb fixed timing crash when trying to update the lock ui after it was closed 2019-11-26 03:36:24 -05:00
isanae 2527d6aa87 switched to using a job object to monitor for processes so child processes can also be captured 2019-11-26 03:30:44 -05:00
isanae 36c6dfd5b8 Merge pull request #903 from isanae/loot-w7-fix
Fixes for windows 7
2019-11-25 09:28:09 -05:00
isanae bec1120693 removed calls to GetOverlappedResultEx() and SetThreadDescription(), not available on windows 7
bumped to alpha7.1
2019-11-25 09:26:46 -05:00
isanae 7380747ca9 Merge pull request #902 from isanae/loot-broom
Use the broom icon for dirty plugins
2019-11-25 05:35:37 -05:00
isanae 78ee23220f bumped to 2.2.2alpha7
use the broom icon for dirty plugins
better handling of failing to spawn loot
2019-11-25 05:31:28 -05:00
isanae 765c9667de Merge pull request #901 from isanae/loot-rework
Loot rework
2019-11-25 04:01:32 -05:00
isanae f1b621d0ba save/restore state for loot dialog 2019-11-25 03:34:51 -05:00
isanae bd191f3a71 now passes --language to lootcli 2019-11-25 03:28:27 -05:00
isanae 23e917df45 switched to overlapped io so lootcli can still be terminated even if it's not writing anything to stdout 2019-11-25 03:08:27 -05:00
isanae 0c69619dbe switched to named pipes 2019-11-25 02:10:59 -05:00
isanae 0e45044dbd fixed cancel button
debug logs, some cleanup
2019-11-25 00:47:45 -05:00
isanae 48fcf9521f removed max-width, larger dialog
removed messages in output now that there's a full report
2019-11-24 23:47:59 -05:00
isanae 64304a6368 tweaked css, finished markdown report
copy markdown.html to resources/
2019-11-24 23:23:15 -05:00
isanae 70ee786102 changed loot report to webengine with markdown support 2019-11-24 22:19:23 -05:00
isanae cd876a0f9f split loot dialog, added ui file 2019-11-24 20:11:50 -05:00
isanae f5476531ae basic html loot report 2019-11-24 19:39:26 -05:00
isanae 54b18e8815 added loot info to tooltip 2019-11-23 23:54:19 -05:00
isanae 3728db1527 removed m_ prefix from struct members
some refactoring, whitespace
2019-11-23 22:56:17 -05:00
isanae 3a085212c9 added loot report to the plugin list, not used yet
split PluginList::data() into individual functions
disabled loot message processing, will use report instead
2019-11-23 22:35:08 -05:00
isanae 5c9de17b63 rewrite of json report parsing
added json.h with some utilities
2019-11-23 22:08:53 -05:00
LostDragonist 5f165b80e8 Merge pull request #897 from LostDragonist/Develop
Sort the files when presenting them during querying info
2019-11-23 17:56:15 -07:00
LostDragonist d649a86195 Sort the files when presenting them during querying info 2019-11-23 17:53:31 -07:00
isanae 237825f5b6 emit logs for general messages
handle new json output file
2019-11-22 09:14:02 -05:00
isanae 0faf628e92 open json report button 2019-11-22 08:26:29 -05:00
isanae d05df3bb7c cancel/close button 2019-11-22 08:01:07 -05:00
isanae 8fcaea9de3 added loot log level option 2019-11-22 07:44:09 -05:00
Silarn 981c1b7739 Move all Qt deployment to main MO project 2019-11-19 14:42:50 -06:00
isanae 2b5747c19d handles changes in lootcli for a more formal communication protocol 2019-11-18 17:04:01 -05:00
isanae 27dadd0164 <li> in tooltip for information messages
rewrote json output file handling to check for errors
2019-11-18 13:32:33 -05:00
isanae 1b6dc5e0a0 moved things around 2019-11-18 11:15:09 -05:00
isanae d686a61a7a removed unused job stuff
don't emit error when the process terminates because it's cancelled
2019-11-16 23:05:24 -05:00
isanae b8eab5d248 threaded loot 2019-11-16 22:25:55 -05:00
isanae 9688f37bbe added loot output 2019-11-16 20:47:30 -05:00
isanae 272cb51483 added LootDialog, more flexible than QProgressDialog 2019-11-16 20:34:55 -05:00
isanae 838446e262 split loot stuff to loot.h/cpp, no changes in functionality 2019-11-16 19:41:17 -05:00
isanae d6c3bad01a Merge pull request #887 from isanae/spawning-and-waiting
Spawning, waiting and locking
2019-11-11 14:14:01 -05:00
isanae decd5c1828 renamed lockwidget files to uilocker 2019-11-06 07:45:04 -05:00
isanae 4f84565085 renamed LockWidget to UILocker
lock interface up to two processes
2019-11-06 07:45:03 -05:00
isanae 8f40ec0bdc threaded wait for process 2019-11-06 07:45:03 -05:00
isanae 96cc662b18 lock widget now moves between dialogs and the main window when closing dialogs 2019-11-06 07:45:03 -05:00
isanae 642ddacab8 moved LockWidget back to OrganizerCore to support having multiple locks active
moved the ui out of LockWidget into LockInterface
added LockWidget::Session to manage multi locks
2019-11-06 07:45:02 -05:00
isanae 3d0197fa5e comments 2019-11-06 07:45:02 -05:00
isanae ada2ac0cb5 removed redundant checkBinary(), which used to check for non existing binaries, that's handled when spawning
removed useless checkEnvironment(), which checked for EventLog
removed CREATE_BREAKAWAY_FROM_JOB from CreateProcess() calls, didn't do anything
fixed setFromFileOrExecutable() when running just a filename that's not an executable name
split run()
fixed lock widget being disabled when running without a ui
2019-11-06 07:45:02 -05:00
isanae 72dd230cdc removed unused files
fixed handle leak when starting steam
2019-11-06 07:45:01 -05:00
isanae 719a2f20b4 refresh ui after running an exe from 1) an external message, and 2) the data tab 2019-11-06 07:45:01 -05:00
isanae 7db5f93884 removed unused SpawnedProcess
lock widget now interprets closing the dialog as a forced unlock
2019-11-06 07:45:00 -05:00
isanae 7ebd4debee added a ForceWait flag to bypass disabled locking
merged a bunch of unnecessary functions in ProcessRunner
2019-11-06 07:45:00 -05:00
isanae 9ff8a471aa added waitForAllUSVFSProcesses() wrapper in OrganizerCore, the fact that it's in ProcessRunner is a bit of a hack 2019-11-06 07:45:00 -05:00
isanae d72e94a92f added attachToProcess(), made waitForApplication() private
changed OrganizerProxy::startApplication() so it _doesn't_ wait for completion, which is its original behaviour
2019-11-06 07:44:59 -05:00
isanae a88f9dd9a7 removed runExecutableOrExecutableFile()
log the actual spawning and requests to start as well as wait from plugins
raise the lock widget when it's a dialog
2019-11-06 07:44:59 -05:00
isanae b855754c97 removed runShortcut()
changed lock widget text when running without a ui
2019-11-06 07:44:58 -05:00
isanae 2c3079c1dc removed runExecutable() 2019-11-06 07:44:58 -05:00
isanae c8e101e19e removed runExecutableFile()
turns out on_startButton_clicked() had redundant code
2019-11-06 07:44:58 -05:00
isanae 0cea4833eb explicit refresh parameter for setWaitForCompletion(), some parts of the ui will crash if things refresh unexpectedly
removed runFile()
fixed crash when unlocking if some widgets were destroyed in the meantime
lock widget will now pick the active window and disable all top levels
2019-11-06 07:44:57 -05:00
isanae db0b92776b added lockwidget to replace all the other dialogs
rewrote ProcessRunner to have a bunch of setters and then a run()
fixed bad exit code when waiting on a process that's already completed
removed lock()/unlock() from main window, ProcessRunner is in charge of that now
2019-11-06 07:44:57 -05:00
isanae 2aa70de49e return failure if the user has unlocked in waitForApplication() 2019-11-06 07:44:56 -05:00
isanae f2cc71779f always wait until completion in waitForApplication(), regardless of lock setting 2019-11-06 07:44:56 -05:00
isanae b5a5ea1b4d recheck the process tree if the current process is not that interesting 2019-11-06 07:44:56 -05:00
isanae b05cbeed90 refactored waiting into waitForProcesses() 2019-11-06 07:44:55 -05:00
isanae 4d269c2e1a split to processrunner
added IUserInterface::qtWidget()
put back IUserInterface in OrganizerCore now that there's a way to get the widget
2019-11-06 07:44:55 -05:00
isanae 8c72077feb replaced uilock by a progress callback in spawn
waiting for process now gets the whole process tree to find an interesting process
2019-11-06 07:44:54 -05:00
isanae 18b438cf27 split to getRunningUSVFSProcesses()
simplified waitForAllUSVFSProcesses() to always get the list of running processes after one process completes
2019-11-06 07:44:54 -05:00
isanae bff5a22f48 spawning an executable now only waits for that particular process
added waitForAllUSVFSProcesses() to OrganizerCore, used when closing MO
2019-11-06 07:44:54 -05:00
isanae 8f24f6298f wait for executable when opening files 2019-11-06 07:44:53 -05:00
isanae 4e8dcc5157 moved findJavaInstallation() and getFileExecutionContext() to spawn
fixed env::get() returning garbage after value
2019-11-06 07:44:53 -05:00
isanae b60f2aa786 renamed startApplication() to runExecutableOrExecutableFile() 2019-11-06 07:42:57 -05:00
isanae e43500eaf5 renamed runExecutable() to runExecutablefile()
added runExecutable() for Executable class, also used by runShortcut()
2019-11-06 07:42:57 -05:00
isanae 4fb79cae45 renamed executeFileVirtualized() to runFile()
renamed spawnBinary() to runExecutable()
renamed spawnBinaryDirect() to spawnAndWait()
2019-11-06 07:42:56 -05:00
isanae 74631ae88e merged spawnBinaryDirect() and spawnBinaryProcess() 2019-11-06 07:42:56 -05:00
isanae d91580cc26 initial Spawner and SpawnedProcess
added steam app id to spawn parameters
removed threadHandle, unused
moved most of the stuff from OrganizerCore::spawnBinaryProcess() to Spawner
replaced m_UserInterface by m_MainWindow
2019-11-06 07:42:56 -05:00
isanae 7b3c5dcbb3 Merge pull request #885 from isanae/usvfs-parameters-mutex
Crash dump path and toString()
2019-11-06 06:36:11 -05:00
isanae 33f5b59bee added crash dump path to parameters, if a mechanism to customize it is ever created
moved toString() for log level and dump type to usvfs, which needs them for logging
2019-11-01 10:14:17 -04:00
isanae aa582ab376 Merge pull request #884 from isanae/failed-to-receive-fix
Fix for "failed to receive data from secondary instance"
2019-10-31 09:09:00 -04:00
isanae a523a0b21b make sure all the data is sent before disconnecting
don't fail if waitForReadyRead() returns false but there's data available
2019-10-31 09:06:09 -04:00
LostDragonist 70b966dc0e Improve automatic naming of new executables
When using the "Add from file..." option, the extension will be removed.
E.g., "zEdit 1.2.3.exe" will be shortened to "zEdit 1.2.3".

When using the "Add empty" option and subsequently browsing for a binary,
the complete base name will be used instead of just the base name.  E.g.,
"zEdit 1.2.3.exe" will be shorted to "zEdit 1.2.3" instead of "zEdit 1".

When using the "Add as Executable" option of the data tab, the complete
base name will be used instead of just the base name.  E.g.,
"zEdit 1.2.3.exe" will be shorted to "zEdit 1.2.3" instead of "zEdit 1".
2019-10-22 23:32:28 -05:00
LostDragonist 741893c735 Update version to 2.2.2alpha5 2019-10-19 20:46:22 -05:00
Silarn 77a9c64fda Add button in modinfo image preview to use preview plugin dialog
- Disabled if no compatible preview is found
- Now renders an image for unsupported formats instructing the user
2019-10-19 02:35:33 -05:00
LostDragonist d255be54a0 Merge pull request #878 from LostDragonist/Develop
Remove mention of 32-bit Java
2019-10-18 19:07:06 -05:00
LostDragonist 09450f744b Remove mention of 32-bit Java
MO doesn't really care about which version of Java is installed.
Saying that 32-bit Java is required is misleading.
2019-10-18 19:06:11 -05:00
LostDragonist 133dc3b7a3 Merge pull request #876 from LostDragonist/Develop
Improve selection of mod ID when querying info
2019-10-18 19:00:48 -05:00
LostDragonist e3629c193a Improve selection of mod ID when querying info
The mod ID selection was fairly unreliable when the mod author decided
to use certain values in the mod name or filename.  A filename of
"K-9 - Armor-1-2-3" would automatically set the mod ID to 9 with no
chance for the user to correct it.  Other filenames would only present
2 choices of mod ID to the user, neither being correct.

The primary intent of this change is to present the user with all the
numbers found in the filename as options for the mod ID.  This should
allow the correct mod ID to be easily chosen in all cases.
2019-10-18 14:55:33 -05:00
LostDragonist a8d329a510 Merge pull request #872 from LostDragonist/Develop
Only flag plugins as light if the game supports light plugins
2019-10-15 16:26:53 -05:00
LostDragonist c0afb8c673 Only flag plugins as light if the game supports light plugins 2019-10-15 16:24:10 -05:00
isanae ca7aba129e Merge pull request #870 from isanae/clone-fix
Fixed exe cloning
2019-10-14 08:57:07 -04:00
isanae 20c7b2f498 title wasn't always trimmed, did all sorts of weird things 2019-10-14 04:45:46 -04:00
isanae 6c881c8502 Merge pull request #869 from isanae/loot-fix
Fixed loot not being hooked, bumped to alpha 4.1
2019-10-12 19:12:56 -04:00
isanae 0b480089c3 fixed loot not being hooked
bumped to alpha 4.1
2019-10-12 19:11:46 -04:00
isanae 56ae2bc24d Merge pull request #866 from isanae/new-usvfs-parameters
Uses new usvfsParameters, also updates spawn delay
2019-10-11 09:30:46 -04:00
isanae b7d83a30de Merge pull request #867 from isanae/missing-boss-button
Fixed missing sort button
2019-10-10 11:57:25 -04:00
isanae 1aa3e1f96c visible property was false 2019-10-10 11:48:41 -04:00
isanae 324fa12a2d uses new usvfsParameters, also updates spawn delay 2019-10-10 10:25:46 -04:00
isanae 168fc950f9 Merge pull request #863 from isanae/executables-fixes
Executables fixes
2019-10-10 06:12:07 -04:00
isanae 0f5ecb8b78 Merge pull request #864 from isanae/show-usvfs-version
Added usvfs version in log and about dialog
2019-10-10 06:10:19 -04:00
isanae dfb3020f89 added usvfs version in log and about dialog 2019-10-09 01:38:53 -04:00
isanae c01e80a651 Merge pull request #858 from isanae/proper-exit
Proper exit procedure
2019-10-08 23:24:53 -04:00
isanae 4d3495b3fb theme fixes for QToolButton with a menu 2019-10-08 23:17:48 -04:00
isanae 21f55da7d3 added hide flag to executables 2019-10-08 23:03:45 -04:00
isanae de48d430ec fixed tab order
fixed list items being selected, but not focused, which broke keyboard nav
2019-10-08 19:55:44 -04:00
isanae 0ea975248b remove separators and backups from mod list in the edit executables dialog 2019-10-08 19:38:56 -04:00
isanae 52db7e8c7d initial selection in the edit executables dialog from main window 2019-10-08 19:20:08 -04:00
isanae 8bc84a1513 remove whitespace from executable names
add from binary, clone
2019-10-08 19:08:55 -04:00
isanae b4f5c17898 disallow empty titles 2019-10-07 07:41:13 -04:00
isanae 94b40b328b Merge pull request #859 from isanae/usvfs-delay-parameter
Added spawn delay setting, not exposed
2019-10-07 07:13:27 -04:00
isanae a082c029b2 added spawn delay setting, not exposed 2019-10-07 07:04:56 -04:00
isanae 3d97b0efd0 added ExitModOrganizer(), used instead of qApp->exit()
reset geometry uses TaskDialog
moved restart code for the settings dialog to MainWindow
fixed settings sometimes not being saved when restarting
don't log "crash dumps present" every time the settings dialog is closed
2019-10-07 04:27:53 -04:00
isanae 4dbd541286 Merge pull request #857 from isanae/auth-warnings
Some warnings on authentication
2019-10-07 03:28:36 -04:00
isanae f10e91528b remaining requests can be 0 if not logged in, would show incorrect throttling message
validation dialog could pop even if logged in
typos in comments
2019-10-07 03:26:20 -04:00
isanae 96c3193256 Merge pull request #856 from isanae/profile-settings-fix
Removed some ambiguous overloads for settings
2019-10-07 02:32:56 -04:00
isanae 85f1635d2d Merge pull request #855 from isanae/context-menu-log-toggle
Log toggle in context menu
2019-10-07 02:31:42 -04:00
isanae 7fae2fb9f1 Merge pull request #854 from isanae/categories-collapse-fix
Categories panel collapsing
2019-10-07 02:31:07 -04:00
isanae 97d58a17bd Merge pull request #853 from isanae/validation-progress-dialog-fixes
Validation progress dialog fixes
2019-10-07 02:28:34 -04:00
isanae c9e8e71b93 removed some ambiguous overloads for settings 2019-10-07 02:23:28 -04:00
isanae ef993a693c stop reusing the view menu, just create a new context menu with the right stuff in it 2019-10-05 14:36:07 -04:00
isanae c28d435ed4 showEvent() is called for stuff like minimizing and restoring the window, don't re-read settings for that 2019-10-05 14:17:04 -04:00
isanae 925dbcba87 at least put one message in the list when opening the dialog to avoid having an empty widget 2019-10-05 13:52:04 -04:00
isanae e7cc4774e1 don't show the progress dialog on startup until after the first failure 2019-10-05 13:47:11 -04:00
isanae 8269ac1b48 rework of the nexus key validator to allow multiple attempts before failing 2019-10-05 13:36:27 -04:00
isanae fc909d4b2e implemented cancel button on progress dialog
fixed crash when exiting MO because the dialog is destroyed in atexit(), way after Qt is gone
2019-10-05 10:41:23 -04:00
isanae 3fe54c8431 now using ui file for validation progress dialog
moved elapsed timer to NexusKeyValidator, progress dialog now just shows what the validator is doing, which allows for hiding and showing it at any time
recreate the dialog when the parent changes, avoids theme errors
2019-10-05 10:11:55 -04:00
isanae 73556ad084 Merge pull request #852 from isanae/symlinks-log-only
Symlinks warning
2019-10-05 08:55:25 -04:00
isanae 76df854483 only log a warning for symlinks instead of exiting MO
added logs: when dmp files are present, for portable instances, and the ini path
clear the log widget when switching instances
2019-10-05 08:53:31 -04:00
isanae 605b669bed Merge pull request #851 from isanae/api-visible-at-startup
Check the api setting on startup to hide it if needed
2019-10-05 08:33:07 -04:00
isanae 4921d2a0dd Merge pull request #850 from isanae/blocked-files
Blocked files
2019-10-05 08:33:01 -04:00
isanae c4d96ed8cf check the api setting on startup to hide it if needed 2019-10-05 08:30:58 -04:00
isanae 93423f6351 don't log "(no guid"), happens all the time for the windows firewall 2019-10-05 08:21:59 -04:00
isanae 1467cb9955 sanity checks: comments, more debug logging 2019-10-05 08:11:12 -04:00
isanae 897d315359 fixes for VS preview: missing namespace, missing setting() with two parameters 2019-10-05 07:38:14 -04:00
isanae 1dc3962199 changed some of blocked files logging 2019-10-05 07:05:47 -04:00
isanae 633ef81972 moved checks to sanitychecks.cpp
added check for blocked files, only logs
2019-10-05 07:05:47 -04:00
Al 8aa298b606 Merge pull request #849 from Al12rs/more-filters
Added "No valid game data" and "No Nexus ID" filters as per #295
2019-10-04 22:17:01 +02:00
Al e427dbae55 Merge pull request #847 from isanae/file-renamer-errors
FileRenamer error messages
2019-10-04 22:16:39 +02:00
Al 73541c9bb4 Merge pull request #846 from isanae/tr-archive-errors
Made extraction errors translatable
2019-10-04 22:16:17 +02:00
Al 0ff1da60b1 Merge pull request #845 from isanae/plugin-tooltips
Tooltips in plugin list
2019-10-04 22:15:49 +02:00
Al 49e19c8185 Added "No valid game data" and "No Nexus ID" filters as per #295 2019-10-04 17:18:06 +02:00
isanae daa0b4b339 forgot one tr() 2019-10-04 10:47:42 -04:00
isanae c4dd23abb7 added error messages to FileRenamer and a few more
fixes for shell functions changing names
2019-10-04 09:40:37 -04:00
isanae 88ff7bb372 made extraction errors translatable 2019-10-04 07:45:59 -04:00
isanae c17b0829dc emblemes -> emblems 2019-10-04 07:14:30 -04:00
isanae 27aec50c25 added tooltip for flags, reworded those copy/pasted from the mod list 2019-10-04 07:11:50 -04:00
isanae 2fe50f2ff3 Merge pull request #842 from isanae/dialog-settings
Dialog settings
2019-10-04 06:30:15 -04:00
isanae 239cfbe685 explicit tab order, seems to fix hang when switching tabs 2019-10-04 06:29:23 -04:00
Al e6a47bf8b7 Preemptively bump version to alpha build 3 so I don't forget next time. 2019-10-03 01:20:38 +02:00
isanae 75941afd34 fixed checkboxes not being set when opening the settings dialog 2019-10-02 18:28:31 -04:00
Al 17ebbc30c5 Set Plugins tab as default tab again after last commit. 2019-10-02 23:35:51 +02:00
Al b389161077 Made categories section (filters) resizable via a splitter. Correctly handled hiding and unhiding as well as saving the state between sessions. 2019-10-02 23:06:35 +02:00
Jeremy Rimpo ae55d08041 Capitalize the org name 2019-10-01 14:32:46 -05:00
Chris Djali de8b2883ed Add link to new DDS preview plugin 2019-10-01 12:58:40 +01:00
LostDragonist 8e3af100f9 Fix help text for optional ESP deactivate button 2019-09-28 17:01:42 -05:00
LostDragonist a7afc1664c Merge pull request #844 from LostDragonist/Develop
Fix md5 hashing for large download files
2019-09-28 08:13:42 -05:00
LostDragonist 4fe267b6b4 Fix md5 hashing for large download files
Previously, the md5 hashing was broken for download files larger
than about 2GB.  This was due to the maximum size of a QByteArray.
The hashing was broken up into 10MB chunks to correct this issue.

Additionally, a progress bar was added as hashing large files would
lock up the GUI.
2019-09-28 08:11:29 -05:00
isanae ec48a6d796 a few comments for ColorTable 2019-09-27 15:26:00 -04:00
isanae 51d664d76c moved color stuff to ColorTable, now shows sample text and icons 2019-09-27 15:20:02 -04:00
isanae 5d74bd3789 refactored addLanguages() a bit
changed some of the tooltips
2019-09-25 19:32:53 -04:00
isanae 8237a1c47f use QStyleFactory to get default styles instead of hardcoding them
don't display extensions in style combobox
2019-09-25 18:39:37 -04:00
isanae 01b2a8201d replaced color buttons by a QTableWidget 2019-09-25 18:24:08 -04:00
isanae 088f27fe48 changed the layout of the general settings tab
added option to disable checking for updates
removed online check, just try it and see
2019-09-23 19:10:19 -04:00
isanae 200b5283eb added center dialogs option
moved download list options to their own group box
renamed confusing "Download Meta Information" to "Show Meta Information"
2019-09-23 18:21:39 -04:00
isanae 829124d8b8 ensure windows are on screen 2019-09-23 17:52:46 -04:00
Al d0099f577e Changed label of executable dialog to be more clear about application icons. 2019-09-23 17:40:09 +02:00
isanae 5044a6cd2c Merge pull request #839 from isanae/even-more-logging
Even more logging
2019-09-22 15:14:53 -04:00
isanae c1a5f2ef73 refactored getSecurityProductsFromWMI() to stop using a lambda
security products now only need a guid, handles failures better
2019-09-21 21:27:45 -04:00
isanae 2feaed68b4 missing period 2019-09-20 01:19:01 -04:00
isanae b455659114 registry details when steam fails to start
typos
2019-09-20 00:45:22 -04:00
isanae 54871e7b56 added details to blacklist dialog 2019-09-19 17:14:09 -04:00
isanae 94b0c46342 TaskDialog for blacklisted, with button to change the blacklist 2019-09-19 17:10:30 -04:00
isanae cbfd3692ce TaskDialog for event log not running 2019-09-19 16:41:36 -04:00
isanae f92e2c376d TaskDialog for restarting as admin for steam
added a parent widget parameter to a bunch of places
fixed paths still getting changed even if folders can't be created
made private the member variables that were temporarily public during rework
2019-09-19 16:27:41 -04:00
isanae 9bac57e3e8 steam confirmation now using TaskDialog
fixed dialog choices not remembering files
2019-09-19 15:03:03 -04:00
isanae a5db7ed864 added Settings::isExecutableBlacklisted()
moved blacklisted confirmation to dialogs
2019-09-19 11:23:21 -04:00
isanae 8bc67a86d6 moved event log warning to dialogs 2019-09-19 11:17:52 -04:00
isanae c1ab18b614 moved the content of checkService() to env::getService(), refactored it 2019-09-19 11:14:14 -04:00
isanae c50722100c removed helper.h and helper.cpp, merged into spawn 2019-09-19 10:11:56 -04:00
isanae c603681115 moved helper stuff to spawn so it can reuse error handling
removed unused helper::init()
removed logging when deleting a credential that doesn't exist, happens all the time
2019-09-19 10:07:52 -04:00
LostDragonist f69559fe0b Update version to 2.2.2alpha1 2019-09-18 15:31:43 -05:00
LostDragonist 7f857711ce Merge pull request #837 from LostDragonist/Develop
Add translation to "New Executable"
2019-09-17 00:21:48 -05:00
LostDragonist ea20335240 Add translation to "New Executable" 2019-09-17 00:19:12 -05:00
LostDragonist 795d47e6ab Merge pull request #836 from LostDragonist/Develop
Automatically fill in the name of new executables
2019-09-17 00:08:58 -05:00
LostDragonist 1fec9da2d3 Automatically fill in the name of new executables
When the binary browse button is used to select a binary, this
will use the binary name to fill in the executable name if the
previous executable name stated with "New Executable".
2019-09-17 00:08:11 -05:00
LostDragonist 11bf4499c0 Merge pull request #835 from LostDragonist/Develop
Add placeholder text to notification dialog
2019-09-16 18:12:50 -05:00
LostDragonist 0ecac8f4c4 Add placeholder text to notification dialog
A lot of new users miss the fact you can click on a notification
to get more details about that notification.  This directs them
to click on stuff.
2019-09-16 16:45:11 -05:00
LostDragonist 0d6eb8bd4c Merge pull request #831 from LostDragonist/portable_lock
Add portable lock feature
2019-09-16 16:32:37 -05:00
isanae 09b95e3943 moved all spawn dialogs into a namespace
starting steam with spawn() instead of QProcess
dialogs for bad steam registry key and failure
refactored credentials code, added logging
add environment variables to env
2019-09-13 15:15:18 -04:00
isanae b867b0bccd refactored steam handling 2019-09-12 03:49:17 -04:00
isanae ac6bc5fd01 testForSteam() now uses env to get processes
moved processes from env.cpp to envmodule.cpp, merged what crash dumps did with what was in testForSteam()
2019-09-12 02:45:03 -04:00
isanae bf3d752780 made SpawnParameters public, changed to Qt types
removed 'suspended', not used
2019-09-12 01:48:48 -04:00
isanae 971cecf343 split spawnBinaryProcess() into spawn, no changes 2019-09-12 01:09:40 -04:00
isanae 0015a12cf8 rewritten spawn() to use std::wstring instead of manual buffers
error dialogs now use TaskDialog with more user-friendly text
2019-09-11 23:36:13 -04:00
isanae 06218502ed fixes for ExpanderWidget
removed dead code in MainWindow
2019-09-11 23:34:54 -04:00
isanae 09f98576e8 added env::getFileSecurity()
Environment gets stuff on demand
2019-09-11 23:33:23 -04:00
isanae 9c59c739d4 moved ExpanderWidget to uibase 2019-09-11 23:32:32 -04:00
LostDragonist 4d9c1db885 Add portable lock feature
If the file "portable.txt" is present in the application directory,
MO will force itself to be launched as a portable instance.  The
change game button and menu item are hidden to prevent the user
from changing out of the portable instance.
2019-09-11 11:45:32 -05:00
isanae 61956802b1 now logs in utc, added year to avoid confusion 2019-09-09 04:24:12 -04:00
isanae 635c0b7a06 log line and line number when there's an error with the locked order file 2019-09-09 03:24:09 -04:00
isanae 12e1a91e4f log desktop geometry
log more info on game plugin
2019-09-09 01:32:12 -04:00
isanae e08e605c85 added missing include guards
log free space on drives involved in paths
2019-09-09 01:32:12 -04:00
isanae 99fdbb2539 Merge pull request #830 from isanae/settings-interface
Settings interface
2019-09-09 01:25:01 -04:00
isanae d863e62c6e really remove ask_for_nexuspw, the 2.2.0 update code was using the wrong section 2019-09-08 08:09:38 -04:00
isanae da212968ca change the old servers map while processing updates instead of on-demand
statusbar_visible is not used anymore
2019-09-08 03:10:43 -04:00
isanae 4df40baea6 clean up old settings when updating 2019-09-08 01:23:17 -04:00
isanae c9397c3909 more documentation for settings
removed unused automaticLoginEnabled()
2019-09-08 00:53:10 -04:00
isanae 2a2af36a38 documentation for settings
renamed some PluginSettings members and moved them around
2019-09-08 00:27:45 -04:00
isanae 7f0fa1069f don't log widget and geometry setting changes
fixed mod info dialog tab order using different settings for read and write
mod info dialog now doesn't complain when no tab order exists in the settings
only remove section when the array is larger, prevents logging changes when nothing actually changed
2019-09-02 16:09:31 -04:00
isanae 209c27c7a2 only remove section when the array is larger, prevents logging changes when nothing actually changed
changed back section names that were originally lowercase, arrays end up in two different sections
2019-09-02 15:47:21 -04:00
isanae 3757aa3f53 split into settingsutilities 2019-09-02 15:07:35 -04:00
isanae e9dba260cb split settings into a bunch of classes
removed "get" from the getters that had it
2019-09-02 14:52:02 -04:00
isanae ec3fb7b350 removed duplicate useProxy()
use dedicated functions to set, get or remove settings, allows for logging
2019-09-02 12:56:50 -04:00
isanae 57bef2ab8d removed directinterface 2019-09-02 09:38:21 -04:00
isanae ca2a7da3f6 moved workarounds to settings 2019-09-02 09:35:11 -04:00
isanae a174d4a2aa moved plugins to settings 2019-09-02 09:22:45 -04:00
isanae 8708265f69 moved setting paths to Settings 2019-08-26 04:52:15 -04:00
isanae 2eee72da68 moved code for byte sizes and speed to uibase
added scoped classes for QSettings groups and arrays
servers logged on startup
2019-08-26 04:21:06 -04:00
isanae c42e5fb2fe changed total speed and count to a list of the last 5 downloads
existing servers now merged when retrieving the download links
download manager doesn't store the servers any more, queries the settings every time
2019-08-26 03:01:55 -04:00
isanae 896d80d02c server settings converted to array instead of byte array map
moved cleanup to ServerList
2019-08-26 01:31:56 -04:00
isanae aff3ee8fcf moved preferred servers into ServerList 2019-08-26 01:07:03 -04:00
isanae 36dbb4bad7 ServerList instead of a QList of ServerInfo
changed preferred to an int
moved all server settings to Settings
2019-08-26 00:48:25 -04:00
isanae 7395fbb754 made ServerInfo a class
moved server functions together in Settings
2019-08-26 00:21:41 -04:00
isanae b1687380c5 moved more nexus stuff to settings
settings tab remembered
2019-08-26 00:01:07 -04:00
isanae 4f1b15f0a1 changed crash dump type to use enum instead of int
added ColorSettings
settings dialog general and diag tabs don't use qsettings anymore
removed logging of setting changes, will be added back to Settings class
2019-08-24 16:07:07 -04:00
isanae baa32b99f5 finished moving mod info dialog directinterface to settings 2019-08-24 13:10:50 -04:00
isanae 0f712305c8 added settings for QTabWidget, checkable QAbstractButton and ExpanderWidget
removed directInterface() from mod info conflicts
2019-08-24 13:04:10 -04:00
isanae 2ffad7edf2 made member variables in SettingsTab private, added accessors
SettingsDialog now uses GeometrySaver
2019-08-17 13:20:53 -04:00
isanae dfa15218f3 passes callbacks to QuestionBoxMemory so it doesn't access the ini directly
fixed selected executable being empty after closing the edit dialog
put backup_install inside Settings
2019-08-17 12:42:27 -04:00
isanae 7cc5f22052 put tutorials in the settings
finished moving endorsement to settings
2019-08-17 08:27:13 -04:00
isanae d9cb15f1d1 put endorsement state and first start in settings 2019-08-17 07:42:37 -04:00
isanae 965eccb328 merged DockFixer into GeometrySettings
added combobox index to settings
2019-08-16 10:29:42 -04:00
isanae 0374291a34 StatusBar now inherits from QStatusBar to handle hide/show events
merged settings into saveVisibility() and restoreVisibility()
call MainWindow::storeSettings() earlier so widget visibility is still valid
2019-08-16 09:00:31 -04:00
isanae a5cb39aaf4 moved all geometry save, restore and reset to GeometrySettings
changed reset button in settings to restart immediately
2019-08-16 08:02:14 -04:00
isanae 3f487a5a6c merged toolbars into restoreToolbars() and saveToolbars()
added centerOnMainWindowMonitor(), now also used by validation dialog
added overloads for splitter, used by main splitter
fixed saveState() for QMainWindow calling the wrong function
2019-08-16 07:03:52 -04:00
isanae 799ddb1b24 added GeometrySaver
removed widget-specific functions in GeometrySettings, now using generic functions in Settings
removed some unused member variables in MainWindow
2019-08-16 06:03:05 -04:00
isanae 73626b2979 Merge pull request #817 from erri120/patch-1
Updated string of the hideAPICounterBox
2019-08-15 03:52:37 -04:00
erri120 3ca0a9fe1e Updated string of the hideAPICounterBox
The api counter box is in the bottom right corner since the last update. This change reflects that.
2019-08-14 15:38:31 +00:00
isanae 4d4f25d177 moved getting and setting executables to Settings 2019-08-05 13:10:21 -04:00
isanae ab14a8bac3 moved recent directories to Settings
use global cache variable instead of an instance inside a function
2019-08-04 07:51:12 -04:00
isanae 89415ca5c3 moved geometry handling to PreviewDialog
fixed dialogs not having a parent
2019-08-04 07:32:12 -04:00
isanae 4c6ccb3845 geo already saved by ListDialog 2019-08-04 07:20:30 -04:00
isanae ea3840a39d removed registerWidgetState(), was used just for header list headers, now saved and restored directly 2019-08-04 07:14:06 -04:00
isanae f387a670d1 moved mod list stuff to setupModList(), no changes 2019-08-04 06:58:15 -04:00
isanae 3d86f150ca moved geometry handling to ProblemsDialog and CategoriesDialog 2019-08-04 06:30:37 -04:00
isanae 61ad96cb54 moved geometry handling to ListDialog 2019-08-04 06:09:48 -04:00
isanae 37502f3884 removed convertVariant(), turns out value() does it
separator colors to settings
2019-08-04 06:09:48 -04:00
isanae cc3a16c6e9 moved geometry handling to mod info and overwrite dialogs 2019-08-04 06:09:48 -04:00
isanae 7eed0450e8 moved geometry handling to ProfilesDialog 2019-08-04 06:09:48 -04:00
isanae e40245abf4 moved geometry handling to EditExecutablesDialog itself 2019-08-04 06:09:48 -04:00
isanae e4418b95fa moved settings updates to Settings::processUpdates() 2019-08-04 06:09:48 -04:00
isanae 07f1ac7a96 split into GeometrySettings
removed most of storeSettings() from OrganizerCore: QSettings handles saving by itself, no need for that
removed topLevelSplitter from ui, unused since the log widget is in a dock
removed QSettings from MainWindow::readSettings()
replaced return values for some of the new getters in Settings to std::optional
2019-08-04 06:09:48 -04:00
isanae b6b01a52db removed mentions of QSettings from main.cpp
added necessary member functions in Settings
2019-08-04 06:09:47 -04:00
isanae a7df11a31d Merge pull request #808 from isanae/settings-rework
Settings rework
2019-08-03 09:31:19 -04:00
Jeremy Rimpo 80dd9222f3 Merge pull request #809 from isanae/logging-fixes
Logging fixes
2019-08-02 13:36:32 -05:00
isanae 5e98855847 create log directory sooner to handle creating new instances
reset the log file in case MO is restarted and the previously selected instance is deleted
switched back to single `mo_interface.log` file
2019-08-02 07:01:06 -04:00
isanae 712c8687c2 changed old whatsthis for prerelease
apparently, QFontMetrics::width() is deprecated
2019-08-02 05:33:57 -04:00
isanae 4099efcb5b rebased to new logging 2019-08-02 03:06:59 -04:00
isanae ee43c40598 removed obsolete load mechanisms 2019-08-02 03:06:59 -04:00
isanae a05862aaa1 cleaned up includes
removed commented out code
reordered member functions in Settings
2019-08-02 03:06:59 -04:00
isanae 107b396902 moved tabs to SettingsDialog
removed Settings::query(), main window now deals with SettingsDialog directly
2019-08-02 03:06:59 -04:00
isanae e8d7930eda split diagnostics tab
fixed log and crash dump directory links in label not working
2019-08-02 03:06:59 -04:00
isanae e4dcdb01ac split workarounds tab 2019-08-02 03:06:59 -04:00
isanae 55eafd62dd split plugins tab 2019-08-02 03:06:58 -04:00
isanae d91d0caba5 removed incorrect warning that steam password is unencrypted
split steam tab
2019-08-02 03:06:58 -04:00
isanae af95b3b863 renamed tab classes, clashing with mod info dialog
split nexus tab
2019-08-02 03:06:58 -04:00
isanae 0a5ce34b1a split paths tab 2019-08-02 03:06:58 -04:00
isanae 6b5c9675ae moved SettingsTab out of Settings
split general tab
2019-08-02 03:06:58 -04:00
Jeremy Rimpo cff526415d Merge pull request #807 from isanae/logging-rework
Logging rework
2019-08-02 01:49:33 -05:00
Jeremy Rimpo bdf45aea69 Merge pull request #806 from ModOrganizer2/qt-5.13
Qt 5.13
2019-08-02 00:33:02 -05:00
isanae e4cf2c314d missing bracket 2019-08-01 22:50:42 -04:00
isanae 9aa7a5a366 renamed log actions 2019-07-22 07:39:53 -04:00
isanae 6f1a8f5b7a added clear option to log list 2019-07-22 07:39:53 -04:00
isanae 3c7712a32d moved setLogLevel() to OrganizerCore
moved context menu to LogList
2019-07-22 07:39:53 -04:00
isanae 5304d52f93 removed some useless logging
initializing usvfs logging now logs strings for log level and crash dump type
2019-07-22 07:39:53 -04:00
isanae f49efd6d44 replaced formatSystemMessageQ() with formatSystemMessage()
replaced windowsErrorString() with formatSystemMessage()
2019-07-22 07:39:52 -04:00
isanae b3d0ddb0b7 changed qDebug() to log::debug()
removed some commented out logging
2019-07-22 07:39:52 -04:00
isanae e071dfdfaa changed qCritical() to log::error()
removed now unused vlog()
2019-07-22 07:36:38 -04:00
isanae aae6d6a5aa replaced qWarning() 2019-07-22 07:34:53 -04:00
isanae f13f5e21c4 replaced qInfo() with log::info() 2019-07-22 07:33:38 -04:00
isanae d8760ed8ad refactored Metrics and Display, no change in functionality 2019-07-22 07:33:38 -04:00
isanae b2a1e1391f split env 2019-07-22 07:33:38 -04:00
isanae f95479b981 log guid for security products 2019-07-22 07:33:38 -04:00
isanae c84240b759 only display "inactive" for security products 2019-07-22 07:33:38 -04:00
isanae 20ac714bf8 fixed bad compare for nahimic
log displays on startup
2019-07-22 07:33:38 -04:00
isanae 2ef32d1230 moved environment dump to member function
added check for nahimic
2019-07-22 07:33:38 -04:00
isanae 35ae099d3f check for files likely to be eaten by an AV on startup 2019-07-22 07:33:38 -04:00
isanae eb190380e3 dump executables on startup 2019-07-22 07:33:38 -04:00
isanae 28c46eed91 reversed log level menu actions to fit settings combobox
replaced qWarnings() and qCritical()
2019-07-22 07:33:38 -04:00
isanae 3bf7717c0a moved Settings out of OrganizerCore so it can be created by itself to access settings early
set log level on startup
replaced more qDebug()
2019-07-22 07:33:38 -04:00
isanae 4dfaa363c0 logging initialized early, log file set later
replaced a few qDebug()
2019-07-22 07:33:38 -04:00
isanae ad77e315f5 moved Console to util 2019-07-22 07:33:38 -04:00
isanae bca6283311 use log::Levels instead of ints
create log level combobox in code, set selected index based on value instead
added log level to context menu in log list
2019-07-22 07:33:37 -04:00
isanae d1b4dec8ad moved setup to new LogList class 2019-07-22 07:33:37 -04:00
isanae 6217f910f0 renamed logbuffer files to loglist 2019-07-22 07:33:37 -04:00
isanae 54d98e2917 removed unused or redundant stuff in error_report.h
renamed log() to vlog() for now
extracted console creation to Console class
rewrote LogBuffer to work with logging from uibase, renamed to LogModel
added fmt dependency
2019-07-22 07:33:37 -04:00
isanae bc9f286bce moved the log to a dock widget
added a menu item in the view menu for it
2019-07-22 07:32:56 -04:00
Jeremy Rimpo 1f1b838c2b Merge pull request #796 from isanae/login-progress-dialog
Nexus login progress dialog and Nexus settings
2019-07-22 01:02:21 -05:00
isanae 2d78957c3d changed message when opening browser 2019-07-14 17:20:53 -04:00
isanae b69b3e5e47 removed already commented out code:
don't resend the guid and token, nexus never answers with the api key, just create a new request every time
2019-07-12 03:24:05 -04:00
isanae 45daaec7aa removed useless flags, they were only used by settings 2019-07-12 03:09:03 -04:00
isanae 45f0a9e78a nexus info and stats in settings
cleaned up double logging for github
reset validation progress dialog parent just before the main window dies
removed unused APIStats from APIUserAccount, added isValid()
2019-07-12 02:46:31 -04:00
isanae be1ee2a97c refactored state messages 2019-07-11 05:49:12 -04:00
isanae 226372dba2 api key validator in settings 2019-07-11 05:33:35 -04:00
isanae c0a52bc1ca extracted api key validator from NXMAccessManager
api key now part of ApiUserAccount
2019-07-11 05:06:42 -04:00
isanae ad29525e98 moved NexusSSOLogin to nxmaccessmanager
added logs for manual key validation, will need to rewrite a few things
2019-07-11 02:31:59 -04:00
isanae 5e5681709a reworked the nexus connection panel
moved most of the stuff into a new NexusSSOLogin class
2019-07-11 01:55:31 -04:00
isanae f44663d795 handle context menu on pending downloads 2019-07-10 21:43:31 -04:00
isanae fa66028161 dialog should be on the heap, gets deleted by the main window 2019-07-10 20:45:37 -04:00
isanae d9003f9e54 made ValidationProgressDialog a QDialog to handle close events
allow hiding dialog and make it appear again if needed
don't use an event loop in validated(), it causes all sorts of problems because it can be reentrant if another logged in action is done while the dialog is visible
2019-07-10 20:45:37 -04:00
isanae 89d0528a00 progress dialog now shows elapsed time in progress bar 2019-07-10 20:45:37 -04:00
isanae ea7ad772bb moved progress dialog to its own class 2019-07-10 20:45:37 -04:00
isanae c38e864c92 set the progress dialog's parent to main window as soon as it's available 2019-07-10 20:45:37 -04:00
isanae 724945ab33 removed useless validationFailed() callback in MainWindow
moved the log that was in it to organizer core
2019-07-10 20:45:37 -04:00
Silarn 2b213fe7ce Merge branch 'Develop' into qt-5.13 2019-07-08 13:22:25 -05:00
Silarn d2a8890e74 Merge branch 'Develop' into qt-5.13 2019-07-05 18:40:03 -05:00
Silarn 5feff2f997 Merge remote-tracking branch 'origin/Develop' into qt-5.13 2019-07-05 16:28:33 -05:00
Silarn 9a795c3ce9 Merge remote-tracking branch 'origin/Develop' into qt-5.13 2019-07-04 23:14:39 -05:00
Silarn 7879ea2c62 Fix issue if widget isn't on a window 2019-07-04 15:09:49 -05:00
Silarn ccc0653ca1 Merge branch 'Develop' into qt-5.13 2019-07-03 21:29:22 -05:00
Silarn 3a2f056e8a More refactoring 2019-07-03 14:12:38 -05:00
Silarn aa9a1fc07f Refactor obsolete methods 2019-07-03 13:04:27 -05:00
307 changed files with 27199 additions and 27500 deletions
+7 -1
View File
@@ -1,6 +1,10 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
ADD_COMPILE_OPTIONS($<$<CXX_COMPILER_ID:MSVC>:/MP> $<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELEASE>:/O2>> $<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELWITHDEBINFO>:/O2>>)
ADD_COMPILE_OPTIONS(
$<$<CXX_COMPILER_ID:MSVC>:/MP>
$<$<CXX_COMPILER_ID:MSVC>:/D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING>
$<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELEASE>:/O2>>
$<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELWITHDEBINFO>:/O2>>)
PROJECT(organizer)
@@ -11,9 +15,11 @@ set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
set(CMAKE_INSTALL_MESSAGE NEVER)
SET(DEPENDENCIES_DIR CACHE PATH "")
# hint to find qt in dependencies path
LIST(APPEND CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
LIST(APPEND CMAKE_PREFIX_PATH ${LZ4_ROOT}/dll)
LIST(APPEND CMAKE_PREFIX_PATH ${FMT_ROOT}/build)
ADD_SUBDIRECTORY(src)
+40 -36
View File
@@ -43,44 +43,48 @@ MO2 consists of multiple repositories on github. The Umbrella project will downl
Here is a complete list:
* https://github.com/LePresidente/cpython-1
* https://github.com/Modorganizer2/githubpp
* https://github.com/Modorganizer2/modorganizer
* https://github.com/Modorganizer2/modorganizer-archive
* https://github.com/Modorganizer2/modorganizer-bsatk
* https://github.com/Modorganizer2/modorganizer-bsa_extractor
* https://github.com/Modorganizer2/modorganizer-check_fnis
* https://github.com/Modorganizer2/modorganizer-diagnose_basic
* https://github.com/Modorganizer2/modorganizer-esptk
* https://github.com/ModOrganizer2/githubpp
* https://github.com/ModOrganizer2/modorganizer
* https://github.com/ModOrganizer2/modorganizer-archive
* https://github.com/ModOrganizer2/modorganizer-bsatk
* https://github.com/ModOrganizer2/modorganizer-bsa_extractor
* https://github.com/ModOrganizer2/modorganizer-check_fnis
* https://github.com/ModOrganizer2/modorganizer-diagnose_basic
* https://github.com/ModOrganizer2/modorganizer-esptk
* https://github.com/ModOrganizer2/modorganizer-fnistool
* https://github.com/Modorganizer2/modorganizer-helper
* https://github.com/Modorganizer2/modorganizer-game_fallout3
* https://github.com/Modorganizer2/modorganizer-game_fallout4
* https://github.com/Modorganizer2/modorganizer-game_fallout4vr
* https://github.com/Modorganizer2/modorganizer-game_falloutnv
* https://github.com/Modorganizer2/modorganizer-game_features
* https://github.com/Modorganizer2/modorganizer-game_gamebryo
* https://github.com/Modorganizer2/modorganizer-game_morrowind
* https://github.com/Modorganizer2/modorganizer-game_oblivion
* https://github.com/Modorganizer2/modorganizer-game_skyrim
* https://github.com/Modorganizer2/modorganizer-game_skyrimSE
* https://github.com/ModOrganizer2/modorganizer-helper
* https://github.com/ModOrganizer2/modorganizer-game_enderal
* https://github.com/ModOrganizer2/modorganizer-game_fallout3
* https://github.com/ModOrganizer2/modorganizer-game_fallout4
* https://github.com/ModOrganizer2/modorganizer-game_fallout4vr
* https://github.com/ModOrganizer2/modorganizer-game_falloutnv
* https://github.com/ModOrganizer2/modorganizer-game_features
* https://github.com/ModOrganizer2/modorganizer-game_gamebryo
* https://github.com/ModOrganizer2/modorganizer-game_morrowind
* https://github.com/ModOrganizer2/modorganizer-game_oblivion
* 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_ttw
* https://github.com/Modorganizer2/modorganizer-installer_bain
* https://github.com/Modorganizer2/modorganizer-installer_bundle
* https://github.com/Modorganizer2/modorganizer-installer_fomod
* https://github.com/Modorganizer2/modorganizer-installer_manual
* https://github.com/Modorganizer2/modorganizer-installer_ncc
* https://github.com/Modorganizer2/modorganizer-installer_quick
* https://github.com/Modorganizer2/modorganizer-lootcli
* https://github.com/Modorganizer2/modorganizer-NCC
* https://github.com/Modorganizer2/modorganizer-nxmhandler
* https://github.com/Modorganizer2/modorganizer-plugin_python
* https://github.com/Modorganizer2/modorganizer-preview_base
* https://github.com/Modorganizer2/modorganizer-tool_configurator
* https://github.com/Modorganizer2/modorganizer-tool_inibakery
* https://github.com/Modorganizer2/modorganizer-uibase
* https://github.com/Modorganizer2/usvfs
* https://github.com/ModOrganizer2/modorganizer-game_ttw
* https://github.com/ModOrganizer2/modorganizer-installer_bain
* https://github.com/ModOrganizer2/modorganizer-installer_bundle
* https://github.com/ModOrganizer2/modorganizer-installer_fomod
* https://github.com/ModOrganizer2/modorganizer-installer_manual
* https://github.com/ModOrganizer2/modorganizer-installer_ncc
* https://github.com/ModOrganizer2/modorganizer-installer_quick
* https://github.com/ModOrganizer2/modorganizer-lootcli
* https://github.com/ModOrganizer2/modorganizer-NCC
* https://github.com/ModOrganizer2/modorganizer-nxmhandler
* https://github.com/ModOrganizer2/modorganizer-plugin_python
* https://github.com/ModOrganizer2/modorganizer-preview_base
* https://github.com/ModOrganizer2/modorganizer-preview_dds
* https://github.com/ModOrganizer2/modorganizer-form43_checker
* https://github.com/ModOrganizer2/modorganizer-script_extender_plugin_checker
* https://github.com/ModOrganizer2/modorganizer-tool_configurator
* https://github.com/ModOrganizer2/modorganizer-tool_inibakery
* https://github.com/ModOrganizer2/modorganizer-uibase
* https://github.com/ModOrganizer2/usvfs
### Unused Repositories
* https://github.com/Modorganizer2/modorganizer-hookdll
* https://github.com/ModOrganizer2/modorganizer-hookdll
* https://github.com/TanninOne/modorganizer-tool_nmmimport
+94 -26
View File
@@ -37,7 +37,15 @@ SET(organizer_SRCS
spawn.cpp
singleinstance.cpp
settingsdialog.cpp
settingsdialogdiagnostics.cpp
settingsdialoggeneral.cpp
settingsdialognexus.cpp
settingsdialogpaths.cpp
settingsdialogplugins.cpp
settingsdialogsteam.cpp
settingsdialogworkarounds.cpp
settings.cpp
settingsutilities.cpp
selfupdater.cpp
selectiondialog.cpp
queryoverwritedialog.cpp
@@ -73,13 +81,9 @@ SET(organizer_SRCS
mainwindow.cpp
main.cpp
loghighlighter.cpp
logbuffer.cpp
lockeddialogbase.cpp
lockeddialog.cpp
waitingonclosedialog.cpp
loglist.cpp
loadmechanism.cpp
installationmanager.cpp
helper.cpp
filedialogmemory.cpp
executableslist.cpp
editexecutablesdialog.cpp
@@ -110,6 +114,7 @@ SET(organizer_SRCS
previewdialog.cpp
aboutdialog.cpp
modflagicondelegate.cpp
modconflicticondelegate.cpp
genericicondelegate.cpp
organizerproxy.cpp
viewmarkingscrollbar.cpp
@@ -128,7 +133,19 @@ SET(organizer_SRCS
apiuseraccount.cpp
filerenamer.cpp
texteditor.cpp
expanderwidget.cpp
env.cpp
envmetrics.cpp
envmodule.cpp
envsecurity.cpp
envshortcut.cpp
envwindows.cpp
colortable.cpp
sanitychecks.cpp
processrunner.cpp
uilocker.cpp
loot.cpp
lootdialog.cpp
filterlist.cpp
shared/windows_error.cpp
shared/error_report.cpp
@@ -145,7 +162,15 @@ SET(organizer_HDRS
spawn.h
singleinstance.h
settingsdialog.h
settingsdialogdiagnostics.h
settingsdialoggeneral.h
settingsdialognexus.h
settingsdialogpaths.h
settingsdialogplugins.h
settingsdialogsteam.h
settingsdialogworkarounds.h
settings.h
settingsutilities.h
selfupdater.h
selectiondialog.h
queryoverwritedialog.h
@@ -181,13 +206,9 @@ SET(organizer_HDRS
messagedialog.h
mainwindow.h
loghighlighter.h
logbuffer.h
lockeddialogbase.h
lockeddialog.h
waitingonclosedialog.h
loglist.h
loadmechanism.h
installationmanager.h
helper.h
filedialogmemory.h
executableslist.h
editexecutablesdialog.h
@@ -218,12 +239,12 @@ SET(organizer_HDRS
previewdialog.h
aboutdialog.h
modflagicondelegate.h
modconflicticondelegate.h
genericicondelegate.h
organizerproxy.h
viewmarkingscrollbar.h
plugincontainer.h
organizercore.h
ilockedwaitingforprocess.h
iuserinterface.h
instancemanager.h
usvfsconnector.h
@@ -238,7 +259,19 @@ SET(organizer_HDRS
apiuseraccount.h
filerenamer.h
texteditor.h
expanderwidget.h
env.h
envmetrics.h
envmodule.h
envsecurity.h
envshortcut.h
envwindows.h
colortable.h
processrunner.h
uilocker.h
loot.h
lootdialog.h
json.h
filterlist.h
shared/windows_error.h
shared/error_report.h
@@ -262,8 +295,6 @@ SET(organizer_UIS
modinfodialog.ui
messagedialog.ui
mainwindow.ui
lockeddialog.ui
waitingonclosedialog.ui
editexecutablesdialog.ui
credentialsdialog.ui
categoriesdialog.ui
@@ -293,11 +324,13 @@ SET(organizer_RCS
source_group(src REGULAR_EXPRESSION ".*\\.(h|cpp|ui)")
set(application
filterlist
iuserinterface
main
mainwindow
moapplication
moshortcut
sanitychecks
selfupdater
singleinstance
statusbar
@@ -320,6 +353,8 @@ set(core
organizercore
organizerproxy
apiuseraccount
processrunner
uilocker
)
set(dialogs
@@ -350,15 +385,23 @@ set(downloads
downloadmanager
)
set(env
env
envmetrics
envmodule
envsecurity
envshortcut
envwindows
)
set(executables
executableslist
editexecutablesdialog
)
set(locking
ilockedwaitingforprocess
lockeddialog
lockeddialogbase
set(loot
loot
lootdialog
)
set(modinfo
@@ -409,7 +452,18 @@ set(profiles
set(settings
settings
settingsutilities
)
set(settingsdialog
settingsdialog
settingsdialogdiagnostics
settingsdialoggeneral
settingsdialognexus
settingsdialogpaths
settingsdialogplugins
settingsdialogsteam
settingsdialogworkarounds
)
set(utilities
@@ -418,7 +472,6 @@ set(utilities
csvbuilder
shared/error_report
eventfilter
helper
shared/leaktrace
persistentcookiejar
serverinfo
@@ -427,18 +480,20 @@ set(utilities
shared/util
usvfsconnector
shared/windows_error
json
)
set(widgets
expanderwidget
colortable
genericicondelegate
filerenamer
filterwidget
icondelegate
lcdnumber
logbuffer
loglist
loghighlighter
modflagicondelegate
modconflicticondelegate
modidlineedit
noeditdelegate
qtgroupingproxy
@@ -447,8 +502,9 @@ set(widgets
)
set(src_filters
application core browser dialogs downloads executables locking modinfo modinfo\\dialog
modlist plugins previews profiles settings utilities widgets
application core browser dialogs downloads env executables loot modinfo
modinfo\\dialog modlist plugins previews profiles settings settingsdialog
utilities widgets
)
foreach(filter in list ${src_filters})
@@ -520,15 +576,20 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
FIND_PACKAGE(zlib REQUIRED)
# TODO FindZlib doesn't find the static zlib library
# fmt
find_package(fmt REQUIRED)
INCLUDE_DIRECTORIES(${project_path}/uibase/src
${project_path}/bsatk/src
${project_path}/esptk/src
${project_path}/archive/src
${project_path}/lootcli/include
${dependency_project_path}/usvfs/include
${project_path}/game_gamebryo/src/gamebryo
${project_path}/game_gamebryo/src/creation
${project_path}/game_features/src
${project_path}/githubpp/src
${SPDLOG_ROOT}/include
${LZ4_ROOT}/lib)
INCLUDE_DIRECTORIES(shared ${ZLIB_INCLUDE_DIRS})
@@ -551,10 +612,11 @@ ELSE()
ENDIF()
ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIS} ${organizer_RCS} ${organizer_QRCS} ${organizer_translations_qm})
TARGET_LINK_LIBRARIES(ModOrganizer
Qt5::Widgets Qt5::WinExtras Qt5::WebEngineWidgets Qt5::Quick
Qt5::Qml Qt5::QuickWidgets Qt5::Network Qt5::WebSockets
${Boost_LIBRARIES}
${Boost_LIBRARIES} fmt::fmt
zlibstatic
uibase esptk bsatk githubpp
${usvfs_name}
@@ -610,6 +672,10 @@ INSTALL(
${qt5bin}/windeployqt.exe --verbose 0 uibase.dll ${windeploy_parameters}
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
)
EXECUTE_PROCESS(COMMAND
${qt5bin}/windeployqt.exe --verbose 0 plugins/bsa_packer.dll ${windeploy_parameters}
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
)
file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/bin/platforms)
file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/bin/styles)
file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/bin/dlls/imageformats)
@@ -620,4 +686,6 @@ 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 ${CMAKE_CURRENT_SOURCE_DIR}/../qdds.dll DESTINATION bin/dlls/imageformats)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/markdown.html DESTINATION bin/resources)
+3
View File
@@ -20,6 +20,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "aboutdialog.h"
#include "ui_aboutdialog.h"
#include "util.h"
#include <utility.h>
#include <QApplication>
@@ -85,6 +86,8 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
ui->revisionLabel->setText(ui->revisionLabel->text() + " unknown");
#endif
ui->usvfsLabel->setText(ui->usvfsLabel->text() + " " + MOShared::getUsvfsVersionString());
ui->licenseText->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
}
+31 -7
View File
@@ -104,6 +104,13 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="usvfsLabel">
<property name="text">
<string>usvfs:</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@@ -151,9 +158,9 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="sourceText">
<widget class="LinkLabel" name="sourceText">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Source code can be found at &lt;a href=&quot;https://github.com/ModOrganizer2/modorganizer&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;GitHub&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Source code can be found at &lt;a href=&quot;https://github.com/ModOrganizer2/modorganizer&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -208,6 +215,11 @@
<string notr="true">LostDragonist</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">isanae</string>
</property>
</item>
</widget>
</item>
</layout>
@@ -234,11 +246,6 @@
<string notr="true">erasmux</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">isanae</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Project579</string>
@@ -320,6 +327,11 @@
<string notr="true">pndrev (German)</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Xahtax (German)</string>
</property>
</item>
<item>
<property name="text">
<string>yohru (Japanese)</string>
@@ -462,6 +474,11 @@
<string notr="true">outdatedtv</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">reedts</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Schilduin</string>
@@ -529,6 +546,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>LinkLabel</class>
<extends>QLabel</extends>
<header location="global">linklabel.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="resources.qrc"/>
</resources>
+34 -1
View File
@@ -1,10 +1,37 @@
#include "apiuseraccount.h"
QString localizedUserAccountType(APIUserAccountTypes t)
{
switch (t)
{
case APIUserAccountTypes::Regular:
return QObject::tr("Regular");
case APIUserAccountTypes::Premium:
return QObject::tr("Premium");
case APIUserAccountTypes::None: // fall-through
default:
return QObject::tr("None");
}
}
APIUserAccount::APIUserAccount()
: m_type(APIUserAccountTypes::None)
{
}
bool APIUserAccount::isValid() const
{
return !m_key.isEmpty();
}
const QString& APIUserAccount::apiKey() const
{
return m_key;
}
const QString& APIUserAccount::id() const
{
return m_id;
@@ -25,6 +52,12 @@ const APILimits& APIUserAccount::limits() const
return m_limits;
}
APIUserAccount& APIUserAccount::apiKey(const QString& key)
{
m_key = key;
return *this;
}
APIUserAccount& APIUserAccount::id(const QString& id)
{
m_id = id;
@@ -63,5 +96,5 @@ bool APIUserAccount::shouldThrottle() const
bool APIUserAccount::exhausted() const
{
return (remainingRequests() <= 0);
return isValid() && (remainingRequests() <= 0);
}
+22 -5
View File
@@ -18,6 +18,8 @@ enum class APIUserAccountTypes
Premium
};
QString localizedUserAccountType(APIUserAccountTypes t);
/**
* current limits imposed on the user account
@@ -49,17 +51,28 @@ struct APIStats
/**
* represents a user account on the mod provier website
* represents a user account on the mod provider website
*/
class APIUserAccount
{
public:
// when the number of remanining requests is under this number, further
// when the number of remaining requests is under this number, further
// requests will be throttled by avoiding non-critical ones
static const int ThrottleThreshold = 200;
APIUserAccount();
/**
* whether the user is logged in
*/
bool isValid() const;
/**
* api key
*/
const QString& apiKey() const;
/**
* user id
*/
@@ -81,6 +94,11 @@ public:
const APILimits& limits() const;
/**
* sets the api key
*/
APIUserAccount& apiKey(const QString& key);
/**
* sets the user id
*/
@@ -92,7 +110,7 @@ public:
APIUserAccount& name(const QString& name);
/**
* sets the acount type
* sets the account type
*/
APIUserAccount& type(APIUserAccountTypes type);
@@ -120,10 +138,9 @@ public:
bool exhausted() const;
private:
QString m_id, m_name;
QString m_key, m_id, m_name;
APIUserAccountTypes m_type;
APILimits m_limits;
APIStats m_stats;
};
#endif // APIUSERACCOUNT_H
+4 -5
View File
@@ -18,13 +18,13 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bbcode.h"
#include <log.h>
#include <QRegExp>
#include <map>
namespace BBCode {
namespace log = MOBase::log;
class BBCodeMap {
@@ -88,7 +88,7 @@ public:
return temp.replace(tagIter->second.first, QString("<font style=\"color: #%1;\">%2</font>").arg(color, content));
}
} else {
qWarning("don't know how to deal with tag %s", qUtf8Printable(tagName));
log::warn("don't know how to deal with tag {}", tagName);
}
} else {
if (tagName == "*") {
@@ -99,8 +99,7 @@ public:
} else {
// expression doesn't match. either the input string is invalid
// or the expression is
qWarning("%s doesn't match the expression for %s",
qUtf8Printable(temp), qUtf8Printable(tagName));
log::warn("{} doesn't match the expression for {}", temp, tagName);
length = 0;
return QString();
}
+12 -11
View File
@@ -24,9 +24,10 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "messagedialog.h"
#include "report.h"
#include "persistentcookiejar.h"
#include "settings.h"
#include <utility.h>
#include "settings.h"
#include <log.h>
#include <QWebEngineSettings>
#include <QNetworkCookieJar>
@@ -35,9 +36,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QInputDialog>
#include <QWebEngineHistory>
#include <QDir>
#include <QDesktopWidget>
#include <QKeyEvent>
using namespace MOBase;
BrowserDialog::BrowserDialog(QWidget *parent)
@@ -48,7 +49,7 @@ BrowserDialog::BrowserDialog(QWidget *parent)
ui->setupUi(this);
m_AccessManager->setCookieJar(new PersistentCookieJar(
QDir::fromNativeSeparators(Settings::instance().getCacheDirectory() + "/cookies.dat")));
QDir::fromNativeSeparators(Settings::instance().paths().cache() + "/cookies.dat")));
Qt::WindowFlags flags = windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint;
Qt::WindowFlags helpFlag = Qt::WindowContextHelpButtonHint;
@@ -71,7 +72,7 @@ BrowserDialog::~BrowserDialog()
void BrowserDialog::closeEvent(QCloseEvent *event)
{
// m_AccessManager->showCookies();
Settings::instance().geometry().saveGeometry(this);
QDialog::closeEvent(event);
}
@@ -125,6 +126,7 @@ void BrowserDialog::urlChanged(const QUrl &url)
void BrowserDialog::openUrl(const QUrl &url)
{
if (isHidden()) {
Settings::instance().geometry().restoreGeometry(this);
show();
}
openInNewTab(url);
@@ -138,9 +140,8 @@ void BrowserDialog::maximizeWidth()
int contentWidth = getCurrentView()->page()->contentsSize().width();
QDesktopWidget screen;
int currentScreen = screen.screenNumber(this);
int screenWidth = screen.screenGeometry(currentScreen).size().width();
QScreen* screen = this->window()->windowHandle()->screen();
int screenWidth = screen->geometry().size().width();
int targetWidth = std::min<int>(std::max<int>(viewportWidth, contentWidth) + frameWidth, screenWidth);
this->resize(targetWidth, height());
@@ -192,12 +193,12 @@ void BrowserDialog::unsupportedContent(QNetworkReply *reply)
try {
QWebEnginePage *page = qobject_cast<QWebEnginePage*>(sender());
if (page == nullptr) {
qCritical("sender not a page");
log::error("sender not a page");
return;
}
BrowserView *view = qobject_cast<BrowserView*>(page->view());
if (view == nullptr) {
qCritical("no view?");
log::error("no view?");
return;
}
@@ -206,14 +207,14 @@ void BrowserDialog::unsupportedContent(QNetworkReply *reply)
if (isVisible()) {
MessageDialog::showMessage(tr("failed to start download"), this);
}
qCritical("exception downloading unsupported content: %s", e.what());
log::error("exception downloading unsupported content: {}", e.what());
}
}
void BrowserDialog::downloadRequested(const QNetworkRequest &request)
{
qCritical("download request %s ignored", request.url().toString().toUtf8().constData());
log::error("download request {} ignored", request.url().toString());
}
+44 -8
View File
@@ -21,6 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <utility.h>
#include <report.h>
#include <log.h>
#include <QObject>
#include <QFile>
@@ -61,8 +62,9 @@ void CategoryFactory::loadCategories()
++lineNum;
QList<QByteArray> cells = line.split('|');
if (cells.count() != 4) {
qCritical("invalid category line %d: %s (%d cells)",
lineNum, line.constData(), cells.count());
log::error(
"invalid category line {}: {} ({} cells)",
lineNum, line.constData(), cells.count());
} else {
std::vector<int> nexusIDs;
if (cells[2].length() > 0) {
@@ -72,7 +74,7 @@ void CategoryFactory::loadCategories()
bool ok = false;
int temp = iter->toInt(&ok);
if (!ok) {
qCritical("invalid category id %s", iter->constData());
log::error("invalid category id {}", iter->constData());
}
nexusIDs.push_back(temp);
}
@@ -82,8 +84,7 @@ void CategoryFactory::loadCategories()
int id = cells[0].toInt(&cell0Ok);
int parentID = cells[3].trimmed().toInt(&cell3Ok);
if (!cell0Ok || !cell3Ok) {
qCritical("invalid category line %d: %s",
lineNum, line.constData());
log::error("invalid category line {}: {}", lineNum, line.constData());
}
addCategory(id, QString::fromUtf8(cells[1].constData()), nexusIDs, parentID);
}
@@ -294,7 +295,7 @@ bool CategoryFactory::isDecendantOf(int id, int parentID) const
return isDecendantOf(m_Categories[index].m_ParentID, parentID);
}
} else {
qWarning("%d is no valid category id", id);
log::warn("{} is no valid category id", id);
return false;
}
}
@@ -319,6 +320,41 @@ QString CategoryFactory::getCategoryName(unsigned int index) const
return m_Categories[index].m_Name;
}
QString CategoryFactory::getSpecialCategoryName(SpecialCategories type) const
{
QString label;
switch (type)
{
case Checked: label = QObject::tr("Active"); break;
case UpdateAvailable: label = QObject::tr("Update available"); break;
case HasCategory: label = QObject::tr("Has category"); break;
case Conflict: label = QObject::tr("Conflicted"); break;
case Endorsed: label = QObject::tr("Endorsed"); break;
case Backup: label = QObject::tr("Has backup"); break;
case Managed: label = QObject::tr("Managed"); break;
case HasGameData: label = QObject::tr("Has valid game data"); break;
case HasNexusID: label = QObject::tr("Has Nexus ID"); break;
case Tracked: label = QObject::tr("Tracked on Nexus"); break;
default: return {};
}
return QString("<%1>").arg(label);
}
QString CategoryFactory::getCategoryNameByID(int id) const
{
auto itor = m_IDMap.find(id);
if (itor == m_IDMap.end()) {
return getSpecialCategoryName(static_cast<SpecialCategories>(id));
} else {
const auto index = itor->second;
if (index >= m_Categories.size()) {
return {};
}
return m_Categories[index].m_Name;
}
}
int CategoryFactory::getCategoryID(unsigned int index) const
{
@@ -359,10 +395,10 @@ unsigned int CategoryFactory::resolveNexusID(int nexusID) const
{
std::map<int, unsigned int>::const_iterator iter = m_NexusMap.find(nexusID);
if (iter != m_NexusMap.end()) {
qDebug("nexus category id %d maps to internal %d", nexusID, iter->second);
log::debug("nexus category id {} maps to internal {}", nexusID, iter->second);
return iter->second;
} else {
qDebug("nexus category id %d not mapped", nexusID);
log::debug("nexus category id {} not mapped", nexusID);
return 0U;
}
}
+15 -15
View File
@@ -37,23 +37,21 @@ class CategoryFactory {
friend class CategoriesDialog;
public:
static const int CATEGORY_NONE = 0;
static const int CATEGORY_SPECIAL_FIRST = 10000;
static const int CATEGORY_SPECIAL_CHECKED = CATEGORY_SPECIAL_FIRST;
static const int CATEGORY_SPECIAL_UNCHECKED = 10001;
static const int CATEGORY_SPECIAL_UPDATEAVAILABLE = 10002;
static const int CATEGORY_SPECIAL_NOCATEGORY = 10003;
static const int CATEGORY_SPECIAL_CONFLICT = 10004;
static const int CATEGORY_SPECIAL_NOTENDORSED = 10005;
static const int CATEGORY_SPECIAL_BACKUP = 10006;
static const int CATEGORY_SPECIAL_MANAGED = 10007;
static const int CATEGORY_SPECIAL_UNMANAGED = 10008;
enum SpecialCategories
{
Checked = 10000,
UpdateAvailable,
HasCategory,
Conflict,
Endorsed,
Backup,
Managed,
HasGameData,
HasNexusID,
Tracked
};
public:
struct Category {
Category(int sortValue, int id, const QString &name, const std::vector<int> &nexusIDs, int parentID)
: m_SortValue(sortValue), m_ID(id), m_Name(name), m_HasChildren(false),
@@ -142,6 +140,8 @@ public:
* @return QString name of the category
**/
QString getCategoryName(unsigned int index) const;
QString getSpecialCategoryName(SpecialCategories type) const;
QString getCategoryNameByID(int id) const;
/**
* @brief look up the id of a category by its index
+7
View File
@@ -21,6 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "ui_categoriesdialog.h"
#include "categories.h"
#include "utility.h"
#include "settings.h"
#include <QItemDelegate>
#include <QRegExpValidator>
#include <QLineEdit>
@@ -109,6 +110,12 @@ CategoriesDialog::~CategoriesDialog()
delete ui;
}
int CategoriesDialog::exec()
{
GeometrySaver gs(Settings::instance(), this);
return QDialog::exec();
}
void CategoriesDialog::cellChanged(int row, int)
{
+5 -1
View File
@@ -33,12 +33,16 @@ class CategoriesDialog;
class CategoriesDialog : public MOBase::TutorableDialog
{
Q_OBJECT
public:
explicit CategoriesDialog(QWidget *parent = 0);
~CategoriesDialog();
// also saves and restores geometry
//
int exec() override;
/**
* @brief store changes here to the global categories store (categories.h)
*
+334
View File
@@ -0,0 +1,334 @@
#include "colortable.h"
#include "modflagicondelegate.h"
#include "modconflicticondelegate.h"
#include "settings.h"
class ColorItem;
ColorItem* colorItemForRow(QTableWidget* table, int row);
void paintBackground(
QTableWidget* table, QPainter* p, const QStyleOptionViewItem& option,
const QModelIndex& index);
// delegate for the sample text column; paints the background color
//
class ColoredBackgroundDelegate : public QStyledItemDelegate
{
public:
ColoredBackgroundDelegate(QTableWidget* table)
: m_table(table)
{
}
void paint(
QPainter* p, const QStyleOptionViewItem& option,
const QModelIndex& index) const override
{
paintBackground(m_table, p, option, index);
QStyleOptionViewItem itemOption(option);
initStyleOption(&itemOption, index);
// paint the default stuff like text, but override the state to avoid
// destroying the background for selected items, etc.
itemOption.state = QStyle::State_Enabled;
QStyledItemDelegate::paint(p, itemOption, index);
}
private:
QTableWidget* m_table;
};
// delegate for the icons column; paints the background and icons
//
class FakeModFlagIconDelegate : public ModFlagIconDelegate
{
public:
explicit FakeModFlagIconDelegate(QTableWidget* table)
: m_table(table)
{
}
void paint(
QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const override
{
paintBackground(m_table, painter, option, index);
ModFlagIconDelegate::paintIcons(painter, option, index, getIcons(index));
}
protected:
QList<QString> getIcons(const QModelIndex& index) const override
{
const auto flags = {
ModInfo::FLAG_BACKUP,
ModInfo::FLAG_NOTENDORSED,
ModInfo::FLAG_NOTES,
ModInfo::FLAG_ALTERNATE_GAME
};
return getIconsForFlags(flags, false);
}
size_t getNumIcons(const QModelIndex& index) const override
{
return getIcons(index).size();
}
private:
QTableWidget* m_table;
};
// delegate for the icons column; paints the background and icons
//
class FakeModConflictIconDelegate : public ModConflictIconDelegate
{
public:
explicit FakeModConflictIconDelegate(QTableWidget* table)
: m_table(table)
{
}
void paint(
QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const override
{
paintBackground(m_table, painter, option, index);
ModFlagIconDelegate::paintIcons(painter, option, index, getIcons(index));
}
protected:
QList<QString> getIcons(const QModelIndex& index) const override
{
const auto flags = {
ModInfo::FLAG_CONFLICT_MIXED,
ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE,
ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN,
ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED
};
return getIconsForFlags(flags, false);
}
size_t getNumIcons(const QModelIndex& index) const override
{
return getIcons(index).size();
}
private:
QTableWidget* m_table;
};
// item used in the first column of the table
//
class ColorItem : public QTableWidgetItem
{
public:
ColorItem(
QString caption, QColor defaultColor,
std::function<QColor ()> get,
std::function<void (const QColor&)> commit) :
m_caption(std::move(caption)), m_default(defaultColor),
m_get(get), m_commit(commit)
{
setText(m_caption);
set(get());
}
// color caption
//
const QString& caption() const
{
return m_caption;
}
// the current color
//
QColor get() const
{
return m_temp;
}
// sets the current color, commit() must be called to save it
//
bool set(const QColor& c)
{
if (m_temp != c) {
m_temp = c;
return true;
}
return false;
}
// resets the current color, commit() must be called to save it
//
bool reset()
{
return set(m_default);
}
// saves the current color
//
void commit()
{
m_commit(m_temp);
}
private:
const QString m_caption;
const QColor m_default;
std::function<QColor ()> m_get;
std::function<void (const QColor&)> m_commit;
QColor m_temp;
};
ColorItem* colorItemForRow(QTableWidget* table, int row)
{
return dynamic_cast<ColorItem*>(table->item(row, 0));
}
template <class F>
void forEachColorItem(QTableWidget* table, F&& f)
{
const auto rowCount = table->rowCount();
for (int i=0; i<rowCount; ++i) {
if (auto* ci=colorItemForRow(table, i)) {
f(ci);
}
}
}
void paintBackground(
QTableWidget* table, QPainter* p, const QStyleOptionViewItem& option,
const QModelIndex& index)
{
if (auto* ci=colorItemForRow(table, index.row())) {
p->save();
p->fillRect(option.rect, ci->get());
p->restore();
}
}
ColorTable::ColorTable(QWidget* parent)
: QTableWidget(parent), m_settings(nullptr)
{
setColumnCount(4);
setHorizontalHeaderLabels({"", "", "", ""});
setItemDelegateForColumn(1, new ColoredBackgroundDelegate(this));
setItemDelegateForColumn(2, new FakeModConflictIconDelegate(this));
setItemDelegateForColumn(3, new FakeModFlagIconDelegate(this));
connect(
this, &QTableWidget::cellActivated,
[&]{ onColorActivated(); });
}
void ColorTable::load(Settings& s)
{
m_settings = &s;
addColor(
QObject::tr("Is overwritten (loose files)"),
QColor(0, 255, 0, 64),
[this]{ return m_settings->colors().modlistOverwrittenLoose(); },
[this](auto&& v){ m_settings->colors().setModlistOverwrittenLoose(v); });
addColor(
QObject::tr("Is overwriting (loose files)"),
QColor(255, 0, 0, 64),
[this]{ return m_settings->colors().modlistOverwritingLoose(); },
[this](auto&& v){ m_settings->colors().setModlistOverwritingLoose(v); });
addColor(
QObject::tr("Is overwritten (archives)"),
QColor(0, 255, 255, 64),
[this]{ return m_settings->colors().modlistOverwrittenArchive(); },
[this](auto&& v){ m_settings->colors().setModlistOverwrittenArchive(v); });
addColor(
QObject::tr("Is overwriting (archives)"),
QColor(255, 0, 255, 64),
[this]{ return m_settings->colors().modlistOverwritingArchive(); },
[this](auto&& v){ m_settings->colors().setModlistOverwritingArchive(v); });
addColor(
QObject::tr("Mod contains selected plugin"),
QColor(0, 0, 255, 64),
[this]{ return m_settings->colors().modlistContainsPlugin(); },
[this](auto&& v){ m_settings->colors().setModlistContainsPlugin(v); });
addColor(
QObject::tr("Plugin is contained in selected mod"),
QColor(0, 0, 255, 64),
[this]{ return m_settings->colors().pluginListContained(); },
[this](auto&& v){ m_settings->colors().setPluginListContained(v); });
}
void ColorTable::resetColors()
{
bool changed = false;
forEachColorItem(this, [&](auto* item) {
if (item->reset()) {
changed = true;
}
});
if (changed) {
update();
}
}
void ColorTable::commitColors()
{
forEachColorItem(this, [](auto* item) {
item->commit();
});
}
void ColorTable::addColor(
const QString& text, const QColor& defaultColor,
std::function<QColor ()> get,
std::function<void (const QColor&)> commit)
{
const auto r = rowCount();
setRowCount(r + 1);
setItem(r, 0, new ColorItem(text, defaultColor, get, commit));
setItem(r, 1, new QTableWidgetItem("Text"));
setItem(r, 2, new QTableWidgetItem);
resizeColumnsToContents();
}
void ColorTable::onColorActivated()
{
const auto rows = selectionModel()->selectedRows();
if (rows.isEmpty()) {
return;
}
const auto row = rows[0].row();
auto* ci = colorItemForRow(this, row);
if (!ci) {
return;
}
const QColor result = QColorDialog::getColor(
ci->get(), topLevelWidget(), ci->caption(), QColorDialog::ShowAlphaChannel);
if (result.isValid()) {
ci->set(result);
update(model()->index(row, 1));
}
}
+39
View File
@@ -0,0 +1,39 @@
#ifndef COLORTABLE_H
#define COLORTABLE_H
#include <QTableWidget>
class Settings;
// a QTableWidget to view and modify color settings
//
class ColorTable : public QTableWidget
{
public:
ColorTable(QWidget* parent=nullptr);
// adds colors to the table from the settings
//
void load(Settings& s);
// resets the colors to their default values; commitColors() must be called
// to save them
//
void resetColors();
// commits any changes
//
void commitColors();
private:
Settings* m_settings;
void addColor(
const QString& text, const QColor& defaultColor,
std::function<QColor ()> get,
std::function<void (const QColor&)> commit);
void onColorActivated();
};
#endif // COLORTABLE_H
+2 -2
View File
@@ -127,7 +127,7 @@ void DirectoryRefresher::addModFilesToStructure(DirectoryEntry *directoryStructu
FilesOrigin &origin = directoryStructure->createOrigin(ToWString(modName), directoryW, priority);
for (const QString &filename : stealFiles) {
if (filename.isEmpty()) {
qWarning("Trying to find file with no name");
log::warn("Trying to find file with no name");
continue;
}
QFileInfo fileInfo(filename);
@@ -143,7 +143,7 @@ void DirectoryRefresher::addModFilesToStructure(DirectoryEntry *directoryStructu
QString warnStr = fileInfo.absolutePath();
if (warnStr.isEmpty())
warnStr = filename;
qWarning("file not found: %s", qUtf8Printable(warnStr));
log::warn("file not found: {}", warnStr);
}
}
} else {
+13 -22
View File
@@ -19,12 +19,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "downloadlist.h"
#include "downloadmanager.h"
#include <utility.h>
#include <log.h>
#include <QEvent>
#include <QColor>
#include <QIcon>
#include <QSortFilterProxyModel>
using namespace MOBase;
DownloadList::DownloadList(DownloadManager *manager, QObject *parent)
: QAbstractTableModel(parent), m_Manager(manager)
@@ -75,6 +77,7 @@ QVariant DownloadList::headerData(int section, Qt::Orientation orientation, int
case COL_SIZE: return tr("Size");
case COL_STATUS: return tr("Status");
case COL_FILETIME: return tr("Filetime");
case COL_SOURCEGAME: return tr("Source Game");
default: return QVariant();
}
} else {
@@ -116,11 +119,17 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const
if (m_Manager->isInfoIncomplete(index.row())) {
return {};
} else {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(index.row());
return QString("%1").arg(m_Manager->getModID(index.row()));
}
}
case COL_SIZE: return sizeFormat(m_Manager->getFileSize(index.row()));
case COL_SOURCEGAME: {
if (m_Manager->isInfoIncomplete(index.row())) {
return {};
} else {
return QString("%1").arg(m_Manager->getDisplayGameName(index.row()));
}
}
case COL_SIZE: return MOBase::localizedByteSize(m_Manager->getFileSize(index.row()));
case COL_FILETIME: return m_Manager->getFileTime(index.row());
case COL_STATUS:
switch (m_Manager->getState(index.row())) {
@@ -192,23 +201,5 @@ void DownloadList::update(int row)
else if (row < this->rowCount())
emit dataChanged(this->index(row, 0, QModelIndex()), this->index(row, this->columnCount(QModelIndex())-1, QModelIndex()));
else
qCritical("invalid row %d in download list, update failed", row);
}
QString DownloadList::sizeFormat(quint64 size) const
{
qreal calc = size;
QStringList list;
list << "MB" << "GB" << "TB";
QStringListIterator i(list);
QString unit("KB");
calc /= 1024.0;
while (calc >= 1024.0 && i.hasNext()) {
unit = i.next();
calc /= 1024.0;
}
return QString().setNum(calc, 'f', 2) + " " + unit;
log::error("invalid row {} in download list, update failed", row);
}
+1 -2
View File
@@ -43,6 +43,7 @@ public:
COL_MODNAME,
COL_VERSION,
COL_ID,
COL_SOURCEGAME,
// number of columns
COL_COUNT
@@ -99,8 +100,6 @@ private:
DownloadManager *m_Manager;
bool m_MetaDisplay;
QString sizeFormat(quint64 size) const;
};
#endif // DOWNLOADLIST_H
+3 -1
View File
@@ -96,6 +96,8 @@ bool DownloadListSortProxy::lessThan(const QModelIndex &left,
return m_Manager->getFileSize(left.row()) < m_Manager->getFileSize(right.row());
} else if (left.column() == DownloadList::COL_FILETIME) {
return m_Manager->getFileTime(left.row()) < m_Manager->getFileTime(right.row());
} else if (left.column() == DownloadList::COL_SOURCEGAME) {
return m_Manager->getDisplayGameName(left.row()) < m_Manager->getDisplayGameName(right.row());
} else {
return leftIndex < rightIndex;
}
@@ -110,7 +112,7 @@ bool DownloadListSortProxy::filterAcceptsRow(int sourceRow, const QModelIndex&)
if (m_CurrentFilter.length() == 0) {
return true;
} else if (sourceRow < m_Manager->numTotalDownloads()) {
QString displayedName = Settings::instance().metaDownloads()
QString displayedName = Settings::instance().interface().metaDownloads()
? m_Manager->getDisplayName(sourceRow)
: m_Manager->getFileName(sourceRow);
return displayedName.contains(m_CurrentFilter, Qt::CaseInsensitive);
+43 -30
View File
@@ -19,6 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "downloadlist.h"
#include "downloadlistwidget.h"
#include <log.h>
#include <QPainter>
#include <QMouseEvent>
#include <QMenu>
@@ -29,6 +30,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QCheckBox>
#include <QWidgetAction>
using namespace MOBase;
void DownloadProgressDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QModelIndex sourceIndex = m_SortProxy->mapToSource(index);
@@ -132,6 +135,7 @@ void DownloadListWidget::setManager(DownloadManager *manager)
header()->hideSection(DownloadList::COL_MODNAME);
header()->hideSection(DownloadList::COL_VERSION);
header()->hideSection(DownloadList::COL_ID);
header()->hideSection(DownloadList::COL_SOURCEGAME);
}
void DownloadListWidget::setSourceModel(DownloadList *sourceModel)
@@ -201,40 +205,49 @@ void DownloadListWidget::onCustomContextMenu(const QPoint &point)
QModelIndex index = indexAt(point);
bool hidden = false;
if (index.row() >= 0) {
m_ContextRow = qobject_cast<QSortFilterProxyModel*>(model())->mapToSource(index).row();
DownloadManager::DownloadState state = m_Manager->getState(m_ContextRow);
hidden = m_Manager->isHidden(m_ContextRow);
try
{
if (index.row() >= 0) {
m_ContextRow = qobject_cast<QSortFilterProxyModel*>(model())->mapToSource(index).row();
DownloadManager::DownloadState state = m_Manager->getState(m_ContextRow);
if (state >= DownloadManager::STATE_READY) {
menu.addAction(tr("Install"), this, SLOT(issueInstall()));
if (m_Manager->isInfoIncomplete(m_ContextRow))
menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfoMd5()));
else
menu.addAction(tr("Visit on Nexus"), this, SLOT(issueVisitOnNexus()));
menu.addAction(tr("Open File"), this, SLOT(issueOpenFile()));
menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
hidden = m_Manager->isHidden(m_ContextRow);
if (state >= DownloadManager::STATE_READY) {
menu.addAction(tr("Install"), this, SLOT(issueInstall()));
if (m_Manager->isInfoIncomplete(m_ContextRow))
menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfoMd5()));
else
menu.addAction(tr("Visit on Nexus"), this, SLOT(issueVisitOnNexus()));
menu.addAction(tr("Open File"), this, SLOT(issueOpenFile()));
menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
menu.addSeparator();
menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
if (hidden)
menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
else
menu.addAction(tr("Hide"), this, SLOT(issueRemoveFromView()));
} else if (state == DownloadManager::STATE_DOWNLOADING) {
menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
menu.addAction(tr("Pause"), this, SLOT(issuePause()));
menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
} else if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR)
|| (state == DownloadManager::STATE_PAUSING)) {
menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
menu.addAction(tr("Resume"), this, SLOT(issueResume()));
menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
}
menu.addSeparator();
menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
if (hidden)
menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
else
menu.addAction(tr("Hide"), this, SLOT(issueRemoveFromView()));
} else if (state == DownloadManager::STATE_DOWNLOADING) {
menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
menu.addAction(tr("Pause"), this, SLOT(issuePause()));
menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
} else if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR)
|| (state == DownloadManager::STATE_PAUSING)) {
menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
menu.addAction(tr("Resume"), this, SLOT(issueResume()));
menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
}
menu.addSeparator();
} catch(std::exception&)
{
// this happens when the download index is not found, ignore it and don't
// display download-specific actions
}
menu.addAction(tr("Delete Installed Downloads..."), this, SLOT(issueDeleteCompleted()));
menu.addAction(tr("Delete Uninstalled Downloads..."), this, SLOT(issueDeleteUninstalled()));
menu.addAction(tr("Delete All Downloads..."), this, SLOT(issueDeleteAll()));
@@ -277,7 +290,7 @@ void DownloadListWidget::issueDelete()
void DownloadListWidget::issueRemoveFromView()
{
qDebug() << "removing from view: " << m_ContextRow;
log::debug("removing from view: {}", m_ContextRow);
emit removeDownload(m_ContextRow, false);
}

Some files were not shown because too many files have changed in this diff Show More