Commit Graph

7964 Commits

Author SHA1 Message Date
Philip Müller
21641bd2a2 [partition] offer /boot also when other EFI partition was specified
- it still makes sense to offer /boot in EFI
- example: /boot ext4, /boot/efi vfat
- this partly reverts 60f8a7c5fb
2021-11-09 01:59:06 +01:00
Adriaan de Groot
ead641c344 [summary] Prefer a step's widget over text
- the partition module makes a nice descriptive widget,
  which includes the text it **also** has for the summary;
  (the text is intended for the QML summary).
- In general, if a module has a widget for the summary, assume
  that that is the **whole** summary and use it instead of text.

This resolves duplicate summaries -- showing the text of the
partitioning-step, followed by its widget -- introduced in July.
2021-11-08 14:44:12 +01:00
Adriaan de Groot
2a86e86817 [packages] Make package-installation messages slightly less scary.
From a test with XeroLinux, at some point it says 'reinstalling linux...'
which is a message from pacman about the package called 'linux'.
2021-11-09 15:25:06 +01:00
Adriaan de Groot
e4b44b5f85 [packages] Look for other progress indicators
- the (n/m) lines are output of specific steps, not actual package-
  installation. So look for "<action> <packagename> ..." lines instead.
  This means we keep some state around, and need extra machinery to
  report those lines rather than the generic progress reporting
  that reports on groups.
2021-11-09 14:42:12 +01:00
Adriaan de Groot
4821f450f3 [packages] Report progress by scanning pacman output
- during install and remove, check for (n/m) output lines which
  report progress of the pacman actions and turn those into progress
  reports for the *packages* module.
2021-11-09 13:07:29 +01:00
Adriaan de Groot
575654941f [partition] Move required partition table type to Config
- remove from GS
- remove duplication across Config and ChoicePage
- improve translations (presumably "msdos or gpt" is the most
  complicated it will get)

FIXES #1735
2021-11-09 12:25:47 +01:00
Philip Müller
0486e48c4e [partition] offer /boot also when other EFI partition was specified
- it still makes sense to offer /boot in EFI
- example: /boot ext4, /boot/efi vfat
- this partly reverts 60f8a7c5fb
2021-11-09 01:51:49 +01:00
Adriaan de Groot
6130a9c51f [unpackfs] Re-jig process-return-value in Python
- make the installation work,
- special case because rsync can return error 23 (which throws, from
  inside the Python API) which still means "it was ok".
2021-11-05 16:52:18 +01:00
Adriaan de Groot
c79bb3cd10 [unpacks] PARTIAL conversion to newer API with callback 2021-11-05 16:33:10 +01:00
Adriaan de Groot
b9691c339e S also docs 2021-11-05 16:32:40 +01:00
Adriaan de Groot
5e6d292235 FIXUP 2021-11-05 16:31:47 +01:00
Adriaan de Groot
faf1d68d32 [libcalamares] Tidy up processing of process output
- force C locale on processes
- split trailing output if output per-line-processing is active
2021-11-05 16:26:45 +01:00
Adriaan de Groot
94039c19bb [unpackfs] Use callback instead of building giant string in memory
SEE #1740

By processing each line in turn (and just counting is) rather
than collecting all of the lines of output from the tools,
we end up with lower memory usage.
2021-11-03 16:09:11 +01:00
Adriaan de Groot
e8209089c6 Merge branch 'issue-1740' into calamares
FIXES #1740
2021-11-03 15:49:03 +01:00
Adriaan de Groot
fe582fb94d Docs: document the Python APIs for modules 2021-11-03 15:48:26 +01:00
Adriaan de Groot
74d65d8338 Docs: touch-ups and typos 2021-11-03 13:51:17 +01:00
Adriaan de Groot
2800128a8d [libcalamares] Expand the output-processing API
- support host and target runs
- add stdin and timeout values
- allow automatic output to list
2021-11-03 13:45:15 +01:00
Adriaan de Groot
3120abbce8 [libcalamares] Introduce host_env_process_output, too
- run commands consistently, with optional output-processing,
  in host or target;
- raises exception on error, like the check_* functions.
2021-11-03 12:23:39 +01:00
Adriaan de Groot
e5323ec487 [libcalamares] Expand Runner documentation
- document a bit more of the methods
- provide convenience method enableOutputProcessing() alongside
  an explicit setter; adjust tests to the changed API.
- add an executable() information method.
2021-11-03 12:20:36 +01:00
Adriaan de Groot
f2142bc4b3 [libcalamares] Move Python callback to utils submodule
- don't need the job to do the callback
- allow callable objects from Python
- doesn't actually run the process yet
2021-11-03 11:53:44 +01:00
Adriaan de Groot
a0cb4b63a8 [partition] Fix build for old Qt 2021-11-03 11:14:22 +01:00
Adriaan de Groot
344948b5ab Modules: clean up QProcess (part 1) 2021-11-02 23:46:26 +01:00
Adriaan de Groot
2088502e57 [libcalamares] Don't use QProcess directly outside of Runner 2021-11-02 23:46:26 +01:00
Adriaan de Groot
57c174c37f [libcalamares] Clean up QProcess includes 2021-11-02 23:46:26 +01:00
Adriaan de Groot
5c82cb32ab [libcalamares] Expand tests to show last-output-line 2021-11-02 23:20:22 +01:00
Adriaan de Groot
aa315c0696 [libcalamares] Handle last-output-line without newline 2021-11-02 22:58:41 +01:00
Adriaan de Groot
0a339a5402 [libcalamares] Test Runner output-processing 2021-11-02 22:55:41 +01:00
Adriaan de Groot
953b899f75 [libcalamares] Allow Runner instances to collect output 2021-11-02 22:50:13 +01:00
Adriaan de Groot
870009e815 [libcalamares] Replace runCommand internals by Runner 2021-11-02 22:27:33 +01:00
Adriaan de Groot
89824a9e0d [libcalamares] Fix up Runner (as a replacement for current system code) 2021-11-02 22:27:33 +01:00
Adriaan de Groot
24ca64deac [libcalamares] Chase moved redacted-logging 2021-11-02 22:27:33 +01:00
Adriaan de Groot
85debfc69b [libcalamares] Add Redacted logging
- this was an internal class for logging commands, let's lift
  it up to the Logger framework where it might be more generally
  useful (or not .. everything needs special-casing for actual
  redaction).
2021-11-02 22:27:33 +01:00
Adriaan de Groot
f0104af1c3 [libcalamares] Expand tests on Runner internals 2021-11-02 22:27:33 +01:00
Adriaan de Groot
e5fa58b890 [libcalamares] Add tests for relativeCangeDirectory() 2021-11-02 22:27:32 +01:00
Adriaan de Groot
0b943e801c [libcalamares] Begin implementing Runner
This copies a bunch of code from the System methods for running,
and then #if 0's them to get it to compile. Add some basic
directory-management.
2021-11-02 22:27:32 +01:00
Adriaan de Groot
b9dac6eef8 [libcalamares] Small step in implementation 2021-11-02 22:27:32 +01:00
Adriaan de Groot
e0fdde06c9 [libcalamares] Python API for callbacks from processes
This is an experiment in Python API that will allow a callback
function in the Python module to be called for each output line.
It builds on the run-a-process extensions that are being built
simultaneously.
2021-11-02 22:27:32 +01:00
Adriaan de Groot
2de09d4001 [libcalamares] Start refactor of running-a-process support
The background idea is that, while CalamaresUtils::System::runCommand()
is a useful general API, it is
- still missing flexibility
- lacking a way to process output from the command "as it happens"

