[gnome-packagekit/glib2-merge-candidate: 9/11] Don't show 4Gb as the file size when we actually get -1, meaning percentage unknown
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/glib2-merge-candidate: 9/11] Don't show 4Gb as the file size when we actually get -1, meaning percentage unknown
- Date: Tue, 6 Oct 2009 14:10:50 +0000 (UTC)
commit 67263a4f1182fd5ee94e3ebbce194acf035d58c2
Author: Richard Hughes <richard hughsie com>
Date: Tue Oct 6 13:40:57 2009 +0100
Don't show 4Gb as the file size when we actually get -1, meaning percentage unknown
src/gpk-update-viewer.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 3c0a5fb..1ecbbab 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -828,13 +828,13 @@ gpk_update_viewer_progress_cb (PkProgress *progress, PkProgressType type, GMainL
else
gpk_update_viewer_add_active_row (model, path);
}
-
- size_display = size - ((size * subpercentage) / 100);
- gtk_list_store_set (array_store_updates, &iter,
- GPK_UPDATES_COLUMN_PERCENTAGE, subpercentage,
- GPK_UPDATES_COLUMN_SIZE_DISPLAY, size_display,
- -1);
-
+ if (subpercentage > 0) {
+ size_display = size - ((size * subpercentage) / 100);
+ gtk_list_store_set (array_store_updates, &iter,
+ GPK_UPDATES_COLUMN_PERCENTAGE, subpercentage,
+ GPK_UPDATES_COLUMN_SIZE_DISPLAY, size_display,
+ -1);
+ }
gtk_tree_path_free (path);
} else if (type == PK_PROGRESS_TYPE_ALLOW_CANCEL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]