Commit Graph

6452 Commits

Author SHA1 Message Date
Adriaan de Groot
4525060c26 [calamares] Refactor Settings initialization
- add a Settings::init() to do actual work
 - remove the same kind of code from CalamaresApplication
 - make constructor of Settings private
 - initialize settings before the application
2020-02-05 16:48:49 +01:00
Adriaan de Groot
68e8b0695d [calamares] Make declaration order match calling order 2020-02-05 16:14:56 +01:00
Adriaan de Groot
db80a34aca [calamares] Remove intermediate debug-settings
- There's a multi-stage setup for debug-mode, where the application
   object also knows that debugging is set. Remove it.
 - Break debug mode (because now the settings don't get debug-mode set).
 - Refactor so that parameter handing is only done if this Calamares
   is the unique (first) Calamares.
2020-02-05 16:10:41 +01:00
Adriaan de Groot
50b6801d35 [calamares] Install translator after loading settings
- means that also the *initial* translation can take settings
   into account, like -d loading local translations.
2020-02-05 14:33:42 +01:00
Adriaan de Groot
f233cac7a1 [calamares] Refactor debug-logging settings 2020-02-05 14:23:55 +01:00
Adriaan de Groot
ea8adc3de7 [calamares] Simplify return from main 2020-02-05 14:04:52 +01:00
Adriaan de Groot
af862336a8 [calamares] Initialize settings before QML 2020-02-05 13:50:18 +01:00
Adriaan de Groot
91625c8ba8 [libcalamares] Tidy up boolean options in Settings
- The const getters for a single boolean value have moved
   to the header, for inlining.
 - Document the getters and what their settings mean.
2020-02-05 13:35:26 +01:00
Adriaan de Groot
21aec96e2e Changes: document new language, random 2020-02-04 22:24:22 +01:00
Calamares CI
f45ed644d9 i18n: [python] Automatic merge of Transifex translations 2020-02-04 22:19:48 +01:00
Calamares CI
8c0ef5798d i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-02-04 22:19:48 +01:00
Calamares CI
2088261ac6 i18n: [desktop] Automatic merge of Transifex translations 2020-02-04 22:19:47 +01:00
Calamares CI
1b3797b414 i18n: [calamares] Automatic merge of Transifex translations 2020-02-04 22:19:47 +01:00
Adriaan de Groot
d956c79291 [libcalamares] Load translations from more places
- To support translation testing, without needing to recompile
   Calamares, load files from the local directory when debugging,
   or from /usr/share/calamares/lang/ in general.
 - This allows updating translations and testing them with just
   lrelease (a translation build tool) installed, without rebuilding
   Calamares.
 - This allows distro's to ship updated or modified translations without
   rebuilding Calamares.
2020-01-30 19:06:33 +01:00
Adriaan de Groot
f1d7b29f11 Merge branch 'issue-1254' 2020-01-30 10:34:14 +01:00
Adriaan de Groot
02e5e0de5e [users] Use entropy service.
FIXES #1254
2020-01-30 10:32:34 +01:00
Adriaan de Groot
5b987d4f33 [machineid] Use entropy service
- Most of the code was error-checking, just replace the open-read
   with a call to the service instead.
 - It's not an error if /dev/urandom doesn't exist in the source system
   (there may be other good random sources, and otherwise we have the
   low-quality random fallback).
2020-01-30 10:32:27 +01:00
Adriaan de Groot
c971127b17 [machineid] Fix entropy-file return
- If the file was created and written, it would drop out of the
   if() and return an error anyway.
2020-01-30 10:08:55 +01:00
Adriaan de Groot
e56948cefa [libcalamares] Fix tests (cell is the lower unicode byte) 2020-01-29 16:41:17 +01:00
Adriaan de Groot
be0831ee11 [libcalamares] Add printable-entropy (e.g. for password salt) 2020-01-29 16:39:25 +01:00
Adriaan de Groot
8947f9c00c [libcalamares] Test the Entropy service 2020-01-29 16:16:12 +01:00
Adriaan de Groot
a574b43eb8 [libcalamares] Also report empty buffer as no-entropy 2020-01-29 16:08:33 +01:00
Adriaan de Groot
842a90e026 [libcalamares] Add an Entropy service for getting random data
- Tries to get the "best" random data
 - Reports the quality of the random data it got
2020-01-29 16:03:50 +01:00
Adriaan de Groot
445eb1f640 Changes: post-release housekeeping 2020-01-29 11:42:22 +01:00
Adriaan de Groot
252ce70203 i18n: updated (English) source files 2020-01-29 11:42:04 +01:00
Adriaan de Groot
b38ae75bef Merge branch 'translate-checks' 2020-01-29 11:11:32 +01:00
Adriaan de Groot
8f581ca861 [welcome] Coding style
- apply coding style, add {}
 - remove unneeded includes (moved to the widgets)
 - update copyright
2020-01-29 11:10:30 +01:00
Adriaan de Groot
5107ce550b Changes: pre-release housekeeping 2020-01-28 17:42:21 +01:00
Adriaan de Groot
5a732a2d7d Merge branch 'issue-1308'
FIXES #1308
2020-01-28 17:38:11 +01:00
Adriaan de Groot
a09593e4a2 [locale] Tighten up language-matching
- Drop plain startsWith() matching, since we now have "as" and "ast"
   as supported languages, where one name is a prefix of the other.
2020-01-28 17:35:54 +01:00
Adriaan de Groot
49690fc681 [locale] Remove superfluous code
- the list is already filtered for UTF-8, so this is redundant
 - this *incidentally* fixes the problem with Assamese and Asturian,
   since Assamese (as_IN) was having its only entry removed,
   after which it would match Asturian (ast_ES)
2020-01-28 16:41:15 +01:00
Adriaan de Groot
97f622e094 [locale] Use standard algorithms 2020-01-28 15:50:08 +01:00
Adriaan de Groot
6b77d5db4a [welcome] Add detail messages for root and screen checks
- these were empty, so the widgets were hidden in the details
   dialog of the requirements check; which looks really strange
   if the reason the check fails is because root is required,
   and you can't see that in the details.

This commit is on a branch because it changes strings, and I want
to do a release Real Soon and not annoy the translators.
2020-01-28 15:24:29 +01:00
Adriaan de Groot
6db4d2ed37 CI: more BSD-compatibility, and remove typo 2020-01-28 15:21:17 +01:00
Adriaan de Groot
ede7d94b40 CI: handle differences in date(1) better 2020-01-28 15:18:54 +01:00
Adriaan de Groot
bf0515d188 CI: handle FreeBSD version of date(1) 2020-01-28 14:52:34 +01:00
Adriaan de Groot
ac96d91a65 Merge branch 'issue-1307'
FIXES #1307
2020-01-28 14:31:27 +01:00
Adriaan de Groot
ad4ac1d25c [welcome] Update copyrights 2020-01-28 14:23:38 +01:00
Adriaan de Groot
9d69d0a893 [welcome] Remove unused variables 2020-01-28 14:21:02 +01:00
Adriaan de Groot
1ac4786365 [welcome] Move all the translation work to the slot
- this needs to (re)check the satisfaction states to figure out the
   message, but that's useful if the state of the checks changes
   (e.g. in #1106)
2020-01-28 14:15:57 +01:00
Adriaan de Groot
221a79b64c [welcome] Simplify logic
- \not mandatorySatisfied \implies \not requirementsSatisfied,
   so the ifs can be combined and simplified
2020-01-28 13:58:08 +01:00
Adriaan de Groot
28d91979c3 [welcome] Make resultWidgets less error-prone
- instead of counting and needing to keep track of the predicate
   applied while creating the widgets, push nullptrs to the widget
   list instead reflecting "this entry did not satisfy the predicate
   for widget creation".
2020-01-28 13:50:23 +01:00
Adriaan de Groot
39534325e6 [welcome] Re-use widget creation code
- for the list, the code can be the same as for the dialog,
   only the predicate is different.
 - while here, implement retranslate() since there's no text on
   the list widgets otherwise.
2020-01-28 13:39:27 +01:00
Adriaan de Groot
38d58e5b16 [welcome] Hoist explanatory-label code
- Create the label once, and it's ok for it to respond to links
   even if there's none in the code.
 - Turn into a member variable in preparation for retranslation-refactor.
2020-01-28 13:32:53 +01:00
Adriaan de Groot
b476e4b386 [welcome] Refactor link-clicking
- remove intermediate lambda
 - rename dialog slot to one handling links in general (which now
   **only** does the dialog link)
2020-01-28 13:24:01 +01:00
Adriaan de Groot
ecc7719abd [welcome] Hoist checking for requirements-satisfied
- lift it out of the loop that creates the widgets
 - some lambda-wankery, but the compiler hammers this down to
   simple loops and you can read the resulting code as

	none_of  [the list]  isUnSatisfied
	none_of  [the list]  isMandatoryAndUnSatisfied
2020-01-28 13:13:09 +01:00
Adriaan de Groot
f5c0e57f17 [welcome] Improve variable naming
- these two are about whether all the checkEntries are satisfied
   (in general, and the mandatory ones) so make the names reflect that.
2020-01-28 13:02:39 +01:00
Adriaan de Groot
5795801be5 [welcome] Remove unneeded member variables.
- local to the constructor, only needed to be members because
   of the weird split between constructor and init()
2020-01-28 13:00:21 +01:00
Adriaan de Groot
5aae736ced [welcome] Create ResultWidget in separate method 2020-01-28 12:53:19 +01:00
Adriaan de Groot
bede280f91 [welcome] Refactor ResultsListWidget
- no point in having init() called immediately after the constructor,
   if it only makes sense to have one call to init() ever to create
   the widget.
 - while here, give it the same kind of structure as the dialog,
   holding on to a reference to the list.
2020-01-28 12:41:36 +01:00