[gnome-software/wip/ubuntu-3-22: 9/25] Hide licence, updated and category fields if they aren't set
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-3-22: 9/25] Hide licence, updated and category fields if they aren't set
- Date: Thu, 24 Aug 2017 00:27:37 +0000 (UTC)
commit 272ae3ca6bd86b7056027ffcfa63c5ba0b28c9ec
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Mar 29 11:30:08 2016 +1300
Hide licence, updated and category fields if they aren't set
src/gs-shell-details.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 9ff5eec..3257244 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -103,6 +103,7 @@ struct _GsShellDetails
GtkWidget *label_details_size_installed_value;
GtkWidget *label_details_size_download_title;
GtkWidget *label_details_size_download_value;
+ GtkWidget *label_details_updated_title;
GtkWidget *label_details_updated_value;
GtkWidget *label_details_version_value;
GtkWidget *label_failed;
@@ -847,8 +848,8 @@ gs_shell_details_refresh_all (GsShellDetails *self)
updated = gs_app_get_install_date (self->app);
if (updated == GS_APP_INSTALL_DATE_UNKNOWN ||
updated == GS_APP_INSTALL_DATE_UNSET) {
- /* TRANSLATORS: this is where the updated date is not known */
- gtk_label_set_label (GTK_LABEL (self->label_details_updated_value), C_("updated", "Never"));
+ gtk_widget_set_visible (self->label_details_updated_title, FALSE);
+ gtk_widget_set_visible (self->label_details_updated_value, FALSE);
} else {
g_autoptr(GDateTime) dt = NULL;
g_autofree gchar *updated_str = NULL;
@@ -867,6 +868,8 @@ gs_shell_details_refresh_all (GsShellDetails *self)
gtk_label_set_markup (GTK_LABEL (self->label_details_updated_value), url->str);
g_string_free (url, TRUE);
}
+ gtk_widget_set_visible (self->label_details_updated_title, TRUE);
+ gtk_widget_set_visible (self->label_details_updated_value, TRUE);
}
/* set the category */
@@ -2023,6 +2026,7 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsShellDetails,
label_details_size_download_value);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails,
label_details_size_installed_title);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails,
label_details_size_installed_value);
+ gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_updated_title);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_updated_value);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_version_value);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_failed);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]