[gnome-software] Allow packages when opening URLs
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Allow packages when opening URLs
- Date: Mon, 6 Nov 2017 15:00:41 +0000 (UTC)
commit 2b19f2ab843b755c3a0f6af8e641c2fbf5635cc6
Author: Iain Lane <iain orangesquash org uk>
Date: Mon Oct 23 17:29:15 2017 +0100
Allow packages when opening URLs
There are apt://<any package name> web links in the wild that we should
keep working, even if the packages being linked to have no appdata.
lib/gs-plugin-loader.c | 4 ++++
src/gs-details-page.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 0bc9e37..daddf2c 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3078,6 +3078,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (object);
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
GsPluginRefineFlags filter_flags;
+ GsPluginRefineFlags refine_flags;
gboolean add_to_pending_array = FALSE;
/* these change the pending count on the installed panel */
@@ -3274,6 +3275,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
}
/* run refine() on each one again to pick up any icons */
+ refine_flags = gs_plugin_job_get_refine_flags (helper->plugin_job);
gs_plugin_job_set_refine_flags (helper->plugin_job,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON);
if (!gs_plugin_loader_run_refine (helper, list, cancellable, &error)) {
@@ -3281,6 +3283,8 @@ gs_plugin_loader_process_thread_cb (GTask *task,
g_task_return_error (task, error);
return;
}
+ /* restore the refine flags so that gs_app_list_filter sees the right thing */
+ gs_plugin_job_set_refine_flags (helper->plugin_job, refine_flags);
break;
default:
break;
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 78e4424..d13932b 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1673,7 +1673,8 @@ gs_details_page_set_url (GsDetailsPage *self, const gchar *url)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RELATED |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS |
- GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS |
+ GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES,
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]