Commit Graph

4740 Commits (8947f9c00c3a397a11f44ebdb3651f48196ea96c)

Author SHA1 Message Date
Adriaan de Groot fbb452f9bf CMake: add support for NO_CONFIG
- A C++ module should set NO_CONFIG to flag that it doesn't have a
   config file (this is an error if it secretly **does** have one)
Adriaan de Groot fed0c46612 [libcalamaresui] Change return type of loadedInstanceKeys()
- 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)
Adriaan de Groot ed4127f661 [libcalamaresui] Shuffle the module interface
- 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
Adriaan de Groot f89c137c90 [libcalamaresui] Migrate module to using InstanceKey
- 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.
Adriaan de Groot a7e1a1f9fc [libcalamaresui] Refactor Module::initFrom()
- generic initFrom() also sets the instance id
 - subclass-specific initFrom() now pure virtual in base
 - chase changes in subclasses
Adriaan de Groot 1a8926181e [locale] Warnings-- (initialization-order)
Adriaan de Groot 2dff2d9d70 [libcalamares] TZRegion is hard to copy
- delete the copy and move constructors
 - adjust tests (which were just interested in simple tr() behavior) to use TZZone instead
Adriaan de Groot 5fbd0169ca [libcalamares] Reduce clang warnings (only-inline-virtual, unused parameters)
Adriaan de Groot 1b62b2f66c [libcalamares] Reduce warnings (extra ;, empty statement ..)
Adriaan de Groot b4c0ebe8ab [calamares] Use screen and window sizes, not position
Adriaan de Groot fcb0109b7b [calamares] Refactor center-placement
- Just move it to its own function where it can have more documentation
 - Tested on multi-screen setups

SEE 
Adriaan de Groot 121013fd96 [calamares] Avoid deprecated desktop()
- Put Calamares on the first screen where it fits
 - This is wordy and weird
Adriaan de Groot 43caf7b46a [calamares] Restore functionality for 'center window'
Adriaan de Groot 17d09342e9 [libcalamaresui] Add a setting for window placement
Adriaan de Groot 1625bb1dae [locale] Support Qt 5.9
FIXES 
Adriaan de Groot d21ed0cc7f [packagechooser] Coding style
Adriaan de Groot cefb66ab5b
Merge pull request from bill-auger/patch-packagechooser-default-selection
[packagechooser] pre-select default item in packagechooser
Adriaan de Groot dd5adc153f
Merge pull request from calamares/initcpiocfg-usr
[initcpiocfg] add usr hook if partition is separate
Adriaan de Groot fe64903d2f [initcpiocfg] Polish PR
- List discrete years in copyright
 - Add docstrings
 - Massage detect_plymouth() to return bool (easier in if() context)
Philip Müller 85d3f9e9b9 [initcpiocfg] add usr hook if partition is separate
Philip Müller a3da47cd9c [initcpiocfg] update plymouth check
Adriaan de Groot 0e7982ec37 [libcalamares] Don't force Hindi on India.
FIXES 
Adriaan de Groot 58786388d6 Merge branch 'zone-data'
Adriaan de Groot 7bea19a62c [locale] Fix build with debugging enabled (API changes)
Adriaan de Groot 242b79e2e1 [locale] Remove old Location information
- 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
Adriaan de Groot 4945408911 [libcalamares] Remove debugging cruft
Adriaan de Groot daa76080f1 [libcalamares] Add meaningful aliases for key()
Adriaan de Groot 0ed2a3e35f [libcalamares] Refactor translation-setting
- 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.
Adriaan de Groot 93ae44e214 [libcalamares] Split translatable timezone data
- 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).
Adriaan de Groot e164f8d63a [locale] Fix build with DEBUG_TIMEZONE
- all the API changes were not reflected in the debugging code
Adriaan de Groot fb9d53909e [locale] Drop ZONES #define
- this was a "cheap" way to write a list, but going through
   QStringList::split() is just a long-way-around for static
   initialization
