diff options
author | Richard Hughes <richard@hughsie.com> | 2016-08-23 14:43:14 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-08-23 14:50:50 +0100 |
commit | 72ccf9f3b2f45dcb75590f9eb8b4d2cdfbfd676d (patch) | |
tree | 8426f96482654f83a772694f5aafaaaddca3c299 /client | |
parent | 9b36119e1ed8ae7c2bec341143c343a9d73dcdd8 (diff) | |
download | appstream-glib-72ccf9f3b2f45dcb75590f9eb8b4d2cdfbfd676d.tar.gz |
trivial: Show the installed state in the appstream-util search output
Diffstat (limited to 'client')
-rw-r--r-- | client/as-util.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/client/as-util.c b/client/as-util.c index 8d51ad8..e60fc06 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -1253,9 +1253,18 @@ as_util_search (AsUtilPrivate *priv, gchar **values, GError **error) g_ptr_array_sort (array, as_util_sort_apps_by_sort_key_cb); for (i = 0; i < array->len; i++) { app = g_ptr_array_index (array, i); - g_print ("[%s] %s\n", - as_app_get_metadata_item (app, "SortKey"), - as_app_get_unique_id (app)); + switch (as_app_get_state (app)) { + case AS_APP_STATE_INSTALLED: + g_print ("[%s] %s (installed)\n", + as_app_get_metadata_item (app, "SortKey"), + as_app_get_unique_id (app)); + break; + default: + g_print ("[%s] %s\n", + as_app_get_metadata_item (app, "SortKey"), + as_app_get_unique_id (app)); + break; + } } /* dump XML */ |