[gnome-software/wip/kalev/session-api-regular-packages: 3/5] Add a new ALLOW_NO_APPDATA refine flag
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/session-api-regular-packages: 3/5] Add a new ALLOW_NO_APPDATA refine flag
- Date: Sun, 10 May 2015 18:23:06 +0000 (UTC)
commit 2bd0dd5522ecccb9485d010901f92705af2718f8
Author: Kalev Lember <kalevlember gmail com>
Date: Sun May 10 20:04:33 2015 +0200
Add a new ALLOW_NO_APPDATA refine flag
This makes it possible for some of the UI to show packages without
appdata if it sets the refine flag.
src/gs-plugin-loader.c | 9 ++++++---
src/gs-plugin.h | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index c3ef950..663c369 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1497,7 +1497,8 @@ gs_plugin_loader_search_thread_cb (GTask *task,
gs_plugin_list_filter (&state->list, gs_plugin_loader_app_is_valid, state);
gs_plugin_list_filter (&state->list, gs_plugin_loader_filter_qt_for_gtk, NULL);
gs_plugin_list_filter (&state->list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
- if (g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
+ if (((state->flags & GS_PLUGIN_REFINE_FLAGS_ALLOW_NO_APPDATA) == 0) &&
+ g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
gs_plugin_list_filter (&state->list,
gs_plugin_loader_get_app_has_appdata,
plugin_loader);
@@ -1664,7 +1665,8 @@ gs_plugin_loader_search_files_thread_cb (GTask *task,
gs_plugin_list_filter (&state->list, gs_plugin_loader_app_is_non_installed, NULL);
gs_plugin_list_filter (&state->list, gs_plugin_loader_filter_qt_for_gtk, NULL);
gs_plugin_list_filter (&state->list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
- if (g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
+ if (((state->flags & GS_PLUGIN_REFINE_FLAGS_ALLOW_NO_APPDATA) == 0) &&
+ g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
gs_plugin_list_filter (&state->list,
gs_plugin_loader_get_app_has_appdata,
plugin_loader);
@@ -1831,7 +1833,8 @@ gs_plugin_loader_search_what_provides_thread_cb (GTask *task,
gs_plugin_list_filter (&state->list, gs_plugin_loader_app_is_non_installed, NULL);
gs_plugin_list_filter (&state->list, gs_plugin_loader_filter_qt_for_gtk, NULL);
gs_plugin_list_filter (&state->list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
- if (g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
+ if (((state->flags & GS_PLUGIN_REFINE_FLAGS_ALLOW_NO_APPDATA) == 0) &&
+ g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
gs_plugin_list_filter (&state->list,
gs_plugin_loader_get_app_has_appdata,
plugin_loader);
diff --git a/src/gs-plugin.h b/src/gs-plugin.h
index 3b89639..0269619 100644
--- a/src/gs-plugin.h
+++ b/src/gs-plugin.h
@@ -98,6 +98,7 @@ typedef enum {
GS_PLUGIN_REFINE_FLAGS_REQUIRE_MENU_PATH = 1 << 12,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ADDONS = 1 << 13,
GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES = 1 << 14,
+ GS_PLUGIN_REFINE_FLAGS_ALLOW_NO_APPDATA = 1 << 15,
GS_PLUGIN_REFINE_FLAGS_LAST
} GsPluginRefineFlags;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]