Moving to trash a file with a long name cause a oversized dialog

Bug #388445 reported by Germán Pabón
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Medium
One Hundred Papercuts
Fix Released
Undecided
Unassigned
nautilus (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

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.

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_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

Revision history for this message
Lorenzo (lorenzo-delledonne) wrote :

Thanks for the report.
I can confirm this bug both for the "nautilus" project and as a "paper cut".
I also attach an image reproducing the issue.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Changed in hundredpapercuts:
status: New → Confirmed
Revision history for this message
Lorenzo (lorenzo-delledonne) wrote :

whooops I should have set the delay, anyway I think the image is still quite clear.
This bug is easily reproducible.

Changed in hundredpapercuts:
milestone: none → round-9
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in nautilus (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

There you go.

Changed in nautilus:
importance: Undecided → Unknown
status: New → Unknown
Changed in nautilus:
status: Unknown → New
Changed in nautilus (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Marcus Carlson (0-launchpad-mejlamej-nu) wrote :

As I can see the function custom_basename_to_string () in nautilus-file-operations.c has to be changed but that will affect a lot of messages (probably to the better).
Unfortunately I'm not sure how to cut utf8 strings in a safe manner so I cannot do it.

Revision history for this message
A. Walton (awalton) wrote :

We have a function for that in Eel, but someone posted a bug about it not being 100% reliable on UTF-8 (I'm not exactly sure why this is, but I'm sure someone could come up with a test-case if they were trying and we could fixup that function). GtkLabel doesn't do us better either, since the way that we're specifying the string doesn't lend itself well to being truncated well by Pango.

An immediate answer would to be to go ahead and use eel_str_middle_truncate(), since there is no replacement for it.

Revision history for this message
Marcus Carlson (0-launchpad-mejlamej-nu) wrote :

Thanks A. Walton, that did the trick! Probably needs testing as it changes a lot of messages.

Revision history for this message
Marcus Carlson (0-launchpad-mejlamej-nu) wrote :
Revision history for this message
A. Walton (awalton) wrote :

Uploaded a tiny-bit different version on GNOME's bug tracker. Won't be around tomorrow but should probably get Cosimo to take a look at it and commit it if he's okay with introducing another consumer of the deprecated eel_str_middle_truncate() func. Otherwise ping me about it Saturday.

Revision history for this message
A. Walton (awalton) wrote :

Committed the fix upstream.

Changed in nautilus (Ubuntu):
status: Triaged → Fix Committed
Vish (vish)
Changed in hundredpapercuts:
status: Confirmed → Fix Committed
Changed in hundredpapercuts:
milestone: round-9 → round-8
Andrew (and471)
Changed in nautilus:
status: New → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the new version is in karmic now

Changed in nautilus (Ubuntu):
status: Fix Committed → Fix Released
Changed in hundredpapercuts:
status: Fix Committed → Fix Released
Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

I was just looking for a method to update the broken bugwatch.

Changed in nautilus:
importance: Unknown → Undecided
status: Fix Committed → New
importance: Undecided → Unknown
status: New → Unknown
Changed in nautilus:
status: Unknown → Fix Released
Changed in nautilus:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.