7770 Commits (8bf95b68812ada29ba82bddf67a0f243ae97cd42)
 

Author SHA1 Message Date
Adriaan de Groot 8bf95b6881 [grubcfg] Support prefer_grub_d settings 4 years ago
Adriaan de Groot 064fff0c12 [grubcfg] Drop default_dir
- the default_dir was only stored in modify_grub_default() to
  create the directory if needed; move that functionality to
  the get_grub_config_paths() function (and drop the "s",
  since it now returns just one).
4 years ago
Adriaan de Groot aa50dfb8a1 [grubcfg] refactor finding-the-grub-paths into a function 4 years ago
Adriaan de Groot f85c70d4d2 [grubcfg] Introduce prefer_grub_d
- new setting for using /etc/defaults/grub.d/ (SEE #1457), not implemented
- add missing fields to schema for config file
4 years ago
Adriaan de Groot 3fc23e3b07 [grubcfg] Fix config schema 4 years ago
Adriaan de Groot 43f9f2e2f4 Merge branch 'issue-1477' into calamares
FIXES #1477
4 years ago
Adriaan de Groot 463ea3c73f [displaymanager] Fix config schema 4 years ago
Adriaan de Groot f324a055e5 CMake: put completions with the other "misc. installs" 4 years ago
Adriaan de Groot 2ce12d5368 Merge branch 'issue-1476' into calamares
Go over the locale module again:
- new models that avoid weird casts and inconvenient iteration
- shared timezone data
- simple sorting and filtering
- simplify the map / QML version

FIXES #1476
FIXES #1426
4 years ago
Adriaan de Groot 1eef6d69f2 Merge branch 'mt-gs' into calamares
Fix up potential thread-safety issues with GS, expand testing.
4 years ago
Adriaan de Groot cb20ba6aba [libcalamares] More GS load/save testing
- failures elsewhere boil down to QStringList is not supported,
  but a QVariantList of QVariants of QStrings is.
4 years ago
Adriaan de Groot 0de98fe4c1 [libcalamares] Expand YAML testing a little
- load/save of a stringlist seems to work
4 years ago
Adriaan de Groot dbc49f001e [libcalamares] Test GS
- test insert, remove, emitted signals
- test loading and saving of YAML and JSON

This shows up a big bug in the YAML saving code (which was never
used, it seems, anyway)
4 years ago
Adriaan de Groot a44e6802e5 [libcalamares] Rename tests for consistency 4 years ago
Adriaan de Groot 3c618a9a19 [libcalamares] Fix GS load behavior
- the loadJson behavior did too many notifications, and was likely to
  deadlock; write directly to the map instead and emit only once.
- the loadYaml method did something very different from its
  documentation or intent.
4 years ago
Adriaan de Groot ac713d8c4b [libcalamares] Apply locking to GS access 4 years ago
Adriaan de Groot dc5d98af7d [libcalamares] Address outdates assumptions about thread-safety 4 years ago
Adriaan de Groot 0121e3755b [libcalamares] GS improve load/save
- save should be const
- rename save() to saveJson() for parity with saveYaml()
4 years ago
Adriaan de Groot 104452513b [libcalamares] Document GS
- write apidox for all of GlobalStorage
- while here, polish up the SPDX bits
4 years ago
Adriaan de Groot 527449a102 [libcalamares] Improve GS debugDump() formatting 4 years ago
Adriaan de Groot c64aefe43c [libcalamares] Remove unused include, declaration 4 years ago
Adriaan de Groot 52d1c8f88a [locale] Explicitly update GS from the locale step
- refactor into some free functions (out of the lambda's for connecting)
- introduce new method to call from onLeave(), matching previous
  widget behavior
4 years ago
Adriaan de Groot c69bd972e9 [localeq] Demonstrate "offline" lookups
- we can do GeoIP and GeoNames lookups, **or**
- use Calamares's internal GeoIP lookup and country / city hints.

The online version is much more accurate, but costs more lookups;
in these examples, set it all to "offline" and document what needs
to change (code edit) to use the online version.

It's probably a good beginner job to introduce a bool in localeq.qml
to switch the behaviors.
4 years ago
Adriaan de Groot 71ca1e1544 [localeq] Pick up Config changes before showing the module 4 years ago
Adriaan de Groot 32c8338a9c [locale] QML doesn't like const 4 years ago
Adriaan de Groot 91cc5a2b42 [locale] Update the map-QML implementation
- Config has suitable strings for displaying TZ information.
  Use them and automatic bindings. Don't update the strings manually.
- Suggest online or offline TZ lookups based on what the distro wants.
  Edit the QML to pick online lookups (needs access to the geonames
  service, though).
- Drop the variables that point at config and geoip: the Config
  object has a currentLocation, which is filled in by both the
  configuration and any GeoIP lookup -- it doesn't have city
  or country information though.
4 years ago
Adriaan de Groot 15a8d62986 [locale] Add a 'current timezone' strings to Config
- status is a longer phrase
- name is a short human-readable name
- code is the internal code

Code that writes its own "Timezone set to" messages can use
the name, rather than the status.
4 years ago
Adriaan de Groot eda14ce548 [locale] Avoid nullptr deref
- when no location has been set at all, there's no sensible TZ
  to report; just leave it blank. In *practice* you won't hit this
  code from the Calamares UI before a location has been set, because
  the Config object is instantiated and then immediately configured,
  but from tests or unusual UIs it could be.
4 years ago
Adriaan de Groot b36ad4c7f4 [locale] Add test for Config initialization
- needs some massaging because Config otherwise depends on
  ModuleManager which is a UI class (for the Reasons),
  but we already have a BUILD_AS_TEST define for that purpose.
- demonstrate a nullptr deref.
4 years ago
Adriaan de Groot 04e53be934 [locale] Repair test: don't re-init te occupied-pixels set each loop
- while here, merge Tests.h to the cpp file
- Fix build when debugging timezones (missed during earlier refactor)
4 years ago
Adriaan de Groot 21f97db8fd [libcalamares] Offer translation lookup of regions 4 years ago
Adriaan de Groot ad3c0de936 [libcalamares] Reduce logging in POD manipulation 4 years ago
Adriaan de Groot 296337d45d [libcalamares] Implement nearest-TZ lookup
- This version, based on lat+lon lookup, handles wrap-around the
  globe at -180 W (which is very close to +180 E)
- Test wrap-around-the-globe lookups
4 years ago
Adriaan de Groot 9e274aac07 [libcalamares] Make ZonesModel more QML-friendly
- expose TZ lookup (as a QObject*, which QML needs)
- C++ code should use find(), which is safer
4 years ago
Adriaan de Groot ab69e7c83a [libcalamares] Add API for geographical lookup
- find a zone given lat, lon -- with a failing test and a bogus
  implementation.
4 years ago
Adriaan de Groot 626dd038da [locale] Re-do locale module with new TZ data
- The Config object now uses the re-done models and timezone data
- most of the properties of the locale Config are unchanged
- much less complication in extracting data from the zones model
4 years ago
Adriaan de Groot d814a3dba8 [libcalamares] Sort the models before use
- zones and regions alphabetically by key
4 years ago
Adriaan de Groot 37c211fd14 [libcalamares] Add an iterator for the full zones model 4 years ago
Adriaan de Groot 7ea2ad7dc6 [libcalamares] Add accessors for TZ data and region in the model
It's convenient when e.g. QComboBox::currentData() gets the key
"automatically", and the default role for that method is UserRole,
so let the value of KeyRole overlap.
4 years ago
Adriaan de Groot 245d4a8ef7 [libcalamares] Add a find() to ZonesModel
- Look up TZ data by region and zone name.
4 years ago
Adriaan de Groot 478a275764 [libcalamares] Make TimeZoneData public
- Also make it a QObject so we can add properties and make it useful
  for QML consumption.
4 years ago
Adriaan de Groot 10fb5b95c7 [libcalamares] Split out CStringPair into TranslatableString
The (renamed) class TranslatableString keeps a key value
(e.g. New_York) and a human-readable version around; the
human-readable one is passed through QObject::tr() for translation
on-the-fly.
4 years ago
Adriaan de Groot 3e32335511 [libcalamares] Introduce a filtering model per-region 4 years ago
Adriaan de Groot 1afdcc9c82 [libcalamares] Give zones data, too
- while here, fix bug in TimeZoneData that didn't munge names
  (so it reported "New_York")
4 years ago
Adriaan de Groot 33e39b92fb [libcalamares] Satisfy test, return region names 4 years ago
Adriaan de Groot 609ea8350c [libcalamares] Failing test: there is data in the regions model 4 years ago
Adriaan de Groot 82cc652f55 [libcalamares] Re-done zones loading
- just make one big list of zones, one short list of regions
- the models are non-functional right now
4 years ago
Adriaan de Groot ca40d2e2d9 [libcalamares] Introduce a failing test for the number of regions 4 years ago
Adriaan de Groot fce05acf1e [libcalamares] Rip out all the TZ models
- The models are overly complicated: **overall** there is just one
  list of timezones, and we need various views on that list.

Start over with an empty model of regions.
4 years ago
Adriaan de Groot 5066624a8e Merge branch 'issue-1471' into calamares
FIXES #1471
4 years ago