Commit graph

142 commits

Author SHA1 Message Date
ivan tkachenko
21d7b4fbdc Virtual Monitor: Replace the video-monitor icon with something that exists
There is no "video-monitor" in Breeze Icons, so it inappropriately falls
back to "video" icon which looks like a file icon rather than a device.
2024-08-05 23:07:01 +00:00
ivan tkachenko
9ee0b23727
plasmoid: Port to pragma ComponentBehavior: Bound 2024-07-12 11:44:13 +03:00
ivan tkachenko
d2ee2bfdd8
plasmoid: Flatten plugin controllers, menu and other non-graphical components
Flat is better than nested. Those non-graphical components don't need to
be buried deep inside visual hierarchy tree. For example, for me it was
confusing to find the device label item after Battery, Connectivity and
VirtualMonitor only to realize some time later that those were not
actual visual indicators.
2024-07-12 11:44:13 +03:00
ivan tkachenko
8c0260d4f8
plasmoid: Use better sizing binding for ListView delegate 2024-07-12 11:44:13 +03:00
ivan tkachenko
2267838dbc
plasmoid: Clip the ListView
That's not a responsibility of a ScrollView to take care of Flickable's
clipping.

See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/332
and https://invent.kde.org/plasma/libplasma/-/merge_requests/1014
2024-07-12 11:44:13 +03:00
ivan tkachenko
90946829bf
plasmoid: Basic code cleanup 2024-07-12 11:44:13 +03:00
ivan tkachenko
1f164e3860
Use ellipses instead of triple period
A real ellipsis character is better for accessibility, as screen readers
will describe it appropriately.
2024-07-12 11:44:11 +03:00
Łukasz Patron
7a4a3c5baa Unset file transfer tooltip location
Not sure what was the goal here, but tooltip should be shown under the
file drop area, not the entire plasmoid.
2024-06-07 21:57:24 +00:00
Fabian Arndt
b24d629802 virtualmonitor: implemented capabilities check
BUG: 485829

## Summary

Currently, the plugin just fails silently if the local device is missing the `krfb` package or if the remote device misses an `vnc://` protocol/scheme handler. You click the button and nothing happens.

One issue is, that the plugin is considered `virtualmonitor.available` in the `DeviceDelegate.qml`, even if the check for `krfb-virtualmonitor` fails and no dbus-path is provided. I investigated the behavior a bit, but ignored it in the end as this MR benefits from being shown for device constellations that _could_ provide this feature.

A warning is shown with brief instructions, how to get the plugin working correctly.

- Check if krfb-virtualmonitor is available locally
- Check default scheme handler for vnc:// on device (Linux)
- Show warnings / reasons, if no connection could be established


## Test Plan

Regarding if the devices have mentioned packages installed, we should see different behaviors.

If the remote device has no VNC client, it can not connect to out server. _A warning should be shown._

If the local device hasn't the `krfb-virtualmonitor` available, the remote device couldn't connect. _A warning should be shown._

If both problems are present, _both warnings should be shown._


If none of these are present, no warning should be shown and we should try to establish a connection.


The connection attempts failed? _A warning should be shown._
2024-05-30 23:13:54 +00:00
Prajna Sariputra
4caf77445f Remove KF5 plasmoid
Now that KDE Connect has moved to Qt6 only since https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/621 we can remove the old KF5 plasmoid.
2023-12-23 16:34:33 +00:00
Prajna Sariputra
44301dd51f plasmoid: Add port to KF6/Plasma 6 alongside the current KF5/Plasma 5 version
Currently the plasmoid is still written for KF5/Plasma 5, and in addition
it also still uses PlasmaComponents2 stuff, which has been removed in
KF6/Plasma 6. So, this is an attempt to port the plasmoid so that it works
in Plasma 6.

BUG: 476389
2023-11-30 23:41:36 +00:00
ivan tkachenko
ba9acbc735
Set WrapMode on TextArea component
Upstream styles do not provide any wrapping by default, and thus we
should not rely on deceptively convenient override in qqc2-desktop-style.