Waiting until the process ends, and then reading all stdout, is
inconvenient for processes that produce a **lot** of output,
and also makes it impossible to report progress. One module
in calamares-extensions has its own run-a-process implementation
for reading output, and this branch aims to introduce something
similar into Calamares core.
2021-11-02 22:27:32 +01:00
Adriaan de Groot
b5dba9108c [partition] Check for LVs that will be formatted, don't close them
- when (manually) using an existing LV, it shouldn't be closed
  prior to formatting, since that kills the volume and then the
  path (/dev/myvg/mylv) no longer exists. Then creating the
  filesysytem on that device path fails.
2021-11-02 15:33:34 +01:00
Adriaan de Groot
7b45793b60 [partition] Allow exceptions when closing /dev/mapper
- some names should not be closed, like "control"
- allow a list of names to be added which should not be closed
2021-11-02 15:26:25 +01:00
Adriaan de Groot
1410157356 [partition] Simplify and document ClearMounts
- note that the job indiscriminately closes all LUKS and LV
- don't hang on to lists we don't need
2021-11-02 11:55:13 +01:00
Adriaan de Groot
0253977778 [partition] Coding style 2021-11-02 11:50:51 +01:00
Adriaan de Groot
ca4a187d1a [partition] Extract the get-PV-groups code to its own function
- get the list (once)
- move the lambda to a named function for readability
2021-11-02 11:18:14 +01:00
Adriaan de Groot
7fa02fd41c [partition] Extract the get-LVM-volumes code to its own function 2021-11-02 11:10:09 +01:00
Adriaan de Groot
2a1ec84c87 [partition] Don't hang on to pointer longer than needed 2021-11-02 11:03:10 +01:00
Adriaan de Groot
04b119b051 [partition] Crypto device-list needn't be a member, either 2021-11-02 00:25:37 +01:00
Adriaan de Groot
f49389a408 [partition] Fix logic errors in stringification of MessageAndPath 2021-11-02 00:09:52 +01:00
Adriaan de Groot
c322eaa430 [partition] Fix translation issues
- Strings were being used as logical values, and then logged
  (which should be in English) and also used in the UI (which
  should be localized). Replace with a MessageAndPath class,
  used only locally, that defers the translation until called-
  upon explicitly.
- Replace some VG stuff with similar calls to apply().
2021-11-01 23:59:39 +01:00
Adriaan de Groot
e56158f5b4 [partition] Generate partition paths with /dev/
Returning partition full-paths instead of only the block-device-name
simplifies later code -- which would prepend /dev/ to the block-
device-name and umount that.
2021-11-01 20:54:48 +01:00
Adriaan de Groot
6c2b2b0daa [partition] Factor out loops, document return values
- the tryX() functions weirdly return a string that is used for
  debug-logging. Document that. The untranslated string is
  later used for user-facing messages. Mark that as FIXME.
- factor out the loop-over-names-and-append to news, because that
  makes the overall story of what is happening hard to read.
- all calls to tryCryptoClose() called tryUnmount() first, so
  put that call inside tryCryptoClose(), so the interface is simpler.
2021-11-01 20:54:18 +01:00
Adriaan de Groot
0c84a87c67 [partition] Make internal methods static 2021-11-01 20:28:47 +01:00
Adriaan de Groot
105517fed7 [partition] Coding style 2021-11-01 20:24:47 +01:00
Adriaan de Groot
ac34cfadea [partition] Factor out finding the swap-partitions 2021-11-01 20:23:49 +01:00
Adriaan de Groot
3e58639a68 [partition] Improve logging in ClearMountsJob
- mark internal bits as static
- explain what is being looked-for

SEE #1817
SEE #1564
2021-11-01 16:44:28 +01:00
Adriaan de Groot
218c1d9344 [fstab] Weaken the prescription against / in crypttab
FIXES #1811
2021-11-01 14:52:04 +01:00
Adriaan de Groot
0df288f647 [welcome] Improve logging of unsatisfied requirements
- improve descriptive-strings in logging ("set?" is not very
  meaningful)
- log only the unsatisfied entries, since the preceding
  log-message suggests that that is what is happening.
2021-11-01 14:24:50 +01:00
Philip Müller
3fba6cf57e [merge] with upstream 2021-10-31 16:02:33 +01:00
Jonas Strassel
5701937883
fix(greetd): deal with no existing config 2021-10-29 00:02:16 +02:00
Philip Müller
e36df22323 [postcfg] we should also check for folders 2021-10-28 13:39:27 +02:00
Philip Müller
0fbdaa5756 Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-10-28 13:37:58 +02:00
Jonas Strassel
fbdb9e6779
feat(greetd): add more greeter fallbacks 2021-10-28 08:14:04 +02:00
Jonas Strassel
e5f5ef0d17
feat(greetd): add greetd to displaymanagers 2021-10-28 08:12:45 +02:00
Adriaan de Groot
c90b9786c6 [packagechooser] Also resize the introductory image
- resize the intro image
- when an invalid index is selected, *still* update the
  images, so it shows the intro image (resized) at the
  right time.
2021-10-26 17:05:31 +02:00
Adriaan de Groot
b9a243028b [packagechooser] Make scaled screenshots nicer
- patch suggested by flyingcakes85
- patch tested by killajoe

FIXES #1807
2021-10-26 16:08:20 +02:00
Adriaan de Groot
748b16ba7f [packagechooser] Look for screenshots in more places.
It is easier to put screenshots somewhere where
they can be searched-for, rather than requiring either
absolute paths (inconvenient to try out someone's
settings) or relative paths (because who knows where
Calamares will be run during testing).
2021-10-26 16:08:20 +02:00
Adriaan de Groot
be398d7edb [packagechooser] Log loading of screenshots
- start of indirection in loading, so that we can do a little more
  work searching for the screenshot.
2021-10-26 15:23:14 +02:00
Adriaan de Groot
d10a952065 [keyboard] Make debug output more readable 2021-10-26 15:19:02 +02:00
dalto
5f55784137 Add getList function to Variant 2021-10-23 14:02:47 -05:00
Adriaan de Groot
cd56bab622
[partition] Merge pull request #1808 from dalto8/zfs-delete-fix
Fix for zfs partition deletion
2021-10-30 14:44:39 +02:00
dalto
13a2d25b24 Add separate functions for zfs 2021-10-29 16:54:09 -05:00
Adriaan de Groot
e9083ecabb [services-systemd] Add a schema file for the configuration 2021-10-29 16:41:03 +02:00
Adriaan de Groot
7aaefa42d1
Merge pull request #1815 from dalto8/timer
[services-systemd] Add support for timers
2021-10-29 14:29:50 +02:00
Adriaan de Groot
9e1b8622f2 [packagechooser] Replace smartClip() with just-do-it
QLabel allows scaling of the Pixmap by itself, and we have a
FixedAspectRatioLabel that scales a pixmap nicely. Use that.
(The new label type needed to be introduced to designer)

