In most cases the port is trivial and can even simplify the code like in
the case of the system tray applet. In the case of notifications applet,
this is causing a bigger refactor and it's now also using a TextArea
that provides the automatic scrolling when selecting behavior.
CCBUG: 437155
This was always the indended appearance, but it was being overridden by
a bug in the ExpandableListItem itself. Let's remove the animations here
so that the bug in question can be fixed while preserving the intended
visual effect.
This patch adds an action to unmount all mounted devices. Also it fixes the issue where an additional header appears if more than one device is mounted.
BUG: 434805
This header needs to be shown only when not in the System Tray and also
when there are multiple mounted removable devices. That's the only
circumstance under which it actually has anything in it.
BUG: 438351
FIXED-IN: 5.22.1
It's possible for the root volume to be on a removable disk. In this
case, don't offer the user the option to eject that disk as it does not
make sense and will fail.
This applet no longer has a config window with any non-autogenerated
content in it, so it doesn't make sense for the configure button to open
that window rather than the Automount KCM. This is what most other
applets do nowadays; the Disks & Devices applet should be consistent.
BasicPlasmoidHeading is essentially the "abstract" version, and will not
trigger the visibility condition correctly when inside a System Tray
containment.
The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.
Here was my full process for making this change:
1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+ " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done`
This was removed in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/185,
however the original reasons for making the change no longer apply
because we now have a clean place to put the option--in the new popup
menu in the header. So let's re-add it, because hidden options are bad.
:)
BUG: 430017
FIXED-IN: 5.20
Right now for removable devices, the default action is either "Mount" or
"Unmount" (depending on whether you have automount turned on or off).
For the common case where you want to mount a device and then
immediately view its contents in the file manager, this requires a
two-step process: mount it, then expand the expandable list item, then
click on "Show in File Manager.
This commit changes the "Mount" action to "Mount and Open", collapsing
the three-step action into just one.
For people who really do want to just mount a disk without opening it, a
"Mount" action that does not also open the file manager is added to the
expandable section of the list item.
Additionally, because the "Show in File Manager" action that's already
in the expandable section of the list item would be redundant with the
one used as the primary action, it is now only shown for mounted
devices.
This mirrors a similar proposed change in the Plasma Vault applet:
https://invent.kde.org/plasma/plasma-vault/-/merge_requests/8
Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
This fixes regresion, when plugging in a removable media or phone the removable
media widget toggles on and off if two or more of them are present.
BUG: 428379
the comboboix of a very rarely used feature right
in the header area is super noisy, looks misaligned and puts the feature
in a too much prominent role.
Put everything under a popup menu, mustually exclusive actions will be
shown as radiobuttons
The previous check for whether a device was non-removable in the
delegate was faulty and was doing too much work, which caused it to miss
non-root internal disks. In fact, we can already get this data straight
from the data engine. This fixes the bug and removes code in net.
BUG: 427176
FIXED-IN: 5.20.1
The old applet only opened the popup when a new device was attached
after the applet was loaded, not if there was already a device attached
when the applet was loaded. This commit brings back the old behavior by
re-using the approach taken in the old applet.
BUG: 426990
FIXED-IN: 5.20
This option is just too nerdy to show a UI for. We keep the logic for it
in the code (it's just two lines) but it's now only available for people
who know about this and manually add "popupOnNewDevice=false" to their
plasma-org.kde.plasma.desktop-appletsrc file.
This prevents the applet from being too cluttered with options with the
new design.
Right now the Device Notifier applet has two settings: what kind of
devices to show, and whether or not to open on new device attachment.
My sense is that nobody knows that these options exist because they're
hidden away in a config window that you can only access by
right-clicking on the item in the system tray.
Furthermore, the setting for what kind of devices to show is more useful
than we give it credit for; when set to "All devices", the applet functions
as an always-visible way to access all of the machine's disks. This is
quite handy.
Accordingly, this commit removes the config window and moves all of the
settings into the main UI of the applet using PlasmoidHeaders--one
header and one footer, exactly like the plasma-pa applet.
With this change, the "Show all devices" feature becomes discoverable:
when you plug in a flash drive or whatever, the applet will pop open,
showing you the combobox that chooses what it will display. In this moment,
you can notice it, play with it, and configure it to show all devices if
you'd like.
Accordingly again, the name of the applet is renamed to "Disks &
Devices" since "Device Notifier" is not an accurate name. It was only
ever accurate when using the applet's default settings, and now that
non-default settings are made more discoverable, it feels appropriate
to give it a more generally appropriate name.
This begins the process of porting plasma-workspace to PlasmaComponents3. At
this point, only the relatively easy work is done. Every file not ported
now has been given the reason for still using PC2 in a comment on the import
line so you can see at a glance what the blocker is by running
`grep -r "org.kde.plasma.components 2.0"` in the repo.
Everything is tested and there are no breakages or functional regressions. In
the process, a few unused imports are removed.
Here are the remaining PC3 omissions blocking what's left from getting easily
ported:
- No Highlight
- No ListItem
- No PageStack
- No ContextMenu
- No QueryDialog
- No ModelContextMenu
- TabBar has no left and right tab states
- ToolButton has no built-in method to show a menu when clicked
Summary:
Port the Device Notifier to use an ExpandibleListItem.
Tested with:
- Removable flash drive
- Removable LUKS-encrypted hard disk drive
- Android phone
- iOS phone
- Internal disks
No regressions or departures from the current behavior were found.
The only major UI change is the loss of the progress bar, which is difficult
to display properly with an ExpandableListItem. It is replaced with a textual
display of free space and total space in the subtitle, which is more consistent with the
appearance of other ExpandableListItem-using applets, and IMO is more useful anyway.
Summary:
CCBUG: 417836
Depends on D29711
As this will depend on Frameworks 5.71, it will be landed on master after branching,
ending up in Plasma 5.20.
Test Plan:
Right-click on applets and activate their configure menu items
Open applets and click on their settings buttons
Observe that the KCMs are opened in System Settings or Info Center
(depending on the context)
Reviewers: mart, #plasma
Reviewed By: mart, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29712
Summary:
After D28144, some animations are now too long because they were inappropriately
multiplying a duration value. That's no longer necessary, so let's remove the
multiplication.
Depends on D28144
Test Plan: Various things that were a bit too slow before feel just right now
Reviewers: #vdg, #plasma, cblack
Reviewed By: #vdg, #plasma, cblack
Subscribers: cblack, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28238
Summary:
We use this centered style in many other places and are moving towards using it
everywhere. This patch applies the same style to the System Tray popups for
notifications and devices, which were still using the old style.
Test Plan:
Notifications, before: {F8090822}
Notifications, after: {F8090777}
Device Notifier: before: {F8090825}
Device Notifier, after: {F8090776}
Reviewers: #vdg, #plasma, ndavis
Reviewed By: #vdg, ndavis
Subscribers: davidedmundson, ndavis, trmdi, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27219
Summary:
Icon should be highlighted hover, as any other icons in the system tray.
CCBUG: 400295
Test Plan: Hover mouse over over the icon - it should highlight.
Reviewers: #plasma, davidedmundson, #plasma_workspaces, broulik
Reviewed By: #plasma, #plasma_workspaces, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24738
Summary: Settings are ported to QtQuickControls 2 and now use a Kirigami Form Layout.
Test Plan:
Before:
{F6633459}
After:
{F6633461}
Reviewers: #vdg, #plasma, ngraham, davidedmundson
Reviewed By: #vdg, #plasma, ngraham, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19289
Summary:
When at least two removable devices are mounted, a button shows
up that will allow to unmount all mounted removable devices.
This is convenient for removable drives with several partitions,
each of which have to be unmounted to be able to safely plug the
device out.
{F6330009}
FEATURE: 395644
Test Plan:
Plug and mount two devices.
Click on the new 'unmount all' button.
Reviewers: #plasma, #vdg, ngraham, broulik
Reviewed By: #plasma, #vdg, ngraham, broulik
Subscribers: abetts, broulik, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16212
Summary:
This patch fixes two issues:
- the 'state' of the device now propagates correctly, that makes the busy indicator be displayed again, device emblems are also updated correctly
- there is no more delay between the moment when the device is actually mounted and the moment the device notifier says it is. The worst case used to be 5 seconds.
BUG: 354321
BUG: 399986
Reviewers: #plasma, #vdg, broulik, bruns, ngraham, davidedmundson
Reviewed By: #plasma, #vdg, ngraham, davidedmundson
Subscribers: mart, cfeck, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16170