[gnome-software] trivial: Only show the download size when not already installed



commit 0e9b789b3485a66ab96905eadb871336f50ba030
Author: Richard Hughes <richard hughsie com>
Date:   Thu Aug 11 09:08:51 2016 +0100

    trivial: Only show the download size when not already installed

 src/gs-shell-details.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index db22ed6..a489945 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -823,15 +823,16 @@ gs_shell_details_refresh_all (GsShellDetails *self)
        }
 
        /* set the download size */
-       if (gs_app_get_size_download (self->app) == GS_APP_SIZE_UNKNOWABLE) {
-               gtk_widget_hide (self->label_details_size_download_title);
-               gtk_widget_hide (self->label_details_size_download_value);
-       } else {
+       if (!gs_app_is_installed (self->app) &&
+           gs_app_get_size_download (self->app) != GS_APP_SIZE_UNKNOWABLE) {
                g_autofree gchar *size = NULL;
                size = g_format_size (gs_app_get_size_download (self->app));
                gtk_label_set_label (GTK_LABEL (self->label_details_size_download_value), size);
                gtk_widget_show (self->label_details_size_download_title);
                gtk_widget_show (self->label_details_size_download_value);
+       } else {
+               gtk_widget_hide (self->label_details_size_download_title);
+               gtk_widget_hide (self->label_details_size_download_value);
        }
 
        /* set the updated date */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]