0.84: File index counts folders

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

0.84: File index counts folders

Post by helmut »

XnView: MP 0.84
OS: Windows 10 - 64bit

The file index displayed in fullscreen mode is wrong because it counts folders.

Effect: Wrong info displayed.

To reproduce:
1. Start XnView
2. In Tools » Settings | Browser » File list activate [x]Visible for "Parent folder ('..')" and [x] Visible for "Folders".
3. In View » Info "tab" make sure that in "Information displayed" there is the place holder "{File Index}" included.
2. Confirm your setting changes with "OK" button.
3. Browse a folder with several image files
4. Select the first image file
5. In context menu select "Fullscreen"
Actual behaviour: XnView opens fullscreen mode and displays the info. Both the current value and the maximum value of the file index are off by one.

Expected behaviour: File index should display "1 / <number of files>"

Note:
When first opening an image in the folder and then switching to Fullscreen, the file index is correct.
vertigo
Posts: 131
Joined: Wed Feb 15, 2017 3:49 pm

Re: 0.84: File index counts folders

Post by vertigo »

Reproduced. It is counting the parent directory link (".."), which is throwing off the count by at least one. It is also counting any actual folders in the current folder. While I definitely feel folders and ALL files should be counted in the status bar (bottom) in browser, fullscreen should only show the count of files that will be displayed (supported files, i.e. images and videos, if the option to show videos is enabled), which is what it appears to do in viewer, as should the status bar in viewer which, again, is what it appears to do. So the browser fullscreen count should be fixed to match the viewer fullscreen/status bar count.

Interestingly, when you do select all, the ".." link isn't selected, and the "object(s)" count in the status bar at the bottom doesn't count it. Even if you manually select it to include it, it doesn't count it. Nor does it count it as an object selected when you select it, by itself or with others. So the status bar count ignores it completely, but the fullscreen count does not.

Somewhat OT, but somewhat related, would be a feature request to make use of the ample status bar space and have it show # of supported files / # of files / # of folders / total # of objects, and which of these show and in which order could be configured by the user.

Also sort of a feature request, but very related to this, so I'll put it here: having total # of objects / # of objects selected followed by the word "selected" seems backwards to me. Instead of reading 200 object(s) / 3 object(s) selected (which at first made me think it was a bug), maybe have it say one of the following:

3 object(s) / 200 object(s) selected
3 object(s) selected / 200 objects(s)
3 / 200 object(s) selected

Furthermore, it seems to me it shouldn't be that difficult to have the code recognize if the number is =1 or /=1, and adjust whether it says object or objects accordingly:

If var = 1 Then Display var + "object"
Else Display var + "objects"
End If

Also, all the info in the status bar kind of runs together. It could use a bit more spacing and maybe colored separators to help break it up.

Somewhat OT, but what is the % at the end of the info in the status bar?

Anyways, found another bug when checking this one, so off to make that report...
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: File index counts folders

Post by helmut »

Thank you for reproducing and your long comment with suggestions, vertigo.

Could you please place your good suggestions in a new topic in "MP - Suggestions"? (Focus is on bugs but your suggestions shouldn't be forgotten).
vertigo
Posts: 131
Joined: Wed Feb 15, 2017 3:49 pm

Re: 0.84: File index counts folders

Post by vertigo »

Done. What is the % in the status bar an indication of? Doesn't make any sense to me.
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: File index counts folders

Post by helmut »

vertigo wrote:Done. What is the % in the status bar an indication of? Doesn't make any sense to me.
Thanks. Hmm, which % are you talking of? In the status bar there is a [ 50 % ] (=zoom factor). Sounds like something is truncated and not displayed right on your computer. Could you please post a screenshot?
vertigo
Posts: 131
Joined: Wed Feb 15, 2017 3:49 pm

Re: 0.84: File index counts folders

Post by vertigo »

Ah, it's the zoom level of the preview (browser). Makes sense now.
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: File index counts folders

Post by helmut »

vertigo wrote:Ah, it's the zoom level of the preview (browser). Makes sense now.
Good. Not a bug - this time. ;)
User avatar
xnview
Author of XnView
Posts: 43595
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.84: File index counts folders

Post by xnview »

I can't reproduce with 0.85
Pierre.
Post Reply