[gnome-software] snap: Use wide scope when searching
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Use wide scope when searching
- Date: Tue, 4 Dec 2018 20:47:04 +0000 (UTC)
commit 670cc9c43be7e2ee1429cd489dc1cc6c988ef636
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Aug 7 16:49:35 2018 +1200
snap: Use wide scope when searching
Wide scope searches for all available versions of snaps, not just stable
versions. This is the intended use for clients, but needs a code change
so not to break backwards compatibility.
plugins/snap/gs-plugin-snap.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 15d80924..85b616a4 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -348,7 +348,7 @@ gs_plugin_url_to_app (GsPlugin *plugin,
/* create app */
path = gs_utils_get_url_path (url);
- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL);
+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path,
cancellable, NULL);
if (snaps == NULL || snaps->len < 1)
return TRUE;
@@ -405,7 +405,7 @@ gs_plugin_add_featured (GsPlugin *plugin,
g_autoptr(GString) background_css = NULL;
g_autofree gchar *css = NULL;
- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error);
if (snaps == NULL)
return FALSE;
@@ -472,7 +472,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
g_autoptr(GPtrArray) snaps = NULL;
guint i;
- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error);
if (snaps == NULL)
return FALSE;
@@ -527,7 +527,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
g_autoptr(GPtrArray) snaps = NULL;
guint j;
- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, tokens[i], NULL, cancellable,
error);
+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, tokens[i], NULL,
cancellable, error);
if (snaps == NULL)
return FALSE;
for (j = 0; j < snaps->len; j++) {
@@ -582,7 +582,7 @@ gs_plugin_add_search (GsPlugin *plugin,
guint i;
query = g_strjoinv (" ", values);
- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, NULL, query, cancellable, error);
+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, NULL, query, cancellable, error);
if (snaps == NULL)
return FALSE;
@@ -605,7 +605,7 @@ get_store_snap (GsPlugin *plugin, const gchar *name, GCancellable *cancellable,
if (snap != NULL)
return g_object_ref (snap);
- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error);
+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name,
cancellable, error);
if (snaps == NULL || snaps->len < 1)
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]