GNOME Bugzilla – Bug 125571
Open Recent menu contains 'trash:'
Last modified: 2004-12-22 21:47:04 UTC
The summary pretty much says it all. 'Trash:' should not be in the 'Open Recent' menu.
Dennis: I suppose you opened the trash by clicking on the desktop. If so, I think it's Nautilus that adds the trash to the recent files. So the bug should be moved there, I suppose. Can you confirm this is what you did?
cc'ing James
Vincent: You are probably right. Though I don't see why it would do that.
Moving to nautilus. Dennis: can you reproduce the bug?
Unfortunately, I haven't been able to nail down this problem to a fixed set of steps. It is probably nautilus adding 'trash:' to the open recent list, but I can't verify it.
*** Bug 128928 has been marked as a duplicate of this bug. ***
Created attachment 22295 [details] [review] Proposed patch to fix this bug.
I just attached a proposed patch. Turns out that nautilus is not filtering out trash uris. Also, I added a filter for x-directory mime-types. This fixes things like samba shares from being added.
Created attachment 22338 [details] [review] Updated proposed patch.
Use nautilus_file_is_directory instead of the mime thing.
I am attaching a new proposed patch with the changes you recommended. Thanks.
Created attachment 22468 [details] [review] New proposed patch.
The g_free needs to go outside the if block, otherwise looks fine to commit (assuming you tested it and it worked).
Moving the g_free() outside the if statement is wrong. You'll cause a compile error, "fm-directory-view.c:5947: warning: `file_uri' might be used uninitialized in this function". The code has been tested and works, so I checked it in to CVS head. 2003-12-15 Dennis Cranston <dennis_cranston at yahoo com> * src/file-manager/fm-directory-view.c: Do not add trash and directory uris to the recent documents list. Fixes bug #125571.