Commit Graph

24 Commits

Author SHA1 Message Date
Martchus 975e86c895 Allow backend libraries to be used from other projects
So far the backend libraries' include paths were relative within this
repository. This means the header files could not be used at their
installed location.

This change replaces them with "<>" includes to fix that problem and adds
a new include directory so building everything at once still works.

With this change it should be easier to actually split some parts into
another repository if this one would become too big.
2021-01-25 19:48:11 +01:00
Martchus 57e9865ace Sort devices by name 2020-10-20 19:36:02 +02:00
Martchus 3e1beaa11d Sort directories by name/ID
* Use the name as sorting criteria and fall back to the ID if there's no
  name
* Use new SyncthingSortFilterDirectoryModel also for Plasmoid's filtering
* See https://github.com/Martchus/syncthingtray/issues/75
2020-10-18 15:48:02 +02:00
Martchus aac87621dc Streamline context menus of regular tray application and Plasmoid
* Support triggering actions via the context menu in the regular tray like
  it is already possible in the Plasmoid
* Support copying via the context menu in the Plasmoid like it is already
  possible in the regular tray
* Reduce repetition of coding patterns using templates
2020-10-07 21:42:50 +02:00
Martchus 13e0732168 Show context menu on recent changes view 2020-01-23 20:07:11 +01:00
Martchus 6057b2cb2c Map context menu coordinates to top-level widget
Map context menu coordinates to top-level widget if the top-level
widget is a QMenu. Otherwise the context menu is not displayed at
the right position. Not sure why this workaround is required.

The check for QMenu is required. Otherwise the "windowed" mode
enabled via --windowed CLI argument would not work anymore. In
this mode the top-level window is a regular window.

Adding the window flags Qt::Sheet or Qt::Dialog to the QMenu
would help as well but that prevents closing the menu (see
https://github.com/Martchus/syncthingtray/issues/41).
2019-07-31 22:26:11 +02:00
Martchus d07bdba5de Add parent to context menus
This is recommended in a Wayland porting guide.
2019-07-31 22:26:00 +02:00
Martchus 9f9b9124a4 Improve code of dir/dev/download views
* Reduce indentation
* Remove unused #include <QCursor>
* Map context menu position to viewport
* Use const when possible
2019-07-27 11:15:13 +02:00
Martchus f4097d3d79 Fix positioning of context menus under Wayland
Does not cover positioning the tray widget itself yet.
2019-07-20 18:56:20 +02:00
Martchus 4a42a3f0c0 Fix and refactor directory error handling
* Rely not only on the FolderErrors event
* Request pull errors when opening the dialog
* Use "pullErrors" from FolderSummary
* Move code for directory error dialog into
  its own class

This should fix that sometimes obsolete errors
were still displayed or actually present errors
missing.
2018-11-03 21:30:17 +01:00
Martchus f462530183 Reduce nesting in DirView::mouseReleaseEvent() 2018-11-03 17:54:12 +01:00
Martchus 69ffaeb1f3 Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:48:15 +02:00
Martchus ee8657cd1d Fix showing errors 2017-08-31 19:49:23 +02:00
Martchus b2780568b4 Allow deletion of non-empty dirs
It is a common error that dirs can not be removed
because they still contain ignored items. Usually
I want to get rid of them nevertheless. This change
allows to remove all non-empty Syncthing can not
remove via the tray.
2017-08-01 00:28:51 +02:00
Martchus aca7f61c84 Prevent trying to rescan paused dirs
* Exclude paused dirs when rescanning all dirs to
  prevent errors
* Disable rescanning particular dir via gui if paused
2017-07-16 21:08:38 +02:00
Martchus c4ccda93c9 Show global directory errors messages
Previously, only error messages for failed
items have been shown.
2017-07-14 20:14:15 +02:00
Martchus 732a5fdd8d Apply clang-format 2017-05-01 03:34:43 +02:00
Martchus 49ff5a7b65 Move widgets from tray app to separate lib
So settings pages, web view and other widgets
can be used in other components such as the
Dolphin plugin and Plasmoid, too.
2017-04-23 18:31:18 +02:00
Martchus 6c62bf946b Swap dir pause and rescan buttons
Looks better with Breeze icon theme
2017-02-24 22:34:46 +01:00
Marius Kittler 5101872532 Allow pausing/resuming dirs in GUI 2017-02-23 15:57:17 +01:00
Martchus 2071aaa2e7 Don't show empty errors 2016-11-01 16:57:20 +01:00
Martchus dd8e443c15 Move SyncthingDev and SyncthingDir to extra files 2016-10-04 23:55:20 +02:00
Martchus 9fa2a028e8 Show out of sync directory state 2016-10-04 23:42:17 +02:00
Martchus 6470038fc7 Refactor to allow sharing backend with other apps
Intended for creating command line tool and plasmoid
2016-09-30 23:58:45 +02:00