1011 Commits (a72d59d23bbcd28dae59e90eb271d415526e5e08)

Author SHA1 Message Date
Adriaan de Groot d731e12456 [libcalamares] Add an extra job-failure enum value 4 years ago
Adriaan de Groot bac1108781 Merge branch 'issue-1550' into calamares
FIXES #1550
4 years ago
Adriaan de Groot 7521be3c5f [libcalamares] Add find() to namedenumtable that takes a default value 4 years ago
Adriaan de Groot 049b9f9c74 [libcalamares] Test the packages service API
- check that the variant and the string-list version of
  the API do the same thing, check independence of
  settings for different instance keys.
4 years ago
Adriaan de Groot e400f79673 [libcalamares] Extend packages service API
- convenience method to install a (string) list of packages
  (doesn't do the installation, but adds to GS the list, so
  that the packages module can handle it).
4 years ago
Adriaan de Groot 1af8796b2b [libcalamares] Refactor translations-for-a-test CMake code
- turn the translations-QRC phase into a function, just in
  case other tests need translations as well.
- This CMake code might work as the base of translation-wrangling for
  plugins (externally).
4 years ago
Adriaan de Groot cfbe722350 [libcalamares] Test the translated string with real translations
- introduce a bogus translation context, load translations,
  and check that the context-enabled translator does its job.
4 years ago
Adriaan de Groot 0143aa5515 [libcalamares] Make the branding-loading messages follow same format as the others 4 years ago
Adriaan de Groot d72e42f7ba [libcalamares] Extend (configuration) translated string with context
Make it possible to pass in a context for strings not-from-config
maps, to allow programmatically set, but translatable, strings.
4 years ago
Adriaan de Groot ed14c49a03 [libcalamares] Extend (configuration) translated string with context
Make it possible to pass in a context for strings not-from-config
maps, to allow programmatically set, but translatable, strings.
4 years ago
Adriaan de Groot 35f4a81768 [libcalamares] Extend packages service API
- convenience method to install a (string) list of packages
  (doesn't do the installation, but adds to GS the list, so
  that the packages module can handle it).
4 years ago
Adriaan de Groot bf7b41f548 [libcalamares] Document the Once class for logging 4 years ago
Adriaan de Groot 0ccd55e33f [libcalamares] Warn (python only) about unknown GS keys
This makes it easier to spot problems where key-names are mis-spelled
in Python (or other modules change a name and it's not applied
to consumers)
4 years ago
Adriaan de Groot b04d59ba2e [libcalamares] More variant->python translations
- There's still 49 enumeration values not handled, leading to
  an annoying Clang warning, but there's just no **point**
  in listing them all: that's what 'default' is for.
4 years ago
Adriaan de Groot 9c2a26bed5 [libcalamares] Apply coding style 4 years ago
Adriaan de Groot ac8f99a206 [libcalamares] Don't double-include FileSystem
The partitioning header 'FileSystem.h' is for KPMCore support;
it is already included by Global.h and guarded by ifdefs for
KPMCore. Do not unconditionally include it from the implementation.
4 years ago
Adriaan de Groot 559b79f920 [partition] Use (better documented) filesystem-use API 4 years ago
Adriaan de Groot 10bec1d970 [libcalamares] Expand API to allow clearing out the filesystem use 4 years ago
Adriaan de Groot 9665af0e5a [libcalamares] Make keys case-insensitive (as documented) 4 years ago
Adriaan de Groot 48541629f9 [libcalamares] Extend tests to handle case-insensitive 4 years ago
Adriaan de Groot f3681a533e [libcalamares] Rearrange filesystem-use API
- make the functies that take a GS* first-class
- use the convenience functions from JobQueue for the others
- inline so only the explicit-GS* functions are in the library
4 years ago
Adriaan de Groot 488631824d [libcalamares] Make the KPMCore global storage filesystem handlers inline 4 years ago
Adriaan de Groot 75eb2c3cd4 [libcalamares] Add tests for filesystem_use service 4 years ago
Adriaan de Groot afdf431b77 [libcalamares] Add partition service for managing global storage
- the global storage key filesystem_use has a structured meaning,
  so give it a (trivial-ish) API for reading and writing.
4 years ago
Adriaan de Groot 1e1b7b7ece [libcalamares] Introduce a convenience getter for GlobalStorage 4 years ago
Adriaan de Groot dc0164d508 [libcalamares] Also install the version header 4 years ago
Adriaan de Groot 5ed1dff655 Merge branch 'issue-1579' into calamares
FIXES #1579
4 years ago
Adriaan de Groot 9341a84820 [libcalamares] Make the RETRANSLATE macros more statement-line
Require a ; after RETRANSLATE macros. They are statement-like;
this makes it easier for some of them to be recognized by
clang-format and resolves some existing weird formatting.
4 years ago
Adriaan de Groot f1446736f8 [libcalamares] Expand tests a little
- do some additions and check they work
- drop the ";add" annotation on the source, this is not
  needed in the current situation with only adds available.