The screenshot should expand more agressively, so that it
does not get margins -- that just leave space around the
name and description -- when the window expands. Adjust some
of the stretching and layout in the UI file.
2021-10-29 13:15:07 +02:00
Adriaan de Groot
d3d4690a81 [libcalamares] Move const to a better spot 2021-10-29 11:25:13 +02:00
Adriaan de Groot
ebf8d63669
Merge pull request #1809 from dalto8/ismoduleenabled
[libcalamares] Add isModuleEnabled function
2021-10-29 11:20:07 +02:00
dalto
f7d8384bff Use key().module() instead of key().first 2021-10-28 14:49:44 -05:00
dalto
be513813e6 Clean-up from initial review 2021-10-28 14:46:38 -05:00
dalto
24fbd3ab90 More doc changes for services-systemd module 2021-10-28 07:40:05 -05:00
dalto
96f3de12b3 Update documentation for services-systemd module 2021-10-28 07:33:32 -05:00
dalto
a1699e28a2 Add support for timers 2021-10-26 16:05:49 -05:00
dalto
e22efab1b3 Add isModuleEnabled function 2021-10-23 13:57:24 -05:00
dalto
be47b5e59c Fix for zfs partition deletion 2021-10-23 13:40:47 -05:00
Philip Müller
682d3b087f [postcfg] deal with symlinks 2021-10-17 17:10:56 +02:00
Philip Müller
33643b5c6b Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-10-08 09:54:21 +02:00
Adriaan de Groot
6b38985a5f [summary] Start using the model 2021-10-04 14:52:23 +02:00
Adriaan de Groot
3bc90e6c06 [summary] Factor out widget creation 2021-10-04 14:29:54 +02:00
Adriaan de Groot
d951a9d317 [summary] Improve role names in SummaryModel 2021-10-04 12:59:50 +02:00
Adriaan de Groot
4731d79a4f [summary] Reduce code-duplication
The summary page can rely on the Config object to create
lists of relevant steps; this code was declared but not
defined / implemented for Config (but also not called, so
it was ok). This is basically shuffling bits around in
preparation for using the model directly, rather than
re-implementing the widget-creation code.

While here, split off the page-resizing into a free function
so that the code reads nicer.
2021-10-04 12:48:16 +02:00
Adriaan de Groot
763f29e2b8 [summary] Improve naming, shuffle parameters
- the page doesn't need to remember what step it belongs to,
  if the step tells it when creating widgets.
- detach naming from the viewstep API that calls it.
2021-10-04 12:23:17 +02:00
Adriaan de Groot
87af923638 [summary] Make widgets-use explicit 2021-10-04 12:15:15 +02:00
Adriaan de Groot
2fdb6fdf37 [summary] Clear model on leave 2021-10-04 12:10:17 +02:00
Adriaan de Groot
8f4ba8c21f [summary] Tighten up scope of declarations, simplify 2021-10-04 11:27:10 +02:00
Adriaan de Groot
329f21093b [libcalamaresui] More careful in unmarginLayout 2021-10-04 00:27:03 +02:00
Adriaan de Groot
d556dae415 [partition] Document how the configurable EFI size is coordinated 2021-09-28 21:31:12 +02:00
Adriaan de Groot
05f287ebbb [partition] Use the configured EFI size
The `partition.conf` file contains an EFI-size. The default is 300MiB,
but distributions might like to use a bigger (or smaller) value.
Apply the configuration consistently everywhere where we need
"the size of the EFI partition". Extend the internal method
to look at the configured size.
2021-09-28 18:23:19 +02:00
Adriaan de Groot
90eb0cd844 [partition] Fix build 2021-09-28 18:16:34 +02:00
Adriaan de Groot
a72fc06502 [partition] Fix message (use MiB instead of bytes)
Reported by cfinnberg.

FIXES: #1796
2021-09-28 16:55:35 +02:00
Adriaan de Groot
6b460ce440 [partition] Compare size with the canonical source of "right EFI size"
While here, note that the canonical source returns bytes (not MiB).
2021-09-28 16:55:35 +02:00
Adriaan de Groot
51898ea32b [unpackfs] Fix typo
Apparently everyone shipping a squashfs image also has the tools
installed, because the error message reporting that the tools-are-
missing contained a reference to an undefined variable.
Fix that, and while here improve the error message so you
don't get a whole path as a title in the error message.

