nautilus/nautilus-replace-deprecated-function.patch
Vincent Untz a7531fe472 Accepting request 77397 from home:gary_lin:branches:GNOME:Factory
- Rebase nautilus-bnc363122-lockdown-context-menus.diff
- Add nautilus-replace-deprecated-function.patch to fix
  64bit-portability-issue from rpmlint

OBS-URL: https://build.opensuse.org/request/show/77397
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/nautilus?expand=0&rev=137
2011-08-03 09:36:20 +00:00

117 lines
4.4 KiB
Diff

commit 3e69fb702393cf42486321c88cede4668329b4c8
Author: Ryan Lortie <desrt@desrt.ca>
Date: Wed Jul 20 20:25:17 2011 +0200
all: switch to g_format_size()
g_format_size_for_display() has been deprecated in GLib and replaced with
g_format_size(). Follow that change.
https://bugzilla.gnome.org/show_bug.cgi?id=654995
diff --git a/configure.in b/configure.in
index 48f463c..7f17360 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ AC_PREREQ(2.54)
dnl ===========================================================================
-m4_define(glib_minver, 2.28.0)
+m4_define(glib_minver, 2.29.13)
m4_define(gnome_desktop_minver, 3.0.0)
m4_define(pango_minver, 1.28.3)
m4_define(gtk_minver, 3.1.6)
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 88223cf..8d73213 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -846,7 +846,7 @@ custom_size_to_string (char *format, va_list va)
goffset size;
size = va_arg (va, goffset);
- return g_format_size_for_display (size);
+ return g_format_size (size);
}
static void
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 55b7407..548f0c8 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -5811,7 +5811,7 @@ nautilus_file_get_size_as_string (NautilusFile *file)
if (file->details->size == -1) {
return NULL;
}
- return g_format_size_for_display (file->details->size);
+ return g_format_size (file->details->size);
}
/**
@@ -5852,7 +5852,7 @@ nautilus_file_get_size_as_string_with_real_size (NautilusFile *file)
return NULL;
}
- formated = g_format_size_for_display (file->details->size);
+ formated = g_format_size (file->details->size);
/* 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);
formated_plus_real = g_strdup_printf (_("%s (%s bytes)"), formated, real_size);
@@ -5918,7 +5918,7 @@ nautilus_file_get_deep_count_as_string_internal (NautilusFile *file,
* directly if desired.
*/
if (report_size) {
- return g_format_size_for_display (total_size);
+ return g_format_size (total_size);
}
return format_item_count_for_display (report_directory_count
@@ -6657,7 +6657,7 @@ nautilus_file_get_volume_free_space (NautilusFile *file)
res = NULL;
if (directory->details->free_space != (guint64)-1) {
- res = g_format_size_for_display (directory->details->free_space);
+ res = g_format_size (directory->details->free_space);
}
return res;
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 1e9d04e..3b0df9b 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -2155,7 +2155,7 @@ directory_contents_value_field_update (NautilusPropertiesWindow *window)
}
} else {
char *size_str;
- size_str = g_format_size_for_display (total_size);
+ size_str = g_format_size (total_size);
text = g_strdup_printf (ngettext("%'d item, with size %s",
"%'d items, totalling %s",
total_count),
@@ -2915,9 +2915,9 @@ create_pie_widget (NautilusPropertiesWindow *window)
GFile *location;
GFileInfo *info;
- capacity = g_format_size_for_display (window->details->volume_capacity);
- free = g_format_size_for_display (window->details->volume_free);
- used = g_format_size_for_display (window->details->volume_capacity - window->details->volume_free);
+ capacity = g_format_size (window->details->volume_capacity);
+ free = g_format_size (window->details->volume_free);
+ used = g_format_size (window->details->volume_capacity - window->details->volume_free);
file = get_original_file (window);
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index fbd482d..7712518 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2852,7 +2852,7 @@ nautilus_view_display_selection_info (NautilusView *view)
if (non_folder_size_known) {
char *size_string;
- size_string = g_format_size_for_display (non_folder_size);
+ size_string = g_format_size (non_folder_size);
/* This is marked for translation in case a localiser
* needs to use something other than parentheses. The
* first message gives the number of items selected;