[gnome-software/wip/kalev/codecs: 7/12] app row: Don't show ratings for local and missing apps



commit 34bfd070cc15cee42d99f5d5031cbbb8237cfaa5
Author: Kalev Lember <kalevlember gmail com>
Date:   Fri Feb 6 09:43:20 2015 +0100

    app row: Don't show ratings for local and missing apps

 src/gs-app-row.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index d93ca3c..815eedd 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -137,7 +137,11 @@ gs_app_row_refresh (GsAppRow *app_row)
                                     gs_app_get_update_version_ui (priv->app));
        } else {
                gtk_widget_hide (priv->version_label);
-               gtk_widget_show (priv->star);
+               if (gs_app_get_kind (priv->app) == GS_APP_KIND_MISSING ||
+                   (gs_app_get_state (priv->app) == AS_APP_STATE_AVAILABLE_LOCAL && gs_app_get_rating 
(priv->app) < 0))
+                       gtk_widget_hide (priv->star);
+               else
+                       gtk_widget_show (priv->star);
                gtk_widget_set_sensitive (priv->star, FALSE);
                if (gs_app_get_rating_kind (priv->app) == GS_APP_RATING_KIND_USER) {
                        gs_star_widget_set_rating (GS_STAR_WIDGET (priv->star),


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