Commit Graph

5519 Commits

Author SHA1 Message Date
Adriaan de Groot
2633cf1ef6 [locale] Fix timezone maps for -1,0,1 timezones
- Merge branch 'master' of https://github.com/FLVAL/calamares
- Add credits to CHANGES

FIXES #1377
SEE #1374
2020-04-16 15:09:14 +02:00
Adriaan de Groot
7b4b268875 [netinstall] Hit the docs with a hammer
- Merge all the format documentation into netinstall.conf,
  where the example is given in full as an embedded
  *groups* entry.
- Get README.md to point to the example.
- Fix up headers in netinstall.yaml, pointing to the
  embedded example in netinstall.conf.
2020-04-16 14:34:55 +02:00
FLVAL
e5b2faad9a
Add files via upload
Timezones updated for these countries found on pixel detection tool 

Dublin is in 0 (-1 needs editing)
Gibraltar should be 1.0 (0 needs editing)
Guernsey and Jersey are in 0 (1.0 needs editing)
Lisbon is in 0 (-1 needs editing)
Vilnius should be in 2 (1 needs editing)
2020-04-16 02:54:38 +02:00
Adriaan de Groot
cd66405363 [locale] Test TZ images properly
- the test wasn't built with DEBUG_TIMEZONES, so it didn't get the
   overlap-checking code at all.
2020-04-15 14:30:10 +02:00
Adriaan de Groot
d0c205c1cc [locale] Fix build (gcc, Debian) 2020-04-15 14:19:47 +02:00
Adriaan de Groot
d20a621e93 [users] Apply coding style 2020-04-15 11:55:09 +02:00
Adriaan de Groot
ab5d5fb772 [users] Log pwquality error message as well (better than just "-14") 2020-04-15 11:49:43 +02:00
Adriaan de Groot
b890345b1f [locale] Tidy includes 2020-04-15 11:45:27 +02:00
Adriaan de Groot
f7a87338b8 [locale] math headers got lost 2020-04-15 11:41:59 +02:00
Adriaan de Groot
a2a10d14b6 [locale] Improve logging in tests 2020-04-14 16:24:56 +02:00
Adriaan de Groot
29fd0e0319 [locale] Expand test to check zones-overlap
- Document index and find methods,
- Check that each location is claimed by only one image (e.g. by
  one zone). This is currently false.
2020-04-14 16:21:24 +02:00
Adriaan de Groot
1d5c4f13aa [locale] Move the find-a-zone-image-for position to the image list 2020-04-14 16:06:21 +02:00
Adriaan de Groot
6173f9337a [locale] Refactor long+lat -> x,y mapping
- Move this code to a static method since it only depends on the
  expected image size (which here, is managed by the image list).
2020-04-14 15:24:05 +02:00
Adriaan de Groot
3945008956 [locale] Test the TZ image loader
- QImage needs Qt5::Gui, so this isn't a guiless-test; it can use
  the offscreen QPA, though.
- Check that the images are all the same size
- Debugging / check code removed from timezonewidget
2020-04-14 15:10:04 +02:00
Adriaan de Groot
340c462062 [locale] Refactor loading of timezone images
- Move the image-loading to a separate class
2020-04-14 14:44:24 +02:00
Adriaan de Groot
4b65600c08 [locale] Remove useless localeglobal
- Although ::init() was called, none of the actual functionality
   from localeglobal was still in use.
2020-04-14 12:37:22 +02:00
Adriaan de Groot
36d9e7d8f4 [locale] Extend tests with tz-image-validation
- The idea is to check all the TZ images for consistency, like
  TimeZoneWidget::setCurrentLocation() does when DEBUG_TIMEZONES is
  on; a zone-pixel should be set in only **one** image.

The test so far is just a stub.
2020-04-14 11:59:45 +02:00
Adriaan de Groot
e84db033b0 [locale] Debug-message typo 2020-04-14 11:57:03 +02:00
Adriaan de Groot
f9d888ec24 [locale] Warnings--
- remove unused variables, tighten up code some
- while here, apply coding style
2020-04-14 11:32:15 +02:00
Adriaan de Groot
022e62b829 [licale] Fix build with DEBUG_TIMEZONES
- QLatin1String isn't a constexpr; the whole ZONE is a bit derpy,
  so let's just #define it.
2020-04-14 11:26:03 +02:00
Adriaan de Groot
05990fb287 CMake: handle DEBUG_* consistently
- Make all four DEBUG_ flags actual CMake options, rather than
  stuffing some of them in the rather-peculiar _enable_debug_flags.
  Each debug option turns on suitable compile flags in the module(s)
  that are affected.
2020-04-14 11:18:51 +02:00
Adriaan de Groot
16a5ca2a55 [libcalamares] Format floats with trailing digits
- When writing YAML, given a float **always** write
   some decimal digits (e.g. "1.0" rather than "1")
   so that the type of the written-out thing stays
   float.
 - Avoids test failure with the sample `welcome.conf`
   file which reads 1.0 and would write out 1, which then
   led to type differences.
2020-04-08 17:10:32 +02:00
Adriaan de Groot
3b354b8b20 [libcalamares] Handle qlonglong when writing YAML
- Handle qlonglong explicitly
- Add a fallbackfor things that convert to qulonglong, to
  avoid these remaining integer types from hitting the
  very end of the if-chain, and being written out as
  the **string** "<typename>"
2020-04-08 17:01:24 +02:00
Adriaan de Groot
c6463a30ea [libcalamares] Be far more detailed in comparing maps
- just comparing a==b (both QVariantMap) gives a
  not-so-informative message, so go through the keys looking
  for differences.
2020-04-08 16:47:03 +02:00
Calamares CI
748973a17c i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-04-07 23:03:18 +02:00
Adriaan de Groot
8a6925c5be i18n: update English texts 2020-04-07 22:59:52 +02:00
Adriaan de Groot
8b41a71668 [partition] Apply coding style to core/ 2020-04-07 21:38:15 +02:00
Adriaan de Groot
b08cb52d0a [partition] Mark /boot or / as bootable
FIXES #1175
2020-04-07 21:26:54 +02:00
Adriaan de Groot
0c6dd4e788 [partition] No "jobs/" needed in jobs includes 2020-04-07 11:46:03 +02:00
Adriaan de Groot
f85732ccb0 [partition] Coding style on Jobs 2020-04-07 11:44:26 +02:00
Adriaan de Groot
1e3ff51bfe [finished] Don't translate placeholder text 2020-04-07 11:09:59 +02:00
Adriaan de Groot
087c88753c [netinstall] Expand the table of common-strings
When one of these common names for the netinstall page is used,
it gets pulled out of the standard translations, so that it
doesn't have to be translated in the per-distro config file.
These labels are common enough that they make sense for
everyone to have lying around.

