GNOME Bugzilla – Bug 588641
nautilus should always show disk free space
Last modified: 2010-08-09 21:06:11 UTC
When I open a new Nautilus window, I can see in the status bar how much free space I have on that media. After, when i select something in that directory, the free space is changed with the space occupied by the selected file(s), and it is not restored until there's nothing selected. So I can't see togheter the free space on the device and the space occupied by the selected files, and i have to open another nautilus window or a terminal to see the free space. There is also another problem: if I use the "list" view this little bug is still worse, because in the list view there is no space to click to unselect all the items. I hope I can help thanks Other information: I first send this bug to One hundred paper cuts initiative on ubuntu's Launchpad, now they said me to write it here. This is my first bug report, I'm sorry if I can't be a lot useful
I could work on this but I would like some guidance from a nautilus maintainer of how the implementation should be done first. Should the "free space" area be a dedicated label (right or left) or just append ", Free space: 1 kb" to the end of the current status string?
Created attachment 140644 [details] [review] Adds "Free space: " to the end of the current status string If it is enough with just appending the current string with "Free space:" this patch would do it. Otherwise, tell me and I'll fix it.
Created attachment 140648 [details] Screenshot of selected objects and "Free space" shown in the statusbar
imho it's perfect!! thanks a lot! i hope i will learn how to maintain software, i would like to be useful in some way...
+ if (free_space_str) + g_free (free_space_str); g_free already checks for NULL, so the if is not necessary + status_string = g_strdup_printf (_("%s, %s"), + status_string = g_strdup_printf (_("%s%s, %s"), + etc These kinds of strings should not be translated.
Alex, about the strings that are marked for translation. Almost all the other ones with "," in the string are marked for translation in the current version - do you want me to remove those too or just remove mine? From the code: /* This is marked for translation in case a localizer * needs to change ", " to something else. The comma * is between the message about the number of folders * and the number of items in those folders and the * message about the number of other items and the * total size of those items. */
Oh, then make sure that comment is before each such item so that it gets into the pofile for translators to see.
Created attachment 164994 [details] [review] Updated patch according to alex comments and nautilus coding standard
Review of attachment 164994 [details] [review]: Looks good, except for the comment below. ::: src/file-manager/fm-directory-view.c @@ +2363,3 @@ + if (free_space_str) { + g_free (free_space_str); No need to check for != NULL, g_free() already does that for you.
Created attachment 167140 [details] [review] Adds "Free space: " to the end of the current status string (#588641) Updated patch against git master and no null check for strings before free.
Review of attachment 167140 [details] [review]: Looks good now, thanks.
Comment on attachment 167140 [details] [review] Adds "Free space: " to the end of the current status string (#588641) Pushed, closing as FIXED