Bug 166799 - Plasma Trash Icon Doesn't Refresh When Emptied
Summary: Plasma Trash Icon Doesn't Refresh When Emptied
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-trashcan (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 167802 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-17 06:24 UTC by Jay LaCroix
Modified: 2008-11-20 13:43 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay LaCroix 2008-07-17 06:24:58 UTC
Version:            (using KDE 4.0.98)
Installed from:    Ubuntu Packages
OS:                Linux

The trash plasmoid included with KDE 4.1 RC1 doesn't update when emptied. 

For example, if I add the Trash plasmoid to my desktop and I have 7 files in my trash folder, it will show a full icon and show "Trash 7 items".

When I click on the green arrow and choose "Empty trashcan" the trash is emptied, but on the desktop it still shows the full trash icon and still displays "Trash 7 items".

After emptying it, if I click on it, Dolphin opens the trash folder and shows the files that I had already deleted, it isn't until I press F5 that Dolphin realizes that it's emptied and clears the files, but the Trash widget still shows the full icon.
Comment 1 Jay LaCroix 2008-07-17 06:27:09 UTC
Also, if I run these two commands:

kquitapp plasma
plasma

The trash icon on the desktop is updated. So if I empty the trash and there is one item in it, I have to run the above two commands to get the plasmoid to realize that the trash is empty.
Comment 2 Dario Andres 2008-07-25 00:18:04 UTC
(KDE 4.0.99 (4.1RC1+) in ArchLinux)
I can't reproduce this bug. The trash can icon is updated when I select "Empty trashcan" in the plasmoid menu
Comment 3 Jay LaCroix 2008-07-25 02:42:51 UTC
For me, the icon on the desktop updates if I open the trash folder in 
Dolphin and delete the files, but if I rightclick or left click the 
green arrow and select empty trash it still says I have trash in the 
trash can.

Darío Andrés wrote:
[bugs.kde.org quoted mail]
Comment 4 Dario Andres 2008-07-26 18:19:57 UTC
Did you try with the 4.0.99 release ? That's weird. I have reported another bug related to Trash (within Dolphin and Trash plasmoid) in https://bugs.kde.org/show_bug.cgi?id=167388 . Can you reproduce it ? (althought it is not directly related)
Comment 5 Jay LaCroix 2008-07-27 07:41:02 UTC
I am using RC1 provided by Kubuntu. As far as the other bug I cannot 
reproduce it because due to my bug I don't get far enough to get to yours.

Darío Andrés wrote:
[bugs.kde.org quoted mail]
Comment 6 Jay LaCroix 2008-07-30 00:18:36 UTC
This bug still occurs in the final version of KDE 4.1.
Comment 7 Aaron J. Seigo 2008-07-31 07:00:39 UTC
*** Bug 167802 has been marked as a duplicate of this bug. ***
Comment 8 Aaron J. Seigo 2008-07-31 07:06:10 UTC
this *really* sounds like file watching isn't working for you (for whatever reason).

this works well and reliably here, but it does rely on directory watches working.

try this:

* open a dolphin or a konqueror window
* navigate to a folder with a file that you can delete in it
* start the terminal view (or just open a konsole/xterm to the same directory)
* rm a file in the terminal
* see if the file view updates in dolphin/konqueror
Comment 9 Jay LaCroix 2008-07-31 07:31:12 UTC
It does update. In fact, if I open the trash in Dolphin and empty it, 
both Dolphin and the trash icon get updated.

This problem happens ONLY if I delete a file and then empty the trash 
from the trash icon context menu, then it still says there are things in 
the trash even when there are not.

Aaron J.Seigo wrote:
[bugs.kde.org quoted mail]
Comment 10 Harikawashi 2008-08-28 12:28:13 UTC
Mine does EXACTLY the same as Jeremy described.

(In reply to comment #9)
> It does update. In fact, if I open the trash in Dolphin and empty it, 
> both Dolphin and the trash icon get updated.
> 
> This problem happens ONLY if I delete a file and then empty the trash 
> from the trash icon context menu, then it still says there are things in 
> the trash even when there are not.
> 
> Aaron J.Seigo wrote:
> [bugs.kde.org quoted mail]
> 

Comment 11 Jay LaCroix 2008-09-03 02:18:00 UTC
Still a problem in KDE 4.1.1.
Comment 12 Fritz Heinrichmeyer 2008-09-03 15:19:24 UTC
same here with KDE 4.1.1 and 4.1: 

Emptying trash with context menu is not reflected in text and icon.

Going to trash and deleting files with dolphin updates trash icon and text.
Comment 13 Jay LaCroix 2008-09-05 23:30:03 UTC
They released an update today or yesterday in Ubuntu Intrepid and now this is working. If others that have subscribed to this no longer have this problem, I will close this bug. Perhaps this was a problem with the distribution? Can anyone that's using something other than Ubuntu confirm it's working?
Comment 14 Fritz Heinrichmeyer 2008-09-06 10:55:22 UTC
with libplasma 4:4.1.1-0ubuntu1~hardy1~ppa1 under Ubuntu 8.04.1 the situation has not changed
Comment 15 Harikawashi 2008-09-08 21:17:27 UTC
Agreed with Fritz, it's still a problem with 4.1.1 on Ubuntu 8.04
Comment 16 Aaron J. Seigo 2008-11-20 07:42:56 UTC

*** This bug has been marked as a duplicate of bug 168733 ***
Comment 17 George Kiagiadakis 2008-11-20 13:43:03 UTC
This bug is specific to debian and (k)ubuntu 8.04.

In debian, the reason is that they rename the "ktrash" executable to "ktrash4" to allow both kde3 and kde4 versions of ktrash in /usr/bin and the trash plasmoid calls this executable directly by the name "ktrash", which hits the kde3 version. The kde3 version then sends a signal over dcop to notify other processes about the change, but the trash applet expects this signal on dbus to update its label.

On the other hand, kubuntu's unofficial kde 4.1 packages do not include ktrash at all! So, if the trash plasmoid emties the trash successfully, it probably uses the kde3 version of ktrash to do it...

Ubuntu has fixed this in 8.10 (by not shiping kde3) and debian in recent releases of kde4 (by patching the applet to call ktrash4).

See also:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494427
https://bugs.launchpad.net/ubuntu/+bug/264525