FIXES #1367

(I say "fixed" but of course it's going to depend on the translation
workflow to make these available)
2020-04-06 17:35:27 +02:00
Adriaan de Groot
11aa6da1e9 Merge branch 'issue-1335'
FIXES #1335
2020-04-06 17:27:41 +02:00
Adriaan de Groot
129bfa3a2e [unpackfs] Counting works better when you update the variable 2020-04-06 17:14:29 +02:00
Adriaan de Groot
bea41465e2 [unpackfs] Update progress around every 1% 2020-04-06 17:08:27 +02:00
Adriaan de Groot
facf5af589 [unpackfs] Don't jump back in progress while counting 2020-04-06 17:06:53 +02:00
Adriaan de Groot
af0d04d523 [unpackfs] Report progress more carefully
- Mark entries as totally-done
- Show a message when counting an entry
2020-04-06 16:54:02 +02:00
Adriaan de Groot
f33c737e99 [libcalamares] Pretty debug formatting
- toggle nospace() and noquote() part-way through the line,
  so that they only affect the output obtained from the external
  command.
2020-04-06 11:56:39 +02:00
Adriaan de Groot
4abb87ccca [libcalamares] Improve reporting on process failures
- In production, cDebug() might not show up, so the log will not
  contain the lines saying what program is being run;
- Errors should at least mention the program name, but "env" or
  "chroot" is not useful, so pull that from *args*, which is
  the command we actually want to run.
2020-04-06 11:17:47 +02:00
Adriaan de Groot
752399ca6b [libcalamares] Error out on empty command
- an empty command isn't going to work (although it might successfully
  run chroot or env in the target system, that's not useful)
- while here, move variable declarations closer to their use.
2020-04-06 11:15:10 +02:00
Adriaan de Groot
88c75fb5dc [libcalamares] Simplify program-arguments creation 2020-04-06 11:08:16 +02:00
Adriaan de Groot
21f060c3fd [unpackfs] Check for squashfs tools earlier 2020-04-06 10:52:32 +02:00
Adriaan de Groot
391bd1098f [unpackfs] An entry knows where it is mounted
- `imgmountdir` no longer defined in `UnpackOperation.run()`
2020-04-06 10:48:34 +02:00
Adriaan de Groot
065a506470 [netinstall] Resize name column
- Once group data is loaded and pre-expanded groups are open,
  adjust the column width so that all the names are visible.
2020-04-05 00:26:53 +02:00
Adriaan de Groot
a97f4771d6 [calamares] Fix test-loader for modules after ViewManager API
- The ViewManager needs to be told when loading is done now (because of
  the quit-at-end settings)

See 7393198f7b
2020-04-05 00:07:42 +02:00
Adriaan de Groot
9db7dd3f3e [netinstall] Add a group with long names 2020-04-04 23:59:58 +02:00
Adriaan de Groot
9b14bf6826 [unpackfs] Rework progress reporting
- Slice overall progress into chunks, with each chunk of equal size
  (as long as we have no overall count information) and place
  the progress of the current chunk into its own slice.
2020-04-04 23:42:20 +02:00
Adriaan de Groot
7e4cb28c1c [unpackfs] Refactor mounting for an entry
- The entry knows where it should be mounted, and can remember that
- mount_entry() didn't use self, so made no sense as a method
  of the Operation class
2020-04-04 23:19:08 +02:00
Adriaan de Groot
49a584377e [unpackfs] Refactor counting an entry
- This does not have to live in the Operation
- Uses only the local imgmountdir (where the entry is mounted)
2020-04-04 23:10:22 +02:00
demmm
e63160cbe9 [localeq] Repeater with zonesModel crashes cala
probably due to dynamically loading items
regionModel now lists, zonesModel only lists one delegate, but
working on QML modules can now continue without crashing cala
2020-04-04 18:43:23 +02:00
Adriaan de Groot
ede561789a Merge branch 'qml-keyboard'
This doesn't actually **work** though, the QML uses older Calamares-internal
APIs and uses a ResponsiveBase that we don't have. Merge it mostly for
the Config and model changes.

FIXES #1355
2020-04-03 17:27:12 +02:00
Adriaan de Groot
af4220331e [libcalamaresui] Move lambda to a "real" slot. 2020-04-03 16:38:10 +02:00
Adriaan de Groot
7393198f7b [libcalamaresui] Tell the manager explicitly when loading is done
- Add some extra checks for validity of m_currentStep (an index)
- Start off with explicitly invalid index, and keep it so until
  loading is complete; this prevents the situation where quit-at-end
  gets triggered after loading the very first module.
2020-04-03 15:36:58 +02:00
Adriaan de Groot
c2fac3a717 [calamares] Minor clean-ups 2020-04-03 15:14:14 +02:00
Adriaan de Groot
59ef307af2 Merge panel-layout code: choose where to place sidebar + nav 2020-04-03 13:56:19 +02:00
Adriaan de Groot
6c418402e3 [localeq] Hit QML file with a hammer
- io.calamares.modules doesn't exist
- ResponsiveBase doesn't exist

The module is now non-functional, but at least it loads and renders
a list of regions and zones.
2020-04-03 13:43:48 +02:00
Adriaan de Groot
54b8ad5475 [localeq] Fix loading default QML
- need our own copy of the QRC, that includes the QML
2020-04-03 12:57:25 +02:00
Adriaan de Groot
c602f2493a [keyboardq] Make QML available
- name default / example QML conventionally
 - copy QRC from keyboard -- the QML needs to be included in the QRC --
   since we don't want to have the QML in the keyboard module.
2020-04-03 12:42:41 +02:00
Adriaan de Groot
7b6b53ab8c [calamares] Re-do building the main layout
- follow branding settings, taking the panel-sides into account
- drop fixed width and height for QML parts
- give panels a minimum appropriate-dimension if they don't have one

