[gnome-software] Use the UNAVAILABLE state for disabled flatpak remotes
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Use the UNAVAILABLE state for disabled flatpak remotes
- Date: Thu, 2 Jun 2016 17:59:28 +0000 (UTC)
commit dff2d95e903cb72dc7fae95a4be7c93817aa12c7
Author: Richard Hughes <richard hughsie com>
Date: Thu Jun 2 18:59:16 2016 +0100
Use the UNAVAILABLE state for disabled flatpak remotes
src/plugins/gs-flatpak.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index ee2089f..9c94076 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -869,9 +869,17 @@ gs_plugin_refine_item_state (GsPlugin *plugin,
gs_app_get_origin (app),
cancellable, NULL);
if (xremote != NULL) {
- g_debug ("marking %s as available with flatpak",
- gs_app_get_id (app));
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ if (flatpak_remote_get_disabled (xremote)) {
+ g_debug ("%s is available with flatpak "
+ "but %s is disabled",
+ gs_app_get_id (app),
+ flatpak_remote_get_name (xremote));
+ gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ } else {
+ g_debug ("marking %s as available with flatpak",
+ gs_app_get_id (app));
+ gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ }
} else {
g_warning ("failed to find flatpak user remote %s for %s",
gs_app_get_origin (app),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]