[gnome-packagekit] Don't use the deprecated g_format_size_for_display
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Don't use the deprecated g_format_size_for_display
- Date: Wed, 19 Oct 2011 07:56:27 +0000 (UTC)
commit 81fdcf304110175e11fb8b0d85d282b6585e257b
Author: Richard Hughes <richard hughsie com>
Date: Wed Oct 19 08:50:17 2011 +0100
Don't use the deprecated g_format_size_for_display
src/gpk-application.c | 2 +-
src/gpk-cell-renderer-size.c | 2 +-
src/gpk-dialog.c | 4 ++--
src/gpk-update-viewer.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index d43aeeb..25b634c 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -2327,7 +2327,7 @@ gpk_application_get_details_cb (PkClient *client, GAsyncResult *res, gpointer us
/* if non-zero, set the size */
if (size > 0) {
/* set the size */
- value = g_format_size_for_display (size);
+ value = g_format_size (size);
if (g_strcmp0 (split[PK_PACKAGE_ID_DATA], "meta") == 0)
/* TRANSLATORS: the size of the meta package */
gpk_application_add_detail_item (_("Size"), value, NULL);
diff --git a/src/gpk-cell-renderer-size.c b/src/gpk-cell-renderer-size.c
index 92fafdf..8891123 100644
--- a/src/gpk-cell-renderer-size.c
+++ b/src/gpk-cell-renderer-size.c
@@ -62,7 +62,7 @@ gpk_cell_renderer_size_set_property (GObject *object, guint param_id,
case PROP_VALUE:
cru->value = g_value_get_uint (value);
g_free (cru->markup);
- cru->markup = g_format_size_for_display (cru->value);
+ cru->markup = g_format_size (cru->value);
g_object_set (cru, "markup", cru->markup, NULL);
/* if the size is zero, we hide the markup */
diff --git a/src/gpk-dialog.c b/src/gpk-dialog.c
index 50064c6..fa7ada5 100644
--- a/src/gpk-dialog.c
+++ b/src/gpk-dialog.c
@@ -343,7 +343,7 @@ gpk_dialog_embed_download_size_widget (GtkDialog *dialog, const gchar *title, gu
}
/* add a hbox with the size for deps screen */
- size_str = g_format_size_for_display (size);
+ size_str = g_format_size (size);
text = g_strdup_printf ("%s: %s", title, size_str);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
widget = gtk_dialog_get_content_area (GTK_DIALOG(dialog));
@@ -454,7 +454,7 @@ gpk_dialog_tabbed_download_size_widget (GtkWidget *tab_page, const gchar *title,
}
/* add a hbox with the size for deps screen */
- size_str = g_format_size_for_display (size);
+ size_str = g_format_size (size);
text = g_strdup_printf ("%s: %s", title, size_str);
hbox = gtk_hbox_new (FALSE, 6);
gtk_container_add_with_properties (GTK_CONTAINER (tab_page), hbox,
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 74c5d1d..ce9f8e6 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1515,7 +1515,7 @@ gpk_update_viewer_reconsider_info (void)
gtk_label_set_label (GTK_LABEL(widget), text);
g_free (text);
} else {
- text_size = g_format_size_for_display (size_total);
+ text_size = g_format_size (size_total);
/* TRANSLATORS: how many updates are selected in the UI, and the size of packages to download */
text = g_strdup_printf (ngettext ("%i update selected (%s)",
"%i updates selected (%s)",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]