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 85141 - Tree view shows misleading text in folder-only view
Tree view shows misleading text in folder-only view
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: [obsolete] Sidebar Panel: Tree
2.13.x
Other All
: Normal trivial
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 110125 142606 329853 517291 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-06-13 09:21 UTC by Andrew Sobala
Modified: 2012-07-20 12:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Apply to nautilus/components/tree/nautilus-tree-model.c to change the offending string. (114 bytes, patch)
2002-06-13 14:30 UTC, m.a.clarke
none Details | Review
Updated patch in diff -duHN format against nautilus/src/file-manager/fm-tree-model.c (711 bytes, patch)
2004-02-18 14:48 UTC, alexander.winston
needs-work Details | Review
Proposed patch. (1.12 KB, patch)
2004-07-24 11:42 UTC, Christian Neumair
reviewed Details | Review

Description Andrew Sobala 2002-06-13 09:21:08 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.
Comment 1 m.a.clarke 2002-06-13 14:30:24 UTC
Created attachment 9195 [details] [review]
Apply to nautilus/components/tree/nautilus-tree-model.c to change the offending string.
Comment 2 Luis Villa 2002-06-13 14:34:00 UTC
Adding keywords.
Comment 3 Andrew Sobala 2002-06-13 16:17:38 UTC
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?)
Comment 4 Luis Villa 2002-06-13 16:48:39 UTC
Yes. Also adding m.a.clarke to the cc: list so that he'll see our
comments :) 
Comment 5 Dave Bordoley [Not Reading Bug Mail] 2002-06-13 17:20:31 UTC
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.
Comment 6 m.a.clarke 2002-06-13 19:35:10 UTC
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...
Comment 7 Dave Bordoley [Not Reading Bug Mail] 2002-06-13 19:38:03 UTC
m.a.clark

there is no rush something like this can not be commited for a while
anyway... :) (string ui freeze)
Comment 8 m.a.clarke 2002-06-15 19:38:47 UTC
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?
Comment 9 Dave Bordoley [Not Reading Bug Mail] 2002-06-15 19:45:37 UTC
m.a. clarke, 

I recommend you email nautilus-list@gnome.org and ask for opinions there.
Comment 10 Murray Cumming 2003-07-28 15:19:58 UTC
The 2.3 string freeze will happen in 8 days, so someone might want to
look at this now.
Comment 11 Sebastien Bacher 2003-11-26 20:49:46 UTC
*** Bug 110125 has been marked as a duplicate of this bug. ***
Comment 12 alexander.winston 2004-02-18 14:48:04 UTC
Created attachment 24514 [details] [review]
Updated patch in diff -duHN format against nautilus/src/file-manager/fm-tree-model.c
Comment 13 Dave Camp 2004-04-12 19:21:38 UTC
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.
Comment 14 Martin Wehner 2004-05-16 22:29:43 UTC
*** Bug 142606 has been marked as a duplicate of this bug. ***
Comment 15 Christian Neumair 2004-07-24 11:42:41 UTC
Created attachment 29844 [details] [review]
Proposed patch.
Comment 16 Jens Lautenbacher 2004-07-25 20:27:30 UTC
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) 
Comment 17 Alexander Larsson 2004-08-12 08:21:58 UTC
manny: It needs to change the already existing strings when the pref is changed too.
Comment 18 Christian Neumair 2004-10-23 07:26:12 UTC
Alex: The tree is re-read when one changes the pref, so this shouldn't be an issue.
Comment 19 Kjartan Maraas 2005-01-03 15:50:41 UTC
Alex, comment on Christian's point here?
Comment 20 Christian Neumair 2005-01-03 16:12:22 UTC
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).
Comment 21 Martijn Vernooij 2005-01-12 09:16:12 UTC
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).
Comment 22 Kjartan Maraas 2005-02-09 23:07:23 UTC
Does this patch need more work before it's acceptable?
Comment 23 Christian Neumair 2005-05-21 14:23:44 UTC
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 24 Martin Wehner 2005-06-06 19:58:28 UTC
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>
Comment 25 Martin Wehner 2005-06-07 19:18:03 UTC
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.
Comment 26 Jens Lautenbacher 2005-06-24 11:17:10 UTC
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.
Comment 27 Christian Neumair 2005-07-30 12:35:33 UTC
Discussion will go on in bug 311945.
Comment 28 Christian Neumair 2006-02-04 08:06:48 UTC
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.
Comment 29 Christian Neumair 2006-02-04 10:44:49 UTC
*** Bug 329853 has been marked as a duplicate of this bug. ***
Comment 30 Christian Neumair 2008-03-16 21:54:32 UTC
*** Bug 517291 has been marked as a duplicate of this bug. ***
Comment 31 William Jon McCann 2012-07-20 12:03:56 UTC
This bug should no longer be present with the latest Nautilus redesign.