After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 46200 - Trash properties window doesn't show size if viewed before others
Trash properties window doesn't show size if viewed before others
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Properties Dialog
2.16.x
Other All
: Normal minor
: ---
Assigned To: Federico Mena Quintero
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2001-01-31 16:53 UTC by John Sullivan
Modified: 2008-02-25 15:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
This solves it but probably not the ideal way. So comments appreciated (1.45 KB, patch)
2005-02-22 22:55 UTC, Jaap A. Haitsma
needs-work Details | Review
Proposed libnautilus-private/ patch (1.79 KB, patch)
2005-07-28 19:57 UTC, Christian Neumair
rejected Details | Review
Proposed prelimitary src/ patch (4.82 KB, patch)
2005-07-28 20:02 UTC, Christian Neumair
rejected Details | Review
Proposed patch (2.35 KB, patch)
2005-07-30 09:34 UTC, Christian Neumair
none Details | Review

Description John Sullivan 2001-09-10 00:57:12 UTC
To reproduce:

(1) Launch Nautilus
(2) Right-click trash icon on desktop and choose "Show Properties"

Note that by "Contents" it says "--"

If you insert (1.5) Right-click any normal folder and choose "Show Properties",
then step (2) works properly. I think the async machinery in NautilusDirectory
isn't getting kicked off properly in the trash case.



------- Additional Comments From don@eazel.com 2001-02-14 17:04:43 ----

Lowering to P5.




------- Additional Comments From darin@bentspoon.com 2001-02-27 10:50:55 ----

Lets reconsider how important it is to fix this minor bug.



------- Additional Comments From don@eazel.com 2001-02-27 15:03:58 ----

Hmmmm, does that mean you want to fix it for you don't want to fix it?




------- Additional Comments From darin@bentspoon.com 2001-02-27 15:13:17 ----

It means I'd like to not fix it.



------- Additional Comments From don@eazel.com 2001-02-27 15:36:37 ----

OK, off to 1.2 it goes.




------- Additional Comments From eli@eazel.com 2001-03-05 17:51:18 ----

Doh. I nearly just filed this. 

(Now, the Contents field is displayed as "...", rather than "--".)



------- Additional Comments From eli@eazel.com 2001-03-26 11:19:40 ----

SPAAAAAAAAAM! 

(Jon Allen has taken these components; QA Assigning bugs to him.)



------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:57 -------
Comment 1 John Fleck 2002-01-05 04:21:01 UTC
Changing to "old" target milestone for all bugs laying around with no milestone set.
Comment 2 John Fleck 2002-04-15 13:16:02 UTC
Moving to 1.1.x - Though this may be a different bug, the Trash now
*never* shows its size in the properties dialog. I'll leave priority
and severity to Louie - this is no huge deal.
Comment 3 Luis Villa 2002-04-15 13:37:44 UTC
Would be nice but yeah, not huge.
Comment 4 Manuel Clos 2002-07-19 11:06:06 UTC
I was tempted to fill this bug a lot of times.

Let's see how much space can I save emptying the trash... ops,
nautilus does not shows the size for the trash?? 

"..." <--- Does this mean working? How much must I wait before
realizing nautilus won't show the real size?

Please fix the bug or remove the "Contents" label for the trash
properties dialog, now it looks *broken* and confusing.
Comment 5 John Fleck 2003-04-20 16:15:13 UTC
This bug is still there in 2.2.3.1.
Comment 6 Manuel Clos 2003-08-02 14:53:21 UTC
bug still in 2.3.3
Comment 7 Jaap A. Haitsma 2005-02-16 23:23:27 UTC
Bug still present in 2.9.

I have to show the properties window of Trash and the Home icon on the desktop
twice before I get to see the size. Furthermore the for Trash it never shows the
Volume and the Free Space.

If I open ~/.Trash it shows the size right away. 

I've been trying to see what's but I don't understand it yet.

nautilus_trash_file is a subclass of nautilus_file. The method which needs to
get the file size is get_deep_counts.

What happens is that when you select Trash

1) nautilus_file_get_deep_counts first gets called by file pointing to "Trash"
2) nautilus_trash_file_get_deep_counts with file pointing to "Trash" 
3) nautilus_file_get_deep_counts get called with file pointing to ".Trash" 

This seems reasonable but somehow the total size and number of files do not get
returned.

If you select ~/.Trash what happens is that only nautilus_file_get_deep_counts
get called with file pointed to ".Trash". So only number 3 of the previous case
gets called but now it works.





Comment 8 Jaap A. Haitsma 2005-02-22 22:55:11 UTC
Created attachment 37802 [details] [review]
This solves it but probably not the ideal way. So comments appreciated

The problem why the Trash folder and the home folder didn't show size and free
space was because nautilus_file_recompute_deep_counts(file) was called with
file pointing to x-nautilus-desktop:///trash for the trash folder and
x-nautilus-desktop: for the home folder.