See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/331
2023-11-28 05:56:24 +03:00
Albert Vaca Cintora
cdcf44efa8 Remove photo plugin
As discussed in Matrix and BUG: 474121 this plugin is confusing (because
it doesn't actually take a photo, it just launches the camera on your
phone) and its use case can be covered by taking a photo and sharing it,
which only requires a couple extra clicks.
2023-09-15 23:04:17 +00:00
Phani Pavan Kambhampati
c5b955fe10 Changed KCM to launch in system settings
KCM used to open in a separate window, changed that behaviour to launch in system settings when launched via the plasmoid.

BUG: 446337
2023-07-30 07:30:52 +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
c486bb9d2c [plasmoid] Remove unneeded panel icon size handling 2023-03-14 20:35:13 +00:00
Joshua Goins
abbaa1575b Fix "Pair a Device..." button in plasmoid 2023-01-18 10:29:25 -05:00
Kareem Abduljaleel
4ecf463cd1 [plasmoid] Add Photo to Plasmoid menu
Adds a menu entry to ask the remote device to take a photo to the Plasmoid menu
2022-09-28 13:03:48 +00:00
Bharadwaj Raju
1f5fd06924 [plasmoid] Add inline reply for notifications instead of opening a dialog
Instead of opening the reply dialog when clicking Reply in the plasmoid, it opens an inline reply UI.
2022-09-26 19:51:28 +00:00
Nicolas Fella
ad01ef1695 Fix activating existing settings window on Wayland
Add the necessary bits for XDG activation to work

Move the code for launching the settings from the daemon to the respective processes so that we don't need to pass activation tokens over another process boundary
2022-07-06 12:55:39 +00:00
Fushan Wen
5f94c49503 plasmoid: fix missing device name
display is not defined, use model.name instead.
2022-06-23 09:40:39 +00:00
Aleix Pol
084bfebcc8 Introduce the VirtualMonitor plugin
It allows to use other paired devices as external displays
transparently.
2022-05-25 00:04:47 +02:00
Fushan Wen
2c9af9874e
plasmoid: Give PlaceholderMessage an icon
"edit-none": No paired devices

"network-disconnect": All paired devices are unavailable

"kdeconnect": pairedDevicesModel.count < 0
2022-05-09 08:51:04 +08:00
Nate Graham
9c303fee79 plasmoid: Don't show redundant configure button in placeholder message
It's not really needed.

BUG: 448457
2022-01-14 16:08:39 -07:00
Carl Schwan
127992b49d Port ScrollArea to ScrollView
Visually a new scrollbar is now displayed and in terms of behavior
changes the scrolling is now consistent with the other plasmoid.

![image](/uploads/76d7c4e73636be11a78c4e9be22a8027/image.png)
2022-01-04 22:24:28 +00:00
Kai Uwe Broulik
4320789a04 [DeviceDelegate] Improve interaction with overflow menu
* Right-align relative to menu button
* Highlight button while menu is open
* Open on press rather than on click like a toolbar menu
2021-07-23 20:42:22 +02:00
Simon Redman
cec5d8086a [Plasmoid] Use icon for battery and connectivity status
## Summary

Use a pretty, granular icon for battery and connectivity status instead of whacking it into the device name.

## Test Plan

It looks so nice!

![image](/uploads/7e64d1339507e1dae90ee70c02327aa6/image.png)

Tested all provided icon states by hacking Battery.qml and Connectivity.qml to provide different values.
2021-07-14 03:30:25 +00:00
Albert Astals Cid
d93c028727 Add missing ) 2021-03-13 18:58:26 +01:00
David Shlemayev
a75da62f4d Add backend for ConnectivityReport plugin 2021-03-12 23:27:16 +00:00
Nicolas Fella
7193cfc927 [plasmoid] Use PlaceholderMessage from PlasmaExtras instead of Kirigami
Otherwise the style may be incorrect

BUG: 434197
2021-03-09 19:20:05 +01:00
Nicolas Fella
1060c1a81a Add API for opening the KCM to daemon
We have a few places that open the KCM, with different arguments.

