[gnome-software] Add a refresh flag for screenshots
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Add a refresh flag for screenshots
- Date: Tue, 13 Jun 2017 21:06:55 +0000 (UTC)
commit db5cc1317e5aca9cc151484d5827a4ed932bd4b7
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Jun 13 16:09:34 2017 +1200
Add a refresh flag for screenshots
lib/gs-plugin-types.h | 2 ++
lib/gs-plugin.c | 2 ++
src/gs-details-page.c | 9 ++++++---
3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index ad0e8dd..6e6a72f 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -146,6 +146,7 @@ typedef enum {
* @GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME: Require the origin hostname
* @GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_UI: Require the origin for UI
* @GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME: Require the runtime
+ * @GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS: Require screenshot information
*
* The refine flags.
**/
@@ -176,6 +177,7 @@ typedef enum {
#define GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME (1u << 23)
#define GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_UI (1u << 24)
#define GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME (1u << 25)
+#define GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS (1u << 26)
typedef guint64 GsPluginRefineFlags;
/**
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index f21faa5..bac9369 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1949,6 +1949,8 @@ gs_plugin_refine_flags_to_string (GsPluginRefineFlags refine_flags)
g_ptr_array_add (cstrs, "require-origin-ui");
if (refine_flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME)
g_ptr_array_add (cstrs, "require-runtime");
+ if (refine_flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS)
+ g_ptr_array_add (cstrs, "require-screenshots");
if (cstrs->len == 0)
return g_strdup ("none");
g_ptr_array_add (cstrs, NULL);
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 6879105..52f52d8 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1566,7 +1566,8 @@ gs_details_page_set_local_file (GsDetailsPage *self, GFile *file)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RELATED |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME |
- GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS |
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS,
NULL);
gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,
self->cancellable,
@@ -1594,7 +1595,8 @@ gs_details_page_set_url (GsDetailsPage *self, const gchar *url)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RELATED |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME |
- GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS |
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS,
NULL);
gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,
self->cancellable,
@@ -1622,7 +1624,8 @@ gs_details_page_load (GsDetailsPage *self)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME |
- GS_PLUGIN_REFINE_FLAGS_REQUIRE_ADDONS,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_ADDONS |
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS,
NULL);
gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,
self->cancellable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]