This allows, for instance, putting both Widget sidebar and QML navigation
on the left-hand side of the window.
2020-04-03 11:40:51 +02:00
Adriaan de Groot
e15e7d1dc5 [libcalamaresui] Load panel-side settings
- Introduce an enum for panel-side
- Expose this to QML -- I can imagine that QML panels need to know
  which side of the Calamares window they're on.
- Refactor loading the setting into a method that handles both
  flavor and side
2020-04-03 11:05:37 +02:00
Adriaan de Groot
b48e0ebb37 [branding] Introduce placement options for nav, sidebar
- There's no real reason to force the sidebar left and nav at the bottom,
  certainly with QML supporting more layouts and being more flexible,
  so document a mechanism to place the sidebar and navigation along
  "edges" of the Calamares window.
2020-04-03 10:39:03 +02:00
Camilo Higuita
835850c02a [keyboardq] apply the style script 2020-04-03 10:27:06 +02:00
Camilo Higuita
1a46e08cc2 [keyboard] changes to the keyboardmodel to work with qml 2020-04-03 10:26:58 +02:00
Camilo Higuita
0872de7910 [keyboard] Add Config object, split out a keyboardq
- Introduce new QML-ified module for the keyboard
- To share code, move *keyboard* module to a Config-object
2020-04-03 10:19:04 +02:00
Adriaan de Groot
733801980c [libcalamaresui] Fix up icon name for back-button 2020-04-03 01:23:17 +02:00
Adriaan de Groot
10dd32edd2 [libcalamaresui] Fix isAtVeryEnd()
- With an empty list, the question is meaningless
- .. and we called this with an empty list while constructing the
  ViewManager; if quit-at-end is true, then this would terminate
  Calamares immediately because the list was at the end.
2020-04-02 23:50:41 +02:00
Adriaan de Groot
081f5ec4d9 [libcalamaresui] Remove unused static methods
- The UI bits that needed these button-setup functions have
  moved to CalamaresWindow (with copies of those functions)
2020-04-02 23:39:29 +02:00
Adriaan de Groot
a3c966cc6c Merge branch 'issue-1361'
FIXES #1361
2020-04-02 23:14:31 +02:00
Adriaan de Groot
c7733f51d0
Merge pull request #1365 from demmm/master
[welcomeq] buttons connecting
2020-04-02 23:13:29 +02:00
Adriaan de Groot
fafc508d63 [welcome] Update the widget's notion of the locale
- when the locale changes, tell the widget so that the drop-down
  displays the right language.

FIXES #1361
2020-04-02 23:10:55 +02:00
Adriaan de Groot
5956c6678e [welcome] Don't const& POD
- simplify parameter types in some set-methods
- while here, shuffle methods to bring things together
2020-04-02 22:42:41 +02:00
Adriaan de Groot
e756cc8720 [libcalamares] Tidy RequirementsModel some more
- put signals in conventional place
- remove const int& parameter, that can just be int
- drop oddly-guarded code (that leaks memory); if the index (row)
  being passed in, it's probably best to just crash
- remove unused signal warningMessageChanged
2020-04-02 22:14:27 +02:00
Adriaan de Groot
4e7020d030 [libcalamares] Polish model
- make signals consistent in carrying a parameter
- explain why there's no Q_ENUM
2020-04-02 22:04:34 +02:00
Adriaan de Groot
d2f5185d49 [welcome] Remove unused m_configurationMap
- the configuration is split into specific properties, not
  stored generically.
2020-04-02 22:00:43 +02:00
Adriaan de Groot
39afbdb570 [welcome] Shuffle signals to conventional location
- signals after slots, before private
- while here give the *MessageChanged signals a parameter (the changed
  message)
2020-04-02 21:57:00 +02:00
Adriaan de Groot
9d97972a34 [welcome] Apply coding style 2020-04-02 21:53:02 +02:00
Adriaan de Groot
ca7733c8e4 [welcome] Drop RequirementsModel
- Use the one from libcalamares
- Massage warning message into Config after it was removed from the model
2020-04-02 21:52:05 +02:00
Adriaan de Groot
3bf69c9da8 [calamares] Pacify gcc 2020-04-02 21:38:29 +02:00
Adriaan de Groot
e5562a5069 [libcalamares] Move RequirementsModel to libcalamares (1/2)
- Add the model and support code to libcalamares. The model still
  has some cruft that should be in the Welcome config.
2020-04-02 21:33:07 +02:00
demmm
34292618d8 welcomeq buttons connecting
minor spelling corrections
2020-04-02 20:16:05 +02:00
Adriaan de Groot
e2fee79957 [libcalamaresui] Set icon on back-button 2020-04-02 17:49:08 +02:00
Adriaan de Groot
abe3f4cda0 Merge branch 'issue-1344'
FIXES #1344
2020-04-02 16:46:59 +02:00
Adriaan de Groot
510f9352e7 [calamares] Tweak QML sidebar
- some margins and extra space
 - left-align text
 - progress lozenges instead of pointy rectangles
2020-04-02 16:45:04 +02:00
Adriaan de Groot
1038de899b [calamares] Update sidebar and navigation QML
- use the right colors (from branding, not from desktop theme)
- apply branding logo
2020-04-02 16:22:39 +02:00
Adriaan de Groot
ff37792dc9 [calamares] Resize QML to width of parent window 2020-04-02 16:01:58 +02:00
Adriaan de Groot
476a576dda [libcalamaresui] Ensure all button labels are accurate
- since lots of state is updated when the labels change, call that
  in the constructor so that any QML bindings get current values.
2020-04-02 15:48:43 +02:00
Adriaan de Groot
c755c7ed98 [libcalamaresui] restore quit-at-very-end functionality
- This doesn't need to go indirectly through a button
2020-04-02 13:54:14 +02:00
Adriaan de Groot
91d0ba1007 [libcalamaresui] Remove *quit* button from ViewManager
- Mostly like the other buttons
- Also show/hide the button and set tooltip
2020-04-02 13:44:49 +02:00
Adriaan de Groot
0c71c7c23f [calamares] Set initial states of next, back buttons 2020-04-02 12:36:45 +02:00
Adriaan de Groot
38deb66e42 [libcalamaresui] Remove *back* button from ViewManager
- Now the back button should be done by clients as well
- Refactor in CalamaresWindow to avoid leaking local button pointers
  to surrounding code.
- Add macro UPDATE_BUTTON_PROPERTY for convenience in ViewManager
  (ugh, macro) to change a value and emit corresponding update signal.
