Commit Graph

406 Commits

Author SHA1 Message Date
Martchus da3ad3347d Fix remaining problems preventing unity builds to work
* Avoid multiple definitions of `centerObj()`; this was very bad anyway
* Include `c++utilities/tests/testutils.h` upfront so the formatting
  operators are included before CppUnit
2024-01-30 23:11:00 +01:00
Martchus 4265a94a63 Apply clang-format 2024-01-27 02:56:53 +01:00
Martchus afe9cb2135 Add actions/shortcuts to desktop file
* Remove the old approach to specify actions as it is lacking the `Actions`
  key and doesn't allow customizing the executable name
* Add actions for most important use cases
2024-01-27 02:56:33 +01:00
Martchus 5667aad412 Support Syncthing's shell completion
Syncthing added shell completion in v1.27.3-rc.1 (commit
78db3af8c5e8bd08a9773b0c4da233a52ed4cfe6). This change integrates
that shell completion with Syncthing Tray's long existing completion (which
only supports Bash so far).
2024-01-26 01:48:47 +01:00
Martchus 13ddb6dba5 Apply clang-format 2024-01-15 21:32:38 +01:00
Martchus 25971b6fd5 Update resource paths in UI file after folder structure has changed 2024-01-07 22:35:01 +01:00
Martchus 01fe57492c Add and update tab-stops explicitly where default order is wrong 2024-01-07 22:30:48 +01:00
Martchus 939594aea6 Update translations 2024-01-02 15:22:15 +01:00
Martchus c36b3223f1 Fix displaying issues with Windows 11 style
* Set content margins to take shadow effects into account
* Fix behavior when showing the QMenu not as `Qt::Popup`
    * Prevent polishing as it would wrongly override our window flags
    * Use the background color from the application's palette as the
      background color from the QMenu itself is changed by the Windows 11
      style
2023-12-25 00:48:29 +01:00
Martchus 71c1d794ab Fix AppStream validation tests 2023-11-14 02:15:28 +01:00
Martchus 59ec061580 Remove useless braces 2023-11-10 14:33:17 +01:00
Martchus 04a8905a83 Allow opening Syncthing directly when clicking on tray icon
This might be useful if minimalism is desired or to avoid positioning
issues on Wayland.
2023-11-10 14:33:03 +01:00
Martchus 9360bf8bc8 Fix grammar mistakes in German translation after replacing "Verzeichnis" with "Ordner" 2023-11-10 13:17:16 +01:00
Martchus 784630104d Save position and size of window after is has been moved/resized
* Remember new size after user resized the window
* Remember new position after user repositioned window and using explicit
  coordinates has been configured in the appearance settings
2023-10-06 21:03:40 +02:00
Martchus cdfa769c84 Disable resizing/moving for popups under X11 as it is not working
At least it wasn't working with KWin and leading to the popup not closing
correctly anymore.
2023-10-06 17:55:51 +02:00
Martchus a9cc948099 Allow resizing/moving tray widget
This might be useful on Wayland where positioning the popup is otherwise
not possible at all. Combined with a session restoration mechanism this
might actually be a feasible workaround. The user just needed to position
the popup once wherever it is wanted to show up and then the compositor
could remember that position.

Especially the resizing would also be useful on other platforms (and is by
the way also already possible when using the Plasmoid showing it as part of
the system tray Plasmoid).
2023-10-06 17:05:40 +02:00
Martchus 230532d15e Do the directory/folder replacement also in German translation 2023-09-18 22:34:30 +02:00
John Veness c2a0eee029 Change Directory to Folder in user-facing strings 2023-09-17 19:33:31 +01:00
Martchus abf1dd0748 Rename `SyncthingDeviceModel::IsOwnDevice` in accordance with recent UI changes 2023-09-16 23:09:48 +02:00
Martchus 5fa69e4f5a Rename `SyncthingDevStatus::OwnDevice` in accordance with UI change 2023-09-16 22:28:35 +02:00
Martchus e4bbe852bd Avoid CMake deprecation warning by bumping version 2023-07-23 21:05:22 +02:00
Martchus 8f481b0168 Update translations 2023-07-04 19:38:52 +02:00
Martchus 5b5b2811da Update translations 2023-07-03 00:56:45 +02:00
Martchus 4effd6045b Dynamically retranslate some aspects of the UI
There are still many places missing but this is a first step.
2023-07-03 00:56:19 +02:00
Martchus 10aafceb68 Update translations 2023-06-30 12:47:30 +02:00
Martchus 13730ab933 Ignore "Forbidden" errors shortly after Syncthing start
Not sure why I'm getting

```
Fehler beim Abfragen der Syncthing-Konfiguration: Error transferring http://127.0.0.1:8384/rest/system/config - server replied: Forbidden
URL der Anfrage: http://127.0.0.1:8384/rest/system/config
```

