Bug 167388

Summary: After empty trash from the trashcan plasmoid, dolphin shows "Empty Trash" disabled when new files are deleted
Product: [Applications] dolphin Reporter: Dario Andres <andresbajotierra>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: normal CC: faure, georg.wittenburg
Priority: NOR Keywords: investigated, reproducible
Version: 16.12.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Empty trashcan disabled action
Wrong icon in the Trash Dolphin window
Wrong icon in the Trash Dolphin window
Screenshot

Description Dario Andres 2008-07-25 00:33:16 UTC
Version:           Version 1.1 Using KDE 4.1.00 (KDE 4.0.99 (4.1 RC1+)) (KDEmod) (using KDE 4.0.98)
Installed from:    Compiled From Sources
Compiler:          gcc 4.3.1 
OS:                Linux

Steps to reproduce:
-Open a Dolphin window showing Trash
-Move some files to the trash. The Trash Dolphin window shows the files, and the context menu option "Empty" is enable.
-Also, the Trash plasmoid display the "full trashcan" icon.
-Select Empty trashcan from the Trash plasmoid context menu
-The Trash Dolphin windows shows nothing and the context menu option "Empty" is disable (As expected)
-Now, move some other files to the trash.
-The context menu in the Trash Dolphin window shows "Empty trash" as disabled (but there are files on it!)

The Trash plasmoid is showing the "full trashcan" icon, and its "Empty trash" option is enabled

If I manually delete the file in Trash ("Delete"(Shift+Del)) the Icon in the Information Panel stays as of the icon of the deleted file.
When I took a screenshot, the Icon in the Info Panel went to "full Trashcan" icon
Comment 1 Dario Andres 2008-07-25 00:35:56 UTC
Created attachment 26389 [details]
Empty trashcan disabled action
Comment 2 Dario Andres 2008-07-25 00:36:33 UTC
Created attachment 26390 [details]
Wrong icon in the Trash Dolphin window
Comment 3 Dario Andres 2008-07-25 00:36:47 UTC
Created attachment 26391 [details]
Wrong icon in the Trash Dolphin window
Comment 4 Dario Andres 2008-07-29 22:27:47 UTC
I can still reproduce this bug in Using KDE 4.1.00 final (KDE 4.1.0) (KDEmod) in ArchLinux i686
Comment 5 Dario Andres 2008-08-19 17:17:11 UTC
I can also reproduce this bug with:
kdelibs4.2 svn rev.849324
kdebase4.2 svn rev.849337
ArchLinux 2.6.25-zen2-20080814 i686 
Comment 6 Dario Andres 2008-10-04 18:49:04 UTC
Using KDE 4.1.2 (KDE 4.1.2) (KDEmod): 
I can still reproduce this bug
Comment 7 Dario Andres 2008-12-26 15:09:51 UTC
(just updating bug state)
Still reproducible using:

Qt: 4.4.3
KDE: 4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221))
kdelibs svn rev. 901624 / kdebase svn rev. 901624
on ArchLinux x86_64 - Kernel 2.6.27.10
Comment 8 Dario Andres 2008-12-28 23:07:14 UTC
Mh, seems like the trashrc file is not being updated after the Trashcan plasmoid cleans the trash. There are also a lot of kio_trash process in background (?)
Also , it seems that the Trashcan plasmoid uses "ktrash --empty" to do clean the trash (I don't know if this might be related)
Comment 9 Georg Wittenburg 2009-01-04 17:37:13 UTC
Created attachment 29898 [details]
Screenshot

I'm seeing something similar in 4.1.86 (with unofficial Debian packages from kde42.debian.net at version 4:4.1.86+svn902162-0r1). When I use Digikam to move images to the trash, I can't empty the trash later on because the context menu item in Dolphin is inactive. Strangely enough, the trash icon in the Places view shows that there are indeed files in the trash.
Comment 10 Dario Andres 2009-05-07 00:22:36 UTC
Still reproducible using:

Qt: 4.5.1 (qt-copy  960517)
KDE: 4.2.71 (KDE 4.2.71 (KDE 4.3 >= 20090428))
kdelibs svn rev. 963904 / kdebase svn rev. 963904
on ArchLinux i686 - Kernel 2.6.29.1
Comment 11 Georg Wittenburg 2009-07-22 09:15:01 UTC
Still reproducible using 4.3 RC2 on Debian experimental.
Comment 12 Dario Andres 2009-07-22 16:22:08 UTC
Here using:

Qt: 4.5.2 (KDE-Qt git commit 46a247a2c9a8c0c4456a02f6a0922d859d88fe76
        Date:   Fri Jun 26 13:45:37 2009 +0200)
KDE: 4.3.61 (KDE 4.3.61 (KDE 4.4 >= 20090717))
kdelibs svn rev. 999250 / kdebase svn rev. 999250
on ArchLinux i686 - Kernel 2.6.30.1

It seems the steps changed a bit: after empty the trashcan using the plasmoid, and moving another file to trash, the option in the contextual menu was enabled (kind-a-fixed). However, after some tries of repeating this, and finally emptying the trash using the contextual menu of the Dolphin window (instead of the one on the plasmoid) cause this to happen again. The next file I moved to the trash didn't enabled the Empty Trash action in the Dolphin contextual menu.

.kde4/share/config/trashrc contains:
[Status]
Empty=true

Even when there is a file in the trash, so it is like some inconsistency.

Regards
Comment 13 潘卫平 2009-09-15 03:38:40 UTC
SVN commit 1023611 by peterpan:

call m_config.reparseConfiguration() when adding a file.
BUG:167388


 M  +1 -0      trashimpl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1023611