2020-04-02 12:31:14 +02:00
Adriaan de Groot
8920be6bca [libcalamaresui] Remove *next* button from ViewManager
- add properties for the next button (enabled, label, icon...)
- update those properties as normal
- connect to the properties in the UI implementation
2020-04-02 12:04:24 +02:00
Adriaan de Groot
c638343c18 [libcalamares] Give ViewManager a real quit() slot
- instead of creating a lambda, give ViewManager a real slot
- hook up the new navigation buttons to the next, back, quit slots
2020-04-01 18:45:25 +02:00
demmm
2c2bba5525 actually set About button to false... 2020-04-01 16:21:43 +02:00
demmm
b3f59cee25 filling About in QML, button still disabled
using Loader, can be reused for other widgets conversion
leave onClick example with full path, commneted out
title text for About is hardcoded, discuss option to make this configurable in welcome.conf
background color hardcoded, tested to work well in dark themes too
2020-04-01 16:19:00 +02:00
Adriaan de Groot
9f66b63c00 [calamares] Indulge in template-fu to refactor
- since we've got two blocks of code copy-pasted, which both
  decide to call one or the other of two member functions based
  on a flavor value, turn that into a templated function.
- passing member functions looks a bit weird, and calling them
  is syntactically surprising, but it cuts down the code a lot.
2020-04-01 15:30:47 +02:00
Adriaan de Groot
2dcf265c40 [calamares] Give QML navigation bar a fixed height 2020-04-01 15:13:08 +02:00
Adriaan de Groot
02fc4ce806 [calamares] Load QML navigation 2020-04-01 15:09:59 +02:00
Adriaan de Groot
d4f903b95c [calamares] Create navigation panel in CalamaresWindow
- this is a non-functional duplicate panel, so it looks funny
2020-04-01 11:35:27 +02:00
Adriaan de Groot
6c8aa5da63 [libcalamaresui] Remove commented-out code 2020-04-01 11:26:09 +02:00
Adriaan de Groot
57e6864902 [libcalamaresui] Add panel flavor
- rename enum to more general PanelFlavor
- introduce branding settings for navigation (e.g. for switching
  the navigation buttons off, or using QML)
2020-04-01 11:13:41 +02:00
Adriaan de Groot
d4083c9bbb [libcalamaresui] Add "hidden" as alias for "none" in sidebar settings 2020-04-01 11:07:23 +02:00
Adriaan de Groot
d8ecd302e1 [libcalamares] Apply coding style
- minor space issues
 - drop a blank line after moc-warnings.h to avoid if being sorted
   downwards, after the MOC file it's protecting
2020-03-31 23:19:51 +02:00
Adriaan de Groot
1765412b61 [libcalamaresui] Move RequirementsChecker to libcalamares
- the checker only collects and calls requirements; it has no
  UI component, and only manages data (and a thread to do the
  checking). Move it out of the UI library.
2020-03-31 23:13:13 +02:00
Adriaan de Groot
7655584022 [libcalamaresui] Move Module to libcalamares
- The Module class has no UI-specific code in it; it's all about
  loading and data-management. Move it out of the UI library.
2020-03-31 22:56:42 +02:00
Adriaan de Groot
e04f87fe95 [libcalamaresui] Refactor moduleFromDescriptor
- this function lives in Module -- and is the only thing typing
  Module to the ViewSteps and JobTypes. Split it out into its
  own funciton. Nothing else in Module needs to befriend the
  ViewSteps, so we move the friend declaration around a bit
  as well.
- while here, apply coding style.

This is prep-work for moving module to libcalamares.
2020-03-31 22:46:45 +02:00
Adriaan de Groot
4ddd1ecceb [libcalamares] Move Requirement to libcalamares
- This isn't a UI component: a requirement can be checked and
  reported-on without a UI entirely.
2020-03-31 22:13:30 +02:00
demmm
c10ef9e3bc [welcome] Improve welcomeq visuals
- set image to fill
 - keep aspect ratio
 - don't hardcode text color
 - variation in icons used
 - expand header text to check fit
2020-03-31 16:08:24 +02:00
Adriaan de Groot
eda2e4e10a [calamares] Tweak looks of basic-QML-sidebar
- Use the new currentStepIndex (suggested by Camilo) to see if something
  is selected / current.
2020-03-30 14:25:54 +02:00
Adriaan de Groot
fff4caf0de [libcalamaresui] Apply coding style
- while here, update copyright
2020-03-30 14:16:25 +02:00
Adriaan de Groot
3d7e5bc90d [libcalamaresui] Expose just currentIndex
- drop the current and completed roles, and expose only
  the currentIndex. QML can use the QObject property on
  the model, while QWidgets can call internally through
  the model's data() function.
- we don't need to provide role names for this, so drop that bit.
- simplify the delegate code while here.
2020-03-30 14:14:10 +02:00
Adriaan de Groot
aad79f664e [libcalamaresui] Expose currentIndex also as model data 2020-03-30 14:10:20 +02:00
Adriaan de Groot
b8962cec2d [libcalamaresui] Expose currentStepIndex 2020-03-30 13:11:08 +02:00
Adriaan de Groot
b271ed19b7 [partition] Fix typo in message 2020-03-28 12:49:34 +01:00
Adriaan de Groot
83f5f9e1a7 [libcalamares] Introduce generic delete-later class
Don't bother with QScopeGuard just right now, since I can't
find a use-case in the Calamares codebase.

FIXES #1358
2020-03-28 11:49:23 +01:00
Adriaan de Groot
7c56a50632 [netinstall] Expand documentation of groups format 2020-03-28 11:18:31 +01:00
Calamares CI
2b6eb8473e i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-03-27 23:43:50 +01:00
Adriaan de Groot
33a4b08ac0 Merge branch 'issue-1343'
- Also add documentation to CHANGES

FIXES #1343
FIXES #1319
2020-03-27 21:14:47 +01:00
Adriaan de Groot
433ed8384f [netinstall] Inherit criticalness in groups
- Groups inherit slightly differently: if a subgroup **explicitly**
  configures criticalness, use that. It would be weird, but possibly,
  to have a non-critical subgroup of a critical group.
