Adriaan de Groot
92d0e71029
[libcalamaresui] one more refactor for string-loading
...
- Do the checking for IsMap inside loadStrings() and use
YAML::Exception to get to bail() (since we're already dealing
with exceptions here, no extra costs). This tidies up the code
somewhat.
2019-05-20 17:03:32 +02:00
Adriaan de Groot
667f78c016
[libcalamaresui] if there's a YAML exception in branding, bail
...
- all kinds of type errors result in bailing out, but a totally
broken branding file does not?
2019-05-20 17:03:28 +02:00
Adriaan de Groot
62328c9940
[libcalamaresui] images-strings loading fixed
...
- move the string-munge into a lambda and use the generic loadStrings()
2019-05-20 17:03:17 +02:00
Adriaan de Groot
544d905b2f
[libcalamaresui] WIP: refactor again
...
- the string-manipulation can be done through a lambda. That makes
handling *strings* and *styles* simple.
- still doesn't compile.
2019-05-20 17:03:17 +02:00
Adriaan de Groot
5a126816f4
[libcalamaresui] WIP: refactor copying strings from config to Branding
...
- this is mostly to make the constructor easier to read by
moving parts of the story to easily-understood methods.
- doesn't actually compile.
2019-05-20 17:03:08 +02:00
Adriaan de Groot
5bae7b7b52
[libcalamaresui] check for sufficiently-new KF5CoreAddons
...
- From 5.58, KOSRelease is available (not used yet, though)
2019-05-20 17:03:04 +02:00
Adriaan de Groot
a9f3b4050c
[libcalamaresui] don't over-complicate PythonQt library linking
2019-05-20 17:02:59 +02:00
Adriaan de Groot
f3bfc81e52
[libcalamares] Rename dontCancel to disableCancelDuringExec
...
- This way the name actually refers to what it does, rather
than being a somewhat ambiguous overload of disableCancel.
2019-05-14 08:30:34 -04:00
Adriaan de Groot
d4f4a40fa5
[libcalamaresui] Refactor quit-enabling
...
- Add signal for change-of-quit-enabledness
- Minor tidying
2019-05-14 13:43:07 +02:00
Adriaan de Groot
088fa5004c
[libcalamaresui] Disallow closing the window during execution
...
- If the disable-cancel-during-exec setting is on, and the user clicks
the window-close button, then disregard the close message.
2019-05-14 13:21:05 +02:00
Adriaan de Groot
ad4352b65c
[libcalamaresui] Make stepIsExecute() more general
...
- Checking if the **next** step is an execute-step is a little
weird, so make the API more general (and add the +1 to indexes
where it was using NextWillExecute before).
2019-05-14 13:18:51 +02:00
Adriaan de Groot
25099ae854
[libcalamaresui] Remove duplicate setEnabled
...
- If executing is set to true, then later setEnabled( !executing && ... )
fill be false, so we don't need to call setEnabled( false ) here as well.
2019-05-14 13:10:36 +02:00
Adriaan de Groot
d78bc0c5c5
[libcalamaresui] When disable-cancel is on, never confirm
...
- This function is also reached by clicking the window-close decoration.
2019-05-14 13:04:24 +02:00
Adriaan de Groot
8fcdbd5bd5
[libcalamaresui] Improve warning message
...
- Tell the packager / deployer that certain modules are missing
2019-05-12 16:29:50 +02:00
Arnaud Ferraris
bfd46276ad
[libcalamaresui] Fix sidebar label for setup mode
...
In the sidebar, the "Install" step should be named "Set Up" when in
setup mode, which will be more consistent with the other UI texts,
including button labels.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-05-08 12:29:01 +02:00
Adriaan de Groot
9331a25905
[libcalamares] Remove Typedefs.h
...
- This small header file contained a few unrelated typedefs.
Move those typedefs to the classes they relate to. This
**does** mean that some consumers need to #include something
else instead.
- Use type names more consistently.
Editorial: why are **pages** responsible for creating the jobs?
2019-05-07 09:51:23 -04:00
Adriaan de Groot
a99eccf19d
[libcalamaresui] Fix PythonQt code w/ moved enums
2019-05-07 08:47:33 -04:00
Adriaan de Groot
a482d7be44
[libcalamaresui] Don't expose build details in DebugWindow
...
- In a library class, don't include uic-generated headers inside
the public headers.
2019-05-07 07:48:40 -04:00
Adriaan de Groot
de2b85eabf
[libcalamaresui] Tidy the CMake bits
...
- Explain (briefly) what the library is for
- Explicitly add includes from the non-UI library
2019-05-07 07:48:40 -04:00
Adriaan de Groot
cdb613bf02
[libcalamares] Move module-related things into subdirectory
...
- Currently just moves a single enum, but this is prep-work for
moving the non-GUI parts of the module system into libcalamares,
to better support GUI-less operation.
2019-05-07 07:48:40 -04:00
Adriaan de Groot
169159f888
[libcalamaresui] Switch to enum classes for Type, Interface
...
- Somewhat gratuitous change, but brings more enums into modern style.
2019-05-07 06:33:31 -04:00
Adriaan de Groot
6b89ac8461
[libcalamaresui] Remove TODO
...
- I don't know what this would mean, so it's not a TODO any more.
2019-05-07 06:26:43 -04:00
Adriaan de Groot
8d0f076591
[libcalamares] Rename CalamaresUtils -> String
...
- The only remaining functions in the file are string-related, so
rename to match their purpose.
- Drop this include file from most places, since they don't actually
use the string functionality at all.
2019-04-29 06:49:16 -04:00
Adriaan de Groot
eaba696173
[libcalamares] Move the crash() function to the one place it's used
2019-04-29 06:49:16 -04:00
Adriaan de Groot
ac095d9ed0
[libcalamares] [libcalamaresui] [calamares] Adjust to moved Dirs.h
2019-04-29 06:49:16 -04:00
Adriaan de Groot
2907b48844
[libcalamaresui] Move RESPATH #define to the one place it's used
2019-04-29 06:14:21 -04:00
Adriaan de Groot
f076dd76ad
[libcalamares] Rename YamlUtils.h
...
- Since we have the utils/ filesystem namespace, and use CalamaresUtils::
as C++ namespace, simplify naming.
2019-04-29 06:14:21 -04:00
Adriaan de Groot
7149b80146
[libcalamares] Distinguish kinds of errors
...
- errors can now carry an integer what-am-I code apart from
the message; all errors have a code != 0 (and ok has code 0).
2019-04-28 14:34:39 -04:00
Adriaan de Groot
08e4090354
Merge remote-tracking branch 'origin/raurodse-branding'
...
FIXES #961
2019-04-23 16:41:22 -04:00
Adriaan de Groot
a216b5ca76
[libcalamaresui] Misplaced const
2019-04-22 00:18:28 +02:00
Adriaan de Groot
b7ddb39105
[libcalamaresui] Massage disable-cancel code
...
- Even when Cancel is hidden, also disable it (prevents DBUS
triggers, for instance),
- Re-enable it when exec is over, if it's disabled then.
- simplify code a little.
2019-04-21 17:32:05 +02:00
Adriaan de Groot
10727c7bd9
Merge pull request #1126 from feren/patch-3
...
Patch to add 'dont-cancel' setting to disable Cancel only during the installation phase
2019-04-21 17:02:21 +02:00
Adriaan de Groot
c44e221fb6
Merge branch 'issue-1107'
...
FIXES #1107
2019-04-19 16:27:19 +02:00
Adriaan de Groot
58aa9f4989
[libcalamares] Move LocaleLabel from libcalamaresui to libcalamares
...
- This isn't a UI-dependent class
- Doesn't make much sense in CalamaresUtilsGui either
2019-04-19 10:04:49 +02:00
Adriaan de Groot
242d756731
[libcalamaresui] Add convenience name() to LocaleLabel
2019-04-19 09:55:51 +02:00
Adriaan de Groot
bd0af4bb77
[libcalamaresui] Give LocaleLabel a default constructor
...
- Needed for use in containers
- While here refactor building the english label
2019-04-19 09:18:26 +02:00
Adriaan de Groot
cef2f50510
Reduce warnings about extra ;
...
- Trailing ; after Q_UNUSED
- Trailing ; after CALAMARES_RETRANSLATE
2019-04-18 12:06:09 +02:00
Adriaan de Groot
c83395ff6d
Reduce warnings for yaml-cpp
...
- Use only utils/YamlUtils.h to pull in yaml-cpp and supporting code.
- When compiling with clang, turn off warnings that the system header
for yaml-cpp would generate.
2019-04-18 12:06:09 +02:00
Adriaan de Groot
620940c75b
[libcalamaresui] Drop now-unused sortKey from LocaleLabel
...
- sortKey is unused
- add englishLabel for reverse-i18n
2019-04-16 23:49:27 +02:00
The feren OS Dev
a7ac046b3d
Update copyright headers
2019-04-16 18:27:51 +01:00
The feren OS Dev
825c92582a
Update ViewManager.cpp
2019-04-16 17:20:39 +01:00
Adriaan de Groot
5e951466df
[libcalamaresui] Sort languages by ISO code
...
- this puts the Englishes together, and is less confusing than
sorting with American first.
2019-04-16 15:38:06 +02:00
Adriaan de Groot
ef3b4c387c
[libcalamaresui] Remove unused AbstractPage
2019-04-15 09:20:08 -04:00
Adriaan de Groot
4fec6731ba
[calamares] [libcalamaresui] Improve includes
...
- avoid useless ../
- sort alphabetically and by kind
2019-04-15 09:20:08 -04:00
Adriaan de Groot
d6cf0617f6
[libcalamaresui] Make logging more consistent
2019-04-15 09:02:21 -04:00
Adriaan de Groot
e664370b28
[libcalamaresui] Use modern tr() annotation
2019-04-11 10:28:09 -04:00
Adriaan de Groot
5a95bf507f
[libcalamaresui] Improve WindowDimensions class
...
- Make sure the class knows its own suffixes
2019-04-11 15:14:31 +02:00
Adriaan de Groot
6560c194ad
[libcalamaresui] Reduce 0-for-nullptr warnings in 3rd party code
...
- replace = 0 with = nullptr to reduce warnings; not a meaningful
or copyrightable change.
2019-04-11 15:14:31 +02:00
Adriaan de Groot
1008a91eba
[libcalamaresui] Reduce warnings
...
- getting a (sensible) uint from an int is tougher than you might think
2019-04-11 15:14:31 +02:00
Adriaan de Groot
8dd22dcbbf
[libcalamaresui] bail() is a [[noreturn]] function
2019-04-11 15:14:31 +02:00
Adriaan de Groot
713370da55
Merge remote-tracking branch 'origin/issue-1100'
2019-04-11 11:47:00 +02:00
Adriaan de Groot
01f5ac22a0
CMake: use conventional method for setting version
...
- Using project() to set up the version is idiomatic for CMake
and more standardised than doing it by hand. Do retain the
RC flag, because that's used in other parts of versioning.
2019-04-04 15:58:07 +02:00
Adriaan de Groot
3a0bd254c0
[libcalamaresui] Adjust quit-messages to setup-mode
2019-04-01 06:16:37 -04:00
Adriaan de Groot
2b7832857c
[libcalamaresui] Simplify checking dependencies
...
- Avoid crash due to invalid iterator, when modules
are removed due to missing requirements.
- Simplify code, factor out the determination of
which required modules are missing.
2019-03-19 11:11:43 -04:00
Adriaan de Groot
5a8ed8583f
[libcalamaresui] Complain about missing config files
...
- When no config file is found, tell where it wasn't.
2019-03-19 05:42:28 -04:00
Adriaan de Groot
54ba0aaf13
[welcome] Use convenience function
...
- Introduce a hasDetails() for RequirementEntry, which is just
a short-cut, but makes code more readable.
2019-02-26 06:20:20 -05:00
Adriaan de Groot
8cf3c217f7
Merge branch 'requirements-checking'
2019-02-25 10:00:43 -05:00
Adriaan de Groot
c3d13e3451
[libcalamaresui] Add documentation to ViewStep methods
2019-02-25 08:15:01 -05:00
Adriaan de Groot
64ca9d0d5a
[libcalamaresui] Document multi-page support.
2019-02-25 08:11:03 -05:00
Adriaan de Groot
6071489788
[libcalamaresui] Provide default implementations of next() and back()
...
- These methods are used for multi-page view-steps, which are rare.
For all the others, just drop the empty implementation and defer
to the base class.
2019-02-25 07:49:10 -05:00
Adriaan de Groot
08565b5f17
[libcalamaresui] Remove the signal done() from ViewStep
...
- The signal is emitted, generally from next(), but not actually used.
2019-02-25 07:34:40 -05:00
Adriaan de Groot
40a7082bfc
[libcalamaresui] Handle no-requirements-to-check case
...
- If there's no requirements at all, none of the watchers
will call finished(), so do it once extra.
2019-02-25 07:15:51 -05:00
Adriaan de Groot
0ad115732e
[libcalamaresui] Report elapsed time as well.
...
- While waiting on modules, report the elapsed time in seconds
based on the number of progress-ticks that have passed.
2019-02-25 06:39:50 -05:00
Adriaan de Groot
5ddf7b980b
[libcalamaresui] Report progress also while waiting
...
- Ping the progress every 1.2 seconds, so the user sees more than
just the throbber.
2019-02-25 06:33:46 -05:00
Adriaan de Groot
ac652a2bc1
[libcalamaresui] Report module-name in italics
2019-02-25 04:19:05 -05:00
Adriaan de Groot
41fecf341b
[libcalamaresui] Avoid metatype warnings at runtime
...
- Register the types with the Qt type system. This is needed
because we're passing them as signal and slot parameters
across threads.
2019-02-24 15:57:36 -05:00
Adriaan de Groot
f1aa22d9e8
[libcalamaresui] Sort signals chronologically
2019-02-24 09:08:02 -05:00
Adriaan de Groot
b169281b69
[libcalamaresui] Use convenience type
2019-02-23 17:41:24 -05:00
Adriaan de Groot
6090a464f8
[libcalamaresui] Switch requirementschecking to threaded mode
...
- Use QFuture and QFutureWatcher to spawn threads that do the actual
checking of the requirements; collect results and report on
them as they come in.
2019-02-23 11:12:55 -05:00
Adriaan de Groot
c678cd80b4
[libcalamaresui] Refactor Requirements-Checking
...
- Move the actual checking into a separate object with some lifecycle-
management signals.
- Right now this is still single-threaded and blocking, so no net gain.
2019-02-20 05:48:15 -05:00
Adriaan de Groot
bbb9ff0cbf
[libcalamaresui] Remove useless #define
2019-02-18 10:19:06 -05:00
Adriaan de Groot
ff10e1301d
[libcalamaresui] Fix struct/class mismatch
2019-02-18 10:10:16 -05:00
Adriaan de Groot
5aa4e52452
[libcalamaresui] Improve debug-logging
2019-02-18 09:09:37 -05:00
Adriaan de Groot
d33752c66c
[libcalamaresui] Refactor Requirements classes
...
- improve naming of member variables
- expand documentation
2019-02-15 20:53:55 +01:00
Adriaan de Groot
43eae0bc47
Merge branch 'master' into requirements-checking
2019-02-15 00:32:45 +01:00
Adriaan de Groot
667c0594a4
Merge pull request #1074 from a-wai/disable-cancel-button
...
Add a settings.conf option to disable "Cancel" button
2019-01-24 21:05:38 +01:00
Arnaud Ferraris
db3d3a7d03
Add a settings.conf option to disable "Cancel" button
...
In some cases, e.g. when calamares is used as an "initial setup" tool,
we may want to user to go through all the configuration steps in order
to end up with a usable system.
Therefore, disabling the "Cancel" button can be useful in this case.
This commit adds an option to settings.conf which disables this button
when set to "true". If the option is not present in the settings file,
the default behavior ("Cancel" button enabled & visible) is enforced.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-01-23 15:56:07 +01:00
Adriaan de Groot
12665192ae
[libcalamaresui] Defend against missing config settings
2019-01-14 15:30:44 +01:00
Adriaan de Groot
ef94b1f689
[calamares] Support noexpand
...
- When in noexpand mode, just don't grow the window, and assume
widgets elsewhere will get scrollbars automatically.
2019-01-14 14:25:01 +01:00
Adriaan de Groot
866797a6c9
[calamares] Support starting fullscreen
2019-01-14 14:17:39 +01:00
Adriaan de Groot
80569a746f
[libcalamaresui] Relax validity check in branding
...
- A size of 64em has a value less than 1024, which is the minimum
size **in pixels**. The check doesn't make sense as-is and would
have to take the unit into account. Leave that to clients of
branding (e.g. CalamaresWindow, which already does this).
2019-01-14 13:42:41 +01:00
Adriaan de Groot
32ab377e43
[libcalamaresui] Record branding window-size
2019-01-14 12:06:04 +01:00
Adriaan de Groot
819a57e458
[libcalamaresui] Store resize configuration
...
- Use the named enums code for simplicity.
2019-01-11 17:35:06 +01:00
Adriaan de Groot
210965aca4
[libcalamaresui] Allow always-show-country setting in locale label
2018-12-14 13:20:32 +01:00
Adriaan de Groot
8790985fca
[libcalamaresui] Code-formatting, remove dead code
2018-12-14 11:33:13 +01:00
Adriaan de Groot
3dda9ab860
[libcalamaresui] LocaleLabel doesn't need to inherit QObject
...
- Use static QObject::tr instead.
2018-12-14 11:30:05 +01:00
Adriaan de Groot
1f4ac45bb5
[libcalamaresui] Cleanup locale-labeling code
...
- Support translations of the "language (country)" format instead
of forcing English parenthesis.
2018-12-14 11:22:47 +01:00
Adriaan de Groot
084f4d2445
[libcalamaresui] Refactor: move LocaleLabel to UI library
...
- This is prep-work for making locale labels consistent everywhere.
- While here, improve code documentation.
2018-12-14 10:52:55 +01:00
Adriaan de Groot
3b8d2835e0
[calamares] Use XDG_{DATA,CONFIG}_DIRS as appropriate
...
- Use DATA for the qml and branding directories (looks for qml/
and branding/<name>/ in those directories).
- Use CONFIG for the global settings and module settings (looks
for settings.conf and module/<name>/ in those directories).
FIXES #941
2018-10-08 10:28:30 -04:00
Adriaan de Groot
869357a89c
Merge branch 'master' into oem-resizer
2018-09-27 20:47:17 +02:00
Adriaan de Groot
d752223d0b
[libcalamaresui] When reporting failure, use full product name.
2018-09-24 17:58:22 +02:00
Adriaan de Groot
39a0d2315b
[calamares] Better config-loading diagnostics
...
- Be more verbose when things go wrong while loading module-
configuration files.
- Allow more forms of paths to be specified. In debug mode, this
is mostyle helpful for the module test-loader.
2018-09-20 07:39:43 -04:00
Adriaan de Groot
4602b30264
[libcalamaresui] Use PYTHONQT_INCLUDE_DIRS
...
- document new variable from the CMake module
- use it in libcalamaresui to simplify #include'ing the
header for the "all" extension.
Suggested by Denis Proskurin.
2018-09-03 06:26:26 -04:00
Adriaan de Groot
bf40f3bd23
Merge branch 'master' into requirements-checking
2018-08-10 12:02:57 -04:00
Adriaan de Groot
ae7700f2d7
[libcalamares] Refactor searching for module configurations
...
- Similar to the refactorings in Calamares proper, just split out
collecting the search paths into a static function. This makes
it a little easier to find places that will need expansion for
more-than-one-config-directory.
2018-07-10 04:12:24 -04:00
Adriaan de Groot
d66393f1ae
[libcalamares] Fix early failure mode
...
- There is more to failing out of loadModules() than just
emitting modulesFailed, so instead share the failure
code with the code after loading modules -- but don't load any.
2018-06-26 08:43:23 -04:00
Adriaan de Groot
08966ff933
[libcalamaresui] Check module dependencies
...
- Module dependency-checking is done in two phases:
first, catch any unknown modules that are listed
in *requiredModules* and bail out before loading
anything. Second, check that the modules required
by X occur before X in the sequence.
2018-06-26 08:32:36 -04:00
Adriaan de Groot
731594fb40
[libcalamaresui] Remove the requiredModules setting
...
- The value set in module.desc was never stored for use,
but isn't an attribute of the instance, either. It belongs
with the descriptor, in ModuleManager.
2018-06-26 08:18:00 -04:00
Raul Rodrigo Segura
f25d6b278d
add support onLeave and onActivate to pythonqt plugins
2018-06-21 13:21:48 +02:00
Adriaan de Groot
1a097f8c49
Style: run modulesystem through the style guide
2018-06-18 10:56:10 -04:00