The slightly weird error-message construction is so that no
messages change and no translation work is needed.
2021-09-27 21:04:26 +02:00
Adriaan de Groot
16f8243fb3 [unpackfs] Move to conventional python-libcalamares use
All **other** modules fully specify libcalamares; only unpackfs
was importing shortcuts. Change to conventional usage (partly
because that's easier on the pylint implementation, partly because
it's then consistent with the rest).
2021-09-27 21:04:26 +02:00
Adriaan de Groot
96c89fc080 [displaymanager] Fix Python errors
Apparently nobody ever hit the else-branch here (because
each DM has exactly one implementation -- that's what the
check is there for!) because the logging of the error
itself would raise IndexError or ValueError.
2021-09-27 21:04:26 +02:00
Philip Müller
abfda4fc57 Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-09-27 20:50:40 +02:00
Adriaan de Groot
96aa5b4532 Merge branch 'improve-loadmodule' into calamares 2021-09-27 14:27:50 +02:00
Adriaan de Groot
815bb62ae5 [calamares] Fix test-application command-line-args
- use C++11 uniform-initialization
- while here, remove space from name of --global option
2021-09-27 14:26:43 +02:00
Adriaan de Groot
7cda1d2edd [calamares] Test-loader tries loading from install-dir, too 2021-09-27 13:39:27 +02:00
Adriaan de Groot
058e6cbcda [calamares] Log failed module-load in test-application 2021-09-27 13:34:08 +02:00
Adriaan de Groot
de9e6a7d70 [calamares] Log module-searching in the test-application 2021-09-27 13:27:36 +02:00
Adriaan de Groot
657a36310b [libcalamares] Log the Python pre-script a little better
- Make clear that the @ is a string-location, and how long the
  pre-script is (although in practice, it will be either null
  and 0, or the values set in the loadmodule executable).
2021-09-27 13:18:12 +02:00
corey lang
590f16370c [networkcfg] fix replace_username() undefined variables 2021-09-27 01:24:05 -05:00
Philip Müller
b09fefc4a6 [fstab] remove double compress 2021-09-24 21:39:56 +02:00
Philip Müller
217780bec0 [merge] with upstream 2021-09-24 21:36:43 +02:00
demmm
65c1ef7cb5 [initcpiocfg] fix install failure due to extra s 2021-09-24 16:27:35 +02:00
Adriaan de Groot
ce5d42ce0f [networkcfg] Refactor getting source-and-target paths of a file 2021-09-24 12:33:00 +02:00
Adriaan de Groot
13d69cb813 [networkcfg] Don't mindlessly PEP8 2021-09-24 12:30:11 +02:00
Adriaan de Groot
bf60d0576b [networkcfg] Refactor username-replacement
Read, then write, the NM file. Add a note about how we might
handle this better. Rename live_user() function to give it
a verb (and avoid UnboundLocal when using a variable of the same name).
2021-09-24 12:25:33 +02:00
Adriaan de Groot
678e6f6d74 [networkcfg] Be more forgiving when getting the live username
- This function is intended to do whatever it takes to
  get the live username.
2021-09-24 12:15:20 +02:00
Adriaan de Groot
88669a4079
Merge pull request #1777 from librewish/btrfs_additions
[fstab] Improve btrfs mount options
2021-09-24 11:26:41 +02:00
librewish
e5e9e14a9f [initcpiocfg] add consolefont to hooks 2021-09-24 12:30:42 +05:30
librewish
3f890dfb8e [fstab] Improve btrfs mount options 2021-09-24 12:24:58 +05:30
Shrinivas Vishnu Kumbhar
528a815307 [locale] Default to English in India 2021-09-23 11:10:09 +02:00
Shrinivas Vishnu Kumbhar
9b57f402da [keyboard] Use US-English for India 2021-09-23 11:07:43 +02:00
Adriaan de Groot
8f65a644a9 [libcalamares] Rename cPointerSetter
This class doesn't really set a pointer -- it is a scoped assignment
through a pointer, which **can** set a value on destruction (when
it leaves scope). Rename it.

While here, extend the API so that it can do an assignment to the
underlying object **now**, while also doing a scoped assignment
later when it leaves scope. This makes some code a bit easier
to read ("in this scope, X is now <v> and then it becomes <v'>")
2021-09-22 11:29:52 +02:00
Adriaan de Groot
bba5b21873 [libcalamares] Remove cBoolSetter
This class was used only once, and is confusing because
the assignment happens always, but to the opposite value
as what was visible. It can be replaced with other
scoped assignment, instead.

Removes the tests for it, too.
2021-09-22 11:29:52 +02:00
Adriaan de Groot
b0149c2712 [libcalamares] Log the Python language-search process just once
- log the list of search paths once
- log the found-language as if from Python
- warn always if none are found
2021-09-22 11:29:52 +02:00
Adriaan de Groot
db26df311d [libcalamares] Reduce log-spam in emergencies
- when an emergency strikes, log the modules that are skipped
  with a Once, but if an emergency module runs, refresh that
  Once so that the function header is printed again -- to
  distinguish JobQueue debugging from the logging from the
  emergency module.
2021-09-22 01:44:00 +02:00
Adriaan de Groot
9be9431970 [libcalamares] Give Logger::Once more flexibility 2021-09-22 01:41:28 +02:00
Adriaan de Groot
049bccbdd8 [libcalamares] Cut down log-spam from KPMManager 2021-09-22 01:28:40 +02:00
Adriaan de Groot
cf1128b719 [partition] Cut down log-spam while checking for resize 2021-09-22 01:27:33 +02:00
Adriaan de Groot
857aaa6ca4 [partition] Cut down log spam about /etc/fstab 2021-09-22 01:15:37 +02:00
Adriaan de Groot
39915db988 [libcalamares] Reduce log spam when running commands 2021-09-22 00:58:31 +02:00
Adriaan de Groot
54385b7606 [libcalamares] Cut down config-file-loading log spam 2021-09-21 16:53:09 +02:00
Adriaan de Groot
cb92e49363 [initcpiocfg] Document this module 2021-09-21 15:16:08 +02:00
Adriaan de Groot
a4c714238f [initcpio] Refactor file-writing
- iterate over the lines of the source file, rather
  than over indexes, and make clear that the hooks, modules and files
  lines are replaced, rather than merged.
- this calls write() more often, but it's only a few lines
2021-09-21 13:39:29 +02:00
Adriaan de Groot
12cd9dd5b2 [initcpiocfg] Refactor
- Read the host /etc/mkinitcpio.cfg in one function rather
  than hiding it inside the writer
2021-09-21 13:18:01 +02:00
Adriaan de Groot
60e495bd8c [initcpiocfg] Refactor, improve testability
- don't chain directly from modify_mkinitcpio_conf() to the
  function that writes the file write_mkinitcpio_lines();
  split into "figure out what needs to be written" and calling
  that writing-function, so that we can test / check / log
  if needed between the two.
2021-09-21 13:13:21 +02:00
Adriaan de Groot
118e18ac60 [initcpiocfg] Code-shuffle
- put the system-information and -detection functions at top
  and the "do the actual work" things below
- don't mix the boolean do-we-use-this flags with the
  lists of files and modules which are the important
  parts of modify_mkinitcpio_conf
2021-09-21 13:03:13 +02:00
Adriaan de Groot
7c3c7c4ff7 [initcpiocfg] Use booleans for boolean values
(as previous) Use False/True rather than ""/"yes" for
keeping track of does-the-system-use-lvm2.
2021-09-21 12:54:18 +02:00
Adriaan de Groot
7f7dc04e8d [initcpiocfg] Use bools for boolean values
Having "" and "yes" as values is a bit shell-script-ish.
Use a regular boolean value instead; simplify code
while we're at it.
2021-09-21 12:52:16 +02:00
Philip Müller
03d8e5e68c Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-09-21 12:43:27 +02:00
Adriaan de Groot
45daebd989 [initcpiocfg] Refactor CPU-characteristics determination
The code is still over-wrought, but the API for cpuinfo
now exposes the interesting thing (is it Intel?) in
a useful -- more readable -- way.
2021-09-21 12:42:58 +02:00
Adriaan de Groot
1d812f88ce [luksbootkeyfile] Bump timeout for adding LUKS keyfile 2021-09-21 12:12:07 +02:00
Adriaan de Groot
ada13c19fd [libcalamares] Simplify filling the entropy buffer 2021-09-21 12:02:26 +02:00
Adriaan de Groot
a393ffe126 [luksbootkeyfile] Don't dd in the target to get entropy 2021-09-21 11:58:22 +02:00
Philip Müller
52ef084c31 [merge] upstream code 2021-09-17 21:18:36 +02:00
demmm
9c1e635804 [keyboardq] fix xml files, xml id has to be first 2021-09-17 15:01:27 +02:00
demmm
65b9bb0d6b [keyboardq] set proper SPDX headers
rename wrongly named shift.license
2021-09-16 15:01:37 +02:00
Adriaan de Groot
2988f9a651
Merge pull request #1782 from killajoe/patch-1
[shellprocess] fix typo in conf
2021-09-15 14:27:13 +02:00
Adriaan de Groot
f49627f417 [libcalamaresui] Improve sizeLimit handling in log upload
The log sizeLimit can be 0 (disable log upload) but that's
not so clear in the code. While here, tidy up and add
some comments to surprising bits.
2021-09-15 13:30:06 +02:00
Johannes Kamprad
e189faabe5
Update branding.desc
hint on sizeLimit must be set to have the log option work.
2021-09-14 16:54:29 +02:00
Philip Müller
3966239635 [merge] upstream changes 2021-09-14 10:44:57 +02:00
Johannes Kamprad
e98bf0da72
Update shellprocess.conf
a minor typo
2021-09-12 13:47:38 +02:00
Adriaan de Groot
cefe3dd4ff [tracking] Add Q_OBJECT, sanitize API 2021-09-08 13:31:17 +02:00
Adriaan de Groot
8d71e67a75 Add Q_OBJECT macro where it's missing
- Transifex tools complain about missing Q_OBJECT (which makes
  some sense -- you end up with a different context for calls
  to tr(), of the base class).
2021-09-08 13:23:20 +02:00
Adriaan de Groot
3380da638e
Merge pull request #1774 from demmm/calamares
[keyboardq] add interactive keyboard preview
2021-09-08 11:58:36 +02:00
Adriaan de Groot
87eb5300d2 Merge branch 'load-qtbase' into calamares
FIXES #1688
2021-09-08 11:29:15 +02:00
Adriaan de Groot
e47dc4aa78 [partition] Fix build with translated buttons 2021-09-08 11:28:38 +02:00
Adriaan de Groot
4a6753c867 [packagechooser] Restore (renamed) include that is needed after all 2021-09-08 11:26:21 +02:00
Adriaan de Groot
226419f794 [partition] Translate button texts in warning boxes 2021-09-08 11:15:12 +02:00
Adriaan de Groot
6e0a8d8ca1 [libcalamaresui] Translate button texts for paste-message 2021-09-08 11:15:12 +02:00
Adriaan de Groot
7516740bbf [interactiveterminal] Fix up standard buttons 2021-09-08 11:15:12 +02:00
Adriaan de Groot
dcfbb766dc [libcalamaresui] Use fixed standard-buttons labels
Move some of the texts to the new TranslationFix, from ViewManager,
and use them. Keep them in ViewManager, too, so that the translations
with context ViewManager are not removed just now.
2021-09-08 11:14:46 +02:00
Adriaan de Groot
8c84ae9ff6 [license] Remove unused header 2021-09-08 11:14:46 +02:00
Adriaan de Groot
683bad19fc i18n: introduce a "TranslationFix"
This is intended to apply translations to some common Qt UI components.

Example: a QMessageBox with standard buttons OK and Cancel; the text
for that is determined at startup using the system locale, and later
changes to the current locale or the current translation catalog,
do not affect OK and Cancel. It might be possible to load a catalog
with the right translation strings, except that there is no way to
know what the context or catalog **is** for the strings that are
used to label standard buttons: they can come from Qt base, or
the platform, or the theme. Merely loading the Qt Base translations
for the correct language does not help, because those translations
do not contain an "OK" string with the context used for standard
buttons.

Do the translation by hand; then we have all of the Calamares
languages covered, too, which is more than the Qt translations do.
2021-09-08 11:14:46 +02:00
Adriaan de Groot
438302fcf5 i18n: Shuffle the build so that all the bits are in lang/
Move the CMake code responsible for building the translations from
the src/calamares directory (yeah, yeah, the translations need to
link into the executable) into lang/ (which is where the source
and other infrastructure lives).
2021-09-08 11:14:46 +02:00
Adriaan de Groot
06d12fc924 [packagechooser] Remove unneeded include 2021-09-08 11:04:35 +02:00
Adriaan de Groot
24162cb162 i18n: repair language names for Chinese
Prompted by Linlinger, I've reconsidered the names of languages
in the drop-down in the welcome page. We already have the
infrastructure for assigning specific names / locales to
"Calamares locale names" (which match Transifex names, not
necessarily Qt names). Use that to put exactly two Chinese-
language translations in the drop-down:
- Simplified Chinese (code zh_CN)
- Traditional Chinese (code zh_TW)
Drop zh (which is a peculiar locale name anyway) and zh_HK
(which is Traditional Chinese, but using the geographic
boundary is a bit weird; we're going to ignore the
minor orthographic differences with Traditional Chinese
written elsewhere for now).

Note that this makes the drop-down show "Chinese"
in the English column, twice; the difference is visible
only in the native-language representation.

SEE #1741
2021-09-07 15:47:30 +02:00
Adriaan de Groot
4e60f8af13 [libcalamares] Use strong types for locale Ids
Change the API to force strong type for more methods.
This cascades to a couple of consumers.
2021-09-07 12:51:57 +02:00
Adriaan de Groot
3ff5896dc6 [libcalamares] Remove unused method 2021-09-07 12:35:47 +02:00
Adriaan de Groot
5f4e65bc77 [libcalamares] Code-format Retranslator, hide internal symbols 2021-09-07 12:35:37 +02:00
Adriaan de Groot
ad1a4b6479 [libcalamares] APIdox on Translation 2021-09-07 11:42:32 +02:00
Adriaan de Groot
73bfc6ca32 [libcalamares] Use structured bindings to unpack a std::pair 2021-09-07 11:38:54 +02:00
demmm
79cc616de2 [keyboardq] add interactive keyboard preview
rewrite of keyboardq.qml, reduce stackview to 2, use a combobox for
keyboard models list
colors set to configurable
.xml files used for keyboard layouts, about a dozen added now
builds, runs, actions record as intended, GS filled correctly
2021-09-06 19:25:16 +02:00
Adriaan de Groot
5e7746668e Merge branch 'calamares' into refactor-translation 2021-09-06 15:38:42 +02:00
Philip Müller
8ae76edd88 Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-09-06 15:32:40 +02:00
Adriaan de Groot
0aa2603a23 [libcalamares] Fix network-connectivity check on old Qt
With old Qt, Calamares could only run one check on a thread,
because the NAM would be switched to NotAccessible --
subsequent checks would fail because the NAM is already
hard-set to NotAccessible, so it could never be turned back
on by Calamares code.

Reset the accessible flag for the NAM while checking if
the internet is there.
2021-09-06 14:44:52 +02:00
Adriaan de Groot
0851a8a6a4 Merge branch 'issue-1769' into calamares
FIXES #1769
2021-09-06 13:23:59 +02:00
Adriaan de Groot
44e66c1318 [keyboard] Fix mapping for India + English
- India (when in English) should use the English variant, not Hindi
- While here, fix up minor items in code:
  - Typo in comment
  - Asturian doesn't need a special case (which didn't match, anyway)
  - Don't debug-log a country-name that might be entirely wrong
    (the layout is English, variant "in" but "in" interpreted as
    a country is Indonesia, and the actually-desired name is eng_in
    which isn't a QLocale name at all -- just like the Hausa and Igbo
    special cases)
