Commit Graph

7572 Commits

Author SHA1 Message Date
Adriaan de Groot
995ebd5c83 [locale] Remove unused #includes 2020-07-21 17:44:44 +02:00
Adriaan de Groot
1de2210d29 [locale] Move the GS updating to the Config object
- since all locale changes need to be entered into GS anyway, this
  is something the Config object can do because it is the source
  of truth for locale settings.
- drop all the GS settings from the Page.
2020-07-21 17:38:22 +02:00
Adriaan de Groot
f7c2e4a3e7 [locale] Sanitize Config signals and slots
- remove the weirdly-structured prettyStatus and similar:
  the Config object has human-readable status strings (three,
  for location, language, and LC-formats) which can be
  normal properties with signals.
- Implement prettyStatus in the view step by querying the Config.
2020-07-21 17:38:22 +02:00
Adriaan de Groot
ef08ff6ac0 [locale] Move status strings from Page to Config
- the config knows the status and how to describe it,
  fetch the strings from there.
2020-07-21 15:51:49 +02:00
Adriaan de Groot
855b21a7db [locale] Remove redundant method
- configuration information lives in the Config object
2020-07-21 15:35:38 +02:00
Adriaan de Groot
abc98cfa79 [locale] Simplify allocation, guard against crashes if the dialog is deleted. 2020-07-21 14:57:09 +02:00
Adriaan de Groot
66eacce654 [locale] Move localeconfiguration to Config object
- the language and LC settings migrate from page to config
- add API for explicitly setting language (which is then preserved
  when clicking new locations)
2020-07-21 13:16:52 +02:00
Adriaan de Groot
a307217d83 [locale] Tidy LocaleConfiguration
- expand API documentation
- minor coding-style adjustments
2020-07-21 11:13:40 +02:00
Adriaan de Groot
81520bbbf9 [locale] Chase RAII conveniences
- several early-return paths would leave the TZ widget blocked
- use the zones data from config
2020-07-21 00:21:42 +02:00
Adriaan de Groot
0645a46b42 [libcalamares] Expand RAII conveniences 2020-07-21 00:21:16 +02:00
Adriaan de Groot
98f912f80a [locale] Drop LocalePage:;init
- setting the initial location is something the Config-object should do
- setting up the combo-boxes can be done in the constructor
2020-07-21 00:11:16 +02:00
Adriaan de Groot
726f882185 [locale] Move current-location to Config 2020-07-20 23:06:12 +02:00
Adriaan de Groot
5a6a9a0d45 [locale] Move job-creation to Config
- since Config knows what settings there are, it should create the
  jobs to run later -- not the Page.
- this doesn't work yet, because the Config does **not** know what
  the selected timezone is yet.
2020-07-20 22:21:29 +02:00
Adriaan de Groot
8c21b59853 [locale] Remove unused localegen (moved to Config earlier) 2020-07-20 18:13:33 +02:00
Adriaan de Groot
f0cac7d669 [locale] Hook tz widget up to the Config's data 2020-07-20 16:54:44 +02:00
Adriaan de Groot
4d5ff6d5c4 [locale] Make the Page use the region model from Config 2020-07-20 16:27:15 +02:00
Adriaan de Groot
88d1d255f6 [locale] Add regions & zones models to Config
- The models are constant pointers, even if their contents aren't.
- Make the top-level (region) model point to the global TZ list.
2020-07-20 16:16:53 +02:00
Adriaan de Groot
51b7ec875f [locale] Don't need own copy of zones list 2020-07-20 13:55:00 +02:00
Adriaan de Groot
439f828d9b [locale] Document TZ widget 2020-07-20 13:47:23 +02:00
Adriaan de Groot
931ce20f30 [locale] Reduce API surface
- getLocationPosition doesn't need to be a method, since it calls out
  to a static function of TimeZoneImageList anyway.
2020-07-20 13:38:20 +02:00
Adriaan de Groot
25ba1bb767 [locale] Remove localeGenLines from page
- the Config object took over loading of the string list
- expose the list as a property
- drop loading code from the page.
2020-07-20 13:24:31 +02:00
Adriaan de Groot
338635146f [locale] Hand the Config object also to the page 2020-07-20 12:58:35 +02:00
Adriaan de Groot
b6b5c44996 [locale] Load supported locales in Config 2020-07-20 12:55:07 +02:00
Adriaan de Groot
8119c7e72a [locale] Reset Config object
The Config object wasn't being used at all in the locale module;
reset it to empty and start using it in locale, so that
configuration functionality can be added to it as-needed,
and with the necessary refactoring built-in.
2020-07-20 12:37:27 +02:00
Adriaan de Groot
0d5db2dd06 [localeq] Config-handling is a total bodge-job, disable 2020-07-20 12:36:58 +02:00
Adriaan de Groot
4e4ffde604 Changes: post-release housekeeping 2020-07-11 17:00:36 +02:00
Adriaan de Groot
724b92ee60 [partition] Drop documentation of vanished parameter 2020-07-11 16:35:54 +02:00
Calamares CI
92a27a2c2d i18n: [python] Automatic merge of Transifex translations 2020-07-11 16:29:36 +02:00
Calamares CI
f5ada5e9ef i18n: [desktop] Automatic merge of Transifex translations 2020-07-11 16:29:35 +02:00
Calamares CI
97bdb9b4f7 i18n: [calamares] Automatic merge of Transifex translations 2020-07-11 16:29:35 +02:00
Adriaan de Groot
cfb0bebe0e Changes: pre-release housekeeping 2020-07-11 16:27:27 +02:00
Adriaan de Groot
e1f4224bed [libcalamaresui] Fix slideshowAPI loading
In 022045ae05 a regression was introduced: if no *slideshowAPI*
is specified in the branding file, Calamares refuses to start, with
a YAML failure.

