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 390055 - do not show file size in toolbar for computer:///
do not show file size in toolbar for computer:///
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-27 16:43 UTC by Ed Catmur
Modified: 2007-07-01 21:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
omit-size-of-special-entries.patch (2.88 KB, patch)
2006-12-27 17:43 UTC, Ed Catmur
committed Details | Review

Description Ed Catmur 2006-12-27 16:43:58 UTC
Browse to computer:///.

Select any of the icons (removable drives, Filesystem, Network).  Look at the status bar.  Marvel at the stupidity of describing e.g. "Network" as 0 bytes.

gnome-vfs is not to blame; the dentries don't have GNOME_VFS_FILE_INFO_FIELDS_SIZE set.
Comment 1 Ed Catmur 2006-12-27 17:23:11 UTC
void
fm_directory_view_display_selection_info (FMDirectoryView *view)
{
...
	for (p = selection; p != NULL; p = p->next) {
		file = p->data;
		if (nautilus_file_is_directory (file)) {
			folder_count++;
			if (nautilus_file_get_directory_item_count (file, &file_item_count, NULL)) {
				folder_item_count += file_item_count;
			} else {
				folder_item_count_known = FALSE;
			}
		} else {
			non_folder_count++;
			non_folder_size += nautilus_file_get_size (file);
		}

and

GnomeVFSFileSize
nautilus_file_get_size (NautilusFile *file)
{
	/* Before we have info on the file, we don't know the size. */
	return nautilus_file_info_missing (file, GNOME_VFS_FILE_INFO_FIELDS_SIZE)
		? 0 : file->details->info->size;
}

This is lies.
Comment 2 Ed Catmur 2006-12-27 17:43:37 UTC
Created attachment 78952 [details] [review]
omit-size-of-special-entries.patch

Patch.

Logic: show file size info if at least one selected file has GNOME_VFS_FILE_INFO_FIELDS_SIZE set.

String changes, unfortunately.
Comment 3 Christian Kirbach 2006-12-27 22:28:50 UTC
true. we should not display the size at all, that is obsolete.
Comment 4 Christian Kirbach 2006-12-27 22:50:21 UTC
patch works for me
Comment 5 Christian Kirbach 2007-01-13 14:52:38 UTC
I've been using this patch for weeks without problems
Comment 6 Alexander Larsson 2007-02-26 15:07:57 UTC
Can't go in atm due to string freeze, but looks like a good idea.
Comment 7 Steve Tousignant 2007-05-02 02:58:28 UTC
Here is a bug peek to make remember that the string freeze is finished and this could now be applicable. 

Just to make you remember before it pass to much time before being applied.
Comment 8 Alexander Larsson 2007-05-09 08:34:16 UTC
Thanks for the reminder. Commited.