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.