[gnome-software] Do not show application tags on the updates page
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show application tags on the updates page
- Date: Fri, 29 Jan 2016 14:03:49 +0000 (UTC)
commit f73d2a3a5c7db68b3172de4cf693a1017b06cb15
Author: Richard Hughes <richard hughsie com>
Date: Fri Jan 29 13:37:34 2016 +0000
Do not show application tags on the updates page
src/gs-app-row.c | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index ec89fb1..4dfb5eb 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -156,18 +156,26 @@ gs_app_row_refresh (GsAppRow *app_row)
}
/* add tags */
- gtk_widget_set_visible (priv->label_tag_webapp,
- gs_app_get_id_kind (priv->app) == AS_ID_KIND_WEB_APP);
- switch (gs_app_get_id_kind (priv->app)) {
- case AS_ID_KIND_WEB_APP:
- case AS_ID_KIND_UNKNOWN:
- break;
- default:
- gtk_widget_set_visible (priv->label_tag_nonfree,
- !gs_app_get_licence_is_free (priv->app));
- gtk_widget_set_visible (priv->label_tag_foreign,
- !gs_app_get_provenance (priv->app));
- break;
+ if (priv->show_update) {
+ gtk_widget_set_visible (priv->label_tag_webapp, FALSE);
+ gtk_widget_set_visible (priv->label_tag_nonfree, FALSE);
+ gtk_widget_set_visible (priv->label_tag_foreign, FALSE);
+ } else {
+ switch (gs_app_get_id_kind (priv->app)) {
+ case AS_ID_KIND_WEB_APP:
+ case AS_ID_KIND_UNKNOWN:
+ gtk_widget_set_visible (priv->label_tag_webapp, TRUE);
+ gtk_widget_set_visible (priv->label_tag_nonfree, FALSE);
+ gtk_widget_set_visible (priv->label_tag_foreign, FALSE);
+ break;
+ default:
+ gtk_widget_set_visible (priv->label_tag_webapp, FALSE);
+ gtk_widget_set_visible (priv->label_tag_nonfree,
+ !gs_app_get_licence_is_free (priv->app));
+ gtk_widget_set_visible (priv->label_tag_foreign,
+ !gs_app_get_provenance (priv->app));
+ break;
+ }
}
gtk_label_set_label (GTK_LABEL (priv->name_label),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]