2020-03-27 20:53:13 +01:00
Adriaan de Groot
83a89c144c [netinstall] Packages should inherit critical-ness from parent 2020-03-27 20:45:04 +01:00
Adriaan de Groot
14a3e10cc2 [netinstall] Simplify getItemPackages
- Use convenience predicate isPackage()
- Name child->item(i) for brevity
2020-03-27 20:37:36 +01:00
Adriaan de Groot
464561b420 [netinstall] Update subgroup-checkedness based on children
- An unselected group with (some) selected subgroups was not
  displayed as (semi)checked -- it was unchecked, because
  its checked-ness was not updated based on the children.
2020-03-27 17:28:32 +01:00
Adriaan de Groot
63b940a623 [netinstall] Implement immutable groups
- An immutable group doesn't show a checkbox at all
2020-03-27 16:47:33 +01:00
Adriaan de Groot
7a42a4d71f [netinstall] Add example section that is immutable
- The section can't be changed, but is selected (it doesn't
  make sense otherwise)
2020-03-27 16:47:07 +01:00
Adriaan de Groot
85551f0fdb [netinstall] Various refactoring
- move ready-indication to Config
- don't check pointers that can't be null
- hand the whole Config to the page
2020-03-27 16:12:48 +01:00
Adriaan de Groot
4cdfe1276a [netinstall] Rip loading out of the UI page
- Create a config object in the ViewStep
- Model lives in the config object and loads there
- Give model to the UI page for display
2020-03-27 15:51:03 +01:00
Adriaan de Groot
9a35427113 [netinstall] Remove unused m_jobs
- Netinstall doesn't make any jobs itself, so drop the member variable
- Use type alias, and simplify jobs()
2020-03-27 15:14:37 +01:00
Adriaan de Groot
1a74a713b6 [netinstall] Make status an enum
- Since we might change translations after loading, display
  the message based on the status enum, rather than
  setting it once at load-time.
2020-03-27 14:54:06 +01:00
Adriaan de Groot
7a4f6f7bfd
Merge pull request #1357 from demmm/master
[partition] Increase Manual Partition instructions
2020-03-27 14:05:56 +01:00
Adriaan de Groot
463435db68 [localeq] De-cruft CMakeLists
- Remove commented-out code
- Fix layout
- Update to modern CMake approach
2020-03-26 11:39:04 +01:00
Adriaan de Groot
ba8811c628 [keyboard] Apply coding style
- Include order
- ci/calamaresstyle
- modern alias for job-list
2020-03-26 11:08:55 +01:00
Adriaan de Groot
ac08598176 Branding: expand the stylesheet example
- Mention that the sidebar menu can't be styled
- Point to more documentation about styling
- Give an example of styling buttons with an icon
2020-03-25 23:35:33 +01:00
demmm
8dc81b6987 Increase Manual Partition instructions
used downstream since 2014, has helped a lot with increaisng correct setups
2020-03-25 19:43:29 +01:00
Adriaan de Groot
215bc46469 [welcome] Update copyright years in about-popup 2020-03-25 13:54:54 +01:00
Adriaan de Groot
de5c97af11 Merge branch 'milohr-qml-bits'
FIXES #1352
2020-03-25 13:48:26 +01:00
Adriaan de Groot
2a93c7e236 [welcome] Chase changed API in master 2020-03-25 13:48:10 +01:00
Adriaan de Groot
ce244d8514 [welcome] Style in viewstep (unrelated to merge) 2020-03-25 13:46:27 +01:00
Adriaan de Groot
875f79b49f [libcalamares] Drop unused parameter
- the `parent` when installing a translator was not used, so drop it
  from the API. Chase some uses of the API, but leave welcome-modules
   broken: there's a merge of those coming.
2020-03-25 12:08:27 +01:00
Adriaan de Groot
81912f9e7d [welcome] Style in Config 2020-03-25 12:00:41 +01:00
Adriaan de Groot
1ede7003c0 [welcome] Apply coding style 2020-03-25 11:41:39 +01:00
Adriaan de Groot
ff74113675 Merge branch 'qml-bits' of https://github.com/milohr/calamares into milohr-qml-bits 2020-03-25 11:37:56 +01:00
Adriaan de Groot
e3b4689cab [libcalamares] Warnings--
- It's the perennial struggle between Qt index types and STL ones
2020-03-25 00:42:42 +01:00
Adriaan de Groot
998790d69c [libcalamares] Warnings-- 2020-03-24 23:52:57 +01:00
Adriaan de Groot
4aeb774812 [libcalamares] POD don't bother with const& 2020-03-24 23:52:20 +01:00
Adriaan de Groot
177d6fe861 [libcalamares] Apply coding style 2020-03-24 22:57:36 +01:00
Adriaan de Groot
08b5012946 [locale] Apply coding style to Config
- ci/calamaresstyle
- sort includes by kind (local module, Calamares, Qt, STL)
- add copyright line
2020-03-24 22:48:14 +01:00
Adriaan de Groot
412a8043a9 Merge branch 'qml-locale' of https://github.com/milohr/calamares into milohr-qml-locale 2020-03-24 22:43:13 +01:00
Adriaan de Groot
26dd93b67c [partition] Simplify code
- isEfi only used meaningfully once
- if (isEfi) followed by if (!isEfi) can be simpler
- create bios-but-not-GPT strings in one go
- mark TODO that this should warn only if needed
- use weird * notation for branding-strings
2020-03-24 22:32:49 +01:00
Adriaan de Groot
b57e198c29 [partition] Apply coding style
- This isn't particularly related to the change at hand, though.
2020-03-24 22:21:56 +01:00
demmm
b6228d137c Adding popup warning/instructions for GPT with BIOS
see https://github.com/calamares/calamares/issues/1339#issuecomment-600862507
this is a very generic warning, used downstream since 2016
stopped virtual all BIOS GPT failures and questions
2020-03-24 16:59:31 +01:00
Camilo Higuita
b6b9f888fc correct typo 2020-03-24 10:39:29 -05:00
Camilo Higuita
e02077d58e some models need to be updated to work with locale qml view step 2020-03-24 10:04:14 -05:00
Camilo Higuita
8ff1996e12 add the localq module and config to locale 2020-03-24 09:47:53 -05:00
Adriaan de Groot
1de2a4ff14 [libcalamares] Introduce quit-at-end
- In some cases, it makes sense to close Calamares automatically
  when it is done. Set *quit-at-end* to do so -- although this
  probably also means you should remove the *finished* page.