one one of my setups but this kind of error can likely be ignored shortly
after the start similar to other types of errors.
2023-06-30 12:43:06 +02:00
Martchus c6b03ae0aa Show "Connecting …" status via "Connect/Resume/Pause" button
This makes it more obvious that Syncthing Tray is currently connecting to
Syncthing (instead of just hiding the button completely).
2023-06-20 23:21:21 +02:00
Martchus 240155b534 Apply clang-format 2023-06-08 15:34:06 +02:00
Martchus 33f457ef7f Update translations 2023-06-08 14:04:40 +02:00
Martchus 6a16333dfd Update statistics icons dynamically when color palette changes 2023-06-08 14:04:16 +02:00
Martchus 90a790d584 Improve CLI for running Syncthing itself
* Fix abbreviation
* Streamline with Syncthing itself so no arguments mean `serve` (and not
  `--help`)
2023-05-29 18:12:07 +02:00
Martchus b9853043fb Improve libsyncthing
* Do *not* build Syncthing in addition as standalone executalbe
* Explose instead all of Syncthing's commands via the library
  interface
* Make all of Syncthing's commands (including `serve`) accessible
  via Syncthing Tray's executable
* Remove copied code for directory creation and instead use
  upstream's code directly
2023-05-29 17:30:33 +02:00
Martchus 41b26d7f71 Avoid another warning about shadowing 2023-05-21 19:08:46 +02:00
Martchus 9f2e2819c6 Use generic `toInt()` function which relies less on compiler optimizations 2023-05-18 00:53:37 +02:00
Martchus d3a559446f Apply clang-format 2023-05-11 17:57:22 +02:00
Martchus 878e973c9d Improve auto start setting
* Do not blindly override existing auto start entry
* Warn if an auto start entry exists but points to a different executable
    * Allow removing such an entry explicitly
2023-05-11 00:11:34 +02:00
Martchus e703ddd524 Allow overriding single instance ID via env variable 2023-05-03 21:18:03 +02:00
Martchus 884ead9760 Improve startup code further to fix problems showing expecially on Windows
* Avoid overriding argv/argc via `CMD_UTILS_CONVERT_ARGS_TO_UTF8` in
  Windows-specific code when processing arguments from a 2nd instance
* Move the other startup code to main as well as they are not needed when
  processing arguments from a 2nd instance
* Improve debug logging
* Use `waitForBytesWritten()` instead of `flush()` when passing args as
  recommended by the documentation
* Avoid use of `bytesAvailable()` as it doesn't work as expected in this
  situation on Windows (likely it doesn't really work reliably on all
  platforms); calling `readAll()` works and is simpler anyways
* Tested that `--replace` works as well; also the
  `waitUntilGone && QFile::exists(fullServerName)` block is entered and if
  the previous instance is taking some time it really waits until it is
  gone
2023-05-01 21:10:09 +02:00
Martchus e9135d735a Update translations 2023-04-29 21:08:29 +02:00
Martchus c9cd81311d Improve startup/shutdown behavior; add `--replace` CLI option
* Make functions in `main.cpp` static as they are not used by
  other units
* Delete the `TrayIcon` via an extra parent object that is
  deleted before the `QNetworkAccessManager` is deleted; otherwise
  the destruction of `SyncthingConnection` (which aborts pending
  replies) might access dangling `QNetworkReply` objects
* Improve error handling in `SingleInstance` code
* Allow to replace the current instance via the new `--replace`
  argument; this may be useful when creating an installer/updater
2023-04-29 21:07:30 +02:00
Martchus 58b8a4e540 Allow showing Syncthing UI in Chromium-based browser in "app mode"
See https://github.com/Martchus/syncthingtray/issues/178
2023-03-27 20:28:52 +02:00
Martchus 9566623651 Apply Qt settings during runtime
It is no longer required to restart the application to change settings like
the widget style and palette.
2023-03-26 21:32:53 +02:00
Martchus 70e94bcd3c Re-evaluate the default icon theme when the color palette changes
So far the Plasmoid is not covered. It would likely not be very useful
anyways because under GNU/Linux the default icon theme can be determined
from the system and thus the "fallback" default this change is about is not
effective.
2023-03-23 22:43:59 +01:00
Martchus a15c176b18 Remove symlink for README 2023-02-27 22:16:41 +01:00
Martchus b5d81eefc6 Avoid remaining symlinks for testfiles 2023-02-27 22:14:35 +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 5bf8a4e25a Update translations 2023-02-17 19:23:01 +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 243160d43a Don't hide `--show-wizard` argument anymore; it is no longer experimental 2023-02-11 17:37:49 +01:00
Martchus c7f6da6a17 Update translations 2023-01-30 16:29:29 +01:00