Bug 288596 - Maximum text length for filenames
Summary: Maximum text length for filenames
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: icons mode (show other bugs)
Version: 2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 292704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-09 20:28 UTC by Christian (Fuchs)
Modified: 2012-04-13 22:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Attachments
screenshot of the problem (81.16 KB, image/png)
2011-12-09 20:28 UTC, Christian (Fuchs)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2011-12-09 20:28:07 UTC
Created attachment 66563 [details]
screenshot of the problem

Version:           1.99 (using Devel) 
OS:                Linux

Hi, first of all thanks for the dolphin rewrite, it works great so far, and finally bug 189981 has been closed. Thanks a lot. 

However, one thing that I consider a regression: I know that there was a feature request to not cut off the file names. This has been addressed, since they are no longer cut off. 

In the traditional icon view, however, this looks horrible as soon as there are files with really long file names (yes, people should not do that in the first place). And the setting of the text lenght (which works since yesterday) now only changes the text width. 

Would it be possible to add an option to the new view engine so that the name is cut off after a given amount of lines? This way the vertical gap would not be huge as soon as there is one item in the line with a long filename. 

By having this configurable, I think both groups would be happy: those who actually want to read huge filenames, and those who don't. 

Thanks in advance, keep up the good work. 

Reproducible: Always

Steps to Reproduce:
Rename one file in a folder to have a huge filename. 

Actual Results:  
The vertical gap between two lines is huge due to this file. 

Expected Results:  
Really long filenames can be cut off, similar to as it was in dolphin 1
Comment 1 Peter Penz 2011-12-09 20:42:22 UTC
Thanks for the suggestion! For the 4.8 release it is too late already for an option as the string freeze is already in place quite some time. Would it be possible that you attach a screenshot of a view which looks horrible from your point of view? This would be helpful to get some "real world" usecases that I might not have been faced yet...

I'm open for an option here if it turns out that more people have a similar kind of problem.

> Hi, first of all thanks for the dolphin rewrite, it
> works great so far, and finally bug 189981 has been closed. Thanks a lot. 

Great to hear that you like it so far (although it still has a lot of rough edges at the moment). Thanks!
Comment 2 Peter Penz 2011-12-09 20:42:52 UTC
Ah, I did not recognize the screenshot that you have already attached - please ignore my previous request ;-)
Comment 3 Christian (Fuchs) 2011-12-09 20:53:04 UTC
Good evening Peter, 

the main problem (which is not visible in the screenshot) is if there is a directory with, say, 500 files, and 50 of them have long filenames, 20 really long filenames and 2 have a absurdly long filename. (Example: the folder with my background images). This is unfortunately hard to show in a screenshot, you have to see it live. 

Scrolling through them is kind of a pain, since the vertical distance between the lines varies a lot. 

Since I can build individual packages out of git and/or easily build them with patches, having to wait until after 4.8 is not really an issue.

If you decide to implement it, I'll be glad to test it for you and give feedback :) 

Kind regards
Comment 4 Peter Penz 2012-01-28 18:55:09 UTC
*** Bug 292704 has been marked as a duplicate of this bug. ***
Comment 5 Janet 2012-01-29 01:16:22 UTC
I suffer from the same problem. It is not only that dolphin now wastes a lot of space in all view modes and that it makes it harder to find files at one glance and to have an overview. It also makes it hard in icon view to find specific additional information like the file size or date because tha information now is not aligned in one row but directly under the end of the file name and that position varies because of the file name length. You cannot quickly glance at a bunch of files to optically grab and compare the information, your view has to go up down up down.

Either there should be an option to cut file names after a certain number of characters or to optionally use a maximum of text lines. The latter would be great for the icon view mode (as it was). But as this problem also exists in the other view modes (compact and details) where the text is alongside the icons that would not help. In details mode it would help when dolphin would remember the column with the user sets (Bug 264434), that cuts the file name too. And in compact mode I can only think of limiting the number of shown characters optionally.
Comment 6 Mark 2012-01-29 02:14:58 UTC
(In reply to comment #5)
> I suffer from the same problem. It is not only that dolphin now wastes a lot of
> space in all view modes and that it makes it harder to find files at one glance
> and to have an overview. It also makes it hard in icon view to find specific
> additional information like the file size or date because tha information now
> is not aligned in one row but directly under the end of the file name and that
> position varies because of the file name length. You cannot quickly glance at a
> bunch of files to optically grab and compare the information, your view has to
> go up down up down.
> 
> Either there should be an option to cut file names after a certain number of
> characters or to optionally use a maximum of text lines. The latter would be
> great for the icon view mode (as it was). But as this problem also exists in
> the other view modes (compact and details) where the text is alongside the
> icons that would not help. In details mode it would help when dolphin would
> remember the column with the user sets (Bug 264434), that cuts the file name
> too. And in compact mode I can only think of limiting the number of shown
> characters optionally.

I personally just don't understand how people can even use file explorers where the filenames are not truncated to normal length names. The way it's now with dolphin is how it was (or even is?) with nautilus (gnome's file manager) and i absolutely hated that. Sure, works fine with the shorter filenames but sometimes the names need to be long and those are the ones that really screw up the view.

I'm heavily in favor of having filename truncation back in dolphin, set at 2 lines and enabled by default. Just as it was with the previous dolphin version.

I intact tried to make a patch to get it back in. I'm sure it's easy for Peter to do, and i did get "something" working although it also made the file icons change in seemingly random sizes :s So i rather leave it to "mr dolphin ;)" to patch this back in.

Note: If you want this (back) in, you can vote for this bug.
Comment 7 Peter Penz 2012-04-13 22:28:50 UTC
Git commit 9541f9ee09562d309529a10b48460c62107b03a4 by Peter Penz.
Committed on 14/04/2012 at 00:22.
Pushed by ppenz into branch 'master'.

Allow to optionally limit the maximum number of text lines

Showing the whole filename unclipped seems to be a good default,
however for users with a lot of files that have extremely long names
this might get a problem especially in the icons-view.

- Allow to limit the maximum number of lines in the icons-view
- Allow to specify a maximum width in the compact-view

(No limit is required for the details-view, as the name is shortened
automatically to show other columns)
FIXED-IN: 4.9.0

M  +38   -9    dolphin/src/kitemviews/kfileitemlistwidget.cpp
M  +4    -2    dolphin/src/kitemviews/kitemliststyleoption.cpp
M  +1    -0    dolphin/src/kitemviews/kitemliststyleoption.h
M  +17   -10   dolphin/src/kitemviews/kitemlistview.cpp
M  +4    -0    dolphin/src/settings/dolphin_compactmodesettings.kcfg
M  +4    -0    dolphin/src/settings/dolphin_iconsmodesettings.kcfg
M  +49   -13   dolphin/src/settings/viewmodes/viewsettingstab.cpp
M  +2    -1    dolphin/src/settings/viewmodes/viewsettingstab.h
M  +21   -3    dolphin/src/views/dolphinitemlistcontainer.cpp

http://commits.kde.org/kde-baseapps/9541f9ee09562d309529a10b48460c62107b03a4