Commit Graph

11 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 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 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 732a5fdd8d Apply clang-format 2017-05-01 03:34:43 +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