4 years ago
Adriaan de Groot 5b609565e2 [libcalamares] Make Packages API more flexible
- pass in the GS object; this makes mostly **testing** much easier
4 years ago
Adriaan de Groot b868894371 [libcalamares] Start a packages service for netinstall and others 4 years ago
Adriaan de Groot a90f510b85 [libcalamares] Convenience for logging subentries
For methods that log a bunch of things, and which want to
consistently use SubEntry, but don't know when the **first**
log entry is within the method, Logger::Once can be used
to log one regular message (with function info) and the
rest are subentries.
4 years ago
Adriaan de Groot 72f67286a4 [libcalamares] Preserve type CDebug() if possible. 4 years ago
Adriaan de Groot a3a1350dc7 [libcalamares] Don't complain if there isn't a preset
- If the module knows about a preset, then it should be registered
  even if there is not a value set for it specifically; this avoids
  complaints from isEditable() for fields that are known, but
  do not have a preset. (Reported by Anke)
4 years ago
Adriaan de Groot a4c1f07521 [libcalamares] Reduce indentation-depth in apply() through early-return 4 years ago
Adriaan de Groot 33fec86ef6 [welcome] Improve logging of requirements-checking
- less chatty when 0-results come in
- compress the welcome debug to one output chunk
4 years ago
Adriaan de Groot b4a21d7aca [libcalamares] Add macro CONFIG_PREVENT_EDITING to handle uneditable fields
Boilerplate code for avoiding accidental setting of an internal
field when the UI is editable and the underlying data isn't.
4 years ago
Adriaan de Groot 2e90a8d829 [libcalamares] Report preset mis-configurations
- warn about fields applied twice (program error)
- warn about fields not used (configuration error)
- add operator<< for "clean" looking preset application
4 years ago
Adriaan de Groot d8dff3dc65 [libcalamares] Replace loadPresets() with an applicative style
Build up the list of known presets by what the Config-object
expects, not by what the Config file provides. This allows
early detection of mis-matched configurations.

Presets can only apply to Q_PROPERTY properties, and the
preset must match the property name.
4 years ago
Adriaan de Groot 8b10a9cfc2 [libcalamares] Add isEditable() check
This adds support for checking whether a field is editable;
Config objects should reject changes if the field is not
editable. There is an "unlock" setting to override the
check, although this is currently always locked.
4 years ago
Adriaan de Groot 0be5e04c2e [libcalamares] Add a base class for Config-objects
This is an optional (until 3.3) base class, which can handle
Presets consistently for configurations.
4 years ago
Adriaan de Groot d9f2f5e988 [libcalamares] Start a 'presets' configuration datastructure 4 years ago
Adriaan de Groot ea63f48c31 [libcalamares] Put the units in a nested namespace
- this makes it much easier to use the literal suffixes
  by using the namespace rather than individual operators.
4 years ago
Adriaan de Groot 24e129a413 Merge branch 'issue-1634' into calamares
FIXES #1634
4 years ago
Adriaan de Groot e49f0cf3ba [libcalamares] Document NamedEnum in much more detail 4 years ago
Adriaan de Groot f045e4f00e [libcalamares] Switch default language in Belarus
*If* the distro has GeoIP enabled and auto-selects the language for
Calamares, then Belarus now selects Russian, rather the Belarusian.
This is based on some personal input, mostly, and Wikipedia census data.

FIXES #1634
4 years ago
Adriaan de Groot 38fa1d9567 [libcalamares] Distinguish logging raw, shared and unique pointers
- It shouldn't be necessary to explicitly .get() pointers for
  logging, and it's convenient to know when a pointer is smart.
  * no annotation means raw (e.g. @0x0)
  * S means shared
  * U means unique
4 years ago
Adriaan de Groot c98a330bf9 [libcalamares] Store DBus reply value, drop debug-logging 4 years ago
Adriaan de Groot 1704ad5977 [partition] Add a job to handle automount behavior
- while here, nudge CalamaresUtils automount API a little,
  since it doesn't really need an rvalue-ref.
4 years ago
Adriaan de Groot b9210721e6 Merge branch 'issue-1613' into calamares
The popup now cuts down messages to a manageable length.
Hopefully the part that is preserved, will still show
something meaningful for the user (8 lines of text should
be sufficient for the kind of things we do).

FIXES #1613
4 years ago