diff options
-rw-r--r-- | client/as-util.c | 1 | ||||
-rw-r--r-- | libappstream-glib/as-app.c | 6 | ||||
-rw-r--r-- | libappstream-glib/as-app.h | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c index aef892f..20ddb7b 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -1307,6 +1307,7 @@ as_util_search (AsUtilPrivate *priv, gchar **values, GError **error) AS_APP_SEARCH_MATCH_COMMENT | AS_APP_SEARCH_MATCH_NAME | AS_APP_SEARCH_MATCH_KEYWORD | + AS_APP_SEARCH_MATCH_ORIGIN | AS_APP_SEARCH_MATCH_ID); as_store_load_search_cache (store); diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index edd7419..67e0673 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -5545,6 +5545,12 @@ as_app_create_token_cache_target (AsApp *app, AsApp *donor) as_app_add_token (app, tmp, FALSE, AS_APP_SEARCH_MATCH_PKGNAME); } } + if (priv->search_match & AS_APP_SEARCH_MATCH_ORIGIN) { + if (priv->origin != NULL) { + as_app_add_token (app, priv->origin, TRUE, + AS_APP_SEARCH_MATCH_ORIGIN); + } + } } static void diff --git a/libappstream-glib/as-app.h b/libappstream-glib/as-app.h index 2f734c7..b66bc14 100644 --- a/libappstream-glib/as-app.h +++ b/libappstream-glib/as-app.h @@ -442,6 +442,7 @@ typedef enum { * @AS_APP_SEARCH_MATCH_NAME: Use the app name * @AS_APP_SEARCH_MATCH_KEYWORD: Use the app keyword * @AS_APP_SEARCH_MATCH_ID: Use the app application ID + * @AS_APP_SEARCH_MATCH_ORIGIN: Use the app origin * * The token match kind, which we want to be exactly 16 bits for storage * reasons. @@ -455,6 +456,7 @@ typedef enum __attribute__((__packed__)) { AS_APP_SEARCH_MATCH_NAME = 1 << 4, /* Since: 0.6.5 */ AS_APP_SEARCH_MATCH_KEYWORD = 1 << 5, /* Since: 0.6.5 */ AS_APP_SEARCH_MATCH_ID = 1 << 6, /* Since: 0.6.5 */ + AS_APP_SEARCH_MATCH_ORIGIN = 1 << 7, /* Since: 0.6.13 */ /*< private >*/ AS_APP_SEARCH_MATCH_LAST = 0xffff } AsAppSearchMatch; |