2021-09-06 13:18:12 +02:00
Adriaan de Groot
b237c73a04 [shellprocess] Fix test
The test was loading the config file (for testing) either from the
build directory or possibly the source directory; if the config
in the build-dir was edited (for other testing purposes) then
the test would fail. Load only the source-dir version of the file.
2021-09-06 12:49:49 +02:00
Adriaan de Groot
6017420dde [welcome] Fix up and expand tests
- improve logging
- fix failing tests -- the observed and expected behavior is
  to fill in a fallback check-URL, not change to an empty list,
- **except** if there's no requirements key in the config
  at all; this is a bit weird, but let's make the tests
  document existing behavior so we can notice if it changes.
2021-09-06 12:35:24 +02:00
Adriaan de Groot
4948f634ed [keyboard] Code tidy
- complain just once (globally) if ckbcomp is not found, rather than
  at every update to the layout.
- tighten up QStringList constructor.
2021-09-06 12:06:11 +02:00
Adriaan de Groot
42bc197f67 Merge branch 'fix-pckq' into calamares 2021-09-06 11:27:09 +02:00
Adriaan de Groot
5a6e033e82 [bootloader] Flags for root-on-BTRFS
This is directly derived from Anke Boersma's KaOS code in module
*bootldr*, which adds the same kernel parameter via a slightly
different route.
2021-09-05 13:34:38 +02:00
Adriaan de Groot
e311d7a893 [packagechooser] Remove 'id' configuration setting
- Setting 'id' (which changes the Global Storage key that
  gets used) is a kludge when the existing module-instance
  name can be used instead -- and **was** already used, as
  a fallback when 'id' is not set. There's no point in having
  two places to set a particular name.