Centralize the implementation in one place.

This makes it easier to switch to invoking systemsettings5 in the future (once https://invent.kde.org/plasma/systemsettings/-/merge_requests/11 is in).

It also makes sure the relevant device is selected when clicking on a pairing notification.

The function is exposed to DBus for the Plasmoid and potential third-party users.

CCBUG: 425660
2020-10-18 18:40:48 +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
Nicolas Fella
198789e6fc Fix file dialog usage in app and plasmoid
fileDialog.open() does *not* block, so we need to move the sending to onAccepted. Not sure why I thought this ever worked.

BUG: 423975
2020-07-18 21:57:15 +00:00
Nate Graham
a9d0cb64b7 [applet] Port to Kirigami.PlaceholderMessage
This new Kirigami component was just introduced with
https://phabricator.kde.org/D29057.

ref T13021
2020-04-22 22:49:26 +00:00
Nate Graham
8e0cfd3899 [applet] Standardize presentation on the "devices unavailable" view
Summary:
This patch makes the "devilces unavailable" page follow the general style used in other
similar views throughout Plasma and other KDE software. It also improves the wording
of various buttons and headers to make them more context-sensitive and thus more relevant
to what the user needs to do to solve the problem.

Test Plan:
{F8149680}

{F8149679}

Reviewers:
#VDG, #kde-connect

Subscribers:
2020-03-15 19:53:53 +00:00
George Vogiatzis
875cf16a40 [Plasmoid]Make device menu use PC ContextMenu
Summary:
Change the three dotted menu to use PlasmaComponents ContextMenu.
This prevents menu from staying open on other system tray's applets.
Wayland still has that issue, happens in other menus too.
BUG: 415142

And change menu icon into a hamburger menu.

Test Plan:
Before:
Open the menu, and then open an other applet. Menu will stay open on
the left. Even if change windows and open the system tray, will still
be there.
After:
Use X11. By clicking, for example volume applet, menu will minimize.
Will need to click again to open the applet.
2020-02-21 11:42:31 +02:00
Aleix Pol
36bcade705 plasmoid: move plasmoid buttons into a menu
This way we get to see what they do together with the icon.
Removes some visual clutter as well.

Reviewed by Albert Vaca
2019-10-12 20:06:12 +02:00
Aleix Pol
8a919a8015 Remove clipboard integration on the plasmoid
It's redundant to the clipboard plugin and remote keyboard.
It clutters the UI.

Reviewed by Albert Vaca
2019-10-12 19:44:09 +02:00
Albert Vaca Cintora
db626fa4bd Hide the install buttons if you have already paired some device 2019-09-20 12:24:30 +02:00
Albert Vaca Cintora
7eeed141f0 Add a button to open the settings
If you already have kdeconnect on your phone, the call to action to install
it doesn't make sense.

This doesn't add a string because it reuses one that was already in the
plasmoid
2019-09-19 18:48:58 +02:00
Albert Vaca Cintora
9f8928513d Don't hide the plasmoid, otherwise the install buttons don't make sense 2019-09-19 18:39:45 +02:00
Nicolas Fella
6c40364490 Fix SMS icon in plasmoid 2019-08-15 19:22:29 +02:00
Aleix Pol
20f4ed3e9b sms: forgot to add the file 2019-07-21 20:13:10 +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
Matthijs Tijink
24eb0799f1 Show install instructions for Android when there are no devices 2019-07-20 18:21:41 +02:00
Matthijs Tijink
f8184f84bc Make more of the device name/battery show up in the plasmoid 2019-06-25 16:40:10 +00:00
Nicolas Fella
f9dee192b5 Completely hide plamoid in system tray if no device is connected 2019-06-20 16:22:43 +00:00
Nicolas Fella
1999a0b49e Allow to share multiple files from plasmoid 2019-06-15 18:10:53 +02:00
Nicolas Fella
5a0b82dd6d Fix whitespace 2019-06-15 17:44:27 +02:00