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
Many applets shouldn't actually appear on the phone, like
devicenotifier, the battery applet, the systray and so on
Populate all desktop files of the plasmoids with the proper
formfactors. on the desktop we keep showing everything.
on the phone most of those applets will be filtered out
Also take into account of the formfactors when populating the available
categories, wo we don't have the risk of seeing empty categories
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.