Commit graph

43 commits

Author SHA1 Message Date
Albert Vaca Cintora
5cc2043c35 Update old-style connect/disconnect where possible 2023-08-08 22:51:30 +02:00
Fushan Wen
47cb369e01 Add i18n context for "Ring device" 2023-08-08 16:12:29 +08:00
Alexander Lohnau
2e67f95017 Add explicit moc includes to cpp files
The rationale is explained in https://planet.kde.org/friedrich-kossebau-2023-06-28-include-also-moc-files-of-headers/

In case of KDEConnect, it impressively speeds up compilation. Before it
took 390 seconds on a clean build and with this change it took 330 seconds.
This is due to the mocs_compilation having to include the header files
and thus all their headers. Due to the lots of small plugins we have,
this means that the same headers must be compiled plenty of times.
When we include the moc files directly in the C++ file, they are already
available.
2023-07-30 07:27:45 +00:00
Albert Vaca Cintora
c3a2665477 Do not call first() on a temporary list 2023-07-20 23:36:05 +02:00
Albert Vaca Cintora
0e2d2af402 Bump KDE compiler settings to latest
This already uses C++17 and C99, so no need to set it manually
2023-07-20 15:47:27 +00:00
Albert Vaca Cintora
144a60b58a Allow disabling clipboard auto-share and add option to share manually
Continues the work started in !396 by rebasing it onto latest master and
making the "send clipboard" button from the plasmoid invisible when
automatic syncing is enabled.
    
I didn't find a way to do the same in kdeconnect-indicator and
kdeconnect-app (why do we have 3 UIs???), so in those we always show the
option for now.
2023-06-07 19:48:25 +00:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Weixuan Xiao
f1843cb492 Improve D-Bus implementation on macOS
Better patch to replace !218.

- Auto and quick detection of previous D-Bus instance;
- Remove private D-Bus compile definition, only use it on macOS without an existing D-Bus instance;
- Safe reboot after crashes because the indicator is not relating on the kdeconnectd to run a D-Bus session;
- Safe exit after clicking on `Quit` in the systray.


More details in commit logs:

Only enable private D-Bus on macOS because the other platforms do not
need them.
The app should be able to easily detect the session bus from the env
DBUS_LAUNCHD_SESSION_BUS_SOCKET from launchd through launchctl.
Because https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-sysdeps-unix.c#L4392
shows that it is the only probing method on macOS with launchd.

The D-Bus session bus can be easily found from launchd/launchctl
with DBUS_LAUNCHD_SESSION_BUS_SOCKET env. It can be an external one
(installed from HomeBrew) or an internal one (launched by a previous
instance followed by a crash).

The indicator helper on macOS can now automatically detect whether we can use a potentially
(with launchd/launchctl env set, or KDE Connect macOS
private_bus_address set) existed and usable session bus.
If previous bus is usable, just try to launch the kdeconnectd with us.
Otherwise, launch a private D-Bus daemon, export the launchd/launchctl
env, and run a kdeconnectd instance.

Everything works better and quicker now :)
2022-04-12 05:40:03 +00:00
Piyush Aggarwal
4d868a2e92 deviceindicator: add path to look in for kdeconnect-handler.exe 2021-06-25 14:15:02 +05:30
Piyush Aggarwal
e10b098ed3 systray: add photo plugin to systray actions 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
3273cea4c8 systray: add separator 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
fc4a19dee0 systray: disable status actions - battery and connectivity - since they don't have any 'on-Click action' bound to them anyways 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
98077b86d6 indicator: replace send file invocation with urlhandler 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
fe3d79ccbc indicator: add connectivity action 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
94d4a9c1c2 indicator: move systray action class to own folder 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
61de9ba315 deviceindicator: add comments to mark each menu entry 2021-06-02 05:37:44 +05:30
Piyush Aggarwal
aee2b593de icons: add qrc for device status icons 2021-06-02 00:02:35 +00:00
Nicolas Fella
f90d6a019f Rework the battery plugin
Instead of having the DBus stuff in a separate class expose the plugin class itself like we do for the other plugins.

Replace the method-based API with properties.

Change the path to <device>/battery for consistency with other plugins
2020-08-27 15:04:40 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Weixuan Xiao
16de0150ce Fix sms indicator entry for macOS 2019-08-19 05:39:05 +00:00
Nicolas Fella
0d7c504cf0 Rename DbusHelper => DBusHelper 2019-08-14 17:36:19 +02:00
Aleix Pol
c17972881b sms: Added opening kdeconnect-sms on the plasmoid and indicator
Add a menu entry on the kdeconnect-indicator within devices' submenu that opens kdeconnect-sms.
Also add it in the plasmoid in the device delegate.
2019-07-21 18:30:41 +02:00
Nicolas Fella
eb53f01e25 Enable running commands from the indicator 2019-07-20 08:23:33 +00:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Weixuan Xiao
5431073844 Add wrapper for macos dbus connection 2019-06-09 15:28:49 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Nicolas Fella
18e0eee564 Forward declare 2019-03-11 18:50:14 +01:00
Nicolas Fella
63a353550c Add icons to indicator
Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17407
2018-12-07 17:32:03 +01:00
Albert Vaca
efaa7cbab1 Fix warning 2017-09-18 20:07:33 +02:00
Albert Vaca
35a9bde458 Get the correct icon 2017-05-24 22:57:36 +02:00
Aleix Pol
a30adbe465 Hardcode a path to find the icon in on Windows 2017-05-24 20:53:12 +02:00
Albert Vaca
636a4507cc Actually, just set the tooltip to the icon
The tooltip within the menus behaved weird, and didn't add any info.
2017-02-28 22:08:40 +01:00
Albert Vaca
44aec35996 Use the device name as tooltip 2017-02-28 22:04:20 +01:00
Albert Vaca
51e4116886 Fixed crash 2017-02-21 00:08:03 +01:00
Aleix Pol
1cbc067205 Remove disabled plugins
No need to show it's not available
2017-02-20 23:27:42 +01:00
Aleix Pol
a000f82475 Remove unpair from the indicator menu
It's never an urgent action, should be done from the KCM
2017-02-20 23:27:03 +01:00
Albert Vaca
1d09ee78a5 Naming 2017-02-05 15:54:38 +01:00
Aleix Pol
c822ef8104 Set the device's announcedName when it's available
No need to block on it
2017-01-13 17:48:37 +01:00
Aleix Pol
8ac7922252 Implement send file for kdeconnect-indicator 2017-01-11 18:04:01 +01:00
Aleix Pol
d517dcea48 Only make actions enabled if they're available 2017-01-11 18:03:44 +01:00
Albert Vaca
3a558984b9 Fix for qt 5.6 2016-11-23 20:27:09 +01:00
Aleix Pol
22e08095ce Let the menu actually do things 2016-11-23 19:45:35 +01:00
Aleix Pol
b67b0e6c2c First approach to a tool that sits on the system tray
Hopefully will better integrate in all platforms
2016-11-23 19:45:35 +01:00