Compare commits

...
317 Commits
Author SHA1 Message Date
Jeremy Rimpo e69078e239 Merge pull request #793 from ModOrganizer2/Develop
Stage for release 2.2.1
2019-07-22 01:01:40 -05:00
Silarn dcd6d62467 Merge branch 'Develop' 2019-07-22 01:00:42 -05:00
Jeremy Rimpo 613aa037cf Merge pull request #798 from Al12rs/Develop-2
Improved Nexus Description display and BBCode support.
2019-07-22 00:57:17 -05:00
Al 21b9d90d00 Changed youtube links in nexus description to use full version instead of shortened one. 2019-07-14 17:15:43 +02:00
Al b997e97472 Fixed Youtube links in Nexus Description view. 2019-07-14 02:46:57 +02:00
Al a2aa4270e9 Added full Spoiler support to the nexus Description viewer. 2019-07-14 01:55:08 +02:00
Al 23b71ca21f Add full support for quotes in nexus descriptions and avoid url horizontal overflow by forcing world break word wrap. 2019-07-14 01:09:36 +02:00
Al c486a88348 Show timestamp seconds of log entries in logList view. 2019-07-10 21:41:15 +02:00
Al a833bc5a3e Improved Nexus description css to be easier on the eyes and handle images better. 2019-07-10 20:52:43 +02:00
Silarn e73c309f08 Update description for month instead of 30 days 2019-07-09 22:31:34 -05:00
Al f7a4ff9f5a Avoid refreshing Data tab each time directoryStructure is refreshed if the tab is not active. 2019-07-10 02:36:30 +02:00
Silarn 63f835628b 2.2.1 RC Version 2019-07-09 11:34:32 -05:00
Silarn df6cb649bd 2.2.1 RC Translation Updates 2019-07-09 11:33:13 -05:00
Jeremy Rimpo 0b2f12f90e Merge pull request #792 from isanae/small-fixes
Small fixes
2019-07-09 00:05:53 -05:00
Silarn 4bfb1a0d76 Fix missing spaces in tutorial message 2019-07-08 13:20:41 -05:00
Silarn 37aa5e07f4 Add some basic checks for symlinks 2019-07-08 13:19:52 -05:00
Jeremy Rimpo e4bacba282 Merge pull request #791 from isanae/shortcut-refactor
New Shortcut class to manage desktop/start menu shortcuts
2019-07-07 18:16:03 -05:00
isanae f0c5f6f672 fixed "not logged in" in the statusbar not respecting theme 2019-07-06 20:15:04 -04:00
isanae 9c00d7b7f6 fixed context menu being offset vertically in the overwrite dialog 2019-07-06 20:05:27 -04:00
isanae 6378a80ad0 fixed duplicate mnemonic for status bar 2019-07-06 20:03:01 -04:00
isanae b5019f586e FileDialogMemory didn't actually use the cached directory 2019-07-06 20:02:16 -04:00
isanae f7c844fcf7 put the error message in the ShellLinkException instead
added more debug logging when creating and deleting shortcuts
2019-07-06 19:23:52 -04:00
isanae 9166bd9c5b added new Shortcut class, moved stuff that was in MainWindow into it
added more error handling and logging, some was missing
removed some redundancy of setting the menu icons for add/remove, they're all set when clicking the button anyway
2019-07-06 18:50:28 -04:00
Silarn e8d14d1ea5 Fix the help button tutorial step and a typo 2019-07-05 18:39:42 -05:00
Silarn 7e760c700a Update translations 2019-07-05 16:28:01 -05:00
Silarn 9f4a9c913f Rework methods to detect the current tab to use the object name 2019-07-05 16:26:20 -05:00
Al 6b81058831 Added "Downloads" since ex NMM users though it mean the installed Mods.
It also gives more difference with "Hide" so that it's less likely to use one instead of the other.
2019-07-05 16:28:59 +02:00
Silarn 1a280f37a7 Various translation updates and additions 2019-07-04 23:25:14 -05:00
Silarn 0596a71990 Various fixes and updates to the tutorial system
* Fix problem with main tutorial advancing past mod activation
* Add various missing overlays for new and updated features
* Restore BSA tab
* Fix problem with positioning action button overlays (requires uibase)
2019-07-04 23:14:15 -05:00
Silarn dfd34bf9c0 Update openssl library names 2019-07-03 19:12:54 -05:00
isanae 0e617f5a3a Merge pull request #788 from isanae/Develop
fixed tab order not being saved
2019-07-03 19:09:54 -04:00
isanae 5a0b6a7cf6 fixed tab order not being saved 2019-07-03 19:08:57 -04:00
isanae 431b35dcf8 Merge pull request #787 from isanae/fix-preloading
fix openssl preloading
2019-07-03 17:30:09 -04:00
isanae 41c9dd9b72 preloadDll() would always think dlls were already loaded 2019-07-03 17:26:08 -04:00
Silarn 7926205ff2 About dialog updates 2019-07-03 15:00:06 -05:00
Silarn fe67855907 Month update check should calculate by day of month instead of 30 days 2019-07-03 14:21:31 -05:00
Silarn 474e3d1e15 Force instance selection window on top 2019-07-03 14:15:27 -05:00
Silarn aeca2a7782 Restore UI files to VS project and remove unused files 2019-07-03 14:14:10 -05:00
Jeremy Rimpo efec72a85a Merge pull request #782 from isanae/modinfodialog-rework
Mod info dialog rework
2019-07-03 10:24:14 -05:00
isanae 7fe637ce44 display error when loading an image fails 2019-07-02 14:57:33 -04:00
isanae 971f890826 some refactoring
updateTabs() creates a list of tabs to update instead of checking for each file
comments
2019-07-02 14:36:59 -04:00
isanae d9a7ef636b reordering tabs, then switching to a mod with a different tab set would discard the changes
comments, moving some stuff around
2019-07-02 13:21:48 -04:00
isanae 4aa59cdc7d added modinfodialogfwd.h, mostly for the enum that's used in various places
renamed ETabs to ModInfoTabIDs and changed all ints to use the enum instead
added ModInfoPtr to avoid having to include modinfo.h just to get ModInfo::Ptr
2019-07-02 12:35:33 -04:00
isanae 82d985064e added a ModInfoDialogTabContext to avoid passing too many things to tab constructors
mod is passed to ctors to make sure they can never be empty
only call deleteRequest() to selected mod
comments
2019-07-02 12:02:07 -04:00
isanae c6e80f1a5e focus tabs when they need a confirmation to close
dialog did not handle closeEvent() at all, it only checked the close button
bunch of comments
2019-07-02 11:05:31 -04:00
isanae 16b6e772a7 fixed conflict lists not expanding vertically properly 2019-07-02 10:10:20 -04:00
isanae ee71f40ce9 convert fs::path to utf-16 instead of ansi 2019-07-02 10:10:20 -04:00
isanae 41292e02bd changed how the mod url works:
- it is now independent from the nexus mod url
 - it can be set in addition to having a valid mod id
 - both urls can be displayed in the context menu
