- 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
- 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.
- 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.
- 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).
- 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)
- 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.
- 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".
- 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.
- 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.
- 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
- 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.
This is an ugly hack, using Bill Auger's support for Job weights.
The unpackfs job is arbitrarily awarded a weight of 12. That makes it
(in a Netrunner install) use progress from 12% to 40% or so, overall,
as all the files are unpacked.
Also fixes bug reported by Kevin Kofler that unpackfs was only reporting
progress when it hit an exact multiple of 100 (instead of over 100).
SEE #1176
- this is currently just an alias for QVariantMap, which is
the type already in use.
- future plan is to tighten this up and have an actual
Descriptor class that carries only the information
actually needed for the module descriptor.
- Replace stringlist with a stronger-typed list of InstanceKey objects
- Move smashing-that-to-stringlist into consumers of the list
(just one, the debug window)
sidebar entry can be configured and translated
adding a more elaborate qml example
keeping this in dummyqml for now, another commit will follow with
continuation of dummyqml in a more aptly named module
- introduce NamedEnum lookup tables for interface and type
- drop "final" and "virtual" from methods that don't make
sense as virtual
- shuffle declaration order so the virtual API for modules
sits together
- Trying to get away from untyped strings with special meaning.
- The "split identifier" branch tried the same thing, but
was duplicating the existing InstanceKey.h work.
- need a configuration before we can start loading (to support
the variable search paths)
- refactor showing a failure in the spinner widget. On failure,
the spinner will never go away, so a message for the user is good.
- stop clang-format from messing up the table of names.
- start of a class to hold configuration information; this can
later be substituted into the WelcomeViewStep and filled from
setConfigurationMap()
In the example application:
- register the Config type
- test application to display the QML (this will be extended
with adding the locale model to it)
- sample QML that does nothing useful yet (will display the locale
model once it's there)
- all the TZ location information now lives in the Calamares
locale service and the TZ list
- replace the Location class that was local to the timezone
widget by the TZZone class
- chase a bunch of small API changes that this needs
- Split the actual loading of translations into classes
to encapsulate the loading logic,
- Build a collection of classes to do the different kinds
of translation loading,
- Build a generic function to load something and update a
static pointer to the translation.
This makes installTranslator() much easier to read, and encapsulates
the type-specific loading somewhere else. While here, add a timezone-
translations loader so that the split-out TZ translations also work.
- Hide the one file from lupdate by giving it a weird suffix
- Call lupdate a second time for the timezone translations
- While here, adjust so that the options precede the directories
they are supposed to affect
I don't want to give the translation teams 444 new strings all
at once (about 90% of which don't need translation).
- Used in only one place, move to .cpp
- Drop useless scaling all the images *are* that size already
- Add debugging check that the images match expected size
- search for a key and return a type-cast pointer to the result
- while here, simplify some other code
- the find() function could be done with std::find_if but doesn't
get any shorter or more elegant
- By using QList< CStringPair* > consistently, we can save
a bunch of model code at the cost of an occasional dynamic_cast;
it's fairly rare for there to be a need for the derived pointer.
- read the file and create the regions on-the-fly, then sort the
resulting list (instead of building a string list and then
building the regions afterwards)
- needs a qwidget to put the top-items (license name, button) in
- fixes issue where the gap between the button and the hrule would
change depending on what is expanded
- Move layouting code into the .ui file
- Reduce margins hugely -- atop the title block, around the
scroll area, etc -- so that more license is visible at once.
- split shared <h1> message off
- do some string-concatenation, but only of whole sentences
- shave off some vertical space by dropping the mainsubtext item
- In code, add the necessary bool
- document meaning in the config file
- actually expand the full text if the entry is local and set to expanding-
by-default. This implementation is a bit lazy since it just pretends
to click on the toggle button.
- While here, reduce scope for UB by initializing POD members
- The arrows Up, Down, Right are used on toolbuttons, but
in the context of this module, those are directions with
meaning; give them better names.
- Because of #1268, the meaning of up- and down- may be swapped;
I'm not sure of which look makes the most sense. This is prep-
work for easily swapping the looks by using the meaningful names
instead.
SEE #1268
- we loop over all the entries anyway, so calculate allLicensesOptional
along the way (debatable whether std::none_of is clearer)
- always un-check the accept-box when resetting entries.
- Toggling the checkbox could disable the next button
because only the checked-state was used, instead of
the next-is-enabled-if-everything-is-optional member variable.
FIXES#1271
- Move retranslation to a separate slot to allow it to be
formatted nicely.
- Use calculated m_allLicensesOptional in retranslation.
- Untangle determining if all licenses are optional; std::none_of
returns true on an empty list.
- this isn't really a Calamares thing to decide, and anyway centering
on the desktop is kind of weird in multi-monitor setups and the
DesktopWidget is deprecated as well.