[gnome-software] trivial: Only show the installed size when not zero
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Only show the installed size when not zero
- Date: Thu, 11 Aug 2016 08:29:54 +0000 (UTC)
commit 0953ec10e71c0dca81fc30284682cc8f29a9d495
Author: Richard Hughes <richard hughsie com>
Date: Thu Aug 11 09:08:23 2016 +0100
trivial: Only show the installed size when not zero
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 17fa1bc..db22ed6 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -810,15 +810,16 @@ gs_shell_details_refresh_all (GsShellDetails *self)
}
/* set the installed size */
- if (gs_app_get_size_installed (self->app) == GS_APP_SIZE_UNKNOWABLE) {
- gtk_widget_hide (self->label_details_size_installed_title);
- gtk_widget_hide (self->label_details_size_installed_value);
- } else {
+ if (gs_app_get_size_installed (self->app) != GS_APP_SIZE_UNKNOWABLE &&
+ gs_app_get_size_installed (self->app) != 0) {
g_autofree gchar *size = NULL;
size = g_format_size (gs_app_get_size_installed (self->app));
gtk_label_set_label (GTK_LABEL (self->label_details_size_installed_value), size);
gtk_widget_show (self->label_details_size_installed_title);
gtk_widget_show (self->label_details_size_installed_value);
+ } else {
+ gtk_widget_hide (self->label_details_size_installed_title);
+ gtk_widget_hide (self->label_details_size_installed_value);
}
/* set the download size */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]