re-arranged some of the widgets on the nexus tab
added a track button
added a custom url checkbox and open in browser button
added a max-width to the browser
2019-07-02 10:10:20 -04:00
isanae b4c26c5164 fix inactive esps being marked as active because path separators changed from / to \ since the change to std::filesystem 2019-07-02 10:10:20 -04:00
isanae 093eb5650b fixed problems with re-ordering tabs, realPos was never updated properly and it wasn't actually used everywhere 2019-07-02 10:10:20 -04:00
isanae 9ec0feba43 fixed crash when opening separators 2019-07-02 10:10:19 -04:00
isanae 6547197e5f remember state of various widgets
remove obsolete settings
2019-07-02 10:10:19 -04:00
isanae e1990df0a2 fixed tab re-ordering not being used if the old setting was present 2019-07-02 10:10:19 -04:00
isanae a818954ee5 added explore menu item to conflict lists and filetree
changed filetree context menu to always show all items
added mnemonics to conflicts context menu
2019-07-02 10:10:19 -04:00
isanae 4b958d9efe added visibility flags
reduced paging size by one, feels much more natural
2019-07-02 10:10:19 -04:00
isanae c90a822444 added path to editor toolbar
moved url to top in nexus tab and made it readonly
2019-07-02 10:10:19 -04:00
isanae 162fa30c3e add image dimension to toolbar and tooltip
don't scroll when selecting an image with the mouse
2019-07-02 10:10:19 -04:00
isanae 1c0024b2fe moved all images classes into a namespace with shorter names
split theme and metrics into their own class
added filename to thumbs
2019-07-02 10:10:19 -04:00
isanae 933a2c7d10 added keyboard navigation for page down/up, end/home
changed to draw the full image background only behind the image
2019-07-02 10:10:19 -04:00
isanae c2df11298b refactored stuff into PaintContext and Files
keep selection when switching back to no filtering
up/down keyboard navigation
2019-07-02 10:10:19 -04:00
isanae 48607afc65 changed thumbnails to use margin around border
selected thumbnail now has a background color
2019-07-02 10:10:19 -04:00
isanae 0fc928fd81 rework of the images tab:
- uses a custom widget with a scrollbar instead of a QScrollArea
- scrolling by image instead of pixel
- refactored all the geometry stuff in ImagesGeometry
2019-07-02 10:10:19 -04:00
isanae 9cce32f19f dds toggle for images 2019-07-02 10:10:19 -04:00
isanae cac0fb710c added explore button to editors
fixed save button on editor being enabled with empty documents
added ctrl+s
always show vertical scrollbar in thumbnails, fixes nonstop relayouts when the height is just right and the scrollbar flickers on and off
2019-07-02 10:10:19 -04:00
isanae cb56bf76fd fixed text editors not clearing when switching mods
ported typo fixes that applied to the mod info dialog
2019-07-02 10:10:19 -04:00
isanae fc3ed80d0d tooltip on images 2019-07-02 10:10:19 -04:00
isanae fa20f81b46 replaced reportError() calls by qCritical() because they can come from a thread, which hangs the ui
categories and notes will update the tab color when changing
fixed rare crash when reordering tabs while loading a mod
2019-07-02 10:10:19 -04:00
isanae 65b3eb24fc filterable images 2019-07-02 10:10:19 -04:00
isanae 19a19ead40 filterwidget now support automatically installing a proxy on lists
filters on txt and ini tabs
2019-07-02 10:10:19 -04:00
isanae 00d4921e47 only load nexus website on activation
fixed refresh not working, will now always clear the browser so the refresh is obvious
2019-07-02 10:10:19 -04:00
isanae fb93d9ff2d nexus tab: fixed to only make one request, changed css to match nexus more closely
bbcode now supports [img width=x,height=x]
images tab: don't reload the original image
2019-07-02 10:10:19 -04:00
isanae 2b57172eb8 added path and explore button to images tab 2019-07-02 10:10:19 -04:00
isanae 139c33ccc4 various optimizations and caching
fixed conflict list not sorting when changing parameters
switched from QDirIterator to std::filesystem, much faster
FilterWidget precompiles the list
2019-07-02 10:10:18 -04:00
isanae 86e4f65eb6 changed vsdark styles to remove left and right padding from list items 2019-07-02 10:10:18 -04:00
isanae b6d8f4e479 custom models for esp lists 2019-07-02 10:10:18 -04:00
isanae 9e3214a73a refactored calculations 2019-07-02 10:10:18 -04:00
isanae 24b9f050c1 check supported extensions instead of using QImageReader, less accurate but much faster 2019-07-02 10:10:18 -04:00
isanae 1ef0620f6e rework of the images tab to avoid using widgets at all, painting is done manually 2019-07-02 10:10:18 -04:00
isanae 1e54b4b576 switched all conflict lists to QTreeView with custom model 2019-07-02 10:10:18 -04:00
isanae 4ee9f29cdc performance optimizations: text/ini tabs and advanced conflict list use views and custom models
call update() after feedFiles() to allow some tabs to have post-processing after feedFiles()
2019-07-02 10:10:18 -04:00
isanae f14f2bad3b don't update invisible tabs
update tabs when origin changes
change setting name because 2.2.0 can't handle the text list
2019-07-02 10:10:18 -04:00
isanae 581cfacbbd changed "tab index" to "tab id", this was confusing the order in the widget and the id from the enum
fixed reordering
2019-07-02 10:10:18 -04:00
isanae ad4a90692b fixed crash in conflict tabs 2019-07-02 10:10:18 -04:00
isanae eb8140afad grey out tab names when they have no data
remove tabs if they're can't handle the selected mod
next/previous now load mods in place without reopening the dialog
tab reordering is broken
2019-07-02 10:10:18 -04:00
isanae 949e451379 added missing icons
now passing tab index to allow enabling/disabling depending on mod type
modinfodialog cleanup
2019-07-02 10:10:18 -04:00
isanae 3edad12463 finished splitting filetree tab
forward delete shortcut to tabs
2019-07-02 10:10:18 -04:00
isanae 895883571b splitting filetree tab
moved mod info dialog classes to a sub filter
2019-07-02 10:10:18 -04:00
isanae cbdc4cc328 split notes tab
added new HTMLEditor that triggers an editingFinished() on focus our, used by notes tab
2019-07-02 10:10:18 -04:00
isanae 8d1c121f64 split nexus tab
added OrganizerCore::loggedInAction() to execute a function only when logged in, replaces a bunch of copy/pasted stuff in mainwindow
moved common variables in ModInfoDialogTab
moved DescriptionPage to modinfodialognexus.h, renamed to NexusTabWebpage, deleted now empty descriptionpage.h
2019-07-02 10:10:18 -04:00
isanae a72573b385 split categories tab 2019-07-02 10:10:17 -04:00
isanae a2e5f7d382 split ModInfoDialogTab 2019-07-02 10:10:17 -04:00
isanae 90280399aa renamed widgets to their proper name 2019-07-02 10:10:17 -04:00
isanae b5c47eb161 pass parent widget to tabs for dialogs
finished moving over conflict tab to its own set of files
2019-07-02 10:10:17 -04:00
isanae c98115e2f6 in the process of moving stuff to modinfodialogconflicts.h/cpp 2019-07-02 10:10:17 -04:00
isanae f8a037a409 changed layout of esps tab, moved to modinfodialogesps.cpp/h
slightly offset next/previous images so they look better when shown next to each other vertically
2019-07-02 10:10:17 -04:00
isanae a130676025 images list now vertical on the left
reworked scaling to respect aspect ratio and not exceed original size
2019-07-02 10:10:17 -04:00
isanae 9f1520c69e split images tab stuff in ImagesTab
text editor: fixed modified flag not being set to false when loading an empty file
2019-07-02 10:10:17 -04:00
isanae 81815d202b split ini tab stuff to IniFilesTab
refactored TextFilesTab into GenericFiles so it can be used by IniFilesTab
2019-07-02 10:10:17 -04:00
isanae b96f154625 removed unused ini tweaks widgets
splitter in ini tab
2019-07-02 10:10:17 -04:00
isanae 10f9fd041c disable editor without selection 2019-07-02 10:10:17 -04:00
isanae 6e2ae2444c split text file tab into its own class 2019-07-02 10:10:17 -04:00
isanae ab7f42dd97 split ExpanderWidget into its own set of files 2019-07-02 10:10:17 -04:00
isanae 491b96c052 made TextEditorToolbar a widget
added save and word wrap icons
2019-07-02 10:10:17 -04:00
isanae 0084ca6c4c text editor default style
changed colour properties to use an actual QColor
stylable highlight background color
padding for line numbers
2019-07-02 10:10:17 -04:00
isanae a2b68c3a2e text and background color, simple syntax highlighter that doesn't do anything
highlight current line
2019-07-02 10:10:17 -04:00
isanae c79cf72d22 line numbers, which required inheriting from QPlainTextEdit instead 2019-07-02 10:10:17 -04:00
isanae fc8d5c1708 checkable wordwrap on toolbar 2019-07-02 10:10:17 -04:00
isanae 9f509f9aa2 TextEditor now has a dynamic toolbar 2019-07-02 10:10:17 -04:00
isanae 6bd5bed29f added initial toolbar, splitter
moved most of the text editor stuff to a new TextEditor class
2019-07-02 10:10:16 -04:00
isanae 59e0c4aa34 moved filerenamer to its own .cpp/.h pair 2019-07-02 10:10:16 -04:00
isanae 67bc0d8327 clean up the list widgets and thumnails as well as recheck the tabs when refreshing after a change 2019-07-02 10:10:16 -04:00
Jeremy Rimpo 1822c1dc65 Merge pull request #781 from isanae/more-logging
More logging
2019-07-01 18:26:11 -05:00
isanae ffebd4c101 a few more comments 2019-07-01 14:51:08 -04:00
isanae 7c1ce768ef now handles windows firewall, which apparently doens't report itself to wmi
some more error checking
2019-07-01 12:38:35 -04:00
isanae 553a4d12a7 show supported games in error dialog when browsing for a binary 2019-07-01 09:55:42 -04:00
isanae 5e27a96a27 a few comments 2019-07-01 08:55:24 -04:00
isanae dfe8093c1a added --crashdump to generate dumps of a running MO process
added dump_running_process.bat to start another instance of MO with that flag
2019-07-01 08:42:58 -04:00
isanae 5a74b02442 security products 2019-07-01 03:41:32 -04:00
isanae 1aa174f143 comments, some refactoring
switched to qDebug()
2019-06-29 20:02:10 -04:00
isanae 813ab32a2d added a warning when running in compatibility mode 2019-06-29 18:58:15 -04:00
isanae fb6512b72e log windows version 2019-06-29 18:16:00 -04:00
isanae 7152b8e97b lower case paths, sorted list, md5 for some files 2019-06-29 16:13:55 -04:00
isanae eab0ec298b refactored preloadSsl() into preloadDll()
removed old HGID check
moved formatSystemMessage() to uibase
added Environment class, lists loaded modules, logged at startup
2019-06-29 15:26:04 -04:00
isanae 38b9c7c060 Merge branch 'Develop' of https://github.com/ModOrganizer2/modorganizer into Develop 2019-06-27 12:07:54 -04:00
isanae 27cffcb3aa Merge branch 'Develop' of github_isa:isanae/modorganizer into Develop 2019-06-27 12:07:43 -04:00
Al a82b5de34a Merge pull request #772 from Nubbie/Develop
Correcting minor spelling mistakes in the UI + add contributor
2019-06-25 22:52:22 +02:00
Al d683ee652c Merge pull request #773 from isanae/formatmessage-logging
Refactored FormatMessage() calls into formatSystemMessage()
2019-06-25 22:50:57 +02:00
Al 56839c9659 Modified Menu Bar:
* Removed Edit and Copy Log as it was useless.
* Moved Visit Nexus to Files.
* Moved Profiles to Tools.
* Renamed Tools submenu to "Tool Plugins".
2019-06-23 04:38:34 -04:00
Al ee89a8e23b * Changed export to CSV to sort by priority.
* Made status a default choice.
* Changed status column to +/- instead of Enabled/Disabled.
2019-06-23 04:38:33 -04:00
isanae c3b57c90d1 refactored FormatMessage() into formatSystemMessage()
fixes trying to load a wchar_t* with qCritical(), which merely prints the address
2019-06-23 04:35:00 -04:00
Matte A 724fad7cb6 Correcting minor spelling mistakes in the UI + add contributor 2019-06-23 04:38:36 +02:00
Al c216442eb4 Modified Menu Bar:
* Removed Edit and Copy Log as it was useless.
* Moved Visit Nexus to Files.
* Moved Profiles to Tools.
* Renamed Tools submenu to "Tool Plugins".
2019-06-20 00:44:19 +02:00
Al 5276c3c244 * Changed export to CSV to sort by priority.
* Made status a default choice.
* Changed status column to +/- instead of Enabled/Disabled.
2019-06-20 00:40:01 +02:00
Al 45ddf061c4 Disabled toolbar executable shortcut action after click to avoid starting it twice with a doubleclick. 2019-06-19 16:43:31 +02:00
Al 6cef9e5a7e Removed old debugline. 2019-06-19 16:16:10 +02:00
Al f74c341954 * Made the loadingbar a little bigger and more centered in the statusbar.
* Changed themes to remove the ugly separator line between widgets on the statusbar.
2019-06-19 15:31:52 +02:00
Al f883a14823 Improved downloads tab deletion and hiding warnings. 2019-06-19 01:57:16 +02:00
Jeremy Rimpo 27815282f7 Merge pull request #764 from isanae/executables-dialog-rework
Executables dialog rework
2019-06-16 16:13:56 -05:00
isanae bae2ee7a29 Merge pull request #765 from isanae/Develop 2019-06-15 15:10:09 -04:00
isanae 58fbdc1c22 removed 'L' from the language code:
- it's incorrect, since language codes are unsigned shorts, and
 - it actually breaks the translation section and makes retrieving it through standard Windows API fail