Changing original_files  to target_files solved the problem for the home dir. 

The trash dir still didn't work that's why I made a hack in
get_target_file_for_original_file so that i.s.o. trash: just ~/.Trash get's
passed into nautilus_file_recompute_deep_counts.

Don't know if nautilus_file_recompute_deep_counts is supposed to work if you
put the "trash:" URI in there. 

Sid effect of this patch is that location in the property window changes from
On the desktop to your home directory. Don't know if this is bad because if you
select a file in the trash it also says the location is in ~/.Trash
Comment 9 Luis Villa 2005-02-24 05:53:21 UTC
Jaap: don't know if you already did this or not, but the nautilus maintainers
mostly ignore patches in bugzilla- please email it to nautilus-list for their
review. Thanks...
Comment 10 Alexander Larsson 2005-02-24 09:17:55 UTC
I commited the original_files -> target_files part.
However, the trash fix isn't right. We need to figure out why
nautilus_file_recompute_deep_counts(file) doesn't work for trash://. It should work.
Comment 11 Jaap A. Haitsma 2005-02-24 10:58:35 UTC
OK, I don't mind having a go for it, but I would need some explanation what is
happening? Getting the file info is working asynchronously, but I haven't found
which call is actually getting the file info stuff. I've put break points on the
file_info calls in gnome_vfs but they don't get called.

Should nautilus handle the translation for trash: or is this part of gnome-vfs?
Comment 12 Christian Neumair 2005-07-27 16:26:38 UTC
Jaap: You're definitly doing the wrong thing here. "trash:" is not part of
GnomeVFS, it is just a virtual location which bundles various other directories
- inter alia ~/.Trash. From a quick look at FMPropertiesWindow, I'd say you'll
have to append all directories you get through
nautilus_trash_monitor_get_trash_directories to the list of target files if
nautilus_desktop_link_get_link_type returns NAUTILUS_DESKTOP_LINK_TRASH for the
encountered NautilusDesktopLink.
Comment 13 Jaap A. Haitsma 2005-07-28 18:35:49 UTC
Christian, I knew that I didn't have the right solution. Spent quite some time
on finding out why it didn't work and finally gave up on it :-(. Feel free to
come up with a patch yourself. You seem to be really good at it :-)
Please also post the patch here. So I can learn something
Comment 14 Christian Neumair 2005-07-28 19:57:51 UTC
Created attachment 49897 [details] [review]
Proposed libnautilus-private/ patch
Comment 15 Christian Neumair 2005-07-28 20:02:55 UTC
Created attachment 49898 [details] [review]
Proposed prelimitary src/ patch

OK, this is the interesting part. We replace the desktop link by its associated
URIs. This already works pretty well for the trash icon on desktop, but doesn't
work for the self properties (the background context menu properties item) of
trash:. We'd have to replace the "trash:" URIs in the property window
presentation function by the desktop link. It could be a simple as adding a
nautilus_file_get ("x-nautilus-desktop:///trash"), but it might be a bit more
tricky if it does additional voodoo in the background - for instance I'm not
sure whether x-nautilus-desktop:///trash exists if there is no trash on the
desktop. Maybe we'll have to create our custom trash link in that case or
something... .
Comment 16 Christian Neumair 2005-07-29 09:03:43 UTC
Bah, these patches just suck.
Comment 17 Christian Neumair 2005-07-30 09:34:13 UTC
Created attachment 49969 [details] [review]
Proposed patch

OK, I've sat down and tried to fix this issue with a sane approach. I think the
way we used to handle this was also broken for remote trash directories that
haven't been viewed before.
Comment 18 Christian Neumair 2005-09-08 11:53:48 UTC
Just FYI, [1] and [2] have discussion on this patch

[1] http://mail.gnome.org/archives/nautilus-list/2005-July/msg00330.html
[2] http://mail.gnome.org/archives/nautilus-list/2005-August/msg00009.html
Comment 19 Federico Mena Quintero 2005-09-08 19:33:30 UTC
I'll work on this.  See also the last comments in bug #171073.
Comment 20 Federico Mena Quintero 2006-05-02 15:49:32 UTC
Sorry, I totally dropped the ball on this.  Was this the problem of the trash window not updating its status bar when a volume gets unmounted?
Comment 21 Teppo Turtiainen 2007-01-20 11:27:24 UTC
Still occurs with Nautilus 2.16.1 on Ubuntu Edgy.
Comment 22 Luca Ferretti 2008-02-25 10:28:53 UTC
To me this seems fixed in Nautilus 2.21.x (GIO). Can someone confirm it?
Comment 23 Cosimo Cecchi 2008-02-25 15:47:26 UTC
Can't reproduce this either, closing as OBSOLETE. Please feel free to reopen the bug is this still happens with Nautilus >= 2.21.x, thanks!