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 619760 - Shorten filenames by removing the middle instead of truncating
Shorten filenames by removing the middle instead of truncating
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Views: List View
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-26 20:58 UTC by 9k5keb602
Modified: 2021-06-18 15:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Middle ellipsize with fts snippets (23.76 KB, image/png)
2017-12-20 23:52 UTC, António Fernandes
Details

Description 9k5keb602 2010-05-26 20:58:12 UTC
If you view long file names in Nautilus List View, it truncates by cutting off the end. But the vast majority of the time, if there are similar filenames, the part that differentiates them will either occur at the beginning or the end. If you cut off the end in this case, they will look identical and you will be forced to scroll or enlarge the text field to identify the one you want:

This is a file.txt
This is a long filename which is c...
This is a long filename which is c...
This is a long filename which is c...
This is a long filename which is c...
This is a short filename.jpg

A better way to shorten filenames is to cut out the middle and leave the ends:

This is a file.txt
This is a long f...is number 001.jpg
This is a long f...is number 002.jpg
This is a long f...is number 003.jpg
This is a long f...that it ends in.htm
This is a short filename.jpg

This should be the standard way to do it in Nautilus.

http://brainstorm.ubuntu.com/idea/15752/
Comment 1 António Fernandes 2017-12-20 19:09:16 UTC
This looks like a good idea and should be easy to do by setting "ellipsize" to PANGO_ELLIPSIZE_MIDDLE on the cell renderer.
Comment 2 António Fernandes 2017-12-20 23:52:09 UTC
Created attachment 365826 [details]
Middle ellipsize with fts snippets

After discussing it with AlexFazakas on IRC, we've figured out this wouldn't play well with full-text-search snippets, which share the cell with the filename, as can be seen in the attached screenshot.

Maybe we should wait for the new GtkListBox-based view to revisit this.
Comment 3 Tomáš Hnyk 2018-06-02 19:48:26 UTC
This is marked as done, or is not it here: https://wiki.gnome.org/Apps/Files/Roadmap so could this be revisited?
Comment 4 António Fernandes 2018-06-02 23:01:37 UTC
Hello. No, this is not done, you can see this bug's status is "NEW".

(The Roadmap needs to be updated to point to our new roadmap labels in the GitLab instance, indeed.)
Comment 5 Tomáš Hnyk 2018-06-03 07:36:37 UTC
I was referring to "new GtkListBox-based view" where "Port GtkPlacesSidebar to GtkListBox" is marked as done.
Comment 6 António Fernandes 2018-06-03 09:59:27 UTC
Ah, I understand now. No, that is unrelated. It was about the sidebar (the list of shortcuts to Home, Documents, etc.) It happened to use GtkListBox too.
Comment 7 André Klapper 2021-06-18 15:54:21 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.