2019-06-15 15:08:45 -04:00
isanae 30ce0ba5ef rebase to statusbar 2019-06-15 14:48:59 -04:00
isanae d7dc13e3b9 fixes plugin executables having empty fields when upgrading from 2.2.0 2019-06-15 14:40:40 -04:00
isanae 5ca4ea5004 merged CustomOverwrites and ForcedLibraries, they were mostly identical
some comments
2019-06-15 14:40:40 -04:00
isanae 7671725436 removed concept of custom executables, everything is modifiable
added apply button to dialog
added reset button that re-adds plugin executables and renames existing ones if needed
moved executables files to their filter in visual studio
2019-06-15 14:40:40 -04:00
isanae 82975a6a38 reduced spacing between buttons, removed chatty logging 2019-06-15 14:40:40 -04:00
isanae b04782877e reduced margins around edit widgets, increased splitter handle width to separate the top buttons from the edit widgets a bit more 2019-06-15 14:40:40 -04:00
isanae c8e1b4ab3a changed the down/up pngs to be slightly offset vertically from what they were, they did not look aligned when next to each other
added status/tooltip/whatsthis strings to new buttons
change enabled status of up/down dynamically
simplified move() to just move by one
2019-06-15 14:40:40 -04:00
isanae 5fa7fd7fb9 moved add/remove to the top, changed them to tool buttons with icons, added up/down buttons 2019-06-15 14:40:40 -04:00
isanae cbe6dd93b1 made the default size of the dialog a bit larger 2019-06-15 14:40:40 -04:00
isanae 98d5602c99 adjusted the position of the "(*) Profile Specific" label
comments
2019-06-15 14:40:40 -04:00
isanae 5e65325772 fixed plugin executables not overriding if the custom attribute was inadvertently set 2019-06-15 14:40:40 -04:00
isanae e86224ee7f moved commiting changes to EditExecutablesDialog itself instead of doing it from the main window
use a separate enabled state for custom overwrites and forced libraries, this remembers the values even when unchecking the checkbox, as long as the dialog stays opened
pass the whole OrganizerCore to EditExecutablesDialog, simplifies a bunch of things
2019-06-15 14:40:40 -04:00
isanae d6d05dcae8 handles changing the title to one that already exists by just ignoring it 2019-06-15 14:40:40 -04:00
isanae 6260455111 removed old, unused stuff
have mainwindow save all the new settings once the dialog closes
2019-06-15 14:40:40 -04:00
isanae 57c7b15685 moved functionality to CustomOverwrites and ForcedLibraries helper classes 2019-06-15 14:40:40 -04:00
isanae f60431f92f remove executable 2019-06-15 14:40:40 -04:00
isanae 6e937f7d09 add executable 2019-06-15 14:40:40 -04:00
isanae 1897d60134 pulled java installation detection out of getFileExecutionContext() and into findJavaInstallation() because it was copy/pasted into EditExecutablesDialog
fixed FileDialogMemory::getOpenFileName() to also use the given directory correctly
handle browse binary button
2019-06-15 14:40:40 -04:00
isanae 7026aeaec8 fixed FileDialogMemory::getOpenFileName() not using given directory
disable all widgets when there's no selection
now saves application icon
browse working directory uses current value in file dialog
2019-06-15 14:40:40 -04:00
isanae f22b64bff7 save forced libraries internally 2019-06-15 14:40:40 -04:00
isanae cd2fefca19 save steam app id, custom overwrite and application icon
custom overwrite directories now set locally, will be written to profile when closing the dialog
2019-06-15 14:40:40 -04:00
isanae b8199f0c47 renamed most of the widgets to shorter or more descriptive names (newFilesModCheckBox?)
modifying widgets calls save()
2019-06-15 14:40:40 -04:00
isanae d125036903 stop changing add button to modify, disable remove for plugin executables
general clean up of member variable names, whitespace
2019-06-15 14:40:40 -04:00
isanae 39d953c838 load plugin executables after settings, allows for changing the order
added warning that an executable is provided by a plugin, disable widgets that can't be changed
refactoring EditExecutablesDialog
2019-06-15 14:40:40 -04:00
isanae 5556e2b152 replaced close with ok/cancel
moved add/remove below the list
2019-06-15 14:40:40 -04:00
isanae 840dba26ba rework of the executables dialog to have a horizontal splitter and use a standard QDialogButtonBox 2019-06-15 14:40:40 -04:00
isanae fafdb14600 fixed EditExecutablesDialog being opened without a parent
removed Executable's constructor with values, replaced with default ctor + setters, all these strings were much too error-prone
added Executable ctor overload to convert from ExecutableInfo
plugin executables now override most of the custom changes
renamed browseButton to browseBinaryButton to avoid confusion with the other browseDirButton
fixed both browse dialogs not handling cancel
EditExecutablesDialog's list used to change the text color for custom executables, replaced with italics
2019-06-15 14:40:39 -04:00
isanae 65ad374d97 removed temporary setters in Executable, unnecessary now that it has mergeFrom() 2019-06-15 14:40:39 -04:00
isanae 617a600545 ExecutablesList:
- merged addExecutable(), updateExecutable() and addExecutableInternal() into a new setExecutable()
 - setExecutable() adds the executable to the list if not found, or forwards to Executable::mergeFrom()
 - mergeFrom() handles merging from/to plugin executables
2019-06-15 14:40:39 -04:00
isanae 26786da96d moved store/load to ExecutablesList 2019-06-15 14:40:39 -04:00
isanae 4f01b94f01 replaced ExecutablesList::getExecutables() by a standard container interface
renamed ExecutablesList::init() to addFromPlugin()
renamed ExecutablesList::find() to get() and added a find() that returns an iterator
changed some calls from get() to find() so they can handle failure because they didn't seem to handle std::runtime_error at all
2019-06-15 14:40:39 -04:00
isanae 5fb26b2dcb made Executable members private, added member function to get and set them 2019-06-15 14:40:27 -04:00
isanae 14c9da1939 Merge pull request #762 from isanae/statusbar 2019-06-15 13:56:34 -04:00
Al 52aa6ff681 Merge pull request #763 from Nubbie/patch-1
Correcting minor spelling mistakes in the UI + add contributor
2019-06-15 16:23:06 +02:00
Matte A 2a2b7c0f10 Correcting minor spelling mistakes in the UI + add contributor
When translating, I found some minor mistakes. Therefor I ran through the file in a proofreader and corrected some mistakes. There is also some mistakes corrected for consistency e.g. spaces and dashes
2019-06-15 16:09:13 +02:00
isanae eed0f1503d re-added the api label tooltip
comments
2019-06-14 02:05:06 -04:00
isanae d527d62b2b changed the notifications action back to being disabled when there aren't any, having a coloured and clickable icon was confusing 2019-06-14 01:53:31 -04:00
isanae a75f54e522 show executable path in status bar 2019-06-14 01:44:53 -04:00
isanae a7c48a05f8 fixed text color of api label when not logged in 2019-06-14 01:41:17 -04:00
isanae 616925ebbb moved api user account classes to their own files
api label in status bar:
 - now shows when not logged in
 - changed some of the colour thresholds to correspond to real throttling numbers
make sure the api key is also cleared from the access manager when clearing from the settings
removed unused bool m_ValidateAttempted in NXMAccessManager
update the window title and status bar api label with correct values on startup, which fixes incorrect values when "restarting" MO after changing nexus settings
2019-06-14 01:38:07 -04:00
isanae a7757e8ba6 added option to hide the status bar
centralized menu visibility into a showMenuBar() function
2019-06-13 23:43:51 -04:00
isanae ba0b2c2a29 switched to stylesheet for api colors, palette doesn't seem to survive hiding/unhiding very well 2019-06-13 23:26:46 -04:00
isanae 4a7a77480b changed StatusBarNotifications to a generic StatusBarAction
added update notification to statusbar
2019-06-12 19:12:34 -04:00
isanae 16d6a4c528 added a StatusBarNotifications class to handle icon, text and double click 2019-06-12 18:04:42 -04:00
isanae dc08c12fe8 fixed progress bar not updating 2019-06-12 17:08:09 -04:00
isanae a418d028b2 max width for progress bar
notification icon in status bar
2019-06-12 16:16:17 -04:00
isanae dc8256bae1 added notifications label, unused 2019-06-12 15:47:36 -04:00
isanae ebbc900755 added a few helper classes for user accounts and stats
moved the api label to the status bar
refactored a bunch of copy/pasted code in NexusInterface to use shouldThrottle() and throttledWarning()
2019-06-12 15:47:36 -04:00
isanae 853c95b921 added new statusbar class, moved refresh progress bar to it 2019-06-12 15:47:36 -04:00
Al 54f3188a06 Merge pull request #759 from isanae/unstyled-icons-fix
Fixing the icons on the toolbar and menus
2019-06-11 23:54:18 +02:00
isanae 89aa616a61 clarified some comments 2019-06-09 09:59:16 -04:00
isanae c31f8b7e31 fixed notification icon not respecting the stylesheet on startup 2019-06-09 09:42:22 -04:00
isanae 4f240ddb7f fixes toolbar and menu icons not respecting the stylesheet 2019-06-09 09:14:35 -04:00
Al a9ad126566 Merge pull request #754 from isanae/conflict-lists-sort
Natural sort for conflict lists
2019-06-05 08:09:55 +02:00
Al f4b33ac478 Merge pull request #753 from isanae/explore-data-file
Added "Open Origin in Explorer" to the data tab
2019-06-05 08:04:17 +02:00
Al 37c4dc5848 Merge pull request #752 from isanae/toolbar-revert
Reverted changes to the toolbar
2019-06-05 07:58:34 +02:00
isanae 75f59b68a5 natural sort for conflict items 2019-06-04 23:42:20 -04:00
isanae aedddb10f8 refactored conflict list items:
- use new ConflictItem class derived from QTreeWidgetItem
 - that class has all the various conflict*() member functions that were previously in the dialog
 - moved some of the can*() member functions out to namespace level so they can be used by ConflictItem, no real need to have them as members anyway
2019-06-04 23:31:29 -04:00
isanae 63d62a40c2 added "Open Origin in Explorer" to the data tab
renamed openOriginExplorer_clicked() to openPluginOriginExplorer_clicked() to make it clearer
exec() for context menu in lists should be relative to the viewport to account for the header size
2019-06-04 22:44:46 -04:00
LostDragonist e6f5e471a7 Merge pull request #749 from isanae/manual-nexus-api-key
New dialog to manually enter Nexus API key
2019-06-04 20:25:13 -05:00
isanae c31303c6af fixed title on the manual key dialog
disabled disconnect and manual key buttons while fetching the api key
2019-06-04 21:15:54 -04:00
isanae 2db29cffda renamed "revoke nexus authorization" to "disconnect from nexus" because "revoking" is ambiguous
reworked manual key dialog to look more like MO1
moved all the UI stuff from callbacks in Settings back to SettingsDialog in a central updateNexusButtons(), which also enables/disables buttons as needed
2019-06-04 20:58:30 -04:00
isanae 479150a619 show the main menu when releasing alt instead of pressing, less annoying to take screenshots with alt+printscreen without having the menu pop up 2019-06-04 18:33:23 -04:00
isanae 369408eed0 reverted changes to the toolbar:
- swapped back "add profile" and "install mod" icons
 - removed links toolbar, icons are added to the main one
 - locked the toolbar because there's only one now
 - right align everything after the last separator and executable shortcuts
2019-06-04 18:25:31 -04:00
Al 2fb33d891f Merge pull request #750 from isanae/more-menu-toolbar
Menu bar can be hidden, also shows executable shortcuts
2019-06-04 23:49:13 +02:00
Al c41cda79b8 Merge pull request #751 from isanae/close-flag-on-cancel-redux
Reset m_closing to false when the user cancels closing
2019-06-04 08:41:23 +02:00
isanae f9906825e7 fixed exit menu item not working 2019-06-03 19:26:03 -04:00
isanae ae021586a5 reset m_closing to false when the user cancels closing 2019-06-03 19:18:09 -04:00
isanae ea3f8826f1 more comments 2019-06-03 19:09:10 -04:00
isanae 254304217d renamed some of the menus to remove underscores
added Run menu with shortcuts, only visible when there are shortcuts to show
fixed menubar visibility not being remembered
2019-06-03 19:00:44 -04:00
isanae 97026b4da0 added menubar toggle in the context menu
removed two unused actions: actionToolbar_Size and actionToolbar_style
added ways to make the menu reappear if you hide everything:
 - show the toolbar popup when right-clicking around the border of the main window
 - intercept the Alt key and make the main menu visible
2019-06-03 18:30:23 -04:00
isanae 933f460ee6 added new dialog to enter api key manually
added button in nexus settings to open the dialog
added a force flag to apiCheck() to do a check with the new key even if the login was successful before
2019-06-03 17:20:31 -04:00
Al 355a2fbbee Merge pull request #747 from isanae/splash-monitor
Display the splash screen on the same monitor as the main window
2019-06-03 22:27:22 +02:00
Al 0ecd812035 Merge pull request #744 from isanae/standard-menu-and-toolbar
Standard menu and toolbars
2019-06-03 22:26:55 +02:00
isanae 24aee49792 remember the monitor number
use it to display the splash screen on the same monitor as the main window instead of where the mouse cursor is
2019-06-03 14:51:12 -04:00
isanae 1fcd8f0e09 missed some mnemonics in the main menu 2019-06-02 22:37:36 -04:00
isanae 471d76832a reduced the padding of toolbar icons in the vs15 themes 2019-06-02 22:01:40 -04:00
isanae 3c69f1e54a update styles to handle the new menu bar
also formatted the Transparent styles, all the css was on one line
added a separator before the settings menu item
fixed medium icon item not being checkable
2019-06-02 21:50:52 -04:00
isanae 71a9f08513 added medium toolbar icon size 2019-06-02 16:45:58 -04:00
isanae e6706c7a5b the toolbar menu is now in the ui file instead of being created by hand
it's also shared between the main menu and the context menu
2019-06-02 16:28:09 -04:00
isanae fab357ef4d toolbar size and button style are now configurable and remembered 2019-06-02 15:57:52 -04:00
isanae 41ef9813dd moved links to a new dedicated toolbar 2019-06-02 15:22:11 -04:00
isanae 746e9c08e6 moved notification menu item to tools, was the only thing in view
fixed endorse action to also work with the menu
fixed changing endorsement integration setting not changing visibility of actions
2019-06-02 14:22:24 -04:00
isanae 860eb49b45 removed actionToToolButton(), which was replacing QAction's in the toolbar with QToolButton's, making it very difficult to have an equivalent in the main menu. QAction's can have a menu, so use that instead.
the only place this doesn't work is with the nexus button, which can be replaced by a menu if there are IPluginModPage plugins adding items to it; registerModPage() works fine with the toolbar, but doesn't handle the main menu yet
2019-06-02 13:14:21 -04:00
isanae 3c7b232361 - always show statusbar, used by the menu and toolbar to display status tips
- reduced margins around central widgets to align it with status bar text, removed bottom margins completely because the statusbar is enough
- notifications: now always enabled, dialog shows a special item when empty, just change the tooltip and leave the text alone
- added all toolbar actions to menu
- non functional in menu for now: tools, help and endorse because they're menus
- changed some of the action strings to be the same on both toolbar and menu, added missing status tips
2019-06-02 11:55:13 -04:00
Al f00314442b Merge pull request #740 from isanae/new-conflict-list
New conflict list, new "go to" conflict menu item
2019-06-01 09:54:09 +02:00
isanae d2eb890f2b refresh files in the constructor because the ui is used to determine the tab states 2019-05-31 17:28:59 -04:00
isanae fa7e34e84a conflict lists:
- the file index is now stored in the row data
 - the alternate origins are now added to the context menu in a "go to" submenu
 - context menu items are now visually disabled instead of omitted from the menu
