Commit Graph

6603 Commits

Author SHA1 Message Date
Calamares CI
3fafeaf09a i18n: [dummypythonqt] Automatic merge of Transifex translations 2021-03-14 16:17:09 +01:00
Adriaan de Groot
8c7e214376 [users] Make the example config usable
Although the example configurations shouldn't really be used
as a sample of how to configure **your** Calamares for your
distro, many distro's do just copy the examples. So leave
traces of the OEM-configuration settings in the example,
and give the standard configuration a 'nothing changed'
set of presets.
2021-03-14 16:07:04 +01:00
Adriaan de Groot
caf18321df [users] Adjust UI to is-field-editable based on presets 2021-03-14 14:20:10 +01:00
Adriaan de Groot
7bae625f46 [users] Pick up UI changes based on the values from Config 2021-03-14 14:14:29 +01:00
Adriaan de Groot
b4a21d7aca [libcalamares] Add macro CONFIG_PREVENT_EDITING to handle uneditable fields
Boilerplate code for avoiding accidental setting of an internal
field when the UI is editable and the underlying data isn't.
2021-03-14 13:30:26 +01:00
Adriaan de Groot
3ea796d009 [users] 'undo' changes to values if the UI is wonky
- you can still call set*(), eg. from the UI, when the field is
  not editable. Although the code previously ignored the change,
  this would lead to a mismatch between what the UI is showing
  (the changed value) and what the Config has (old value).
  Emit a changed-signal (notify) with the old value so that the
  UI is changed *back* as soon as possible.
2021-03-14 12:27:59 +01:00
Adriaan de Groot
9fcf9b5fa8 [users] Pick up values from Config object on startup
- Previously, we 'knew' that the values in Config were empty,
  so didn't have to set them from the Config when building
  the (widget) page
2021-03-14 12:14:33 +01:00
Adriaan de Groot
941cc9c48b [users] Match presets to the actual name of fields 2021-03-14 12:14:33 +01:00
Adriaan de Groot
2e90a8d829 [libcalamares] Report preset mis-configurations
- warn about fields applied twice (program error)
- warn about fields not used (configuration error)
- add operator<< for "clean" looking preset application
2021-03-14 12:14:33 +01:00
Adriaan de Groot
d8dff3dc65 [libcalamares] Replace loadPresets() with an applicative style
Build up the list of known presets by what the Config-object
expects, not by what the Config file provides. This allows
early detection of mis-matched configurations.

Presets can only apply to Q_PROPERTY properties, and the
preset must match the property name.
2021-03-14 12:14:33 +01:00
Adriaan de Groot
8b10a9cfc2 [libcalamares] Add isEditable() check
This adds support for checking whether a field is editable;
Config objects should reject changes if the field is not
editable. There is an "unlock" setting to override the
check, although this is currently always locked.
2021-03-14 12:14:33 +01:00
Adriaan de Groot
448e478b6d [users] Use base Config and its Preset-handling 2021-03-12 13:54:06 +01:00
Adriaan de Groot
0be5e04c2e [libcalamares] Add a base class for Config-objects
This is an optional (until 3.3) base class, which can handle
Presets consistently for configurations.
2021-03-12 13:49:37 +01:00
Adriaan de Groot
381a4f9b53 [users] Add preset to users module Config 2021-03-12 13:25:16 +01:00
Adriaan de Groot
d9f2f5e988 [libcalamares] Start a 'presets' configuration datastructure 2021-03-12 13:16:36 +01:00
Neal Gompa
d39f2b8c3e [packages] Drop urpmi support
This code is essentially untested and unused, as OpenMandriva has been
using DNF for three years now.

Reference: https://www.openmandriva.org/en/news/article/switching-to-rpmv4
2021-03-11 06:32:49 -05:00
Adriaan de Groot
cb67c79203
Merge pull request #1651 from demmm/calamares
[finishedq] add license for svg file
2021-03-09 20:35:22 +01:00
demmm
a7b46a02eb [finishedq] add license for svg file 2021-03-09 19:45:32 +01:00
Adriaan de Groot
98524708cc [partition] Chase namespace change for Units 2021-03-09 19:45:12 +01:00
Adriaan de Groot
9f17d3fd12 [libcalamaresui] Paste the last 16KiB of the log file
- If Calamares is run more than once, reading the log file
  can get you older / not relevant log messages. Get the tail
  end instead.
2021-03-09 18:25:10 +01:00
Adriaan de Groot
980e5e13f8 Merge branch 'fixup-log-upload' into calamares 2021-03-09 18:22:51 +01:00
Adriaan de Groot
ea63f48c31 [libcalamares] Put the units in a nested namespace
- this makes it much easier to use the literal suffixes
  by using the namespace rather than individual operators.
