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