Commit Graph

33 Commits (11761c5a1db02aec3096f07ca8f3c3231d8eb34a)

Author SHA1 Message Date
AnyOldName3 cd7941dc9f Some launcher fixes
I tried to fix https://gitlab.com/OpenMW/openmw/-/issues/8080 by making it so that instead of crashing, we showed an error.

In doing so, I discovered some problems with plugin sorting and the refresh button, like:
* it forgetting the non-user content files somewhere
* nothing guaranteeing that built-in content files stay at the top of the list and them only being there because the first data directory that provides them is usually the first data directory
* it forgetting the non-user content files somewhere else
* it looking like it'd forget any kind of non-user setting under certain circumstances

I fixed those problems too
5 months ago
AnyOldName3 a130ca57a4 Track source of settings
This one's a biggie.

The basic idea's that GameSettings should know:
* what the interpreted value of a setting is, so it can actually be used.
* what the original value the user put in their config was, so it can be put back when the config's saved.
* which path it's processing the openmw.cfg from so relative paths can be resolved correctly.
* whether a setting's a user setting that can be modified, or from one of the other openmw.cfg files that can't necessarily be modified.

This had fairly wide-reaching implications.

The first is that paths are resolved properly in cases where they previously wouldn't have been.
Without this commit, if the launcher saw a relative path in an openmw.cfg, it'd be resolved relative to the process' working directory (which we always set to the binary directory for reasons I won't get into).
That's not what the engine does, so is bad.
It's also not something a user's likely to suspect.
This mess is no longer a problem as paths are resolved correctly when they're loaded instead of on demand when they're used by whatever uses them.

Another problem was that if paths used slugs like ?userconfig? would be written back to openmw.cfg with the slugs replaced, which defeats the object of using the slugs.
This is also fixed.

Tracking which settings are user settings and which are in a non-editable openmw.cfg allows the launcher to grey out rows so they can't be edited (which is sensible as they can't be edited on-disk) while still being aware of content files that are provided by non-user data directories etc.
This is done in a pretty straightforward way for the data directories and fallback-archives, as those bits of UI are basic, but it's more complicated for content files as that uses a nmodel/view approach and has a lot more moving parts.
Thankfully, I'd already implemented that when dealing with builtin.omwscripts, so it just needed wiring up.

One more thing of note is that I made the SettingValue struct storable as a QVariant so it could be attached to the UI widgets as userdata, and then I could just grab the original representation and use it instead of needing any complicated mapping from display value to on-disk value.
10 months ago
Andrei Kortunov 43307bee28 Make ContentSelector errors localizable 11 months ago
Evil Eye 672cefd594 Track checked EsmFile pointers instead of full paths 1 year ago
psi29a 3151452e25 Merge branch 'pandorasbox' into 'master'
Launcher, content selector: support ESM4 files, allow using game files as addon files

See merge request OpenMW/openmw!3219
1 year ago
Andrei Kortunov d3d7a663c6 Move some objects instead of copying 1 year ago
Alexei Dobrohotov 5adda00f5e Content selector: allow using non-primary game files as addon files 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
fredzio b88d32ff5b Add 3 tabs in the "Data Files" page
1 with the data directories
2 with the BSA archives
3 with the content selector

When user select a directory to be added, first we walk the directory
hierarchy to make a list of all potential data= entries. If we find
none, the selected directory is added.

If more than one data directory is found, user is presented with a
directory list to check which one(s) are to be added.

Directories containing one or more content file are marked with an icon.

data= and fallback-archive= lines are handled like content= lines:
- they are part of the profile in launcher.cfg, prefixed by the profile
name
- they are updated in openmw.cfg when profile is selected / created

Directories can be moved in the list by drag and drop or by buttons.
Insertion is possible anywhere in the list.
Global data path and data local are shown but are greyed out, as they
are always included.

No attempt is made to ensure that the user choice are valid
(dependencies, overwrite of content).

After a profile is loaded, any added content is highlighted in green.
3 years ago
Evil Eye a3e039d862 Explicitely sort by file name after adding all data dirs 3 years ago
Petr Mikheev 37386f417e Support *.omwscripts in openmw-launcher 3 years ago
jvoisin 9db7d0278a Sprinkle some const ref 4 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
Capostrophic f20f49daa6 Content selector: allow to copy paths to clipboard (feature #2847) 6 years ago
cc9cii cccf6c6bdd Rebuild the list of available content files when opening the open/new dialogues. Should resolve Bug #2644. 10 years ago
scrawl c04f6cf167 Remove unused code 10 years ago
dteviot 6878e317a7 launcher: decouple Combo Box model from Plug-ins model.
fixes bug reported by scrawl
1. openmw.cfg had content files in order 'Bloodmoon.esm, Tribunal.esm, Morrowind.esm'
2. Blank_ESM_2.0.esm is in the Data Files directory
3. Do an ini file import.
4. Imported profile will have Blank_ESM_2.0.esm as the game file.  Should be Morrowind.esm.

Root cause: Game File combo box and Plugins Grid shared same data model, so changing plug-in file order also changed order of Game File combo box.
10 years ago
dteviot 6dc202cba3 Removed unneeded parameter from ContentModel::setContentList() 10 years ago
scrawl ab9100fa90 Prevent dropping item on itself in ContentModel (Fixes #2334)
Also improves the drop indicator, it is now shown in between items instead of on an item.
10 years ago
dteviot 017e4cd4ef OpenCS shows plug-ins with load order issues.
1. FileDiaog in OpenCS now shows warning icon beside .esm./.esp files with load order problems.
2. omwlaucher -> replaced "stop" icon with "warning" icon for files with load order problems.
10 years ago
dteviot 9d6efcecff Merge remote-tracking branch 'OpenMW/master' into FixLoadOrderReset
Fixed Conflict:
	components/contentselector/model/contentmodel.cpp
10 years ago
dteviot 083de62be5 Fixed issues found by Zinnschlag.
1. Errors found are added to default tool tip text. (Instead of replacing it.)
2. If multiple errors are found, all are shown in tool tip text, not just first one.
3. Load Order Errors are updated when files are activated/deactivated, not just when the files have their position in list changed.
10 years ago
dteviot 43dd9aee94 Fix for more errors found by Travis CI. 10 years ago
dteviot dfbd470613 Adjust plug-in order to match profile loading.
Also marks plug-ins with load order problems in red and changes tool tip to describe error.
10 years ago
MiroslavR 3cc32b641a Fix some memory leaks 10 years ago
scrawl 4d39d77eaa Fix incompatible encoding names in ContentModel (bug uncovered by 41c17bccb6) 11 years ago
scrawl 47172fb8a2 ContentModel: Don't confuse file path with file name (Fixes #1352) 11 years ago
graffy76 1d4b5a2425 Fix broken launcher content file display / selection scheme
Disable selection of content files with missing dependencies (grayed
out)
11 years ago
graffy76 973803eb2f Fixed pathing issues in launcher 11 years ago
graffy76 4c72a9ffdf Fixed non-loading files 11 years ago
graffy76 217a4d75b4 Implemented profile function in launcher datafiles page
Implemented dependency sorting to ensure dependent files appear latest
in the list.
11 years ago
graffy76 d7cff6361e Fixed filter issue (all addons for a gamefile are enabled for checking).
Note:  Other dependencies are not yet automatically selected when an
addon is checked.
11 years ago
graffy76 cfdc19c427 Renamed esxSelector to contentSelector
Fixed datafilespage model implementation in launcher
Filtered addons in table view by selected game file
11 years ago