2021-03-09 18:21:58 +01:00
Adriaan de Groot
a1ed303820 [libcalamaresui] Add test for Paste
This tests only the termbin ("fiche") paste by sending it
a derpy fixed string. Prints the resulting URL, doesn't
verify in particular.

It'd be rude to run this test too often.
2021-03-09 17:55:10 +01:00
Adriaan de Groot
44ec8a7c0b [libcalamaresui] Improve testability
- mark functions with STATICTEST so they can be compiled into a test
- move logfile-reading so we can call the pastebin-upload functions
  with an arbitrary payload.
2021-03-09 17:22:48 +01:00
Adriaan de Groot
846d6abaa8 [libcalamaresui] Move message- and clipboard handling
- The Paste API promises just a (string) URL back, not
  a whole message, so return just the URL from the
  abstract API and the concrete (fiche) implementation.
- Set clipboard contents from the UI
- Build (translated) message in the UI code
2021-03-09 15:51:24 +01:00
Adriaan de Groot
81badc36f4 [libcalamaresui] Implement abstract doLogUpload() API
This is a "do the right thing" function, which then calls
the implementation-specific code for each type.
2021-03-09 15:42:21 +01:00
Adriaan de Groot
1ff854f05d [libcalamaresui] Push upload to a more abstract API
- have a namespace Paste with just one entry point, which will handle
  untangling type &c.

This doesn't compile, but indicates the direction to take the API
2021-03-09 15:32:46 +01:00
Adriaan de Groot
efec12d001 [libcalamares] Read structured upload-server info
- Use just type and url, since port can be specified in
  a URL. Note that we only use host and port, not the
  scheme (or the path, for that matter).
- Factor out understanding the *uploadServer* key to a function.
2021-03-09 15:24:02 +01:00
Adriaan de Groot
bce6f3f1b7 [libcalamaresui] Adjust paste code to desired API
Still doesn't compile because consumers are not ready.
2021-03-09 14:56:37 +01:00
Adriaan de Groot
3c6683bd98 [libcalamaresui] Rip out untyped data about upload server
This doesn't compile, but indicates the **type** information
desired about the (a) upload server.
2021-03-09 14:51:59 +01:00
Adriaan de Groot
f72436aa0a [libcalamaresui] Drop RE-wrangling, compare hosts instead to detect valid paste URL 2021-03-09 14:41:58 +01:00
Adriaan de Groot
8af5fb5da5 [libcalamaresui] Simplify getting URL response
- get a QByteArray rather than going through a char[] buffer
- bytes-read is not important since the RE can only match if
  there **are** that many characters.
2021-03-09 14:38:43 +01:00
Adriaan de Groot
1bf95eacb0 [libcalamaresui] Tidy the logging some more 2021-03-09 14:33:47 +01:00
Adriaan de Groot
260862fabc [libcalamaresui] Move the format-string closer to where it is used 2021-03-09 14:31:46 +01:00
Adriaan de Groot
844831751d [libcalamaresui] Factor out the reading of the log file
- this will be needed for other pastebins, too
2021-03-09 14:30:20 +01:00
Adriaan de Groot
92e36558fa [libcalamaresui] Remove unnecessary shadowing in lambda 2021-03-09 14:25:40 +01:00
Adriaan de Groot
bc2435eb7d [libcalamaresui] Apply coding style 2021-03-09 14:23:52 +01:00
Adriaan de Groot
fc8830ae4a [libcalamaresui] Tidy logging 2021-03-09 14:23:27 +01:00
Adriaan de Groot
1ebb807624 [calamares] Drop #warning about KDSAG
- it might not be very current, and it's *probably* better to
  use dbus-activation / kf5dbus, but let's not call it
  deprecated until very sure that the dbus version does the
  right thing.