Adriaan de Groot 2dfbed40c5 [locale] Move defines
- 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
Adriaan de Groot 9d9d9c361d [locale] Clean up constants
- move LOCALESDIR to the one place it's used
 - remove file with only unused #defines
Adriaan de Groot 7354d35faf [locale] Apply coding style to timezonewidget/
Adriaan de Groot 1e04924224 [locale] Drop the TZ-widget's timezone database
- use the global TZ service instead
 - contains hacks to keep some of the API unchanged, which will be
   removed shortly
Adriaan de Groot 08dc9011d6 [libcalamares] Off-by-one folded the world in half
- Dropped the sign from longitudes, wrapping the west onto the east
Adriaan de Groot 1880eb5148 [libcalamares] Add accessors for TZZone
Adriaan de Groot 3f57b929ee [libcalamares] Make the zoneTab region list static
- there's only one zone.tab, it won't change during a run,
   load it only once (this allows for a single global list).
Adriaan de Groot 4089a01cb1 [locale] Create TZ model earlier
Adriaan de Groot a39c77dfaf [libcalamares] Store region name in each zone as well
Adriaan de Groot 226530cf6f [locale] Use model functions from locale service
- drop the home-grown combo-box filling, use model
Adriaan de Groot c75e870073 [libcalamares] CStringList::find() convenience function
- 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
Adriaan de Groot 6092172f8d [libcalamares] Regions and zones change to QList<Base*>
- 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.
Adriaan de Groot fc8364ea54 [libcalamares] Store zones with each region
- move operator< to base class
 - add each zone to the list held by the region
 - sort zones at the end
Adriaan de Groot 1a8439069e [libcalamares] Extend TZ with location and country
Adriaan de Groot f4509f3380 [libcalamares] Move loading to TZRegion
- don't make the model load files, provide convenience functions
   for loading in the value classes
 - create model from lists of value pointers
Adriaan de Groot da277fa7ba [libcalamares] Drop superfluous enum
Adriaan de Groot 9a5e614172 [libcalamares] Build the TZRegion list in one pass
- 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)
Adriaan de Groot 9f06903115 [local] Chase API change in TZRegionModel
Adriaan de Groot 01bba7b466 [libcalamares] Make explicit when a model comes from a file
Adriaan de Groot afb5430c42 [locale] Use TZRegionModel
- instead of populating combo box with texts, use the model
   read in from zone.tab
 - this **partly** deprecates the LocaleGlobal stuff
Adriaan de Groot 2625bb18df [libcalamares] TZRegionModel gets a data role
Adriaan de Groot 97235e9b3d [libcalamares] Switch CStringPair key to QString
- the key is used in various places as a key for Qt data structures,
   so it's more convenient to have QString than a bare char*
Adriaan de Groot 1d17cf5c77 [libcalamares] Accessors for key and complete region data
Adriaan de Groot b29b89579e [libcalamares] Present TZ regions in consistent order
Adriaan de Groot b2c2255f6a [libcalamares] Add a model of timezone regions
Adriaan de Groot 7d88b6d0cd [license] Show filenames as filenames
- Use File: to display filenames, rather than URL: plus a file:-scheme
 - Document the change in CHANGES
Adriaan de Groot ddc2f60768 Merge branch 'master' into zone-data
Adriaan de Groot ac1c0d97d2 [license] Prevent single item from expanding
- the last item would expand vertically to fill the scroll area;
   add a spacer that pushes against it
Adriaan de Groot 59ea0417fc [license] Move a less-useful message to tooltip
- the message about setup continuing can be a tooltip
Adriaan de Groot c220220563 [license] Give stylesheets meaningful names
Adriaan de Groot 8a912e6ca1 [license] Fix the height of each item
- 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
Adriaan de Groot 7330afd96a [license] Massage display of buttons
- try to keep them the same height
 - show the URL that will be opened
Adriaan de Groot 6e1504fafc [license] Use just one button
- replace the text plus toolbutton (which has an ambiguous arrow in it)
   by a single button with text saying what it will do.
