Commit a8efaf1c authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Update for glib API change.

2007-12-19  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-file-operations.c:
        * libnautilus-private/nautilus-file.c:
        * src/file-manager/fm-directory-view.c:
        * src/file-manager/fm-properties-window.c:
	Update for glib API change.


svn path=/trunk/; revision=13536
parent e626e43d
2007-12-19 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file.c:
* src/file-manager/fm-directory-view.c:
* src/file-manager/fm-properties-window.c:
Update for glib API change.
2007-12-19 David Zeuthen <davidz@redhat.com> 2007-12-19 David Zeuthen <davidz@redhat.com>
Don't put up error dialogs if the error code is Don't put up error dialogs if the error code is
......
...@@ -644,7 +644,7 @@ custom_size_to_string (char *format, va_list va) ...@@ -644,7 +644,7 @@ custom_size_to_string (char *format, va_list va)
goffset size; goffset size;
size = va_arg (va, goffset); size = va_arg (va, goffset);
return g_format_file_size_for_display (size); return g_format_size_for_display (size);
} }
static void static void
......
...@@ -4849,7 +4849,7 @@ nautilus_file_get_size_as_string (NautilusFile *file) ...@@ -4849,7 +4849,7 @@ nautilus_file_get_size_as_string (NautilusFile *file)
if (file->details->size == -1) { if (file->details->size == -1) {
return NULL; return NULL;
} }
return g_format_file_size_for_display (file->details->size); return g_format_size_for_display (file->details->size);
} }
/** /**
...@@ -4890,7 +4890,7 @@ nautilus_file_get_size_as_string_with_real_size (NautilusFile *file) ...@@ -4890,7 +4890,7 @@ nautilus_file_get_size_as_string_with_real_size (NautilusFile *file)
return NULL; return NULL;
} }
formated = g_format_file_size_for_display (file->details->size); formated = g_format_size_for_display (file->details->size);
/* Do this in a separate stage so that we don't have to put G_GUINT64_FORMAT in the translated string */ /* Do this in a separate stage so that we don't have to put G_GUINT64_FORMAT in the translated string */
real_size = g_strdup_printf (_("%"G_GUINT64_FORMAT), (guint64) file->details->size); real_size = g_strdup_printf (_("%"G_GUINT64_FORMAT), (guint64) file->details->size);
formated_plus_real = g_strdup_printf (_("%s (%s bytes)"), formated, real_size); formated_plus_real = g_strdup_printf (_("%s (%s bytes)"), formated, real_size);
...@@ -4956,7 +4956,7 @@ nautilus_file_get_deep_count_as_string_internal (NautilusFile *file, ...@@ -4956,7 +4956,7 @@ nautilus_file_get_deep_count_as_string_internal (NautilusFile *file,
* directly if desired. * directly if desired.
*/ */
if (report_size) { if (report_size) {
return g_format_file_size_for_display (total_size); return g_format_size_for_display (total_size);
} }
return format_item_count_for_display (report_directory_count return format_item_count_for_display (report_directory_count
...@@ -5653,7 +5653,7 @@ nautilus_file_get_volume_free_space (NautilusFile *file) ...@@ -5653,7 +5653,7 @@ nautilus_file_get_volume_free_space (NautilusFile *file)
if (info) { if (info) {
if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_FS_FREE)) { if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_FS_FREE)) {
free_space = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_FS_FREE); free_space = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_FS_FREE);
res = g_format_file_size_for_display (free_space); res = g_format_size_for_display (free_space);
} }
g_object_unref (info); g_object_unref (info);
} }
......
...@@ -2085,7 +2085,7 @@ fm_directory_view_display_selection_info (FMDirectoryView *view) ...@@ -2085,7 +2085,7 @@ fm_directory_view_display_selection_info (FMDirectoryView *view)
if (non_folder_size_known) { if (non_folder_size_known) {
char *size_string; char *size_string;
size_string = g_format_file_size_for_display (non_folder_size); size_string = g_format_size_for_display (non_folder_size);
/* This is marked for translation in case a localiser /* This is marked for translation in case a localiser
* needs to use something other than parentheses. The * needs to use something other than parentheses. The
* first message gives the number of items selected; * first message gives the number of items selected;
......
...@@ -2287,7 +2287,7 @@ directory_contents_value_field_update (FMPropertiesWindow *window) ...@@ -2287,7 +2287,7 @@ directory_contents_value_field_update (FMPropertiesWindow *window)
} }
} else { } else {
char *size_str; char *size_str;
size_str = g_format_file_size_for_display (total_size); size_str = g_format_size_for_display (total_size);
text = g_strdup_printf (ngettext("%d item, with size %s", text = g_strdup_printf (ngettext("%d item, with size %s",
"%d items, totalling %s", "%d items, totalling %s",
total_count), total_count),
...@@ -2788,9 +2788,9 @@ create_pie_widget (FMPropertiesWindow *window) ...@@ -2788,9 +2788,9 @@ create_pie_widget (FMPropertiesWindow *window)
GFile *location; GFile *location;
GFileInfo *info; GFileInfo *info;
capacity = g_format_file_size_for_display (window->details->volume_capacity); capacity = g_format_size_for_display (window->details->volume_capacity);
free = g_format_file_size_for_display (window->details->volume_free); free = g_format_size_for_display (window->details->volume_free);
used = g_format_file_size_for_display (window->details->volume_capacity - window->details->volume_free); used = g_format_size_for_display (window->details->volume_capacity - window->details->volume_free);
file = get_original_file (window); file = get_original_file (window);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment