When using 'Send a file/URL' in the indicator with multiple devices, the
device the user selects for file sharing is not automatically selected in
the URL handler dialog that follows.
This happens because `model.rowForDevice(deviceId)` is called without
waiting for the model to be populated, always returning -1.
Resolving this exposed another bug, where the selected device was still
not the one picked. This happens because `proxyModel` is used to fill the
`QComboBox` but `model` is used to find the correct index. Since
`DevicesPluginFilterProxyModel` sorts and filters the data from `model`
the indices do not match.
This commit addresses these issues by deferring the device selection until
data is available and implementing `rowForDevice` for filtered/sorted data
in `DevicesPluginFilterProxyModel`.
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 :)
Current implementation of kdeconnect-handler did not support controlling the function of kdeconnect-handler completely through GUI.
This patch enables that by adding knobs to the GUI and doing necessary changes to the cpp.
Summary:
Add openFile to Share Plugin and extend handler to open local file urls
Future extension: Modify the desktop file to allow Open with > Open on connected device
Depends on D16605
Test Plan: Apply Android patch. Use kdeconnect-handler file:///somefile. Check phone for reaction
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: sredman, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T8637
Differential Revision: https://phabricator.kde.org/D15294
Summary:
E.g.
Device to call +1234567 with
Device to send /home/nico/foo to
Device to open http://google.com on
Reviewers: #kde_connect, apol
Reviewed By: #kde_connect, apol
Subscribers: apol, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16623
Summary:
The handler allows to easily integrate file sharing into various file managers. Make it appear nicer by removing the scheme and using a different wording when sending
files
Test Plan: {F6382616}
Reviewers: #kde_connect, apol
Reviewed By: #kde_connect, apol
Subscribers: apol, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16605
Summary: Makes it possible to handle tel urls with any KDE Connect device
Test Plan: Manual testing
Reviewers: #kde_connect, albertvaka, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D6120