2019-05-31 15:15:47 -04:00
isanae a6dbb1d766 advanced conflict list tooltips 2019-05-31 14:09:36 -04:00
isanae 7421aaa33b conflict lists
- sorting on advanced list
 - save state of all four lists
 - call refreshLists() just before showing because the state has to be loaded first, which happens after the ctor
2019-05-31 13:59:08 -04:00
isanae 0da1c2591f don't show open menu item if the files are from an archive 2019-05-31 13:09:17 -04:00
isanae 0f6f0c2394 replaced all the manual UserRole stuff with a few constants and helper functions
setConflictItem() is now used by all conflict lists to setup the data (filename, archive, etc.) and visuals (italic for archives)
merged openDataFile() and previewDataFile() into their caller as they weren't used anywhere else
previewDataFile() used to do a fromNativeSeparators() before previewing, moved that to previewFileWithAlternatives() instead
brought overwrittenTree double click in line with overwriteTree, there's no difference between apply() and close() because there's only a close button
2019-05-31 12:49:25 -04:00
isanae 65428e89ad put back changes from another PR lost because of a bad rebase 2019-05-31 11:59:19 -04:00
isanae b7580c5ad7 restore conflicts selected tab and checkboxes 2019-05-31 11:54:32 -04:00
isanae 8efab8bf12 FilterWidget takes a predicate to match strings
copied the logic from modlistsortproxy so the basic boolean syntax in filters works
2019-05-31 11:54:31 -04:00
isanae 98b3be3e9b removed buddy from FilterWidget, the intention was to hook a ctrl+f shortcut to it, but that won't work as a general solution, it would need to be on tabs for the modinfo dialog
added a simple matches() that just searches for the string
FilterWidget can cleanly unhook itself
2019-05-31 11:54:31 -04:00
isanae 4d90e50226 added new filterwidget, will eventually get the operators functionality from the mod/pluging lists 2019-05-31 11:54:31 -04:00
isanae 64604c966a elide first two columns of the advanced list 2019-05-31 11:54:31 -04:00
isanae a202170aab comments, switched some of the ifs for clarity 2019-05-31 11:54:31 -04:00
isanae 260462fe6d added show all/nearest mods radio buttons 2019-05-31 11:54:30 -04:00
isanae ab385347af allow for refreshing individual conflict tabs
advanced conflict list now has items
2019-05-31 11:54:30 -04:00
isanae d168b5db08 added AlternativesVector typedef to FileEntry
split item creation from refreshConflictLists()
2019-05-31 11:54:30 -04:00
isanae 3666995ce1 changed iterator loops to ranged for
added some autos here and there
added some whitespace
2019-05-31 11:54:30 -04:00
isanae 157168e73a split refreshLists() in two 2019-05-31 11:54:30 -04:00
isanae 2687fa8231 added new tabs in the conflict tab 2019-05-31 11:54:30 -04:00
isanae f9e9d79a7d moved all widgets in the conflict tab into a parent widget instead of directly being in the tab, allows for future additions to the tab 2019-05-31 11:54:29 -04:00
Al 41f8da011d Merge pull request #739 from isanae/hide-conflict-items
Share context menu between conflict lists
2019-05-29 14:34:24 +02:00
isanae ee92fa9fc8 reverted change that showed the conflicted file first in the preview dialog
I'm not sure how I got to the conclusion that this was a better idea: preview was always an option for those files, and it has always shown the winning file, so I changed some long-standing behaviour for no reason. I reverted that change, although I'm leaving the functionality in previewFileWithAlternatives() to specify the selected origin because it works and could be useful in the future
2019-05-28 10:53:55 -04:00
isanae d3c244c834 also reversed 'hide' parameter to 'visible' for changeFiletreeVisibility() 2019-05-28 10:30:26 -04:00
isanae 1ec2260db5 reversed 'hide' parameter to 'visible' for changeConflictItemsVisibility()
when I pass true to it, I expect it to be visible, not "yes, this should be hidden"
I had actually started this earlier and ended up in a broken, in-between state, which should be fixed now
2019-05-28 10:26:42 -04:00
isanae adb5ace799 added selectedOrigin to previewFileWithAlternatives()
this is so that an origin other than the primary can be shown first and is used from previewDataFile() in ModInfoDialog since showing a preview for a conflicting file could initially show the file from the wrong mod
removed unused, uninitialized and dangerous ModInfoDialog::m_OriginID
2019-05-28 10:14:15 -04:00
Al 1e3a10c8b2 Merge pull request #732 from isanae/cmake-changes
Adds filters, precompiled headers and quietness to the Visual Studio projects
2019-05-28 09:44:17 +02:00
Al 6db22ef388 Merge pull request #734 from isanae/permissive-flag
Permissive flag
2019-05-28 09:42:06 +02:00
Al 28b117b1a6 Merge pull request #738 from isanae/crash-plugin-highlight
fixes a crash when highlighting plugins
2019-05-28 09:41:20 +02:00
isanae 3732d24e0d findFile() seems to return null in some cases and crash on the line below
this is a quick fix for this particular crash, there's probably something deeper to fix
2019-05-27 20:03:40 -04:00
isanae 2d52299743 multiple selection for noconflict and overwritten lists
set uniformRowHeights for all three lists for faster rendering, all items are text only
all three lists use the same code for the context menu:
 - createConflictMenuActions() returns a struct with the QActions that are valid for the selection
 - showConflictMenu() plugs in the handlers and shows the menu
