Filename not shown or truncated when changing attributes fails

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Filename not shown or truncated when changing attributes fails

Post by *funkymonk »

TC11.00rc1 x32 (and probably earlier)

When changing file attributes for files with long overall path+file names, the path is truncated and the file name might not be shown in the error dialog.
Here is an example:

https://ibb.co/1q6MzRT

This is particularly annoying when trying to change attributes of several files at once and the operation fails for just a few of them.

Suggestion:
Wouldn't it be better to move the path+file name from the window title bar to the the dialog text (with line breaks if too long)?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Filename not shown or truncated when changing attributes fails

Post by *ghisler(Author) »

Windows itself shortens the title bar if the text is too long.
Wouldn't it be better to move the path+file name from the window title bar to the the dialog text (with line breaks if too long)?
Where? I can't change the text of the error this late in the beta test...
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: Filename not shown or truncated when changing attributes fails

Post by *funkymonk »

ghisler(Author) wrote: 2023-07-13, 09:10 UTC Windows itself shortens the title bar if the text is too long.
Of course. What else should it do if the string is too long for the area in which it is shown.
Some truncation is certainly needed. It's just annoying that the file name itself cannot be seen.

Thus my suggestion:
ghisler(Author) wrote: 2023-07-13, 09:10 UTC
Wouldn't it be better to move the path+file name from the window title bar to the the dialog text (with line breaks if too long)?
Where? I can't change the text of the error this late in the beta test...
How about this:

https://ibb.co/WvjHhnp
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Filename not shown or truncated when changing attributes fails

Post by *ghisler(Author) »

OK, I can do that, although the summary shows the name(s) below the warning (but there is no option to continue then).

Btw, this specific warning is only for plugin attributes.
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: Filename not shown or truncated when changing attributes fails

Post by *funkymonk »

Thank you. This is very helpful. :D
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: Filename not shown or truncated when changing attributes fails

Post by *funkymonk »

TC11.00rc2 x32:

Code: Select all

14.07.23 Fixed: When there is an error changing attributes via a content plugin, shorten the name in the title and show it also in the main section of the dialog box (32/64)
Thank you. Looks good and is very helpful.

(BTW: I remember, just recently there was a (lengthy?) discussion about how to show file names in a dialog box. I cannot remember the details or find the thread. But maybe the solution for this thread can serve as an inspiration for the other one.)
Last edited by funkymonk on 2023-07-20, 19:11 UTC, edited 1 time in total.
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Filename not shown or truncated when changing attributes fails

Post by *AntonyD »

But maybe the solution for this thread can serve as an inspiration for the other one.)
Then, first, attach a screenshot of HOW this "fixed" window looks now)))
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Filename not shown or truncated when changing attributes fails

Post by *ghisler(Author) »

Moderator message

Move to fixed bugs
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: Filename not shown or truncated when changing attributes fails

Post by *funkymonk »

Not entirely fixed...

I have played around a bit more today and found some things that (imho) should be changed.
Here is an example:

https://ibb.co/x5RvZrg
  1. In the title bar, the path contains two "..." to reduce its length.
    The first one seems to replace one or more entire subdir names (this is ok);
    the second once seems to replace a part of the last dirname before the actual filename (looks strange).
    Is this intended?
    I think the last dirname before the actual filename should *not* be truncated but shown entirely (if the size of the dialog allows).
    Especially in this example there is plenty of space to show it...

  2. In the main section of the dialog, the line breaks happen primarily at space positions.
    This is reasonable for regular text, but for path+file names I would certainly give priority to backslashes or slashes since they separate dirnames and the filename from each other.
    (Spaces or other chars can still have second priority.)
    For improved readability, I suggest to not put a page break in the filename itself (better put it in a separate line).
@AntonyD Do you remember where the discussion about a similar issue with displaying path+filenames took place? As said, I cannot find it any more -- or I remember it wrong.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Filename not shown or truncated when changing attributes fails

Post by *ghisler(Author) »

1. This is intentional to give you most of the relevant path parts:
- highest priority: The file name
- second highest: The top level directory
- third highest: The parent directory

2. I'm using a message box there, and it does its own line breaks which I cannot influence. It's probably the same as DrawText when using multi-line mode.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Filename not shown or truncated when changing attributes fails

Post by *AntonyD »

2funkymonk
Do you remember where the discussion about a similar issue with displaying path+filenames took place? As said, I cannot find it any more -- or I remember it wrong.
You absolutely right I also remember that but also failed to find it still.... sorryy((((
#146217 personal license
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: Filename not shown or truncated when changing attributes fails

Post by *funkymonk »

ghisler(Author) wrote: 2023-07-21, 14:32 UTC 1. This is intentional to give you most of the relevant path parts:
- highest priority: The file name
- second highest: The top level directory
- third highest: The parent directory
Ok, sounds reasonable.
ghisler(Author) wrote: 2023-07-21, 14:32 UTC 2. I'm using a message box there, and it does its own line breaks which I cannot influence. It's probably the same as DrawText when using multi-line mode.
That's a pity. But ok.
Post Reply