2021-03-09 13:57:21 +01:00
Adriaan de Groot
430b3b0722 REUSE: tag the schema file (badly, missing an email address) 2021-03-09 13:55:20 +01:00
Adriaan de Groot
0b8ef49e7e [calamares] Make debug-window available to QML
- Add a toggle() to the debug-window manager, for convenience
- Make the manager available to QML
- Use the debug-window manager (code imported from KaOS)
2021-03-06 23:11:41 +01:00
Adriaan de Groot
c00a382aea [calamares] Refactor debug-window handling
Move the management of the (a?) DebugWindow to a separate
class, and hang on to that manager in CalamaresWindow.
This is prep-work towards making it available from QML as well.
2021-03-06 22:55:48 +01:00
Adriaan de Groot
992c673951 [calamares] Document how to hide the Quit button
The Quit button can have its own logic at a QML level for
show/hide. It **ought** to follow the *quitVisible* property,
but can do additional work. Here, document how a distro might
choose to hide the Quit button on the last page (generally,
that's the "finished" page).
2021-03-06 22:08:35 +01:00
Adriaan de Groot
44602d0237 [finishedq] CMake: missing keyword 2021-03-06 15:33:15 +01:00
Adriaan de Groot
83e6476be8 [finishedq] Tighten up requirements 2021-03-06 15:23:23 +01:00
Adriaan de Groot
e9384deb5d [finishedq] Document the meaningful settings of the config file 2021-03-06 15:20:24 +01:00
Adriaan de Groot
bd775a16e2 [finished] Add a restart-anyway API to Config
It's possible to ignore the "user setting" for restart-now
and call doRestart(true) directly. This is intended for
use with specific UIs that make that choice clear for the user.

Hook up both [finished] and [finishedq] to the "traditional"
restart-if-the-box-is-ticked logic although the example
QML doesn't expose that box.
2021-03-06 13:51:45 +01:00
Adriaan de Groot
aa004503c5 [finished] Expand Config object's repertoire of notification-API 2021-03-06 13:38:02 +01:00
Adriaan de Groot
f8258f671b [calamares] Navigation getting the wrong side 2021-03-06 13:14:40 +01:00
Adriaan de Groot
6f15b69917 Merge branch 'qml-resizing' into calamares
Make panel sizes consistent, so the QML-navigation can be used better.
2021-03-05 23:20:47 +01:00
Adriaan de Groot
19874ebc3a [finished] Document doRestart() better
- move all the 'really want restart' logic to restartNowWanted()
2021-03-05 23:19:56 +01:00
Adriaan de Groot
f94853eb28 [finishedq] Always restart if possible 2021-03-05 23:17:57 +01:00
Adriaan de Groot
075a28a06d [finished] Log the doRestart() attempt 2021-03-05 22:59:53 +01:00
Adriaan de Groot
0d7c1ec130 [finishedq] Port QML back to using Config object 2021-03-05 22:59:04 +01:00
Adriaan de Groot
5b376b41bf [finishedq] Chase business logic in Config object 2021-03-05 22:40:38 +01:00
Adriaan de Groot
3ad3a9adfc [finished] Move the business logic to the Configt object 2021-03-05 22:27:24 +01:00
Adriaan de Groot
04145f49f8 [calamares] Factor out size-setting for QML panels
- Either orientation needs to have the same generic size-setting
  code, for both navigation and progress panels.
2021-03-05 16:59:54 +01:00
Adriaan de Groot
82223431fa [calamares] Pass orientation into panel-creation
- Add function for mapping panel sides to an orientation (H/V)
- Pass that into the creation functions

This is prep-work for handling vertical navigation and horizontal
progress reporting cleanly.
2021-03-05 14:21:19 +01:00
Adriaan de Groot
0f50085bb9 [calamares] Refactor sidebar creation
- None of these need to be methods of the main window,
  and it can all be put tidy away as static free functions.
2021-03-05 14:01:28 +01:00
Adriaan de Groot
a8463a8763 [calamares] Prefer to expand main panel
- Don't let the navigation items grow if they are QML
  (the Widget ones don't either) so the main panel takes
  most of the space.
2021-03-05 13:35:00 +01:00
Adriaan de Groot
ab7f6abf02 [calamares] Decouple debug-window button
- Provide slots and signals for managing the debug-window,
  so it can be used from QML as well.
2021-03-05 13:20:47 +01:00
Adriaan de Groot
1739d8f15f
Merge pull request #1647 from demmm/calamares
[finishedq] adding QML finished module
2021-03-05 12:24:16 +01:00
Adriaan de Groot
6a1e46d7f6 [libcalamaresui] Add properties to ViewManager to expose Settings 2021-03-03 16:06:53 +01:00
Adriaan de Groot
849da3f322 [libcalamaresui] The ViewManager is a UI component for QML, not core 2021-03-03 15:54:11 +01:00
Adriaan de Groot
c3860849c1 [libcalamaresui] Notify step number when modules are all loaded
- using the QML sidebar would not highlight the first step on startup,
  only after next / prev would the highlight show up. Now, notify
  when all the modules are loaded (and number 0 is active).
2021-03-03 15:43:11 +01:00
demmm
7acc8bcec3 [finishedq] adding QML finished module
module builds & runs, config connections are not registering
no errors
finishedq.qml is offering a different option though, running commands directly in qml
plasma-framework executer is used for that
2021-02-27 22:04:30 +01:00
Adriaan de Groot
cc3017be53
Merge pull request #1619 from deprov447/Upload_Install_Log
[libcalamaresui] Implementing LogUpload functionality from branding
2021-02-26 13:13:16 +01:00
Adriaan de Groot
24e129a413 Merge branch 'issue-1634' into calamares
FIXES #1634
2021-02-23 16:17:57 +01:00
Adriaan de Groot
d3acc39d2d Merge branch 'qml-finished' into calamares 2021-02-23 16:17:14 +01:00
Adriaan de Groot
a4682db987 [finished] Tidy up notification-at-end (and allow failed notifications) 2021-02-23 16:05:48 +01:00
Adriaan de Groot
5af614daf7 [finished] Allow positive and negative notifications at end. 2021-02-23 15:59:40 +01:00
Adriaan de Groot
ec4b6752d6 [finished] Move notification to Config 2021-02-23 15:54:19 +01:00
Adriaan de Groot
76a2791b12 [finished] Clean up includes 2021-02-23 15:42:14 +01:00
Adriaan de Groot
7d024cf72b [finished] Move restart handling to Config 2021-02-23 15:36:44 +01:00
Adriaan de Groot
9d6d8ecaea [finished] Heavy refactor
- move most of the business logic to Config
- make retranslate of the page more robust (e.g. changing language
  after failure would restore the un-failed message)

There's still some bits left.
2021-02-23 15:03:16 +01:00
Adriaan de Groot
288fe5b274 [finished] Rename and document following coding style 2021-02-23 12:50:52 +01:00
Adriaan de Groot
40961f21a7
Merge pull request #1624 from benne-dee/schema-netinstall
[netinstall] Schema for groups in netinstall.schema.yaml
2021-02-23 12:31:47 +01:00
benne-dee
f0aa515c8b
[netinstall] Schema validates also groups file 2021-02-22 22:17:06 +05:30
Adriaan de Groot
9c8194402b [keyboard] Add ASCII mapping for Greek
FIXES #1642
2021-02-19 14:33:38 +01:00
Adriaan de Groot
cdbf45b5d3 [libcalamaresui] Remove unused include 2021-02-19 14:29:46 +01:00
Adriaan de Groot
3a4dcb6913 [libcalamaresui] Give slideshow (ExecutionViewStep) widgets names 2021-02-17 14:34:33 +01:00
Adriaan de Groot
7e6c3a2309 [libcalamaresui] Give the slideshow-widgets a name
- this is the *working* part of the slideshow, not its background
2021-02-17 14:25:06 +01:00
Adriaan de Groot
49f4e7b8e1 [calamares] Make the widget-tree more informative, mention class name 2021-02-17 14:19:45 +01:00
Adriaan de Groot
6bf82e9c65 [welcome] Update .conf documentation
- fix typo
- don't suggest google as internetCheckUrl
- mark TODOs for #1384
2021-02-16 16:32:34 +01:00
Anubhav Choudhary
9738851261 YAML list for uploadServer key 2021-02-15 20:51:41 +05:30
Anubhav Choudhary
7057081bdf QUrl for serverURL + renames 2021-02-10 14:38:26 +05:30
Adriaan de Groot
e49f0cf3ba [libcalamares] Document NamedEnum in much more detail 2021-02-09 17:03:19 +01:00
Adriaan de Groot
04f4441182 [netinstall] Build up a list of urls, rather than just one
- the list is unused, and doesn't drive the loading of groups either;
  the existing one-string entry is used.
2021-02-09 15:06:53 +01:00
Adriaan de Groot
ca1ae6fd1d [netinstall] Support retranslation in the Config object 2021-02-09 11:06:59 +01:00
Adriaan de Groot
335ccbc149 [netinstall] Move other translation parts to Config 2021-02-09 10:58:11 +01:00
Adriaan de Groot
cf7391696e [netinstall] Continue moving settings to the Config object 2021-02-08 22:57:38 +01:00
Adriaan de Groot
f045e4f00e [libcalamares] Switch default language in Belarus
*If* the distro has GeoIP enabled and auto-selects the language for
Calamares, then Belarus now selects Russian, rather the Belarusian.
This is based on some personal input, mostly, and Wikipedia census data.

FIXES #1634
2021-02-07 22:35:32 +01:00
Chrysostomus
16eff98a06 Don't use f-strings yet. 2021-02-07 15:39:38 +02:00
Chrysostomus
0c92a36a53 Remove unnecessary comment 2021-02-07 15:29:30 +02:00
Chrysostomus
6d55005da0 Mount subvolumes to correct mountpoints 2021-02-07 00:16:26 +02:00
Chrysostomus
b16bd6bb23 Fix name error 2021-02-06 20:03:30 +02:00
Chrysostomus
67aedd5582 Move comments closer to where they are used 2021-02-06 19:54:29 +02:00
Chrysostomus
16bf7925a2 Adjust comments 2021-02-06 19:48:09 +02:00
Chrysostomus
1896a38ccc Fix a typo 2021-02-06 01:38:03 +02:00
Chrysostomus
1e0295dc65 Fix name error 2021-02-03 22:55:11 +02:00