Before the refactoring, we had `YAML::Node doc` and looked up
the *slideshowAPI* in it with `doc["slideshowAPI"]`. After the
refactoring, we had `const YAML::Node& doc`. The `const` makes
all the difference:
 - subscripting a non-existent key in a mutable Node silently
   returns a Null node (and possibly inserts the key);
 - subscripting a non-existent key in a const Node returns an
   invalid or undefined node.

Calling IsNull() or IsScalar() on a Null node works: the functions
return a bool. Calling them on an invalid node throws an exception.

So in the **const** case, this code can throws an exception that it
doesn't in the non-const case:
    `doc[ "slideshowAPI" ].IsScalar()`

- Massage the code to check for validity before checking for scalar
- Add a `get()` that produces more useful exception types when
  looking up an invalid key
- Use `get()` to lookup the slideshow node just once.
2020-07-09 11:28:09 +02:00
Adriaan de Groot
a58d59d86c [libcalamares] Minor documentation on Yaml.* 2020-07-09 10:45:28 +02:00
Adriaan de Groot
da1cc7c3a5 [libcalamaresui] Don't clear the map when inserting strings
- the documentation doesn't say the map is cleared, and the one
  place this function is used doesn't need that either.
- make type of config explicit
2020-07-09 08:46:16 +02:00
Adriaan de Groot
a91edfef89 [netinstall] auto-resize the columns
- previously, the first column (name) was sized to show the
  names **that were visible at startup**, which fails when
  there are long names hidden in groups that are not expanded
  immediately.
- change the columns to resize according to the contents; this makes
  the descriptions jump to the right as the name column gets wider.

FIXES #1448
2020-07-08 13:34:38 +02:00
Adriaan de Groot
80cad17e97 Merge branch 'issue-1393' into calamares 2020-07-08 13:11:28 +02:00
Adriaan de Groot
240c703549 [partition] Don't leak the PM core object 2020-07-08 13:11:10 +02:00
Adriaan de Groot
7f1a59f02b [partition] Fix typo 2020-07-08 13:11:10 +02:00
Adriaan de Groot
313531bc4b [partition] Remove unused parameter
- there are no consumers for checking-the-capacity-of-the-drive

This parameter was introduced in 3cd18fd285 as "preparatory work"
but never completed. The architecture of the PartitionCoreModule
makes it very difficult to get the necessary parameters to
the right place, and it would probably be better to put
a SortFilterProxyModel in front of a partitioning model anyway.

Since the display code can already filter on size, just drop this one.
2020-07-08 13:08:51 +02:00
Adriaan de Groot
948c078e1a [partition] winnow floppy drives
- don't list floppy drives

FIXES #1393
2020-07-07 23:03:12 +02:00
Adriaan de Groot
a78c368367 [calamares] Tweak default QML sidebar
- make the rectangles slightly larger
- align text to center of the rectangle
- make the rectangle fill out the column; without this, the
  width would collapse back to 0 after a change in the model,
  which would draw 0-width rectangles.

FIXES #1453
2020-07-07 16:11:18 +02:00
Adriaan de Groot
2b2a69631f [libcalamaresui] Suggestions for better naming of enum values 2020-07-07 15:29:13 +02:00
Adriaan de Groot
3565b6806a [libcalamares] Massage the logger output
- continuations, for the console, no longer print the date + level,
  which makes things easier to visually group and read.
- the file log is mostly unchanged, except it contains more spaces now.
2020-07-07 15:25:25 +02:00
Adriaan de Groot
631923abf8 [libcalamares] Console-logging follows -D flag exactly
- Don't always log LOGEXTRA and below.
2020-07-07 15:12:50 +02:00
Adriaan de Groot
67aa34c4a4 [calamares] Center the progress texts 2020-07-07 14:13:49 +02:00
Adriaan de Groot
37ce49b001 CMake: stop overwriting branding settings in the build dir
- Only copy over branding files if they are newer

Typically I have KDevelop open while working on Calamares; if I
am editing settings in `branding.desc` in the build directory,
then every time KDevelop runs CMake in the background, my
changes (for testing branding things!) would be overwritten.
Don't do that.

For normal builds with a clean build directory, this doesn't change
anything since the target is missing; changing a file in the
source directory **will** copy it over the build directory version.
2020-07-07 14:11:16 +02:00
Adriaan de Groot
14fbfa72d3 Changes: new contributions 2020-07-07 13:48:21 +02:00
Adriaan de Groot
43ebcf8b61 [packages] Keep package-manager list alphabetized 2020-07-07 13:48:07 +02:00
Adriaan de Groot
a923db0289
Merge pull request #1441 from codesardine/calamares
[packages] add pamac support
2020-07-07 07:45:04 -04:00
Vitor Lopes
c16866fb88 pep8 302 2020-07-05 08:37:28 +01:00