[gnome-software] gs-app: Add a new hide-everywhere quirk



commit 386b9eb00e6e6da1788d1921b77ec91d113f7453
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Nov 29 12:10:58 2019 +0000

    gs-app: Add a new hide-everywhere quirk
    
    This is going to replace the `Blacklisted` category, and will have
    exactly the same semantics. The idea is that categories should follow
    the desktop menu spec
    (https://specifications.freedesktop.org/menu-spec/latest/apa.html), and
    `Blacklisted` is not on that spec.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    Helps: #696

 lib/gs-app.c | 2 ++
 lib/gs-app.h | 2 ++
 2 files changed, 4 insertions(+)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index fb946f2c..0cd683d6 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -248,6 +248,8 @@ _as_app_quirk_flag_to_string (GsAppQuirk quirk)
                return "parental-not-launchable";
        case GS_APP_QUIRK_HIDE_FROM_SEARCH:
                return "hide-from-search";
+       case GS_APP_QUIRK_HIDE_EVERYWHERE:
+               return "hide-everywhere";
        default:
                return NULL;
        }
diff --git a/lib/gs-app.h b/lib/gs-app.h
index 6a67dcd5..a014cd67 100644
--- a/lib/gs-app.h
+++ b/lib/gs-app.h
@@ -84,6 +84,7 @@ typedef enum {
  * @GS_APP_QUIRK_NEW_PERMISSIONS:      The update requires new permissions
  * @GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE:      The app cannot be run by the current user due to parental 
controls, and should not be launchable
  * @GS_APP_QUIRK_HIDE_FROM_SEARCH:     The app should not be shown in search results
+ * @GS_APP_QUIRK_HIDE_EVERYWHERE:      The app should not be shown anywhere (it’s blacklisted)
  *
  * The application attributes.
  **/
@@ -105,6 +106,7 @@ typedef enum {
        GS_APP_QUIRK_NEW_PERMISSIONS    = 1 << 13,      /* Since: 3.32 */
        GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE    = 1 << 14,      /* Since: 3.32 */
        GS_APP_QUIRK_HIDE_FROM_SEARCH   = 1 << 15,      /* Since: 3.32 */
+       GS_APP_QUIRK_HIDE_EVERYWHERE    = 1 << 16,      /* Since: 3.36 */
        /*< private >*/
        GS_APP_QUIRK_LAST
 } GsAppQuirk;


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