GNOME Bugzilla – Bug 85141
Tree view shows misleading text in folder-only view
Last modified: 2012-07-20 12:03:56 UTC
In the tree view, if you select the option "Show only files (no folders) in the tree" in preferences, then folders with no subfolders will expand and show the text "(Empty)". This is misleading - because the folder may contain files which just aren't shown in the tree. (ie. enable "show only files....." in preferences; mkdir ~/blobblob; touch ~/blobblob/thingy; browse to ~/blobblob in tree) You could use the text "(No subfolders)" for example; I would recommend _not_ doing it The Windows Way which is to make the expand-arrow disappear when you click on it when the system realises it cannot be expanded.
Created attachment 9195 [details] [review] Apply to nautilus/components/tree/nautilus-tree-model.c to change the offending string.
Adding keywords.
The string change, if committed, needs to only change the string when the "only show folders (no files)..." option is set. This patch changes the string in all cases, even when files _are_ being shown in the tree view. (note correction to the preference title - I got it wrong above, sorry) Removing PATCH keyword for this reason (I think that's the right thing to do, Louie?)
Yes. Also adding m.a.clarke to the cc: list so that he'll see our comments :)
For the record, I believe andersca already shot down doing the tree view the windows way, eg. no disclosure triangle when there is no subfolder in the folder (I believe he said it's hard to implement and the way we do it is the way the mac does it as well). That said, yeah we should probably fix the string to something more clear, like no folders.
I believe I've got it now (bear with me, I'm new =) ). I need to get gnome compiling from cvs to test it though...
m.a.clark there is no rush something like this can not be commited for a while anyway... :) (string ui freeze)
Now then... if the display is set to "Folders only", but the folder in question is truely empty, should it display (Empty)? Or, since it's folders only view, should I stick with (No subfolders) regardless?
m.a. clarke, I recommend you email nautilus-list@gnome.org and ask for opinions there.
The 2.3 string freeze will happen in 8 days, so someone might want to look at this now.
*** Bug 110125 has been marked as a duplicate of this bug. ***
Created attachment 24514 [details] [review] Updated patch in diff -duHN format against nautilus/src/file-manager/fm-tree-model.c
Comment on attachment 24514 [details] [review] Updated patch in diff -duHN format against nautilus/src/file-manager/fm-tree-model.c this patch still doesn't address the problem mentioned about No Subfolders being inappropriate when Only Show Folders is not selected.
*** Bug 142606 has been marked as a duplicate of this bug. ***
Created attachment 29844 [details] [review] Proposed patch.
I was just browsing for a bug about the "(Empty)" text but was very surprised to NOT find anyone who complains about the main problem I see -- namely showing the triangle at all in the "Only Folder Case/No Subfolder Present" or the "Show All/No File Nor Subfolder Present". I can't really see why to prohibit the triangle in these cases is "too hard" - I mean, basically every filemanager I know get's this right. For me it's a complete wrong UI to show a control (the triangle) that suggests that "there is something" only to see that actually nothings there (where the meaning of "nothing" obviously depends on the setting of the "show folders only" setting). Sorry if I sound offensive, but I just don't get it why this isn't the obvious solution for all (which it doesn't seems to be, as I am surely not the first to think about it)
manny: It needs to change the already existing strings when the pref is changed too.
Alex: The tree is re-read when one changes the pref, so this shouldn't be an issue.
Alex, comment on Christian's point here?
Jens: For finding out whether to show a triangle or not for a taken folder, we'd have to analyze each (at least one) item in the folder (for folder-only-view, the worst case would be that we have to check for all files in the folder whether they are directories, and none is) which could cause a big delay for huge directories with huge subdirectories (/usr).
That's a vfs problem actually. You do not have to stat() all the files to get to know if a file is a dir, you can see it in the struct you get from readdir() which you have to do anyway. The only problem is with symlinks, you'd have to special-case them. It's more of a problem on slow media en network files, obviously. Otherwise: [Blib] <~> time ls /usr/* > /dev/null real 0m0.328s user 0m0.050s sys 0m0.020s That's the first time, the next time it'll be like 0.06 secs real (on a P1 200).
Does this patch need more work before it's acceptable?
IMHO the patch should be committed and the bug renamed to "readdir() before deciding whether to show the expansion triangle or not". This is really another issue, although it is valid.
Comment on attachment 29844 [details] [review] Proposed patch. 2005-06-06 Martin Wehner <martin.wehner@gmail.com> * src/file-manager/fm-tree-model.c: (fm_tree_model_get_value): Use "(No subfolders)" instead of misleading "(Empty)" label if files are not to be shown in the tree. Fixes #85141. Patch from Christian Neumair <chris@gnome-de.org>
I backed out the change, as it didn't work out too well visually. The "(No Subfolders)" string is pretty wide and gets even wider in some locales, so it appears cropped most of the time. While I see the basic problem with the string, I agree with Alex that it looked pretty weird.
A little bit late, but better now than never: regarding comment #20 and the big delay: This could all be done asynchronously - it remains to be decided if the triangle should be shown initially and then removed when the check finishes, or if the triangles should be put in place afterward. I belive most filemanagers do it the second way. We could still special case when the user clicks on a folder and check this first before returning to the background task so there wouldn't be a problem for people wo try to go on without all the checks havin finished yet.
Discussion will go on in bug 311945.
Reopening. It turns out that the patch was reverted after being committed: 2005-06-06 Martin Wehner <martin.wehner@gmail.com> * src/file-manager/fm-tree-model.c: (fm_tree_model_get_value): Back out the "(Empty)" vs. "(No subfolders)" change. The string is too wide for the tree and gets even wider in some locales.
*** Bug 329853 has been marked as a duplicate of this bug. ***
*** Bug 517291 has been marked as a duplicate of this bug. ***
This bug should no longer be present with the latest Nautilus redesign.