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 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.
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
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 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.
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:
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:
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:
When unmounting a removable device from dolphin, the device notifier
will popup saying the device can now be safely removed. But the popup
never auto-hides.
Test Plan:
Plug a USB pen drive
Unmount it from dolpin
Device notifier should popup and hide itself after 3 seconds
Reviewers: #plasma, #vdg, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16045
Summary:
When a Solid device is removed (e.g. a CD is ejected) the notifier tries
to read the attributes although the Source for the UDI has just vanished.
Fixes several QML error messages, i.e. "TypeError: Cannot read property
'...' of undefined" and "Unable to assign [undefined] to QString".
Apparently these errors also have the effect of items showing outdated
state, i.e. optical media still being shown after ejecting it.
CCBUG: 394348
Test Plan:
1. insert optical medium
2. eject
Without the changes, the item was stuck
Now, the item is removed as soon as the medium is ejected
Also, no more errors are logged for the devicenotifier
Reviewers: #frameworks, broulik
Reviewed By: broulik
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15687
Summary:
when the device notifier pops up automatically, leave it open
if there is no user activity, if there is any, close after around
3 seconds. Suspend the countdown if the notifier window either has
focus or the mouse cursor is over it, leaving the user the time to
go interact. if it doesn't have focus and the mouse leaves, resume
the countdown
replaces D10591
Test Plan:
tested for a while in a real world usage, it behaves in a fairly natural
way
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10921
When a device notification arrives, such as "you can now safely unmount" or "failed to unmount"
device notifier would unconditionally open showing an empty list.
Since we now show device notifications only connected to the device they're about, it makes no
sense to expand it for invisible devices. Applications where mounting or unmounting can fail
for non-removable devices, like Dolphin, already show the error message within the UI anyway,
making the popup redundant.
BUG: 368894
FIXED-IN: 5.8.0
Differential Revision: https://phabricator.kde.org/D2823
Device auto-mounting is quite related to the device notifier and we used to have
that in Plasma 4 but lost this setting there as we cannot embed widget UIs into
plasmoid configuration dialogs.
BUG: 364977
FIXED-IN: 5.8.0
Differential revision: https://phabricator.kde.org/D2060
Instead of having a bunch of handlers in various places messing with various settings,
try to use declarative bindings where possible.
* Remove separate passive timer, instead re-use the pendingDelegateRemoval property
which has its own timer. This way, when a device is unmounted, device notifier stays
active until the notification has cleared, however, when the device is yanked out manually,
it disappears right away
* Don't break binding on Plasmoid.active to ensure its state is always proper depending on
whether a device or not is present (the linked bug)
* Create tooltip declaratively rather than imperatively
BUG: 362992
FIXED-IN: 5.7.0
Differential Revision: https://phabricator.kde.org/D1793
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
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)
behavior from plasma1: the engine has an "added" value in devices
if false, means the device was already there when plasma started
therefore the applet shouldn't expand itself
this should fix the systray annoyingly opening
itself on each plasma startup
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