- Rip out the docs for 'id' as well.
- Add documentation on the difference between single-selection
  (the QML implementation) and model-selection (what the Widgets
  version does).
2021-09-03 23:59:11 +02:00
Adriaan de Groot
6def41fab4 [packagechooserq] Remove debug-output in QML 2021-09-03 22:57:17 +02:00
Adriaan de Groot
33e7e8da58 [packagechooser] Massage API
- use updateGlobalStorage() for both single-selection and
  model-based approaches, although the model-based one
  needs extra parameters.
- complain about inconsistent settings and API calls (e.g.
  setting a model and single-selection at the same time)
2021-09-03 22:41:13 +02:00
Adriaan de Groot
8a49fde016 [packagechooserq] Apply renaming also to distro-visible code
- The distro-visible key is renamed *pkgc* to *packageChoice*
- Read *packageChoice* only if there are no items to use
2021-09-03 21:21:44 +02:00
Adriaan de Groot
8b703ba6a3 [packagechooserq] More docs for the config file 2021-09-03 21:21:44 +02:00
Adriaan de Groot
c367731c42 [packagechooser] Rename internals
- pkgc -> packageChoice and similar for methods, variables
- document that this is the convenience value for one-selection
  QML modules, not a full model
- use std::optional to keep track of which one is being used.
2021-09-03 21:21:44 +02:00
Adriaan de Groot
47c504df5d [welcome] add SPDX-tags to test-data 2021-09-03 21:21:44 +02:00
Adriaan de Groot
1a1009a2a9 [summaryq] add SPDX-tags 2021-09-03 21:21:44 +02:00
dr460nf1r3
35156574b8
Dont set fsck check for BTRFS in fstab 2021-09-03 20:49:08 +02:00
Adriaan de Groot
2f88ba0d3f [partition] Coding style 2021-08-31 14:03:04 +02:00
Adriaan de Groot
09491e4cbb [partition] expect failures when kpm can't read the disk 2021-08-31 13:58:23 +02:00
Adriaan de Groot
1554c3a07c [partition] Create KPM backend at start of test 2021-08-31 13:54:23 +02:00
Adriaan de Groot
3d0709c779 [partition] Avoid crash when there is no KPM backend 2021-08-31 13:46:25 +02:00
Adriaan de Groot
ede19c8a61 [partition] Fix build of devices test 2021-08-31 13:45:15 +02:00
Philip Müller
46b0a933c2 Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-08-09 11:13:13 +02:00
Philip Müller
25b2f89d31 [postcfg] fix copy_tree() 2021-08-09 09:06:58 +00:00
Philip Müller
7a4cd9cdcc [postcfg] adopt to symlinks in copy_tree() 2021-08-09 07:57:37 +00:00
Adriaan de Groot
854eb845d2 [partition] Fix build of layoutstest
This test needs UI because the devicemodel uses GUI parts.
2021-08-05 15:49:29 +02:00
Adriaan de Groot
22ba21f937 [partition] Stub of a test of scandevice 2021-08-31 13:16:45 +02:00
Adriaan de Groot
e294221a2d [partition] Rename test executables
- all partition tests are now named partition<thing>test
2021-08-31 13:08:54 +02:00
Adriaan de Groot
3519697d0e [libcalamares] Slightly more memory-safe
Use unique_ptr to ensure Private is always deleted.

SEE #1758
2021-08-31 12:54:51 +02:00
Adriaan de Groot
0899eefde7 [packagechooserq] Fix build on Debian, openSUSE with AppStream 2021-08-31 11:33:05 +02:00
Adriaan de Groot
d7767afe1b Merge branch 'extra_qml' into calamares 2021-08-30 23:17:36 +02:00
Adriaan de Groot
6f16d3db83 Merge remote-tracking branch 'origin/issue-1761' into calamares
FIXES #1761
2021-08-30 22:33:03 +02:00
Adriaan de Groot
b9a1d090ec
Merge pull request #1762 from demmm/calamares
[localeq] redo i18n.qml
2021-08-30 13:57:17 +02:00
waneon
4bf3afac48 [partition] Fix invalid variable name 2021-08-27 19:18:09 -04:00
Adriaan de Groot
da49becac3 [partition] Tailor warning message about ESP
- tell the user all the things that are wrong with the
  (proposed) ESP; a missing one gets all the suggestions.
2021-08-27 17:28:07 +02:00
Adriaan de Groot
6324fa3eb9 [partition] Disentangle questions of suitability of ESP
- split into size, type, flags so the warning message can
  be tailored to what is wrong.
2021-08-27 17:27:26 +02:00
Adriaan de Groot
7d08770806 [partition] Apply code style 2021-08-27 17:26:50 +02:00
Adriaan de Groot
52a82ea1e6 [partition] Improve warning message in log 2021-08-26 17:39:06 +02:00
Adriaan de Groot
46ca4d93e7 [partition] Improve constness, naming 2021-08-26 17:30:55 +02:00
Adriaan de Groot
ad9306d7bb
Merge pull request #1749 from LordTermor/calamares
[partition] Disable delete button for extended partition
2021-08-26 17:18:09 +02:00
Adriaan de Groot
51c18baedb Merge branch 'issue-1669' into calamares 2021-08-26 17:15:03 +02:00
Adriaan de Groot
f376b42c31 [welcome] Add a handful of tests for different URL configs 2021-08-26 16:58:46 +02:00
Adriaan de Groot
ad76a2cbe8 [welcome] [welcomeq] Move requirements to Config
The Config object can hold all of the configuration information,
including also the requirements-checking parts. Move requirements-
checking configuration there, so it is shared and consistent
across welcome and welcomeq, regardless.

This repairs the test that expects the Config object to handle
**all** of the configuration, too.
2021-08-26 16:39:55 +02:00
Adriaan de Groot
67d2b5568d [welcome] Fix test, check that the internet check URLs are loaded 2021-08-26 14:40:52 +02:00
Adriaan de Groot
0538881447 [libcalamares] Handle multiple invalid URLs at once
- expand tests with example where more than one URL is invalid
- fix the call to the wrong overload of QVector::erase()
2021-08-26 14:32:57 +02:00
Adriaan de Groot
653359d815 [libcalamares] Fix up multiple URLs for checkinternet
- was filtering out the wrong URLs
- was not actually removing the invalid URLs
- extend API to make it possible to count / confirm the settings
- extend tests to demonstrate that API and the issues
2021-08-26 12:57:40 +02:00
demmm
7bfb769288 [localeq] redo i18n.qml
set colors as vars, mostly kirigami colors, to make it work for boths dark & light themes
highlights now full width and on hover
currentindex still at -1, not implemented in cofig.cpp/h, possible to use js, or is
https://github.com/calamares/calamares/blob/calamares/src/modules/locale/LCLocaleDialog.cpp#L43 accessible to QML?
2021-08-26 12:05:38 +02:00
Adriaan de Groot
d5e6e1075d [welcome] Expand stub tests to check that crashes are gone 2021-08-24 13:37:02 +02:00
Adriaan de Groot
e0ee2d9514 [welcome] Handle nullptrs nicely in Config
- Branding, Settings, and ModuleManager may all be nullptr,
  in which case the corresponding code shouldn't call methods
  of those instances -- this is demonstrated by just creating
  a Config object
