1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 20:23:54 +00:00
Commit graph

62 commits

Author SHA1 Message Date
Andrei Kortunov
1bb48bcef7 Treat editor icons as scalable 2024-04-21 20:56:06 +04:00
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.
2024-03-06 00:36:13 +00:00
Evil Eye
0db8026356 Stop adding and deleting rows 2024-01-09 17:45:48 +01:00
Andrei Kortunov
1ca2a0ef66 Store generated UI by pointer to avoid redundant processing 2023-12-24 20:35:19 +04:00
Andrei Kortunov
ca19f7006c Make hardcoded strings in Launcher and Wizard localizable 2023-12-11 12:02:43 +04:00
Alexei Dobrohotov
5adda00f5e Content selector: allow using non-primary game files as addon files 2023-07-11 11:07:37 +03:00
Andrei Kortunov
902c48d1bb Rework launcher UI 2023-01-15 12:36:08 +04:00
Andrei Kortunov
307a60e87c Migrate from QRegExp to more modern QRegularExpression 2023-01-11 11:21:46 +04:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
mpeco
1868534071 functor-based Qt signal-slot syntax components 2022-08-23 17:14:12 -03:00
jvoisin
8b9ed57348 Clean up Qt includes 2022-06-17 11:56:54 +02:00
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.
2022-04-23 09:54:45 +02:00
Evil Eye
a3e039d862 Explicitely sort by file name after adding all data dirs 2021-11-07 14:15:30 +01:00
Petr Mikheev
37386f417e Support *.omwscripts in openmw-launcher 2021-10-29 20:09:47 +02:00
Petr Mikheev
413ac067ec Allow creating omwaddons without a dependency on an omwgame 2021-09-26 17:44:28 +02:00
Andrei Kortunov
8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
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 2020-07-25 13:58:42 +00:00
Cédric Mocquillon
6e397e4008 Add a search function to the "Datafiles" tab of the OpenMW launcher 2020-06-21 14:45:30 +00:00
James Moore
a37bdfd492 Implement a refresh button on data files page 2020-03-21 19:35:20 +00:00
elsid
045ceeac11
Replace foreach macro by for-loop 2019-10-20 20:08:16 +02:00
Andrei Kortunov
3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
Andrei Kortunov
e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Capostrophic
f20f49daa6 Content selector: allow to copy paths to clipboard (feature #2847) 2018-09-29 02:09:13 +03:00
Andrei Kortunov
bce8de5fe9 Respect selected encoding in the content selector (bug #4467) 2018-09-25 21:39:18 +04:00
Thunderforge
c2fff61ccd Changing so that data changes happen only after the addon is checked 2018-05-26 20:35:28 -05:00
Thunderforge
d58cce9c72 Adding WIP code to dynamically change the autocomplete fields 2018-05-22 20:50:31 -05:00
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
2017-06-09 19:08:53 +02:00
Bret Curtis
d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
Allofich
125e94ef0e Fix shadowing warnings 2016-10-31 00:39:31 +09:00
Arthur Moore
4c0c20b1a0 Changed relative includes to library header format 2015-11-27 21:01:28 -05:00
cc9cii
cccf6c6bdd Rebuild the list of available content files when opening the open/new dialogues. Should resolve Bug #2644. 2015-06-16 12:48:45 +10:00
dteviot
b0c4be2316 Multi-select + context menu. (Fixes #2480)
Content selector, added multi-select + context menu to allow check/uncheck the multi-selected items.
2015-05-04 14:52:47 +12:00
dteviot
80fe24207c correction from Scrawl.
Now correctly handles skills/attributes.
Also, document what ContentSelectorView::ContentSelector::slotAddonTableItemActivated() is doing.
2015-03-05 20:21:22 +13:00
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.
2015-02-24 20:06:06 +13:00
dteviot
6dc202cba3 Removed unneeded parameter from ContentModel::setContentList() 2015-02-23 19:41:41 +13:00
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.
2015-02-05 04:18:43 +01:00
Marc Zinnschlag
fa4718283d Merge remote-tracking branch 'scrawl/contentselector' 2015-01-21 15:23:38 +01:00
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.
2015-01-17 18:11:03 +13:00
dteviot
9d6efcecff Merge remote-tracking branch 'OpenMW/master' into FixLoadOrderReset
Fixed Conflict:
	components/contentselector/model/contentmodel.cpp
2015-01-08 12:15:48 +13:00
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.
2014-12-31 19:19:54 +13:00
scrawl
363d1f9207 Merge remote-tracking branch 'upstream/master' 2014-12-30 23:01:45 +01:00
Marc Zinnschlag
82af524a58 Merge remote-tracking branch 'dteviot/master' 2014-12-26 16:21:18 +01:00
scrawl
f931ba2efc Fix some static analysis issues (coverity) 2014-12-24 15:45:12 +01:00
dteviot
ad5d884761 omwlauncher crash when can't read file in active profile (Fixes #1069) 2014-12-24 10:22:26 +13:00
MiroslavR
3cc32b641a Fix some memory leaks 2014-12-23 20:44:25 +01:00
scrawl
e413bebe99 Toggle addon files when activated or clicked on checkbox rather than clicked (Fixes #1980) 2014-10-16 15:07:51 +02:00
graffy76
ed913936f8 Eliminated game & addon keys from profile configuration 2013-11-03 21:36:41 -06:00
graffy76
1d4b5a2425 Fix broken launcher content file display / selection scheme
Disable selection of content files with missing dependencies (grayed
out)
2013-11-03 14:02:41 -06:00
graffy76
973803eb2f Fixed pathing issues in launcher 2013-11-03 00:02:46 -05:00