2019-05-27 12:07:10 -04:00
Al 622908ee20 Merge pull request #735 from isanae/hover-activate-700
don't activate the window when hovering save files
2019-05-26 15:03:53 +02:00
isanae d0f087be8f don't activate the window when hovering save files
don't popup the widget if the window doesn't have focus
2019-05-26 08:50:13 -04:00
isanae 5716676e08 fixes for /permissive-:
- no implicit conversions for enum classes
- can't bind rvalue to non-const ref
- string literals are const
2019-05-26 08:14:21 -04:00
isanae e821768f79 added /permissive- 2019-05-26 08:07:10 -04:00
Al 1c87bdab35 Merge pull request #733 from isanae/shell-functions-to-uibase
moved shell functions to uibase
2019-05-26 13:24:36 +02:00
isanae fce3c9f8c3 moved shell functions to uibase 2019-05-26 06:52:45 -04:00
Al 2caa688e55 Merge pull request #731 from isanae/filetree-dds-preview-630
Add preview to filetree, some refactoring
2019-05-26 12:24:02 +02:00
isanae 21185182c6 moved getFileExecutionContext() and its enum into OrganizerCore 2019-05-26 06:18:11 -04:00
isanae 0439e18fe4 changed enum case to follow convention 2019-05-26 05:31:02 -04:00
isanae 42159d28ec Merge branch 'cmake-changes' of github_isa:isanae/modorganizer into cmake-changes 2019-05-26 04:27:52 -04:00
isanae 4183e5837f set use_folders, puts all cmake generated projects into a folder 2019-05-26 04:27:16 -04:00
isanae c82c7af678 changed rest of ShellExecuteW() calls to use shell::Execute(), shell::OpenLink() or shell::OpenFile() 2019-05-26 04:00:54 -04:00
isanae 76708b9694 put explore and open functions in namespace shell
previewDataFile() was duplicated in both MainWindow and ModInfoDialog, moved to OrganizerCore
added preview menu item to filetree
better logging when shell operations fail
2019-05-25 08:34:52 -04:00
isanae 54a743faea reordered action variables to match the order in the context menu, added a few missing initializations 2019-05-25 03:23:08 -04:00
isanae ebb855dc14 ExploreFile() will select the file in explorer when the path is a file
replaced more ShellExecute() calls with ExploreFile()
2019-05-25 03:10:37 -04:00
isanae 9a014db4b3 moved GetFileExecutionContext() out of OrganizerCore, no reason for it to be there
added ExploreFile(), changed all mentions of ShellExecute() in MainWindow to use it
2019-05-25 02:12:11 -04:00
isanae f5330efd0d a copy of getBinaryExecuteInfo() and openDataFile() was in both mainwindow and modinfodialog, it's now moved to organizercore and renamed getFileExecutionContext() and executefile()
getFileExecutionContext() is also changed to return an enum instead of a 0-1-2 int
2019-05-25 01:05:15 -04:00
isanae f4b85d0264 Update pch.h
removed headers that were redundant or actually from MO
2019-05-24 06:33:50 -04:00
isanae f8d319cfba added precompiled headers 2019-05-24 06:25:58 -04:00
isanae 350e4fa97f using builtin properties for autogen source groups, everything is now in the autogen filter 2019-05-24 04:37:43 -04:00
isanae 953ab4e6f6 turned autorcc on so no need for qt5_add_resources() anymore
qt5_wrap_ui() is redundant since autouic is already on
generate INSTALL.vcxproj.user to have the proper debugging settings so ModOrganizer.exe is started from install/bin
2019-05-24 04:37:43 -04:00
isanae dfdea05029 greatly decreased the verbosity of builds
always include the INSTALL project in the solution build
2019-05-24 04:37:42 -04:00
isanae e349af70b7 put source files in specific groups so they're organized in the visual studio project 2019-05-24 04:37:42 -04:00
Silarn 2d58ad346c Add support for new Nexus API game codes to NXM link handling 2019-05-23 22:24:57 -05:00
Al a0500fef6c Merge pull request #728 from isanae/Develop
Adds three columns in download list: mod name, version and nexus id
2019-05-23 15:39:21 +02:00
isanae d9cdc24461 Merge remote-tracking branch 'remotes/upstream/Develop' into Develop 2019-05-22 23:18:25 -04:00
isanae 3ef7c401d5 download list: made all column left-aligned except for size 2019-05-22 23:08:07 -04:00
isanae 77678b3765 download list: added columns for mod name, version and nexus id 2019-05-22 22:43:23 -04:00
Jeremy Rimpo 2f0cfa2930 CI: Update to provisioned final VS 2019 image 2019-05-22 13:20:04 -05:00
Silarn 1abecdd517 Set optimization for release builds 2019-05-22 02:04:32 -05:00
Silarn 1d09e85c08 Add logs to build artifacts on CI fail, commit translation changes 2019-05-21 23:46:12 -05:00
Jeremy Rimpo 2a09e17cf4 CI: FileName is for the target not the source 2019-05-21 17:54:43 -05:00
Jeremy Rimpo 86ed2c7c4e CI: Push log files from the main build folder 2019-05-21 17:16:06 -05:00
Jeremy Rimpo 494951210d Add logs to build artifacts on failure 2019-05-21 16:37:20 -05:00
Al 0e5adf171f Merge pull request #727 from isanae/Develop
fix crash when changing file visibility from the filetree
2019-05-21 22:43:11 +02:00
isanae 056ecb4677 fix crash when changing file visibility from the filetree of an installed but inactive mode 2019-05-21 16:09:41 -04:00
Al 0078fd12d0 Merge pull request #726 from isanae/Develop
adds a no-conflict list in the conflicts tab, makes all three lists collapsible
2019-05-21 11:23:08 +02:00
Silarn f966e7db93 Switch to local build files as appveyor can't use installed files 2019-05-21 02:28:05 -05:00
Silarn c2ed511ff0 With old mods, only queue the old ones in case of API overflow 2019-05-21 01:41:12 -05:00
Silarn 44f6d833a9 Unify artifacts source path to install path 2019-05-21 01:37:26 -05:00
isanae 0088ee963b documented ExpanderWidget, removed checkable stuff because the state is kept internally 2019-05-20 18:44:41 -04:00
isanae 513eaaa355 added const version of Settings::directInterface() for restoring states
added top-level saveState() and restoreState() to ModInfoDialog that are called from MainWindow, because it now also has to handle expander states in the conflict tab
added internal opened state to expander widget instead of using widget visibility so it can be saved even after the dialog is closed
2019-05-20 18:33:50 -04:00
isanae c5f6173385 made expander use the full width
context menu for noconflict tree
2019-05-20 17:58:00 -04:00
isanae 00f8cbff05 expandable sections in the conflict tab 2019-05-20 17:38:17 -04:00
isanae a2b1f6a360 added third tree with non-conflicting files 2019-05-20 16:11:10 -04:00
LostDragonist e10fa6e1f3 Fix horizontal scrollbar width for dracula theme 2019-05-19 11:02:35 -05:00
Al b22ee0dc56 Merge pull request #717 from isanae/Develop
enable multiple selection in the conflict tree and file tree
2019-05-19 16:58:08 +02:00
isanae eb203e4c2a if the number of selected items is low, check them to accurately show the hide/unhide items 2019-05-19 09:06:09 -04:00
isanae a1f1656c36 re-enabled unhide menu item in the conflict tree since hidden items can actually appear 2019-05-19 08:53:59 -04:00
isanae 2c30d2d0e9 fixed filetree context menu for multiple selection 2019-05-19 08:38:05 -04:00
isanae 2920a707c7 added filename to file replace confirmation dialog text
hooked up filetree to FileRenamer
fixed filetree context menu positioning being offset vertically
2019-05-19 08:19:57 -04:00
isanae b0c5cf146c added new FileRenamer class to handle user confirmations when hiding/unhiding files
conflict tree hooked up
filetree shows the new dialogs, but doesn't handle buttons correctly yet
2019-05-19 07:21:41 -04:00
isanae 0232435e0a disabled unhide menu item in the conflict tree because hidden items are never shown 2019-05-18 06:26:13 -04:00
isanae 6c470aff82 changed the top conflict treeview to support multiple selection
this required making some changes to both trees because they were sharing m_ConflictsContextItem that was set on right clicks; both trees are now independent
hide/unhide is always shown on multiple selection to avoid scanning all the selected items
2019-05-18 03:53:20 -04:00
Al c1db638d92 Merge pull request #715 from isanae/Develop
limit the number of items in the remove mods dialog
2019-05-17 09:18:46 +02:00
isanae 47cca19109 when removing mods, limit the number of items in the list so the dialog stays at a sane height 2019-05-16 23:47:02 -04:00
Silarn 50fc72ca8d Fix missing translations 2019-05-09 12:23:33 -05:00
Silarn ed4eb2aae8 Update NXM link handling to support premium link and validate user info 2019-05-09 12:04:03 -05:00
Silarn 3d2616ea98 Enable parallel building 2019-05-09 02:10:43 -05:00
Silarn ed31aeb97e Set appveyor image to VS 2019 Preview 2019-05-08 23:10:39 -05:00
Silarn c7ca9653e9 Modify LZ4 paths to support building from source 2019-05-08 23:02:51 -05:00
136 changed files with 20743 additions and 7146 deletions
+19 -1
View File
@@ -1,15 +1,33 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
ADD_COMPILE_OPTIONS($<$<CXX_COMPILER_ID:MSVC>:/MP>)
ADD_COMPILE_OPTIONS($<$<CXX_COMPILER_ID:MSVC>:/MP> $<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELEASE>:/O2>> $<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELWITHDEBINFO>:/O2>>)
PROJECT(organizer)
# sets ModOrganizer as StartUp Project in Visual Studio
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY VS_STARTUP_PROJECT "ModOrganizer")
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)
ADD_SUBDIRECTORY(src)
set(vcxproj_user_file "${CMAKE_CURRENT_BINARY_DIR}/INSTALL.vcxproj.user")
if(NOT EXISTS ${vcxproj_user_file})
FILE(WRITE ${vcxproj_user_file}
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<Project ToolsVersion=\"Current\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
"<PropertyGroup>\n"
"<LocalDebuggerWorkingDirectory>${CMAKE_INSTALL_PREFIX}/bin</LocalDebuggerWorkingDirectory>\n"
"<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>"
"<LocalDebuggerCommand>${CMAKE_INSTALL_PREFIX}/bin/ModOrganizer.exe</LocalDebuggerCommand>\n"
"</PropertyGroup>\n"
"</Project>\n")
endif()
INSTALL(FILES dump_running_process.bat DESTINATION bin)
+8 -4
View File
@@ -1,9 +1,11 @@
version: 1.0.{build}
skip_branch_with_pr: true
image: Visual Studio 2017
image: Visual Studio 2019
environment:
WEBHOOK_URL:
secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1VYoNNsKROB4s6VsQiL6qbLNLc4XQhc8Y9DhdU9Hfh49vhypcjUEQmMsENxnp+1hYMJctTqIYDunVSd767eez5wz6rKHqk+XOHmg5gyVNCV9u4DVcCZJSVe4UTKn1lc47H0=
build:
parallel: true
build_script:
- cmd: >-
git clone --depth=1 --branch=%APPVEYOR_REPO_BRANCH% https://github.com/ModOrganizer2/modorganizer-umbrella.git c:\projects\modorganizer-umbrella 2> $null
@@ -14,9 +16,9 @@ build_script:
C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True %APPVEYOR_PROJECT_NAME%
artifacts:
- path: vsbuild\src\RelWithDebInfo\ModOrganizer.exe
- path: build\src\ModOrganizer.exe
name: modorganizer_exe
- path: vsbuild\src\RelWithDebInfo\ModOrganizer.pdb
- path: build\src\ModOrganizer.pdb
name: modorganizer_pdb
on_success:
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
@@ -24,5 +26,7 @@ on_success:
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
- ps: Push-AppveyorArtifact ${env:APPVEYOR_BUILD_FOLDER}\stdout.log
- ps: Push-AppveyorArtifact ${env:APPVEYOR_BUILD_FOLDER}\stderr.log
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL
- ps: ./send.ps1 failure $env:WEBHOOK_URL
+2
View File
@@ -0,0 +1,2 @@
pushd "%~dp0"
start ModOrganizer.exe --crashdump
+245 -17
View File
@@ -9,6 +9,28 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(PROJ_ARCH x64)
ENDIF()
macro(add_msvc_precompiled_header PrecompiledHeader PrecompiledSource SourcesVar HeadersVar)
if(MSVC)
get_filename_component(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
set(PrecompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${PrecompiledBasename}.pch")
set(Sources ${${SourcesVar}})
set_source_files_properties(
${PrecompiledSource} PROPERTIES
COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\""
OBJECT_OUTPUTS "${PrecompiledBinary}")
set_source_files_properties(
${Sources} PROPERTIES
COMPILE_FLAGS "/Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\""
OBJECT_DEPENDS "${PrecompiledBinary}")
list(APPEND ${SourcesVar} ${PrecompiledSource})
list(APPEND ${HeadersVar} ${PrecompiledHeader})
endif(MSVC)
endmacro(add_msvc_precompiled_header)
SET(organizer_SRCS
transfersavesdialog.cpp
syncoverwritedialog.cpp
@@ -32,6 +54,14 @@ SET(organizer_SRCS
modlist.cpp
modidlineedit.cpp
modinfodialog.cpp
modinfodialogcategories.cpp
modinfodialogconflicts.cpp
modinfodialogesps.cpp
modinfodialogfiletree.cpp
modinfodialogimages.cpp
modinfodialognexus.cpp
modinfodialogtab.cpp
modinfodialogtextfiles.cpp
modinfo.cpp
modinfobackup.cpp
modinfoforeign.cpp
@@ -93,6 +123,12 @@ SET(organizer_SRCS
lcdnumber.cpp
forcedloaddialog.cpp
forcedloaddialogwidget.cpp
filterwidget.cpp
statusbar.cpp
apiuseraccount.cpp
filerenamer.cpp
texteditor.cpp
expanderwidget.cpp
shared/windows_error.cpp
shared/error_report.cpp
@@ -126,6 +162,15 @@ SET(organizer_HDRS
modlist.h
modidlineedit.h
modinfodialog.h
modinfodialogcategories.h
modinfodialogconflicts.h
modinfodialogesps.h
modinfodialogfiletree.h
modinfodialogfwd.h
modinfodialogimages.h
modinfodialognexus.h
modinfodialogtab.h
modinfodialogtextfiles.h
modinfo.h
modinfobackup.h
modinfoforeign.h
@@ -183,12 +228,17 @@ SET(organizer_HDRS
instancemanager.h
usvfsconnector.h
eventfilter.h
descriptionpage.h
moshortcut.h
listdialog.h
lcdnumber.h
forcedloaddialog.h
forcedloaddialogwidget.h
filterwidget.h
statusbar.h
apiuseraccount.h
filerenamer.h
texteditor.h
expanderwidget.h
shared/windows_error.h
shared/error_report.h
@@ -203,7 +253,6 @@ SET(organizer_HDRS
SET(organizer_UIS
transfersavesdialog.ui
syncoverwritedialog.ui
simpleinstalldialog.ui
settingsdialog.ui
selectiondialog.ui
queryoverwritedialog.ui
@@ -215,8 +264,6 @@ SET(organizer_UIS
mainwindow.ui
lockeddialog.ui
waitingonclosedialog.ui
installdialog.ui
finddialog.ui
editexecutablesdialog.ui
credentialsdialog.ui
categoriesdialog.ui
@@ -243,16 +290,191 @@ SET(organizer_RCS
)
SOURCE_GROUP(Source FILES ${organizer_SRCS})
SOURCE_GROUP(Headers FILES ${organizer_HDRS})
SOURCE_GROUP(UI FILES ${organizer_UIS})
source_group(src REGULAR_EXPRESSION ".*\\.(h|cpp|ui)")
set(application
iuserinterface
main
mainwindow
moapplication
moshortcut
selfupdater
singleinstance
statusbar
)
set(browser
browserdialog
browserview
)
set(core
categories
shared/directoryentry
directoryrefresher
installationmanager
instancemanager
loadmechanism
nexusinterface
nxmaccessmanager
organizercore
organizerproxy
apiuseraccount
)
set(dialogs
aboutdialog
activatemodsdialog
categoriesdialog
credentialsdialog
filedialogmemory
forcedloaddialog
forcedloaddialogwidget
listdialog
messagedialog
motddialog
overwriteinfodialog
queryoverwritedialog
problemsdialog
savetextasdialog
selectiondialog
syncoverwritedialog
transfersavesdialog
waitingonclosedialog
)
set(downloads
downloadlist
downloadlistsortproxy
downloadlistwidget
downloadmanager
)
set(executables
executableslist
editexecutablesdialog
)
set(locking
ilockedwaitingforprocess
lockeddialog
lockeddialogbase
)
set(modinfo
modinfo
modinfobackup
modinfoforeign
modinfooverwrite
modinforegular
modinfoseparator
modinfowithconflictinfo
)
set(modinfo\\dialog
modinfodialog
modinfodialogcategories
modinfodialogconflicts
modinfodialogesps
modinfodialogfiletree
modinfodialogfwd
modinfodialogimages
modinfodialognexus
modinfodialogtab
modinfodialogtextfiles
)
set(modlist
modlist
modlistsortproxy
modlistview
)
set(plugins
plugincontainer
pluginlist
pluginlistsortproxy
pluginlistview
)
set(previews
previewdialog
previewgenerator
)
set(profiles
profile
profileinputdialog
profilesdialog
)
set(settings
settings
settingsdialog
)
set(utilities
shared/appconfig
bbcode
csvbuilder
shared/error_report
eventfilter
helper
shared/leaktrace
persistentcookiejar
serverinfo
spawn
shared/stackdata
shared/util
usvfsconnector
shared/windows_error
)
set(widgets
expanderwidget
genericicondelegate
filerenamer
filterwidget
icondelegate
lcdnumber
logbuffer
loghighlighter
modflagicondelegate
modidlineedit
noeditdelegate
qtgroupingproxy
texteditor
viewmarkingscrollbar
)
set(src_filters
application core browser dialogs downloads executables locking modinfo modinfo\\dialog
modlist plugins previews profiles settings utilities widgets
)
foreach(filter in list ${src_filters})
set(files)
foreach(d in lists ${${filter}})
set(files ${files} ${d}.cpp ${d}.h ${d}.inc ${d}.ui)
endforeach()
source_group(src\\${filter} FILES ${files})
endforeach()
file(GLOB_RECURSE rule_files ../vsbuild/CMakeFiles/*.rule)
file(GLOB qm_files ../vsbuild/src/*.qm)
source_group(cmake FILES CMakeLists.txt)
source_group(autogen FILES ${rule_files} ${qm_files})
source_group(resources FILES ${organizer_RCS} ${organizer_QRCS})
# MO projects
SET(dependency_project_path "${DEPENDENCIES_DIR}")
SET(default_project_path "${DEPENDENCIES_DIR}/modorganizer_super")
GET_FILENAME_COMPONENT(${default_project_path} ${default_project_path} REALPATH)
SET(project_path "${default_project_path}" CACHE PATH "path to the other mo projects")
add_msvc_precompiled_header("pch.h" "pch.cpp" organizer_SRCS organizer_HDRS)
#TODO this should not be a hardcoded path
SET(lib_path "${project_path}/../../install/libs")
@@ -260,6 +482,8 @@ SET(lib_path "${project_path}/../../install/libs")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON)
SET(CMAKE_AUTORCC ON)
FIND_PACKAGE(Qt5Widgets REQUIRED)
FIND_PACKAGE(Qt5QuickWidgets REQUIRED)
FIND_PACKAGE(Qt5Quick REQUIRED)
@@ -269,10 +493,14 @@ FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED)
FIND_PACKAGE(Qt5WebSockets REQUIRED)
FIND_PACKAGE(Qt5Qml REQUIRED)
FIND_PACKAGE(Qt5LinguistTools)
QT5_WRAP_UI(organizer_UIHDRS ${organizer_UIS})
QT5_ADD_RESOURCES(organizer_RCCPPS ${organizer_QRCS})
SET(mo_translation_sources ${CMAKE_SOURCE_DIR}/src ${project_path}/uibase/src)
QT5_CREATE_TRANSLATION(organizer_translations_qm ${mo_translation_sources} ${CMAKE_SOURCE_DIR}/src/organizer_en.ts)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP autogen)
set_property(GLOBAL PROPERTY AUTOMOC_SOURCE_GROUP autogen)
set_property(GLOBAL PROPERTY AUTORCC_SOURCE_GROUP autogen)
QT5_CREATE_TRANSLATION(organizer_translations_qm ${mo_translation_sources} ${CMAKE_SOURCE_DIR}/src/organizer_en.ts OPTIONS -silent)
ADD_CUSTOM_TARGET(translations DEPENDS ${organizer_translations_qm})
INCLUDE_DIRECTORIES(${Qt5Declarative_INCLUDES})
@@ -301,12 +529,12 @@ INCLUDE_DIRECTORIES(${project_path}/uibase/src
${project_path}/game_gamebryo/src/creation
${project_path}/game_features/src
${project_path}/githubpp/src
${LZ4_ROOT}/include)
${LZ4_ROOT}/lib)
INCLUDE_DIRECTORIES(shared ${ZLIB_INCLUDE_DIRS})
LINK_DIRECTORIES(${lib_path}
${ZLIB_ROOT}/lib
${LZ4_ROOT}/dll)
${LZ4_ROOT}/bin)
EXECUTE_PROCESS(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
@@ -322,7 +550,7 @@ ELSE()
SET(usvfs_name usvfs_x86)
ENDIF()
ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIHDRS} ${organizer_RCS} ${organizer_RCCPPS} ${organizer_translations_qm})
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
@@ -333,7 +561,7 @@ TARGET_LINK_LIBRARIES(ModOrganizer
Dbghelp advapi32 Version Shlwapi liblz4 Crypt32)
IF (MSVC)
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS "/std:c++latest")
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS "/std:c++latest /permissive-")
ENDIF()
IF (MSVC AND "${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
# 32 bits
@@ -375,11 +603,11 @@ SET(windeploy_parameters "--no-translations --plugindir qtplugins --libdir dlls
INSTALL(
CODE
"EXECUTE_PROCESS(COMMAND
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets --websockets ${windeploy_parameters}
${qt5bin}/windeployqt.exe --verbose 0 ModOrganizer.exe --webenginewidgets --websockets ${windeploy_parameters}
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
)
EXECUTE_PROCESS(COMMAND
${qt5bin}/windeployqt.exe uibase.dll ${windeploy_parameters}
${qt5bin}/windeployqt.exe --verbose 0 uibase.dll ${windeploy_parameters}
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
)
file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/bin/platforms)
+2 -2
View File
@@ -115,7 +115,7 @@ void AboutDialog::on_creditsList_currentItemChanged(QListWidgetItem *current, QL
}
}
void AboutDialog::on_copyrightText_linkActivated(const QString &link)
void AboutDialog::on_sourceText_linkActivated(const QString &link)
{
emit linkClicked(link);
}
}
+1 -1
View File
@@ -74,7 +74,7 @@ private:
private slots:
void on_creditsList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
void on_copyrightText_linkActivated(const QString &link);
void on_sourceText_linkActivated(const QString &link);
private:
+46 -13
View File
@@ -120,20 +120,43 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copyright 2011-2016 Sebastian Herbord&lt;/p&gt;&lt;p&gt;Copyright 2016-2018 Mod Organizer 2 contributors&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copyright © 2011-2016 Sebastian Herbord&lt;br/&gt;Copyright © 2016-2019 Mod Organizer 2 Contributors&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="copyrightText">
<property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;&lt;p&gt;See the GNU General Public License for more details.&lt;/p&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 notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;&lt;p&gt;See the GNU General Public License for more details.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" 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>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="software">
@@ -157,7 +180,7 @@
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Lead Developers/ Maintainers</string>
<string>Lead Developers &amp;&amp; Maintainers</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
@@ -175,11 +198,6 @@
<string notr="true">AL12</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">erasmux</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Silarn</string>
@@ -198,7 +216,7 @@
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Mo2 devs and Contributors</string>
<string>MO2 Developers &amp;&amp; Contributors</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="0">
<item>
@@ -213,12 +231,22 @@
</item>
<item>
<property name="text">
<string>Project579</string>
<string notr="true">erasmux</string>
</property>
</item>
<item>
<property name="text">
<string>przester</string>
<string notr="true">isanae</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Project579</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">przester</string>
</property>
</item>
</widget>
@@ -292,6 +320,11 @@
<string notr="true">pndrev (German)</string>
</property>
</item>
<item>
<property name="text">
<string>yohru (Japanese)</string>
</property>
</item>
<item>
<property name="text">
<string>Mordan (Greek)</string>
@@ -342,12 +375,12 @@
</item>
<item>
<property name="text">
<string>yohru (Japanese)</string>
<string>Nubbie (Swedish)</string>
</property>
</item>
<item>
<property name="text">
<string>...and all other Transifex contributors!</string>
<string>...and all other contributors!</string>
</property>
<property name="toolTip">
<string/>
+67
View File
@@ -0,0 +1,67 @@
#include "apiuseraccount.h"
APIUserAccount::APIUserAccount()
: m_type(APIUserAccountTypes::None)
{
}
const QString& APIUserAccount::id() const
{
return m_id;
}
const QString& APIUserAccount::name() const
{
return m_name;
}
APIUserAccountTypes APIUserAccount::type() const
{
return m_type;
}
const APILimits& APIUserAccount::limits() const
{
return m_limits;
}
APIUserAccount& APIUserAccount::id(const QString& id)
{
m_id = id;
return *this;
}
APIUserAccount& APIUserAccount::name(const QString& name)
{
m_name = name;
return *this;
}
APIUserAccount& APIUserAccount::type(APIUserAccountTypes type)
{
m_type = type;
return *this;
}
APIUserAccount& APIUserAccount::limits(const APILimits& limits)
{
m_limits = limits;
return *this;
}
int APIUserAccount::remainingRequests() const
{
return std::max(
m_limits.remainingDailyRequests,
m_limits.remainingHourlyRequests);
}
bool APIUserAccount::shouldThrottle() const
{
return (remainingRequests() < ThrottleThreshold);
}
bool APIUserAccount::exhausted() const
{
return (remainingRequests() <= 0);
}
+129
View File
@@ -0,0 +1,129 @@
#ifndef APIUSERACCOUNT_H
#define APIUSERACCOUNT_H
#include <QString>
/**
* represents user account types on a mod provider website such as nexus
*/
enum class APIUserAccountTypes
{
// not logged in
None = 0,
// regular account
Regular,
// premium account
Premium
};
/**
* current limits imposed on the user account
**/
struct APILimits
{
// maximum number of requests per day
int maxDailyRequests = 0;
// remaining number of requests today
int remainingDailyRequests = 0;
// maximum number of requests per hour
int maxHourlyRequests = 0;
// remaining number of requests this hour
int remainingHourlyRequests = 0;
};
/**
* API statistics
*/
struct APIStats
{
// number of API requests currently queued
int requestsQueued = 0;
};
/**
* represents a user account on the mod provier website
*/
class APIUserAccount
{
public:
// when the number of remanining requests is under this number, further
// requests will be throttled by avoiding non-critical ones
static const int ThrottleThreshold = 200;
APIUserAccount();
/**
* user id
*/
const QString& id() const;
/**
* user name
*/
const QString& name() const;
/**
* account type
*/
APIUserAccountTypes type() const;
/**
* current API limits
*/
const APILimits& limits() const;
/**
* sets the user id
*/
APIUserAccount& id(const QString& id);
/**
* sets the user name
**/
APIUserAccount& name(const QString& name);
/**
* sets the acount type
*/
APIUserAccount& type(APIUserAccountTypes type);
/**
* sets the current limits
*/
APIUserAccount& limits(const APILimits& limits);
/**
* returns the number of remaining requests
*/
int remainingRequests() const;
/**
* whether the number of remaining requests is low enough that further
* requests should be throttled
*/
bool shouldThrottle() const;
/**
* true if all the remaining requests have been used and the API will refuse
* further requests
*/
bool exhausted() const;
private:
QString m_id, m_name;
APIUserAccountTypes m_type;
APILimits m_limits;
APIStats m_stats;
};
#endif // APIUSERACCOUNT_H
+7 -5
View File
@@ -137,11 +137,13 @@ private:
m_TagMap["center"] = std::make_pair(QRegExp("\\[center\\](.*)\\[/center\\]"),
"<div align=\"center\">\\1</div>");
m_TagMap["quote"] = std::make_pair(QRegExp("\\[quote\\](.*)\\[/quote\\]"),
"<blockquote>\"\\1\"</blockquote>");
"<figure class=\"quote\"><blockquote>\\1</blockquote></figure>");
m_TagMap["quote="] = std::make_pair(QRegExp("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"),
"<blockquote>\"\\2\"<br/><span>--\\1</span></blockquote></p>");
"<figure class=\"quote\"><blockquote>\\2</blockquote></figure>");
m_TagMap["spoiler"] = std::make_pair(QRegExp("\\[spoiler\\](.*)\\[/spoiler\\]"),
"<details><summary>Spoiler: <div class=\"bbc_spoiler_show\">Show</div></summary><div class=\"spoiler_content\">\\1</div></details>");
m_TagMap["code"] = std::make_pair(QRegExp("\\[code\\](.*)\\[/code\\]"),
"<pre>\\1</pre>");
"<code>\\1</code>");
m_TagMap["heading"]= std::make_pair(QRegExp("\\[heading\\](.*)\\[/heading\\]"),
"<h2><strong>\\1</strong></h2>");
m_TagMap["line"] = std::make_pair(QRegExp("\\[line\\]"),
@@ -174,14 +176,14 @@ private:
"<a href=\"\\1\">\\1</a>");
m_TagMap["url="] = std::make_pair(QRegExp("\\[url=([^\\]]*)\\](.*)\\[/url\\]"),
"<a href=\"\\1\">\\2</a>");
m_TagMap["img"] = std::make_pair(QRegExp("\\[img\\](.*)\\[/img\\]"),
m_TagMap["img"] = std::make_pair(QRegExp("\\[img(?:\\s*width=\\d+\\s*,?\\s*height=\\d+)?\\](.*)\\[/img\\]"),
"<img src=\"\\1\">");
m_TagMap["img="] = std::make_pair(QRegExp("\\[img=([^\\]]*)\\](.*)\\[/img\\]"),
"<img src=\"\\2\" alt=\"\\1\">");
m_TagMap["email="] = std::make_pair(QRegExp("\\[email=\"?([^\\]]*)\"?\\](.*)\\[/email\\]"),
"<a href=\"mailto:\\1\">\\2</a>");
m_TagMap["youtube"] = std::make_pair(QRegExp("\\[youtube\\](.*)\\[/youtube\\]"),
"<a href=\"http://www.youtube.com/v/\\1\">http://www.youtube.com/v/\\1</a>");
"<a href=\"https://www.youtube.com/watch?v=\\1\">https://www.youtube.com/watch?v=\\1</a>");
// make all patterns non-greedy and case-insensitive
-28
View File
@@ -1,28 +0,0 @@
#include <QWebEnginePage>
#ifndef DESCRIPTIONPAGE_H
#define DESCRIPTIONPAGE_H
class DescriptionPage : public QWebEnginePage
{
Q_OBJECT
public:
DescriptionPage(QObject* parent = 0) : QWebEnginePage(parent){}
bool acceptNavigationRequest(const QUrl & url, QWebEnginePage::NavigationType type, bool isMainFrame)
{
if (type == QWebEnginePage::NavigationTypeLinkClicked)
{
emit linkClicked(url);
return false;
}
return true;
}
signals:
void linkClicked(const QUrl&);
};
#endif //DESCRIPTIONPAGE_H
+31 -4
View File
@@ -47,7 +47,7 @@ int DownloadList::rowCount(const QModelIndex&) const
int DownloadList::columnCount(const QModelIndex&) const
{
return 4;
return COL_COUNT;
}
@@ -69,6 +69,9 @@ QVariant DownloadList::headerData(int section, Qt::Orientation orientation, int
(orientation == Qt::Horizontal)) {
switch (section) {
case COL_NAME: return tr("Name");
case COL_MODNAME: return tr("Mod name");
case COL_VERSION: return tr("Version");
case COL_ID: return tr("Nexus ID");
case COL_SIZE: return tr("Size");
case COL_STATUS: return tr("Status");
case COL_FILETIME: return tr("Filetime");
@@ -93,6 +96,30 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const
} else {
switch (index.column()) {
case COL_NAME: return m_MetaDisplay ? m_Manager->getDisplayName(index.row()) : m_Manager->getFileName(index.row());
case COL_MODNAME: {
if (m_Manager->isInfoIncomplete(index.row())) {
return {};
} else {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(index.row());
return info->modName;
}
}
case COL_VERSION: {
if (m_Manager->isInfoIncomplete(index.row())) {
return {};
} else {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(index.row());
return info->version.canonicalString();
}
}
case COL_ID: {
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_FILETIME: return m_Manager->getFileTime(index.row());
case COL_STATUS:
@@ -143,10 +170,10 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const
&& m_Manager->isInfoIncomplete(index.row()))
return QIcon(":/MO/gui/warning_16");
} else if (role == Qt::TextAlignmentRole) {
if (index.column() == COL_NAME)
return QVariant(Qt::AlignVCenter | Qt::AlignLeft);
else
if (index.column() == COL_SIZE)
return QVariant(Qt::AlignVCenter | Qt::AlignRight);
else
return QVariant(Qt::AlignVCenter | Qt::AlignLeft);
}
return QVariant();
}
+7 -1
View File
@@ -39,7 +39,13 @@ public:
COL_NAME = 0,
COL_STATUS,
COL_SIZE,
COL_FILETIME
COL_FILETIME,
COL_MODNAME,
COL_VERSION,
COL_ID,
// number of columns
COL_COUNT
};
public:
+42
View File
@@ -43,6 +43,48 @@ bool DownloadListSortProxy::lessThan(const QModelIndex &left,
&& (rightIndex < m_Manager->numTotalDownloads())) {
if (left.column() == DownloadList::COL_NAME) {
return m_Manager->getFileName(left.row()).compare(m_Manager->getFileName(right.row()), Qt::CaseInsensitive) < 0;
} else if (left.column() == DownloadList::COL_MODNAME) {
QString leftName, rightName;
if (!m_Manager->isInfoIncomplete(left.row())) {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(left.row());
leftName = info->modName;
}
if (!m_Manager->isInfoIncomplete(right.row())) {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(right.row());
rightName = info->modName;
}
return leftName.compare(rightName, Qt::CaseInsensitive) < 0;
} else if (left.column() == DownloadList::COL_VERSION) {
MOBase::VersionInfo versionLeft, versionRight;
if (!m_Manager->isInfoIncomplete(left.row())) {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(left.row());
versionLeft = info->version;
}
if (!m_Manager->isInfoIncomplete(right.row())) {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(right.row());
versionRight = info->version;
}
return versionLeft < versionRight;
} else if (left.column() == DownloadList::COL_ID) {
int leftID=0, rightID=0;
if (!m_Manager->isInfoIncomplete(left.row())) {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(left.row());
leftID = info->modID;
}
if (!m_Manager->isInfoIncomplete(right.row())) {
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(right.row());
rightID = info->modID;
}
return leftID < rightID;
} else if (left.column() == DownloadList::COL_STATUS) {
DownloadManager::DownloadState leftState = m_Manager->getState(left.row());
DownloadManager::DownloadState rightState = m_Manager->getState(right.row());
+24 -15
View File
@@ -123,6 +123,15 @@ DownloadListWidget::~DownloadListWidget()
void DownloadListWidget::setManager(DownloadManager *manager)
{
m_Manager = manager;
// hide these columns by default
//
// note that this is overridden by the ini if MO has been started at least
// once before, which is handled in MainWindow::processUpdates() for older
// versions
header()->hideSection(DownloadList::COL_MODNAME);
header()->hideSection(DownloadList::COL_VERSION);
header()->hideSection(DownloadList::COL_ID);
}
void DownloadListWidget::setSourceModel(DownloadList *sourceModel)
@@ -199,7 +208,7 @@ void DownloadListWidget::onCustomContextMenu(const QPoint &point)
if (state >= DownloadManager::STATE_READY) {
menu.addAction(tr("Install"), this, SLOT(issueInstall()));
if (m_Manager->isInfoIncomplete(m_ContextRow))
if (m_Manager->isInfoIncomplete(m_ContextRow))
menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfoMd5()));
else
menu.addAction(tr("Visit on Nexus"), this, SLOT(issueVisitOnNexus()));
@@ -226,9 +235,9 @@ void DownloadListWidget::onCustomContextMenu(const QPoint &point)
menu.addSeparator();
}
menu.addAction(tr("Delete Installed..."), this, SLOT(issueDeleteCompleted()));
menu.addAction(tr("Delete Uninstalled..."), this, SLOT(issueDeleteUninstalled()));
menu.addAction(tr("Delete All..."), this, SLOT(issueDeleteAll()));
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()));
menu.addSeparator();
if (!hidden) {
@@ -259,8 +268,8 @@ void DownloadListWidget::issueQueryInfoMd5()
void DownloadListWidget::issueDelete()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will permanently delete the selected download."),
if (QMessageBox::warning(nullptr, tr("Delete Files?"),
tr("This will permanently delete the selected download.\n\nAre you absolutely sure you want to proceed?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(m_ContextRow, true);
}
@@ -314,8 +323,8 @@ void DownloadListWidget::issueResume()
void DownloadListWidget::issueDeleteAll()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all finished downloads from this list and from disk."),
if (QMessageBox::warning(nullptr, tr("Delete Files?"),
tr("This will remove all finished downloads from this list and from disk.\n\nAre you absolutely sure you want to proceed?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-1, true);
}
@@ -323,8 +332,8 @@ void DownloadListWidget::issueDeleteAll()
void DownloadListWidget::issueDeleteCompleted()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all installed downloads from this list and from disk."),
if (QMessageBox::warning(nullptr, tr("Delete Files?"),
tr("This will remove all installed downloads from this list and from disk.\n\nAre you absolutely sure you want to proceed?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-2, true);
}
@@ -332,8 +341,8 @@ void DownloadListWidget::issueDeleteCompleted()
void DownloadListWidget::issueDeleteUninstalled()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all uninstalled downloads from this list and from disk."),
if (QMessageBox::warning(nullptr, tr("Delete Files?"),
tr("This will remove all uninstalled downloads from this list and from disk.\n\nAre you absolutely sure you want to proceed?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-3, true);
}
@@ -341,7 +350,7 @@ void DownloadListWidget::issueDeleteUninstalled()
void DownloadListWidget::issueRemoveFromViewAll()
{
if (QMessageBox::question(nullptr, tr("Are you sure?"),
if (QMessageBox::question(nullptr, tr("Hide Files?"),
tr("This will remove all finished downloads from this list (but NOT from disk)."),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-1, false);
@@ -350,7 +359,7 @@ void DownloadListWidget::issueRemoveFromViewAll()
void DownloadListWidget::issueRemoveFromViewCompleted()
{
if (QMessageBox::question(nullptr, tr("Are you sure?"),
if (QMessageBox::question(nullptr, tr("Hide Files?"),
tr("This will remove all installed downloads from this list (but NOT from disk)."),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-2, false);
@@ -359,7 +368,7 @@ void DownloadListWidget::issueRemoveFromViewCompleted()
void DownloadListWidget::issueRemoveFromViewUninstalled()
{
if (QMessageBox::question(nullptr, tr("Are you sure?"),
if (QMessageBox::question(nullptr, tr("Hide Files?"),
tr("This will remove all uninstalled downloads from this list (but NOT from disk)."),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-3, false);
+30 -19
View File
@@ -549,10 +549,21 @@ void DownloadManager::addNXMDownload(const QString &url)
NXMUrl nxmInfo(url);
QStringList validGames;
MOBase::IPluginGame* foundGame = nullptr;
validGames.append(m_ManagedGame->gameShortName());
validGames.append(m_ManagedGame->validShortNames());
for (auto game : validGames) {
MOBase::IPluginGame* gamePlugin = m_OrganizerCore->getGame(game);
if (
nxmInfo.game().compare(gamePlugin->gameShortName(), Qt::CaseInsensitive) == 0 ||
nxmInfo.game().compare(gamePlugin->gameNexusName(), Qt::CaseInsensitive) == 0
) {
foundGame = gamePlugin;
break;
}
}
qDebug("add nxm download: %s", qUtf8Printable(url));
if (!validGames.contains(nxmInfo.game(), Qt::CaseInsensitive)) {
if (foundGame == nullptr) {
qDebug("download requested for wrong game (game: %s, url: %s)", qUtf8Printable(m_ManagedGame->gameShortName()), qUtf8Printable(nxmInfo.game()));
QMessageBox::information(nullptr, tr("Wrong Game"), tr("The download link is for a mod for \"%1\" but this instance of MO "
"has been set up for \"%2\".").arg(nxmInfo.game()).arg(m_ManagedGame->gameShortName()), QMessageBox::Ok);
@@ -560,7 +571,7 @@ void DownloadManager::addNXMDownload(const QString &url)
}
for (auto tuple : m_PendingDownloads) {
if (std::get<0>(tuple).compare(nxmInfo.game(), Qt::CaseInsensitive) == 0, std::get<1>(tuple) == nxmInfo.modId() && std::get<2>(tuple) == nxmInfo.fileId()) {
if (std::get<0>(tuple).compare(foundGame->gameShortName(), Qt::CaseInsensitive) == 0, std::get<1>(tuple) == nxmInfo.modId() && std::get<2>(tuple) == nxmInfo.fileId()) {
QString debugStr("download requested is already queued (mod: %1, file: %2)");
QString infoStr(tr("There is already a download queued for this file.\n\nMod %1\nFile %2"));
@@ -620,7 +631,7 @@ void DownloadManager::addNXMDownload(const QString &url)
emit aboutToUpdate();
m_PendingDownloads.append(std::make_tuple(nxmInfo.game(), nxmInfo.modId(), nxmInfo.fileId()));
m_PendingDownloads.append(std::make_tuple(foundGame->gameShortName(), nxmInfo.modId(), nxmInfo.fileId()));
emit update(-1);
emit downloadAdded();
@@ -628,9 +639,10 @@ void DownloadManager::addNXMDownload(const QString &url)
info->nexusKey = nxmInfo.key();
info->nexusExpires = nxmInfo.expires();
info->nexusDownloadUser = nxmInfo.userId();
QObject *test = info;
m_RequestIDs.insert(m_NexusInterface->requestFileInfo(nxmInfo.game(), nxmInfo.modId(), nxmInfo.fileId(), this, qVariantFromValue(test), ""));
m_RequestIDs.insert(m_NexusInterface->requestFileInfo(foundGame->gameShortName(), nxmInfo.modId(), nxmInfo.fileId(), this, qVariantFromValue(test), ""));
}
@@ -1029,14 +1041,14 @@ void DownloadManager::openFile(int index)
reportError(tr("OpenFile: invalid download index %1").arg(index));
return;
}
QDir path = QDir(m_OutputDirectory);
if (path.exists(getFileName(index))) {
::ShellExecuteW(nullptr, L"open", ToWString(QDir::toNativeSeparators(getFilePath(index))).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
shell::OpenFile(getFilePath(index));
return;
}
::ShellExecuteW(nullptr, L"explore", ToWString(QDir::toNativeSeparators(m_OutputDirectory)).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
shell::ExploreFile(m_OutputDirectory);
return;
}
@@ -1046,23 +1058,22 @@ void DownloadManager::openInDownloadsFolder(int index)
reportError(tr("OpenFileInDownloadsFolder: invalid download index %1").arg(index));
return;
}
QString params = "/select,\"";
QDir path = QDir(m_OutputDirectory);
if (path.exists(getFileName(index))) {
params = params + QDir::toNativeSeparators(getFilePath(index)) + "\"";
::ShellExecuteW(nullptr, nullptr, L"explorer", ToWString(params).c_str(), nullptr, SW_SHOWNORMAL);
const auto path = getFilePath(index);
if (QFile::exists(path)) {
shell::ExploreFile(path);
return;
}
else if (path.exists(getFileName(index) + ".unfinished")) {
params = params + QDir::toNativeSeparators(getFilePath(index)+".unfinished") + "\"";
::ShellExecuteW(nullptr, nullptr, L"explorer", ToWString(params).c_str(), nullptr, SW_SHOWNORMAL);
return;
else {
const auto unfinished = path + ".unfinished";
if (QFile::exists(unfinished)) {
shell::ExploreFile(unfinished);
return;
}
}
::ShellExecuteW(nullptr, L"explore", ToWString(QDir::toNativeSeparators(m_OutputDirectory)).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
return;
shell::ExploreFile(m_OutputDirectory);
}
File diff suppressed because it is too large Load Diff
+154 -59
View File
@@ -22,17 +22,118 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "tutorabledialog.h"
#include <QListWidgetItem>
#include <QTimer>
#include "executableslist.h"
#include "profile.h"
#include "iplugingame.h"
#include <QTimer>
#include <QAbstractButton>
#include <optional>
namespace Ui {
class EditExecutablesDialog;
}
class ModList;
class OrganizerCore;
/** helper class to manage custom overwrites within the edit executables
* dialog, stores a T and a bool in map indexed by a QString
**/
template <class T>
class ToggableMap
{
public:
struct Value
{
bool enabled;
T value;
Value(bool b, T&& v)
: enabled(b), value(std::forward<T>(v))
{
}
};
/**
* returns the Value associated with the given title, or empty
**/
std::optional<Value> find(const QString& title) const
{
auto itor = m_map.find(title);
if (itor == m_map.end()) {
return {};
}
return itor->second;
}
/**
* sets the given value, adds it if not found
**/
void set(QString title, bool b, T value)
{
m_map.insert_or_assign(std::move(title), Value(b, std::move(value)));
}
/**
* sets whether the given value is enabled, inserts it if not found
**/
void setEnabled(const QString& title, bool b)
{
auto itor = m_map.find(title);
if (itor == m_map.end()) {
m_map.emplace(title, Value(b, {}));
} else {
itor->second.enabled = b;
}
}
/**
* sets the given value, inserts it enabled if not found
**/
void setValue(const QString& title, T value)
{
auto itor = m_map.find(title);
if (itor == m_map.end()) {
m_map.emplace(title, Value(true, std::move(value)));
} else {
itor->second.value = std::move(value);
}
}
/**
* renames the given value, ignored if not found
**/
void rename(const QString& oldTitle, QString newTitle)
{
auto itor = m_map.find(oldTitle);
if (itor == m_map.end()) {
return;
}
// move to new title, erase old
m_map.emplace(std::move(newTitle), std::move(itor->second));
m_map.erase(itor);
}
/**
* removes the given value, ignored if not found
**/
void remove(const QString& title)
{
auto itor = m_map.find(title);
if (itor == m_map.end()) {
return;
}
m_map.erase(itor);
}
private:
std::map<QString, Value> m_map;
};
/**
@@ -43,85 +144,79 @@ class EditExecutablesDialog : public MOBase::TutorableDialog
Q_OBJECT
public:
using CustomOverwrites = ToggableMap<QString>;
using ForcedLibraries = ToggableMap<QList<MOBase::ExecutableForcedLoadSetting>>;
/**
* @brief constructor
*
* @param executablesList current list of executables
* @param parent parent widget
**/
explicit EditExecutablesDialog(const ExecutablesList &executablesList,
const ModList &modList,
Profile *profile,
const MOBase::IPluginGame *game,
QWidget *parent = 0);
explicit EditExecutablesDialog(OrganizerCore& oc, QWidget* parent=nullptr);
~EditExecutablesDialog();
/**
* @brief retrieve the updated list of executables
*
* @return updated list of executables
**/
ExecutablesList getExecutablesList() const;
void saveExecutable();
const CustomOverwrites& getCustomOverwrites() const;
const ForcedLibraries& getForcedLibraries() const;
private slots:
void on_newFilesModCheckBox_toggled(bool checked);
void on_list_itemSelectionChanged();
private slots:
void on_reset_clicked();
void on_add_clicked();
void on_remove_clicked();
void on_up_clicked();
void on_down_clicked();
void on_binaryEdit_textChanged(const QString &arg1);
void on_title_textChanged(const QString& s);
void on_overwriteSteamAppID_toggled(bool checked);
void on_createFilesInMod_toggled(bool checked);
void on_forceLoadLibraries_toggled(bool checked);
void on_workingDirEdit_textChanged(const QString &arg1);
void on_browseBinary_clicked();
void on_browseWorkingDirectory_clicked();
void on_configureLibraries_clicked();
void on_addButton_clicked();
void on_browseButton_clicked();
void on_removeButton_clicked();
void on_titleEdit_textChanged(const QString &arg1);
void on_overwriteAppIDBox_toggled(bool checked);
void on_browseDirButton_clicked();
void on_closeButton_clicked();
void delayedRefresh();
void on_executablesListBox_itemSelectionChanged();
void on_executablesListBox_clicked(const QModelIndex &index);
void on_forceLoadButton_clicked();
void on_forceLoadCheckBox_toggled();
void on_buttons_clicked(QAbstractButton* b);
private:
std::unique_ptr<Ui::EditExecutablesDialog> ui;
OrganizerCore& m_organizerCore;
void resetInput();
// copy of the original executables, used to clear the current settings when
// committing changes
const ExecutablesList m_originalExecutables;
void refreshExecutablesWidget();
// current executable list
ExecutablesList m_executablesList;
bool executableChanged();
// custom overwrites set in the dialog
CustomOverwrites m_customOverwrites;
void updateButtonStates();
// forced libraries set in the dialog
ForcedLibraries m_forcedLibraries;
private:
Ui::EditExecutablesDialog *ui;
// true when the change events being triggered are in response to loading
// the executable's data into the UI, not from a user change
bool m_settingUI;
QListWidgetItem *m_CurrentItem;
ExecutablesList m_ExecutablesList;
void loadCustomOverwrites();
void loadForcedLibraries();
Profile *m_Profile;
QListWidgetItem* selectedItem();
Executable* selectedExe();
QList<MOBase::ExecutableForcedLoadSetting> m_ForcedLibraries;
const MOBase::IPluginGame *m_GamePlugin;
void fillList();
QListWidgetItem* createListItem(const Executable& exe);
void updateUI(const QListWidgetItem* item, const Executable* e);
void clearEdits();
void setEdits(const Executable& e);
void setButtons(const QListWidgetItem* item, const Executable* e);
void save();
void saveOrder();
bool canMove(const QListWidgetItem* item, int direction);
void move(QListWidgetItem* item, int direction);
void setJarBinary(const QString& binaryName);
bool isTitleConflicting(const QString& s);
void commitChanges();
void setDirty(bool b);
};
#endif // EDITEXECUTABLESDIALOG_H
File diff suppressed because it is too large Load Diff
+342 -117
View File
File diff suppressed because it is too large Load Diff

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