2020-03-24 15:38:43 +01:00
Camilo Higuita
1c0e69e1c2 wraning message is not from conf but form the requirements model 2020-03-24 09:33:09 -05:00
Camilo Higuita
2d09557297 update wlecome to latest 2020-03-24 09:26:24 -05:00
Adriaan de Groot
71b55995ee [dummypython] Fix up progress reporting
- It's annoying to have 100% progress reported (from the processing
  of list items) and then have another 3 seconds delay.

Unrelated to the issue-at-hand, but spotted in testing.
2020-03-24 15:23:40 +01:00
Adriaan de Groot
1d30c99d89 [libcalamaresui] The ExecutionViewStep is done when the queue is
- While the queue is running, pretend that the EVS is not at the
  last page.

FIXES #1351
2020-03-24 15:19:45 +01:00
Adriaan de Groot
184462a875 [libcalamares] Make status of JobQueue queryable
- while the queue is executing (the thread is running jobs) the
  isRunning() method returns true.
- re-work some internals to reset isRunning() before emitting
  finished() signal.
2020-03-24 15:14:38 +01:00
Adriaan de Groot
112895fddc [libcalamares] Keep jobIndex in-sync with the jobs
- Never skip updating the jobIndex, because it is used in emitProgress()
  to find which job to ask for status.
2020-03-24 15:06:34 +01:00
Adriaan de Groot
1ec7251275 [libcalamares] Make isAtVeryEnd() internal 2020-03-24 14:57:36 +01:00
Adriaan de Groot
1eec1a9fe7 [libcalamares] Fix typo in API
- "asynchronouse" is not a thing
2020-03-24 13:43:19 +01:00
Adriaan de Groot
f5b4e5d5e1 [netinstall] Add data-loading to the Config object
- Mostly copied from NetInstallPage
2020-03-24 13:13:18 +01:00
Adriaan de Groot
938536c0c3 [netinstall] Allow post-creation loading of model data
- Instead of loading all in the constructor, provide a public
  setupModelData().
- This allows creating the model and setting it for UI, before
  the load completes.
2020-03-24 12:36:31 +01:00
Adriaan de Groot
5e03df723c [netinstall] Add a (stub) Config object
- Add initial definition of Config object, which will extract the model-
  setting and loading code from the page, and which is also prep-work
  for a QML version of this module.
