[gnome-software/wip/rancell/ubuntu-3-20-rebase: 10/11] Add an unreviewable application quirk



commit 8aca086be2947b723f378bad6ccc738ba57f0849
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 8 14:16:22 2016 +0100

    Add an unreviewable application quirk
    
    This allows vendors to provide GsApps in plugins that cannot be reviewed for
    technical or legal reasons.

 src/gs-app.h           |    1 +
 src/gs-shell-details.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.h b/src/gs-app.h
index 1a0255a..5ce46e9 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -75,6 +75,7 @@ typedef enum {
 
 #if !AS_CHECK_VERSION(0,5,14)
 #define AS_APP_QUIRK_NEEDS_REBOOT              (1 << 4)
+#define AS_APP_QUIRK_NOT_REVIEWABLE            (1 << 5)
 #endif
 
 GQuark          gs_app_error_quark             (void);
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index af097c8..b27bbf0 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1031,6 +1031,10 @@ gs_shell_details_refresh_reviews (GsShellDetails *self)
                break;
        }
 
+       /* some apps are unreviewable */
+       if (gs_app_has_quirk (self->app, AS_APP_QUIRK_NOT_REVIEWABLE))
+               show_reviews = FALSE;
+
        /* set the star rating */
        if (show_reviews) {
                if (gs_app_get_rating (self->app) >= 0) {


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