Commit Graph

197 Commits

Author SHA1 Message Date
Martchus ed28eb5a44 Forward-declare `WizardTests` correctly to fix compilation with MSVC 2023-02-26 20:01:02 +01:00
Martchus 1b72e61c86 Allow to use a window without titlebar
This might look better than a popup on Windows 11 because we'd still get
the round window corners.
2023-02-18 21:27:09 +01:00
Martchus 10c656cc5e Show error when settings cannot be restored or saved
* State the error type and location of the relevant file
* Help debugging problems related to settings
2023-02-17 19:20:10 +01:00
Martchus 588024d1c5 Display progress bar again when re-checking setup detection 2023-02-15 19:26:58 +01:00
Martchus cc2b3365fb Track whether setup detection has already been started and avoid running it twice
This makes the code more explicit about avoiding triggering the setup
detection twice. Maybe it fixes
https://github.com/Martchus/syncthingtray/issues/174 but likely it does not
change the behavior (in general).
2023-02-15 19:21:48 +01:00
Martchus 3e0fc09869 Allow to keep connection/launcher config as-is in wizard 2023-02-11 18:28:59 +01:00
Martchus feeafb0a87 Fix determining main config according to selection in wizard page 2023-02-11 17:38:57 +01:00
Martchus 95d2d4ce1a Fix checking config again after going back in wizard 2023-02-07 18:16:13 +01:00
Martchus 9a9ffac1ae Add further explanations in the connection configuration form
* Show required URL format as placeholder text with an example
* Add explanation where to find API key as placeholder text
* Add explanation to authentication checkbox
* Move API key above authentication as it is more important
* See https://github.com/Martchus/syncthingtray/issues/172
2023-01-28 16:46:50 +01:00
Martchus 1d333b1e19 Remove `--no-console` from default arguments
The launcher hides the process in a way that hides the console
anyways making the use of this option useless. So it is better
to remove it to avoid any negative side-effects it may have (see
https://github.com/syncthing/syncthing/issues/8248#issuecomment-1404102589).
2023-01-25 20:55:57 +01:00
Martchus 517cf813af Remove obsolete reference to "Inotify" in extra launcher
The extra launcher was initially made for launching the "Inotify" tool but
that's now obsolete so there shouldn't be any references to it anymore.
2023-01-12 22:41:15 +01:00
Martchus f04c482538 Allow overriding timeout of wizard's setup detection and log during test 2023-01-11 19:43:46 +01:00
Martchus 23227d3cb7 Init setup detection of `DetectionWizardPage` and connect `done` only once 2023-01-11 19:12:44 +01:00
Martchus 4cc2f19846 Fix one more warning about unqualified slot arguments 2023-01-11 19:04:08 +01:00
Martchus 417950ccb4 Fix warning about getter being mismarked as slot 2023-01-11 19:03:35 +01:00
Martchus e9eeb76578 Fix displaying QR-code in wizard when built-in launcher is used
In this case the connection from the setup detection is not the correct
one. The connection used to apply the settings should generally be used for
querying the QR-code.
2023-01-09 16:01:37 +01:00
Martchus 9da5392c35 Fix warnings about unqualified slot arguments 2023-01-09 15:34:51 +01:00
Martchus c14ae7b963 Avoid misleading note in autostart wizard page
When the launcher has already been setup and the wizard is opened and the
currently running Syncthing instance is selected, then the wizard said the
autostart option had no effect on Syncthing itself. However, that's not
correct when the currently running Syncthing instance has already been
started via the internal launcher. This change adds a special note for this
case which is actually correct.
2023-01-09 15:19:45 +01:00
Martchus 3132c006c5 Allow configuring thickness of status icons 2022-12-20 18:29:05 +01:00
Martchus 6ff0f80e49
Merge pull request #167 from doronbehar/autostart-path
autostart: Enable setting via cmake Exec= path
2022-12-10 12:24:15 +01:00
Martchus a7689e5b70 Avoid duplicating whole line for AUTOSTART_EXEC_PATH configuration
This should avoid accidentally only changing one of the code paths at some
point.
2022-12-10 12:23:23 +01:00
Martchus be5043bbe7 Improve configuration of AUTOSTART_EXEC_PATH
* Avoid adding compile definition project-wide
* Use `SYNCTHINGWIDGETS_`-prefix for definition as it is done in other
  places as well
* Use `set(… CACHE …)` for this non-boolean cache variable
2022-12-10 12:19:26 +01:00
Martchus 24a9e63005 Apply clang-format 2022-12-10 12:06:07 +01:00
Doron Behar f7e36115ab autostart: Enable setting via cmake Exec= path
See https://github.com/NixOS/nixpkgs/issues/199596 .
2022-12-09 09:05:26 +02:00
Martchus 6c89b2dc0a Allow disabling positioning at fallback coordinates
This just turns the "Otherwise assume …" label into a checkbox allowing to
disable the fallback behavior completely.
2022-11-29 23:33:28 +01:00
Martchus 71c56edfd8 Allow showing Syncthing Tray as normal application/window
* Remove experimental pinning feature again and instead allow using a
  normal window
    * Pinning made it inconvenient to close the (frameless) window again
    * Pinning required hiding/showing the window which didn't look very
      nice (and setting flags directly via `QWindow` didn't work as well)
* As normal application/window positioning issues on Wayland are less
  problematic (and those aren't going to be fixed any time soon, if at all)
2022-11-29 23:06:15 +01:00
Martchus 74100611d2 Show own device ID when wizard has been concluded 2022-11-10 21:45:12 +01:00
Martchus 256e90a0cb Avoid warning about unqualified std cast 2022-11-04 16:51:01 +01:00
Martchus f121f5f740 Fix layout related warnings and ownership problems in wizard code 2022-11-02 22:51:22 +01:00
Martchus f6845cd5c0 Use `quickwizard` icon consistently 2022-10-30 21:40:42 +01:00
Martchus 2b5c8b6059 Use `qEnvironmentVariable` via compat header from qtutilities 2022-10-29 21:39:43 +02:00
Martchus 07dc4cac60 Avoid triggering the setup detection of wizard automatically when going back
Otherwise it is not really possible to go back to the start page. Besides,
triggering the setup detection again explicitly might make it more obvious
what's going on.
2022-10-28 15:00:11 +02:00
Martchus 84acab68aa Determine whether autostart is enabled in wizard's setup detection once
Instead of checking whether autostart is enabled each and every time it is
used. Also show it in details from setup detection.
2022-10-28 14:10:19 +02:00
Martchus 9c3f6da89f Set autostart checkbox state of wizard to current autostart state 2022-10-28 13:55:10 +02:00
Martchus bb59f6a230 Streamline coding style in autostart-related code 2022-10-28 13:54:16 +02:00
Martchus 992e754dd7 Enable wizard without WIP flag
The wizard likely still needs improvement but it is time to get more
feedback.
2022-10-27 19:23:56 +02:00
Martchus 1b1b9129be Avoid icon being rendered to big in wizard under Windows
Apparently Qt isn't handling the icon size very well (icon ends up clipped)
on its own so let's just use a pixmap icon of fixed size.
2022-10-27 19:19:13 +02:00
Martchus 328417d1f3 Fix compilation without systemd support 2022-10-24 15:37:53 +02:00
Martchus 74580d382b Allow testing systemd integration with a test unit file 2022-10-22 13:01:25 +02:00
Martchus 77cea5aead Tie suppressing notifications to "reconnect integrations" of launcher/service
So suppressing notifications by either the launcher status or service
status can be enabled/disabled together with the re-connect tweaking. This
makes more sense than having it unconditionally enabled and makes the
presence of the feature (and when it is effective) also more visible to
users.
2022-10-22 12:32:24 +02:00
Martchus b8cbe47099 Prevent doing setup detection when closing wizard in main config step 2022-10-18 22:25:51 +02:00
Martchus 9fd0dd3201 Don't allow continuing wizard if selected option is hidden
The selected option might be hidden if it was previously selected but then
became inavailable after running the setup detection again.
2022-10-18 22:21:27 +02:00
Martchus 8e652217d8 Ensure wizard's setup detection is really reset
So when going back to the detection state the previously selected config is
not used anymore (even though it isn't selected anymore).
2022-10-18 22:19:57 +02:00
Martchus db60c73d8d Fix missing whitespace 2022-10-18 21:53:15 +02:00
Martchus 2dffb7ac97 Do not change launcher settings when currently running instance selected in wizard
The currently running instance might be from the launcher itself as the
wizard might have been started after configuring the launcher manually. So
let's just not mess with the launcher settings at all in this case.
2022-10-16 18:07:11 +02:00
Martchus 9f92e340b9 Add basic tests for wizard 2022-10-16 15:08:29 +02:00
Martchus 5fd07ee1c0 Allow opening wizard from Plasmoid 2022-10-08 23:42:29 +02:00
Martchus 63acf60cd8 Fix autostart configuration via wizard 2022-10-08 23:41:58 +02:00
Martchus ec85052c20 Allow enabling devel modes via env variables
Using CLI args is not possible for plugins (such as the Plasmoid).
2022-10-08 22:44:00 +02:00
Martchus a0297f67ba Add setting to keep track whether it is the Plasmoid 2022-10-08 22:20:06 +02:00