Adriaan de Groot 2d02290b91 Merge branch 'issue-1268'
FIXES 
Adriaan de Groot 9fa021e3c6 [license] Reduce margins hugely
- 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.
Adriaan de Groot 0b126b2c62 [license] Massage the messages some more
- split shared <h1> message off
 - do some string-concatenation, but only of whole sentences
 - shave off some vertical space by dropping the mainsubtext item
Adriaan de Groot 72ee9742f3 [tracking] Correct the example URLs
Calamares CI a034b1a9ab i18n: [dummypythonqt] Automatic merge of Transifex translations
Adriaan de Groot 5cb0ee6cc5 [welcome] Simplify code
- Kevin Kofler pointed out there was a redundant else-if
 - Only use size for comparison if it's valid
Adriaan de Groot 7029c427f1
Merge pull request from bill-auger/patch-createusers-logging
housekeeping - logging for CreateUser Job
Adriaan de Groot 1a13704c71 [grubcfg] HOTFIX typo in function call
bill-auger 7510e883b8 pre-select default item in packagechooser
Adriaan de Groot 8b4bd52a26 [machineid][hostinfo] Reduce warnings
- stray ;
 - clang-tidy had re-ordered the moc-warnings.h header, needs to go
   **before** the .moc so split into its own group
Adriaan de Groot bd5b63b02e [summary][calamares] Chase deprecations in Qt (QWidget::background())
Adriaan de Groot a70b7ad89e [welcome] Chase deprecations in Qt (screen geometry)
Adriaan de Groot c2ebfbf6ae [users] Remove unused parameter (reduces warnings)
Adriaan de Groot 3c1b0e6730 [libcalamares] Reduce warnings with Clang 9 (yaml.h)
Adriaan de Groot ac75c63001 [libcalamares] Reduce warnings with Clang 9 (Boost::Python)
- The boost headers fall foul of tons of Clang warnings, so introduce
   a mechanism like moc-headers for turning off most of those warnings.
bill-auger 344445b437 housekeeping - logging for CreateUser Job
Adriaan de Groot 2e22bdd7dc i18n: update the english translation files for once
Adriaan de Groot b4e9ec7eb1 [hostinfo] There is no config file for this module
- the empty config file would fail in tests
 - move the documentation part of it to CMakeLists.txt
Adriaan de Groot 1de6062233 [license] Add should-be-expanded display option to license entries
- 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
Adriaan de Groot c870fca787 [license] Use more meaningful names for arrows
- 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 , 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 
Adriaan de Groot d322d783ea [license] Chase deprecations in Qt
Adriaan de Groot d8020e3574 [license] Tidy up setting-of-entries
- 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.
Adriaan de Groot 5ed8ec9990 [license] Reduce translation overhead.
Adriaan de Groot 2a0716bf43 [license] Move the 'please review' text to the top.
Adriaan de Groot 2a45765b93 [license] Next depends not just on the checked box
- 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 
Adriaan de Groot ec605adf3f [license] Tidy code
- 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.
Adriaan de Groot 6dfcbd757b [welcome] Remove superfluous call to QColor::value()
Adriaan de Groot 7fd218d7bf [partition] Chase deprecations in Qt
Adriaan de Groot ad868033f3 [locale] Chase deprecations in Qt
Adriaan de Groot fc7ea80d99 [calamares] Do not attempt to center Calamares window
- 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.
Adriaan de Groot 94fe4d2fda [libcalamares] Avoid weak vtables in string-pair implementation
Adriaan de Groot fc7f49b610 [libcalamares] Expand tests for TimeZone translations
Adriaan de Groot 71f3614eb7 [libcalamares] Add TimeZone support to build
- Add to CMakeLists.txt
 - Test basic scenarios
Adriaan de Groot 3af2754022 [libcalamares] Implement translatable-pair-of-char*
- This is base functionality for a translatable model of
   TimeZone names that is scraped from zone.tab
Adriaan de Groot abd3c4171b [libcalamares] Prevent CI coding-style fixes to generated code
Adriaan de Groot 733fb43b5e [libcalamares] Sort the dummy zone names