Commit Graph

63 Commits (8cb5f2a5673165d732790e6440e9cd90b71074d4)

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
Andrei Kortunov 1bb48bcef7 Treat editor icons as scalable 8 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
Evil Eye 0db8026356 Stop adding and deleting rows 12 months ago
Andrei Kortunov 1ca2a0ef66 Store generated UI by pointer to avoid redundant processing 1 year ago
Andrei Kortunov ca19f7006c Make hardcoded strings in Launcher and Wizard localizable 1 year ago
Alexei Dobrohotov 5adda00f5e Content selector: allow using non-primary game files as addon files 2 years ago
Andrei Kortunov 902c48d1bb Rework launcher UI 2 years ago
Andrei Kortunov 307a60e87c Migrate from QRegExp to more modern QRegularExpression 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
mpeco 1868534071 functor-based Qt signal-slot syntax components 2 years ago
jvoisin 8b9ed57348 Clean up Qt includes 3 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
Petr Mikheev 413ac067ec Allow creating omwaddons without a dependency on an omwgame 3 years ago
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 4 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
Cédric Mocquillon 2e27de027e Add members in AdvancedPage class to avoid memory leak when the list of cells names is updated as we recreated a completer at each notification event 5 years ago
Cédric Mocquillon 6e397e4008 Add a search function to the "Datafiles" tab of the OpenMW launcher 5 years ago
James Moore a37bdfd492 Implement a refresh button on data files page 5 years ago
elsid 045ceeac11
Replace foreach macro by for-loop 5 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
Capostrophic f20f49daa6 Content selector: allow to copy paths to clipboard (feature #2847) 6 years ago
Andrei Kortunov bce8de5fe9 Respect selected encoding in the content selector (bug #4467) 6 years ago
Thunderforge c2fff61ccd Changing so that data changes happen only after the addon is checked 7 years ago
Thunderforge d58cce9c72 Adding WIP code to dynamically change the autocomplete fields 7 years ago
Bret Curtis 39185e6f8c purge the rest of boost::shared and any other boost related things that no longer are required
put boost system back in, clean others up

revert Qt

add back boost fstream
8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
Allofich 125e94ef0e Fix shadowing warnings 8 years ago
Arthur Moore 4c0c20b1a0 Changed relative includes to library header format 9 years ago
cc9cii cccf6c6bdd Rebuild the list of available content files when opening the open/new dialogues. Should resolve Bug #2644. 10 years ago
dteviot b0c4be2316 Multi-select + context menu. (Fixes #2480)
Content selector, added multi-select + context menu to allow check/uncheck the multi-selected items.
10 years ago
dteviot 80fe24207c correction from Scrawl.
Now correctly handles skills/attributes.
Also, document what ContentSelectorView::ContentSelector::slotAddonTableItemActivated() is doing.
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
Marc Zinnschlag fa4718283d Merge remote-tracking branch 'scrawl/contentselector' 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 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
scrawl 363d1f9207 Merge remote-tracking branch 'upstream/master' 10 years ago
Marc Zinnschlag 82af524a58 Merge remote-tracking branch 'dteviot/master' 10 years ago
scrawl f931ba2efc Fix some static analysis issues (coverity) 10 years ago
dteviot ad5d884761 omwlauncher crash when can't read file in active profile (Fixes #1069) 10 years ago
MiroslavR 3cc32b641a Fix some memory leaks 10 years ago
scrawl e413bebe99 Toggle addon files when activated or clicked on checkbox rather than clicked (Fixes #1980) 10 years ago
graffy76 ed913936f8 Eliminated game & addon keys from profile configuration 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