[gnome-software/gnome-3-16] Add a new ALLOW_NO_APPDATA refine flag
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-16] Add a new ALLOW_NO_APPDATA refine flag
- Date: Mon, 11 May 2015 09:20:00 +0000 (UTC)
commit 244a121adbe9fd4c0341022c3d7d2aa745588c3f
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 a74e8c7..191dd53 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1636,7 +1636,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);
@@ -1803,7 +1804,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);
@@ -1970,7 +1972,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 248c3a9..64ef6ef 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]