- While here, remove superfluous code
2020-03-24 12:05:48 +01:00
Adriaan de Groot
cf59e2884a [welcome] Reduce warnings from moc-generated code 2020-03-24 12:04:26 +01:00
Adriaan de Groot
1a5c916923 [netinstall] Implement local loading of packages
- For a static list of selectable packages (e.g. what you might otherwise
  use file:/// for with a static file on the ISO) you can now stick the
  list in the config file itself, simplifying some setups.
- Also saves faffing about with network.

SEE #1319
2020-03-24 11:35:58 +01:00
Adriaan de Groot
f59cae2dbb [netinstall] Document local URL
- `local` is supposed to read from the config-file, rather than
  externally; this simplifies examples, makes it easier to have
  multiple netinstalls, and condenses the documentation.
2020-03-23 17:20:14 +01:00
Adriaan de Groot
fa28788f78 [netinstall] Build the model from QVariantList always 2020-03-23 17:20:14 +01:00
Adriaan de Groot
ebc1db6a7b [netinstall] Test loading of a whole (example) file 2020-03-23 17:20:14 +01:00
Adriaan de Groot
f592a3f373 [netinstall] Expand tests to include group-checking
- Check groups
- Check whole treemodels recursively (this is not in PackageTreeItem,
  because that explicitly ignores the tree structure).
- Also a stub of checking example files (from the src dir)
2020-03-23 17:19:32 +01:00
Adriaan de Groot
025ab8b524 [netinstall] Be explicit about checkedness-to-bool conversions 2020-03-23 17:19:32 +01:00
Adriaan de Groot
0e2b3986b9 [netinstall] Use explicit accessor for the type-of-item 2020-03-23 17:19:32 +01:00
Adriaan de Groot
f7191ac29e [netinstall] Compare two PackageTreeItems
- Packages and groups check different fields for equality.
- Selected-state is **not** part of equality.
- Also operator !=
2020-03-23 17:19:15 +01:00
Adriaan de Groot
52d3f4417f [netinstall] Add explicit isGroup()
- Previously you would either need to know where in the tree a
  PackageTreeItem was, or guess that an empty packageName() means that
  it's a group.
2020-03-23 17:19:14 +01:00
Adriaan de Groot
bca316299e [netinstall] Add tests
- Just some simple tests for the Items
- Test creation of package group from variant
- This needs Qt5::Gui to link because QStandardItem is a GUI class,
  although we can run the tests without a GUI.
2020-03-23 17:19:00 +01:00
Adriaan de Groot
dc403237f2 [netinstall] Build model from QVariantList
- As an alternative to the YAML-wranging, build the model from
  a QVariantList instead.
- Expose this as a constructor, too.
2020-03-23 17:18:44 +01:00
Adriaan de Groot
4143ad67af [netinstall] Remove superfluous code
- The constructor for PackageTreeItem now takes over the selected
  state from the parent.
2020-03-23 17:18:44 +01:00
Adriaan de Groot
c7b646315a [netinstall] Add immutable to groups settings 2020-03-23 17:18:44 +01:00
Adriaan de Groot
4cb2ed9552 [netinstall] Chase removal of ItemData
- Simplify creation of PackageTreeItems by interpreting the
  YAML directly (instead of via ItemData),
- Simplify list types,
- Drop superfluous API.
2020-03-23 17:18:44 +01:00
Adriaan de Groot
c66ef5a201 [netinstall] Refactor: kill ItemData
- This doesn't compile right now.
- The nested class ItemData doesn't do anything useful or
  meaningful that having model items with the right data wouldn't.
2020-03-23 17:18:44 +01:00
Adriaan de Groot
8825c9c995 [netinstall] Apply coding style 2020-03-23 17:18:44 +01:00
Adriaan de Groot
1718f7a8a8
Merge branch 'master' into partition-type 2020-03-23 17:09:44 +01:00
Adriaan de Groot
377a78a405
Merge pull request #1347 from gportay/partition-name
[partition] Name partition using filesystem label
2020-03-23 16:59:01 +01:00
Adriaan de Groot
74aaccda15
Merge pull request #1341 from gportay/filesystem-features
[partition] Add support for filesystem-specific features (KPMCore 4.2.0 required)
2020-03-23 16:57:22 +01:00
Adriaan de Groot
54356a22ba [fsresizer] Chase API change in tests
- Missed this earlier because the module is not enabled in FreeBSD.
2020-03-23 16:54:23 +01:00
Gaël PORTAY
15cce29a51 [partition] Add support for filesystem-specific features 2020-03-22 09:25:26 -04:00
Gaël PORTAY
c5ebe13aeb [partition] Add support for partition type 2020-03-22 09:05:32 -04:00
Gaël PORTAY
cba4d2e93b [partition] Name partition using filesystem label 2020-03-21 23:46:20 -04:00
Adriaan de Groot
3b0c0435bc [libcalamaresui] Chase API change in Yaml
- We can drop a bunch of calls to toMap() now.
2020-03-20 21:55:03 +01:00
Adriaan de Groot
1678a03cb3 [libcalamares] Tighten up types
- If we're converting a YAML map to a QVariant (Map), may as well
  express that in the types. This makes the return from, say,
  `yamlMapToVariant()` cheaper, but incurs conversion in
  `yamlToVariant()` .. previously the place for costs was
  swapped around.
- For those cases that want-and-expect a Map, or List, this makes
  the calls slightly cheaper. For the generic case, the costs move
  around internally.
2020-03-20 21:25:42 +01:00
Adriaan de Groot
2eb84e2de1 [partition] [tracking] [welcome] Missing Q_OBJECT
- These aren't strictly necessary for the code, but they
  help with translations.
2020-03-19 00:37:37 +01:00
Adriaan de Groot
d65e0fb4c8 [libcalamares] Fix build with GCC
- <memory> isn't implicitly-included for std::unique_ptr
2020-03-19 00:08:20 +01:00
Adriaan de Groot
9fe679dca8 Merge commit 'afc0c78b4c01ac734b9877b11ae94597c685d804'
Pull in the instance-weight changes and type-improvements,
but not the part where special-casing of unsquash is dropped:
weights are still per-job, not per-module.
2020-03-18 23:58:00 +01:00
Calamares CI
2eff1f0e78 i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-03-18 23:41:19 +01:00
Gabriel Craciunescu
47c167dc04 [bootloader] Resume from outer swap partition
- These fixes are similar to the other swap-from-LUKS changes,
  and just needed to be applied to a different module.
2020-03-18 17:21:20 +01:00
Gabriel Craciunescu
65a989d3cd [grubcfg] With LUKS, resume from the correct swap name
FIXES #1208
2020-03-18 17:12:33 +01:00
Adriaan de Groot
489fd0b272 [welcomeq] Fix QML import
- Now using the properly-namespaced QML import for Calamares things
2020-03-18 11:12:15 +01:00
Adriaan de Groot
cd7884a0e5 [welcomeq] Fix build with clang
- can't convert lambda-with-captures to a function pointer (Clang 9)
- instead, use a context property .. QmlViewStep already sets a
  "config" property with the Config object, but WelcomeQ wants it
  as another name as well.
- this avoids registering the Welcome object across all QML pages,
  as well.

NOTE: needs to have the QML adjusted for this change.
2020-03-18 11:02:35 +01:00
Adriaan de Groot
c4324fd3ea [libcalamaresui] Provide convenience method for context properties 2020-03-18 11:02:16 +01:00
Adriaan de Groot
3f87cc214a [calamares] Warnings--
- Set the width of the QML sidebar explicitly
- Handle all sidebar-flavor enum values explicitly
2020-03-18 10:39:16 +01:00
Adriaan de Groot
afc0c78b4c [libcalamares] Refactor job-weight computations
- only check index-vs-length once
2020-03-16 17:25:27 +01:00
Adriaan de Groot
07da6e3905 [libcalamares] Expand instance with weight 2020-03-13 02:59:09 +01:00
Adriaan de Groot
e37809a126 [libcalamares] Detailed InstanceDescription type 2020-03-13 02:55:38 +01:00
Adriaan de Groot
0e68013bb3 [libcalamares] Start making InstanceDescription a stronger type
- Replace a map-of-strings with a class type.
- For now, doesn't compile.
- Intention is to construct from a YAML / QVariant from the
  *instances* list in `settings.conf`.
2020-03-13 02:41:42 +01:00
Adriaan de Groot
3897bd54df Changes: write some of the QML docs
- Fix references; I decided to put it in Qml.h, which is
  the header for the code that does the work.
2020-03-12 17:37:39 +01:00
Adriaan de Groot
4576cb4fa0 [notesqml] Fix up documentation pointers 2020-03-12 17:30:08 +01:00
Adriaan de Groot
aeffda945f [calamares] Use the ViewManager model to show steps 2020-03-12 15:38:49 +01:00
Adriaan de Groot
b5a09d2f83 [branding] Don't hide the sidebar by default 2020-03-12 05:00:03 +01:00
Adriaan de Groot
cec406e402 [calamares] Add a sample QML-sidebar
- The built-in one is loaded if no branding file is found.
- This sidebar is just the most basic of QML examples.
2020-03-12 04:59:01 +01:00
Adriaan de Groot
cc3b0b2859 [calamares] Remove cruft from CMakeLists.txt 2020-03-12 04:48:07 +01:00
Adriaan de Groot
32ebb08788 [calamares] Search for sidebar QML file
- change name to "calamares-sidebar" so it's clear that
  it is a core component.
2020-03-12 04:21:03 +01:00
Adriaan de Groot
8d6e3e547c [libcalamaresui] Add qmlSearch for non-modules
- Refactor into a support method and two API points
- Use std::transform for doing-things-to-a-list
- Add searchQmlFile that only takes a name, for
  non-modules to use.
2020-03-12 04:17:48 +01:00
Adriaan de Groot
0fd7fec25e [libcalamaresui] Move registration into Qml-service
- Registration of QML modules may need to be done
  for more parts of Calamares. Move into the library,
  out of the model.
- Register for QML when using the QML sidebar.
2020-03-12 03:45:14 +01:00
Adriaan de Groot
c628192163 Merge branch 'progress-model' 2020-03-11 19:39:58 +01:00
Adriaan de Groot
a0b4d58000 [calamares] The very simplest of QML sidebars 2020-03-11 19:39:28 +01:00
Adriaan de Groot
a834d67283 [notesqml] Adjust to new name for Branding 2020-03-11 17:42:19 +01:00
Adriaan de Groot
28c2da12ae [libcalamaresui] Register in io.calamares namespace
- Register both Branding and ViewManager for QML
- Note that this changes the name of Branding
- Add code-docs about object ownership
2020-03-11 17:40:03 +01:00
Adriaan de Groot
7a8eb09cdb [libcalamaresui] Move QML-searching
- This is utility code, so it can be in the QML "service"
  from Calamares, rather than in the QmlViewStep itself.
  That makes it usable for other QML bits as well.
2020-03-11 17:12:02 +01:00
Adriaan de Groot
7d99ad3177 [welcomeq] Adjust to Config-API that QmlViewStep expects 2020-03-11 16:49:07 +01:00
Adriaan de Groot
862b05221d [libcalamaresui] Drop 'name' parameter in QmlViewStep
- The name is just the module identifier, and now we
  search for *m@i* and also *m* from that identifier,
  the name becomes much less important -- and it
  can be set from the config key *qmlFilename* as well.
2020-03-11 15:57:08 +01:00
Adriaan de Groot
8f1ab99190 [libcalamaresui] Search module name as well
- When searching for QML file, obey module name
  (full instance, module-only) and then others.
2020-03-11 15:53:01 +01:00
Adriaan de Groot
165bcfd75d [libcalamaresui] "namespace" QML settings
- To avoid name-collisions in otherwise well-behaved
  modules and configurations, make the QML settings
  more specific:
    search -> qmlSearch
    filename -> qmlFilename
2020-03-11 15:36:42 +01:00
Adriaan de Groot
0f50dc8d33 [welcomeq] Include the QML search mode 2020-03-11 15:23:37 +01:00
Adriaan de Groot
8302f2182b [welcomeq] The QML file name still has a q 2020-03-11 15:21:46 +01:00
Camilo Higuita
d26fa63ccd [welcomeq] initial work for welcomeview in qml 2020-03-11 14:48:14 +01:00
Camilo Higuita
d7f7c16958 [welcome] using config for both qcc2 or qwidgets 2020-03-11 14:48:06 +01:00
Adriaan de Groot
4ab5b4a5e6 [calamares] Progress"tree" is a list
- No need for a TreeView when it's just a one-dimensional
  list of items.
2020-03-11 05:02:06 +01:00
Adriaan de Groot
99c03f7fbb [libcalamaresui] Behave better as a model 2020-03-11 05:01:39 +01:00
Adriaan de Groot
8f0a6d3065 [calamares] The ViewManager is its own model
- Having a ProgressTreeModel that does nothing but
  proxy to ViewManager methods is kind of useless.
- Move the relevant code from ProgressTreeModel to
  ViewManager.
- Remove now-unused ProgressTreeModel.
2020-03-11 04:49:38 +01:00
Adriaan de Groot
b209668d33 [calamares] Fix singleton-ness of the progress view
- Create the ViewManager earlier,
- Create a ProgressTreeModel here for the view,
- Do not weirdly set the model much later.
2020-03-11 04:37:10 +01:00
Adriaan de Groot
290a708e56 [calamares] No need for progresstreeview to be singleton 2020-03-10 21:26:05 -05:00
Adriaan de Groot
e9965d37e3 [calamares] Don't create sidebar if we don't want it 2020-03-10 18:05:24 -05:00
Adriaan de Groot
80f49bed1d [libcalamaresui] Add a sidebar flavor setting 2020-03-10 17:59:06 -05:00
Adriaan de Groot
9a63d63d5b [calamares] Factor out the creation of the sidebar 2020-03-10 17:13:19 -05:00
Adriaan de Groot
04cb5f14f7 [calamares] Role names for progress model 2020-03-10 16:56:22 -05:00
Adriaan de Groot
ba4b42b4ee [calamares] Introduce a "completed" role
- This is for future support of a QML progress view
2020-03-10 16:52:34 -05:00
Adriaan de Groot
d3f55af51e [calamares] Clean up progress tree model
- It's still not a real tree
- Remove unused classes / files
- Apply coding style
2020-03-10 14:13:18 -05:00
Adriaan de Groot
76144fb3dc [calamares] Remove superfluous ViewStepItem
- The model is a simple list, not a tree (it may have been in the
  distant past).
- All the information needed comes from the ViewSteps held by the
  ViewManager.
- The delegate and fake-step handling was never used.
2020-03-10 14:06:35 -05:00
Adriaan de Groot
5a59eb1963 [calamares] Remove unused method from progresstreemodel 2020-03-10 13:43:04 -05:00
Adriaan de Groot
7ec6dff352 [calamares] Apply coding style to progresstree 2020-03-10 13:30:43 -05:00
Adriaan de Groot
e2d9ce737c [netinstall] Implement pre-expanded groups
- Return relevant data
- Document code
- Add to README.md documentation about new key
2020-03-10 12:59:41 -05:00
Adriaan de Groot
b9b48cfbb1 [netinstall] Apply coding style
- Some missing {} were not noticed by astyle
2020-03-10 12:49:12 -05:00
Adriaan de Groot
4f216b0394 [netinstall] Refactor model-data setting
- Introduce convenience methods getString(), getBool() to pick
  out an entry from item definitions in YAML format.
- Apply coding style.
- Pick up the "expanded" property as well.
2020-03-10 12:46:49 -05:00
Adriaan de Groot
0f7f5216ee [netinstall] isHidden is const after construction 2020-03-10 12:39:35 -05:00
Adriaan de Groot
b074696ac1 [netinstall] isCritical is const after construction 2020-03-10 12:38:11 -05:00
Adriaan de Groot
09006a936d [netinstall] Expand groups if requested 2020-03-10 12:37:57 -05:00
Adriaan de Groot
4f22a70b08 [netinstall] Restructure model-method data() 2020-03-10 12:30:33 -05:00
Adriaan de Groot
df86972ea7 [netinstall] Introduce constexpr names for columns and roles 2020-03-10 12:22:56 -05:00
Adriaan de Groot
3d68c74a19 [netinstall] Sanitize PackageTreeItem::data()
- Use of != nullptr for QString just a bad idea
- Massage code so structure for packages resembles that of groups
2020-03-09 22:46:59 -05:00
Adriaan de Groot
201c5ddfe1 [netinstall] Add some debug-logging
- Also, prepare for a start-expanded setting
2020-03-09 22:44:16 -05:00