[gnome-software/wip/iainl/ubuntu-xenial] Put snaps back in the same list as installed apps



commit 191495a2d22c4dd2586ec12463ace9a35fae6e04
Author: William Hua <william hua canonical com>
Date:   Mon Apr 18 09:00:01 2016 -0400

    Put snaps back in the same list as installed apps

 src/gs-plugin-loader.c         |    3 +--
 src/gs-shell-details.c         |    5 +++--
 src/plugins/gs-plugin-snappy.c |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index ce6af76..292fba8 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -469,8 +469,7 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
 
        /* don't show unconverted packages in the application view */
        if (((state->flags & GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES) == 0) &&
-           (gs_app_get_kind (app) == AS_APP_KIND_GENERIC) &&
-           (g_strcmp0 (gs_app_get_management_plugin (app), "snappy") != 0)) {
+           (gs_app_get_kind (app) == AS_APP_KIND_GENERIC)) {
 //             g_debug ("app invalid as only a %s: %s",
 //                      as_app_kind_to_string (gs_app_get_kind (app)),
 //                      gs_plugin_loader_get_app_str (app));
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index efcb193..0b027e0 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -259,8 +259,9 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
        case AS_APP_STATE_INSTALLED:
        case AS_APP_STATE_UPDATABLE:
        case AS_APP_STATE_UPDATABLE_LIVE:
-               if (gs_app_get_kind (self->app) == AS_APP_KIND_DESKTOP ||
-                   gs_app_get_kind (self->app) == AS_APP_KIND_WEB_APP) {
+               if ((gs_app_get_kind (self->app) == AS_APP_KIND_DESKTOP ||
+                    gs_app_get_kind (self->app) == AS_APP_KIND_WEB_APP) &&
+                    g_strcmp0 (gs_app_get_management_plugin (self->app), "snappy") != 0) {
                        gtk_widget_set_visible (self->button_details_launch, TRUE);
                } else {
                        gtk_widget_set_visible (self->button_details_launch, FALSE);
diff --git a/src/plugins/gs-plugin-snappy.c b/src/plugins/gs-plugin-snappy.c
index 97cf180..1ba8517 100644
--- a/src/plugins/gs-plugin-snappy.c
+++ b/src/plugins/gs-plugin-snappy.c
@@ -223,7 +223,7 @@ get_apps (GsPlugin *plugin, const gchar *sources, gchar **search_terms, GList **
                app = gs_app_new (id);
                gs_app_set_management_plugin (app, "snappy");
                gs_app_set_origin (app, _("Ubuntu Snappy Store"));
-               gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+               gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
                refine_app (plugin, app, package);
                gs_plugin_add_app (list, app);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]