Bug 501091 - Empty trash context menu is disabled even with trash having items in it
Summary: Empty trash context menu is disabled even with trash having items in it
Status: REOPENED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: git-master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Pan Zhang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-05 09:25 UTC by Akseli Lahtinen
Modified: 2025-11-25 11:55 UTC (History)
4 users (show)

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


Attachments
Trash context menu disabled with trash having items (31.51 KB, image/png)
2025-03-05 09:25 UTC, Akseli Lahtinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Akseli Lahtinen 2025-03-05 09:25:41 UTC
Created attachment 179134 [details]
Trash context menu disabled with trash having items

SUMMARY

Right clicking in trash view shows disabled context menu even with items in it. The empty trash button next
to navbar is clickable.

STEPS TO REPRODUCE
1. Move items to trash
2. Open trash
3. Right click trash view

OBSERVED RESULT
Empty trash context menu is disabled

EXPECTED RESULT
Empty trash context menu is enabled

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600


ADDITIONAL INFORMATION
When trash is deleted once and this is done again, the context menu seems to work again.
I think this may happen only when PC is rebooted with items in trash.
Comment 1 emozdemir 2025-09-21 13:21:00 UTC
I can reproduce this as well.
Comment 2 kdeagle 2025-10-08 08:21:29 UTC
Bug is still present in Fedora 42, KDE Plasma 6.4.5, Dolphin 25.08.1, Kernel 6.16.9-200.fc42.x86_64.
It is very annoying, but might be a quick fix.
Comment 3 Bug Janitor Service 2025-10-10 03:09:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1063
Comment 4 Pan Zhang 2025-10-10 03:13:14 UTC
I can reproduce this  and submitted a merge request. https://invent.kde.org/system/dolphin/-/merge_requests/1063
Comment 5 Méven 2025-10-17 10:34:49 UTC
Git commit 79fe69f7077e4397d5000cedab8a8d6934ff0d04 by Méven Car, on behalf of Pan Zhang.
Committed on 17/10/2025 at 10:34.
Pushed by meven into branch 'master'.

dolphincontextmenu: Update "Empty Trash" enabled state dynamically

Initialize the action state based on current trash contents and keep it in sync with Trash::emptinessChanged to avoid incorrect disabling on startup.

M  +4    -0    src/dolphincontextmenu.cpp

https://invent.kde.org/system/dolphin/-/commit/79fe69f7077e4397d5000cedab8a8d6934ff0d04
Comment 6 Méven 2025-10-17 10:34:57 UTC
Git commit 6a765fe24da611543da57d4f3eac951de2706591 by Méven Car, on behalf of Pan Zhang.
Committed on 17/10/2025 at 10:34.
Pushed by meven into branch 'master'.

dolphincontextmenu: Update "Empty Trash" enabled state dynamically

Initialize the action state based on current trash contents and keep it in sync with Trash::emptinessChanged to avoid incorrect disabling on startup.

M  +2    -2    src/dolphincontextmenu.cpp

https://invent.kde.org/system/dolphin/-/commit/6a765fe24da611543da57d4f3eac951de2706591
Comment 7 emozdemir 2025-11-25 11:55:15 UTC
This bug still exists if a file or dir was moved to the Trash by another program.

It can be reproduced by using trash-cli. Install trash-cli if it's not or use another program that uses trash.
cli:
1) mkdir testdir or touch testfile
2) trash-put [created dir or file]
3) open dolphin
4) right click trash 
You will see 'Empty Trash' is greyed out.