GNOME Bugzilla – Bug 587316
Deleting files with long names causes an oversized dialog
Last modified: 2010-07-25 20:35:47 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
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).
Patch pushed. Closing bug as FIXED.
*** Bug 577458 has been marked as a duplicate of this bug. ***