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 588641 - nautilus should always show disk free space
nautilus should always show disk free space
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.26.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-15 11:42 UTC by Giovanni
Modified: 2010-08-09 21:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Adds "Free space: " to the end of the current status string (3.80 KB, patch)
2009-08-13 11:30 UTC, Marcus Carlson
needs-work Details | Review
Screenshot of selected objects and "Free space" shown in the statusbar (86.24 KB, image/png)
2009-08-13 11:44 UTC, Marcus Carlson
  Details
Updated patch according to alex comments and nautilus coding standard (5.24 KB, patch)
2010-06-30 20:27 UTC, Marcus Carlson
reviewed Details | Review
Adds "Free space: " to the end of the current status string (#588641) (5.16 KB, patch)
2010-08-04 19:28 UTC, Marcus Carlson
committed Details | Review

Description Giovanni 2009-07-15 11:42:51 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
Comment 1 Marcus Carlson 2009-08-13 10:52:14 UTC
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?
Comment 2 Marcus Carlson 2009-08-13 11:30:25 UTC
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.
Comment 3 Marcus Carlson 2009-08-13 11:44:53 UTC
Created attachment 140648 [details]
Screenshot of selected objects and "Free space" shown in the statusbar
Comment 4 Giovanni 2009-08-13 13:01:22 UTC
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...
Comment 5 Alexander Larsson 2009-10-06 12:39:07 UTC
+	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.
Comment 6 Marcus Carlson 2009-10-10 21:35:54 UTC
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.
 */
Comment 7 Alexander Larsson 2010-06-28 13:41:32 UTC
Oh, then make sure that comment is before each such item so that it gets into the pofile for translators to see.
Comment 8 Marcus Carlson 2010-06-30 20:27:47 UTC
Created attachment 164994 [details] [review]
Updated patch according to alex comments and nautilus coding standard
Comment 9 Cosimo Cecchi 2010-08-04 13:31:44 UTC
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.
Comment 10 Marcus Carlson 2010-08-04 19:28:13 UTC
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.
Comment 11 Cosimo Cecchi 2010-08-09 09:10:54 UTC
Review of attachment 167140 [details] [review]:

Looks good now, thanks.
Comment 12 Marcus Carlson 2010-08-09 21:06:03 UTC
Comment on attachment 167140 [details] [review]
Adds "Free space: " to the end of the current status string (#588641)

Pushed, closing as FIXED