Bug 476423 - Caveau tray icon doesn't change when vault is unlocked
Summary: Caveau tray icon doesn't change when vault is unlocked
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Vaults widget (other bugs)
Version First Reported In: 6.0.0
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Ivan Čukić
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2023-11-01 16:34 UTC by Xwang
Modified: 2025-01-16 19:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xwang 2023-11-01 16:34:05 UTC
SUMMARY

The "Caveau" tray icon that permits to unlock and lock plasma's  vaults does not change when a vault is unocked.

When at least one vault is unlocked the icon in the tray should changes to highlight that to the user.  

STEPS TO REPRODUCE
1.  Unlock a vault
2.  Observe the tray icon
3. Lock it again
4. Observe the icon again 

OBSERVED RESULT
The tray icon is always the same

EXPECTED RESULT
The tray icon shows somehow (open lock or different color) that at least one vault is open (in a similar way as the USB tray icon changes when a device is plugged) 


SOFTWARE/OS VERSIONS
Linux: Archlinux 64bit  
(available in About System)
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 2.111.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2024-04-18 09:21:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-vault/-/merge_requests/47
Comment 2 Nate Graham 2024-04-20 21:49:13 UTC
Git commit ace04d03b6470f70420a3ebaf98011b0004b0fb4 by Nate Graham.
Committed on 20/04/2024 at 21:46.
Pushed by ngraham into branch 'master'.

Make applet active in the System Tray only when any vaults are open

Right now the applet is active when any vaults *exist*, and inactive
otherwise. This lets you always access a vault with two clicks.

As a downside, the Vaults icon is always taking up space in the visible
part of your System Tray. My sense is that most users of this feature
aren't opening and closing vaults all day every day, so for these
people, showing the icon 100% of the time wastes space.

Accordingly, let's make the applet active only when any vaults are
actually open. This makes the visible contents of the System Tray more
contextually relevant, and also provides a visual reminder when you've
forgotten to close your last vault--the icon is still visible!

The drawback to this change is that accessing a vault when none are
already open becomes a three-click task. I think this is an acceptable
trade-off for the above benefits, and people who prefer the status quo
can restore it by setting the applet to be always visible in their System
Tray settings.

Implementation-wise, the change relies on storing a list of open vaults
in the model that's kept in sync with the one in the KDED service, which
mirrors what's already done for the list of busy vaults and vaults in an
error state.

M  +1    -1    plasma/package/contents/ui/main.qml
M  +24   -0    plasma/vaultsmodel.cpp
M  +3    -0    plasma/vaultsmodel.h
M  +1    -0    plasma/vaultsmodel_p.h

https://invent.kde.org/plasma/plasma-vault/-/commit/ace04d03b6470f70420a3ebaf98011b0004b0fb4