[gnome-software] Add an unreviewable application quirk
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Add an unreviewable application quirk
- Date: Fri, 8 Apr 2016 14:00:09 +0000 (UTC)
commit 9d0856a4ef2f8600fcedd1ce83e6248b6ad0e083
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 d18df63..ab170fe 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -79,6 +79,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 3508e06..908cccf 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1042,6 +1042,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]