2021-08-24 12:50:03 +02:00
Adriaan de Groot
1e05e7996b [libcalamares] Avoid cError + SubEntry
The combination of Error and SubEntry loses the indentation.
2021-08-24 12:32:48 +02:00
Adriaan de Groot
14c26d01af [libcalamares] Warnings for nullptr Settings 2021-08-24 12:30:44 +02:00
Adriaan de Groot
e9a98f35ad [welcome] Avoid crash when no Branding available
- don't install translators twice -- do it in setLocaleIndex only
- avoid crash if the branding instance is nullptr
2021-08-24 11:58:24 +02:00
Adriaan de Groot
38c65e80f3 [libcalamaresui] Warn when asking for nonexistent Branding instance 2021-08-24 11:57:37 +02:00
Adriaan de Groot
f1a47a9f0a [welcome] Add (stub) test for the Config object
This crashes because there's no translations object yet,
but that is an internal issue.
2021-08-24 10:24:11 +02:00
Adriaan de Groot
c79fc2e6d9 [libcalamares] Add urls only if valid, add tests to check that 2021-08-24 10:00:42 +02:00
demmm
805fed559c [networkcfg] use os.getlogin()
cala running as root returns root for live_user otherwise
2021-08-16 20:17:07 +02:00
demmm
8913317a44 [networkcfg] add setting the correct target user in copied file
see https://github.com/calamares/calamares/issues/1753
2021-08-16 14:06:13 +02:00
Artem Grinev
74a3a2da78 [partition] Fix Delete button for extended
Extended partition can't be removed when contains children. This commit
adds missing check.
2021-08-12 02:13:16 +04:00
Adriaan de Groot
b7a3f58df4 [partition] Update waiting widget only if it (still) exists 2021-08-05 14:51:31 +02:00
Adriaan de Groot
a1690ac2d6 [partition] Set up swap-choice texts correctly 2021-08-04 01:47:55 +02:00
Adriaan de Groot
0be4c38a87 [partition] Remove useless parameter
- previously, updateSwapChoicesTr() wanted to be a static free function,
  but it needs QObject::tr() ; drop the unnecessary parameter (since it
  is a member function).
2021-08-04 01:45:22 +02:00
Adriaan de Groot
390acd41b2 [partition] Factor out manual partitioning translation
- needs to be called when the button is created, too
2021-08-04 01:42:00 +02:00
Adriaan de Groot
c5fa6383d7 [welcome] Remove annoying debug message 2021-08-05 14:25:20 +02:00
Adriaan de Groot
2820316d16 Partition: don't set text if button doesn't exist 2021-08-05 14:23:11 +02:00
Adriaan de Groot
1452b74740 [welcome] Load potentially a list of URLs to check 2021-08-01 23:52:27 +02:00
Adriaan de Groot
2f3062f4c2 [libcalamares] Fix typo in comment 2021-08-01 23:49:33 +02:00
Adriaan de Groot
81fe8b1488 [libcalamares] Expand API for setting URLs to check 2021-08-01 22:37:13 +02:00
Adriaan de Groot
b8583a1e59 [libcalamares] Expand the number of URLs to check for connectivity
- introduce a list of URLs instead of just one
- ping each of them, in turn, until one responds
2021-08-01 22:07:51 +02:00
Adriaan de Groot
559c53b09c [libcalamares]: stronger type for translation name
QString -> Id for translations in the external API, to avoid
accidentally converting a QLocale name (e.g. ca_ES) into a
Calamares translation name. This preserves special-cases
like ca@valencia and sr@latin.
2021-07-28 14:22:28 +02:00
Adriaan de Groot
bc9d8fb13a [libcalamares] Rename files Label -> Translation 2021-07-28 14:22:28 +02:00
Adriaan de Groot
bf9f1c95bc [libcalamares] Rename classes describing Translations
- the name 'Label' was a relic of the class being UI-centered
2021-07-28 14:22:28 +02:00
Adriaan de Groot
d6825c4986 [libcalamares] Fix linking with renamed targets 2021-07-28 13:20:35 +02:00
Adriaan de Groot
3596b48c7a [libcalamares] Factor out common string in Python logging
- enforce consistent [PYTHON JOB]
- use CDebug() constructor, because the convenience macro's
  introduce the function name -- that's the C++ function, so
  it isn't useful for logging.
2021-07-28 13:13:39 +02:00
Adriaan de Groot
fc2286117d [packages] Move package-list-logic into PM base class 2021-07-28 13:13:39 +02:00
Adriaan de Groot
2b485a5e59 [keyboard] Only guess layouts until the user picks one
- when activating the page, the "guess" functions do their
  work and afterwards the config is left in a "guessable"
  state, but if the user makes a specific choice, then
  the config leaves the "guessable" state and the user's
  explicit choice is preserved.

FIXES #1744
2021-07-31 00:24:10 +02:00
Adriaan de Groot
a65723d4da [libcalamares] Extend cPointerSetter with initial-value
This is a convenience for "set <some variable> to <some value>
at end of scope".
2021-07-31 00:20:27 +02:00
Adriaan de Groot
12b23db286 [keyboard] Re-phrase API
- expose only intended API, guessLayout() becomes internal and static
- rename onActivate() since it was *called* for activation, but does
  something totally different.
2021-07-30 22:17:26 +02:00
Adriaan de Groot
f38b518e86 [keyboard] Factor out lambdas to regular slots
- Long and complicated, nested, lambdas are not convenient for reasoning.
- The debug messages from the innermost lambda have a totally useless
  function name, which makes debugging harder.
2021-07-30 13:22:40 +02:00
Adriaan de Groot
e8cb5c621a [partition] Fix build 2021-07-26 20:54:43 +02:00
Adriaan de Groot
616f3d4fd7 [partition] Simplify retranslation of swap choices and manual partitioning 2021-07-26 16:18:31 +02:00
Adriaan de Groot
e0b8942242 [partition] Introduce retranslate slot for ChoicePage, code style 2021-07-26 16:12:41 +02:00
Adriaan de Groot
954e8ee3f8 [libcalamares] warnings-- with a deduction guide 2021-07-26 15:18:21 +02:00
Adriaan de Groot
4114a2bbe8 CMake: chase renamed YAMLCPP 2021-07-26 15:08:29 +02:00
Adriaan de Groot
03e621f4a2 Modules: clean up linking
- do not link (explicitly) to Calamares libraries, the CMake
  functions do that automatically.
