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
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.
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>) { ... }
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
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:
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
Summary:
In the specific case of having the device notifier opened
and inserting a device that has been configured to be
automatically mounted, the transition animation could be
interrupted resulting in the opacity being wrong.
Test Plan:
In the setup discribed in the summary, you should never
see something like the attached screenshot where the list
of action opacity is not 1.
{F6460038}
See http://doc.qt.io/qt-5/qml-qtquick-viewtransition.html#handling-interrupted-animations
for more information.
Reviewers: #plasma, #vdg, ngraham, davidedmundson
Reviewed By: #plasma, #vdg, ngraham, davidedmundson
Subscribers: broulik, davidedmundson, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17394
Instead of showing a detached status bar with the device name, show the message
below the device in the list.
When removing a device, device notifier will pop up and a "You can now safely remove
this device" message will show up with a highlight gradually fading away until 5 seconds
later the device is removed from the list.
REVIEW: 126688
The code is from a time before we had smart layouts and thus is pretty complicated
with lots of anchoring. This cleans up the code massively.
The layout is a bit tighter now, the eject/mount button is now a proper ToolButton.
The "n actions for this device" text now disappears when the actions are expanded;
(dis)appearance of the disk usage bar is now nicely animated, while the lagging behind
hover effet has been removed.
REVIEW: 126673
get the mounted state using the dedicated isMounted(udi) function;
this allows to simply eject e.g. an Audio CD which can't be mounted otherwise.
Also remove the action icon from an MTP player, it doesn't make sense
there and is non-functional anyway (one cannot mount/unmount it)
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0