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 587316 - Deleting files with long names causes an oversized dialog
Deleting files with long names causes an oversized dialog
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.26.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 577458 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-29 15:50 UTC by Martin Mai
Modified: 2010-07-25 20:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
patch (1.51 KB, patch)
2009-08-14 01:31 UTC, A. Walton
none Details | Review

Description Martin Mai 2009-06-29 15:50:15 UTC
Please describe the problem:
Originally reported at https://bugs.edge.launchpad.net/hundredpapercuts/+bug/388445:

When a file with a very big name is created (example, a flv file from youtube downloaded by wget), and then trying to delete it, Nautilus shows a Dialog with the name of the file to be moved to trash and a "Cancel" | "Ok" bottom.

Now, the problem is that, with a very big file name, the dialog goes off screen. This makes that, for pressing the action bottoms in the dialog, you have to drag it several times until you reach the right end.


Example:
really_big_name_for_a_file_that_is_not_properly_managed_by_the_move_to_trash_option_of_nautilus_and_its_dialog_goes_offscreen_so_the_dialog_must_be_moved_to_reach_the_action_bottoms

It should be displayed in the Dialog as:
really_big_name_for_a_file_that(...)he_dialog_must_be_moved_to_reach_the_action_bottoms

Steps to reproduce:
1. Have a file with a very long name and without whitespaces
   Example:
really_big_name_for_a_file_that_is_not_properly_managed_by_the_move_to_trash_option_of_nautilus_and_its_dialog_goes_offscreen_so_the_dialog_must_be_moved_to_reach_the_action_bottoms

2. Now, for example, select it and press SHIFT + DEL



Actual results:
The dialog goes off screen.

Expected results:
The behavior must be that, if the filename is too long and the dialog goes off screen, then the string should be cut to a reasonable length and put a (...) in the middle.

Example:
really_big_name_for_a_file_that(...)he_dialog_must_be_moved_to_reach_the_action_bottoms

Does this happen every time?
Yes

Other information:
Screenshot of the problem: http://launchpadlibrarian.net/28076399/oversized-delete-dialog.png
Comment 1 A. Walton 2009-08-14 01:31:45 UTC
Created attachment 140734 [details] [review]
patch

Marcus did the lifting on this one, but here's a bit more polished version of his patch. We're still using eel_str_middle_truncate() but there's not an easy way around this still (despite Chpe's bug #410113; furthermore, looking at that function, it looks as if its UTF-8 issues may have been fixed).
Comment 2 A. Walton 2009-08-16 23:41:00 UTC
Patch pushed. Closing bug as FIXED.
Comment 3 Marcus Carlson 2010-07-25 20:35:47 UTC
*** Bug 577458 has been marked as a duplicate of this bug. ***