- while here, tidy and remove commented-out-bits
- while here, remove unneeded includes
2021-07-26 15:04:43 +02:00
Adriaan de Groot
cbb1a5ef36 CMake: within Calamares repo, use the (eventual) imported names of libraries 2021-07-26 14:22:28 +02:00
Adriaan de Groot
a1fb83bdc4 i18n: fix typo and code-style 2021-07-26 11:16:26 +02:00
Adriaan de Groot
53fb16437f i18n: factor out special cases
- allow special Locale or special Name for a translation (or both)
2021-07-25 23:38:09 +02:00
Adriaan de Groot
0e977a7e42 i18n: introduce special case for ca@valencia 2021-07-25 23:18:05 +02:00
Adriaan de Groot
740f1e7fe5 i18n: simplify Label handling of sr@latin 2021-07-25 23:13:44 +02:00
Adriaan de Groot
85a1eb95ee [welcome] Some translation / label fixes
- the message had been arbitrarily changed; change it back
- update (warning) message when there is progress in checking the
  model, so it doesn't stay at "unchecked" until you change language
- minor clean-ups
2021-07-25 00:08:47 +02:00
Adriaan de Groot
243c4e6b02 Merge branch 'fix-retranslate' into calamares
Improve the Retranslator framework so it also affects Config objects.
2021-07-24 23:27:18 +02:00
Adriaan de Groot
59f11e9b67 i18n: make retranslator more consistent
- Improve naming.
- Both lambda and slot versions call the code immediately.
2021-07-24 23:26:02 +02:00
Adriaan de Groot
613d076a60 i18n: re-do the whole Retranslator infrastructure
Just have **one** Retranslator object, and install it as event-filter
(this needs to be done manually on a top-level widget) and use
signals / slots to do the actual work, rather than filtering
in multiple places and doing our own mediocre version of binding-
signal-to-lambda.
2021-07-24 23:18:03 +02:00
Adriaan de Groot
51c5c9ba26 [welcome] Switch to using the message from the Config object
- The Config object owns the requirements model, and has messages /
  strings describing the state of the model. Use that message,
  dropping the duplicate message from the requirements widget.
- Re-jig to pass the Config object around rather than the model
  that it owns.
- This does not work, because translation events do not arrive
  (and the slot isn't called automatically either).
2021-07-24 23:15:05 +02:00
Adriaan de Groot
b81bc17560 [welcome] Log when translation events arrive 2021-07-24 16:59:38 +02:00
Adriaan de Groot
f32671ebab libcalamares: remove declaration that was never implemented 2021-07-23 22:51:08 +02:00
Adriaan de Groot
4b2b74bdbd [libcalamaresui] Do not link publicly to yamlcpp 2021-07-23 17:23:30 +02:00
Adriaan de Groot
949f9e466f [summary] createContentWidget is called exactly once, refactor 2021-07-20 16:24:29 +02:00
Adriaan de Groot
d6fe30dfdb [summary] No need for widget-creation to be a method of the Page 2021-07-20 16:21:59 +02:00
Adriaan de Groot
5de99d53d2 [summary] Move title to Config object
Rather than Config asking its (owning) ViewStep what the title
is -- all existing implementations have a prettyName() for that --
move the title into Config and re-do-the ViewSteps to use it.

Rename init() to something meaningful.
2021-07-20 16:00:53 +02:00
Adriaan de Groot
4e588584d7 [summary] Hook up Config message to page
- the Page displays a simple message describing what the
  summary is all about; Config has the same message,
  use that. Needed some re-jigging to get the signals
  and slots right.
2021-07-20 15:49:03 +02:00
Adriaan de Groot
9eee00c286 [summary] Create Config object
- Create Config object, even if it's not used just yet
- Introduce onLeave() for the Page, better name than
  (re-)creating the content (!?) when leaving
2021-07-20 15:17:35 +02:00
Adriaan de Groot
aba212d700 [summary*] Move Config to the non-QML module, so it can be shared 2021-07-20 14:57:09 +02:00
Adriaan de Groot
f8c3b76367 [summary] Stylistic fixes before moving Config objects around 2021-07-20 14:49:08 +02:00
Adriaan de Groot
6c7e7a6d55 [summaryq] a handful of code-style fixes 2021-07-20 14:45:55 +02:00
demmm
c98b5d7667 [usersq] replace one more (missed) kirigami color 2021-07-16 18:19:10 +02:00
demmm
6bdc655719 [usersq] complete using names for colors
add line breaks
add negative outline color
2021-07-15 19:30:43 +02:00
Adriaan de Groot
1bf73c29c4 [usersq] Use a name instead of a magic number 2021-07-15 17:05:49 +02:00
Adriaan de Groot
56f71501cc [usersq] Back out color-scheme merge 2021-07-15 16:54:02 +02:00
Adriaan de Groot
e361f52415
Merge pull request #1738 from Nitrux/calamares
[usersq]: use system colorscheme instead of hardcoded colors
2021-07-14 16:41:35 +02:00
Adriaan de Groot
3a5334071d [packages] Fix wording problem 2021-07-14 12:54:07 +02:00
Philip Müller
8e28547f2c Merge branch 'calamares' of https://github.com/calamares/calamares into development 2021-07-14 12:41:13 +02:00
Adriaan de Groot
bc77478b2a [calamares] Expand test-mocks for Python
- the rawfs module uses more parts of the subprocess Python module
  and so needs more things mocked for testing.
2021-07-14 09:29:20 +02:00
Adriaan de Groot
235db9f961 [summaryq] No need to be a ParserStatus object
Config classes, which intend to be shared between widgets-
and QML-based view-steps, should not tie closely to internals.
None of the ParserStatus methods are used in a meaningful
way (init() can be called by the view step).
2021-07-13 22:07:06 +02:00
Adriaan de Groot
768760793a [summaryq] Hide internals of building the summary model 2021-07-13 22:04:01 +02:00
Adriaan de Groot
792ba8c0af [summaryq] Nothing uses the derived type of the model
(This assertion may be dialed back if the Config object is used
in the summary ViewStep, which will want to get at the widget
pointers, but that's for later)
2021-07-13 21:29:17 +02:00
Adriaan de Groot
a658e88575 [summaryq] Nothing in the Config is specific to this QML view-step 2021-07-13 21:25:57 +02:00
Adriaan de Groot
a316f1b40d [summaryq] Repair translatable properties
- doesn't make sense to have NOTIFY and CONSTANT
- connect to translation signals
- document the properties
2021-07-13 20:42:19 +02:00
demmm
1570105ddb [usersq] correct plural form as reported in IRC 2021-07-13 12:46:04 +02:00
Adriaan de Groot
3b7c2b2221 [summaryq] Remove memory leak
Don't use a vector of pointers, it is too easy (like when calling clear())
to leak memory.
2021-07-13 11:02:24 +02:00
Adriaan de Groot
d2e11dd5d1 [summaryq] Apply coding style 2021-07-13 10:36:05 +02:00
Adriaan de Groot
c2d0a247a3 [partition] Simplify code for overloads 2021-07-12 16:52:24 +02:00
Adriaan de Groot
b43759c6a5 [partition] Apply coding style 2021-07-12 15:42:54 +02:00
Adriaan de Groot
e8b17b9878 [partition] Factor out the descriptions per-disk 2021-07-12 15:39:45 +02:00
Adriaan de Groot
400a5751f9 [partition] Factor out description of action in status and widget 2021-07-12 15:17:34 +02:00
Adriaan de Groot
535f81ba8a [partition] Factor out gather job-descriptions
Since prettyStatus() and the summaryWidget share a lot of
strings and code, start factoring that out.
2021-07-12 15:02:24 +02:00