[gnome-software] Show system application in the search results



commit 83873d3304ffcada1bc0cd145a7cc95f3735884a
Author: Richard Hughes <richard hughsie com>
Date:   Thu Sep 19 11:31:15 2013 +0100

    Show system application in the search results
    
    ...but never show a 'Remove' button in this case.

 src/gs-app-widget.c    |    6 +++---
 src/gs-plugin-loader.c |    1 -
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-app-widget.c b/src/gs-app-widget.c
index 33321f5..cc2d12e 100644
--- a/src/gs-app-widget.c
+++ b/src/gs-app-widget.c
@@ -94,7 +94,7 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
        if (gs_app_get_pixbuf (priv->app))
                gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image),
                                           gs_app_get_pixbuf (priv->app));
-       gtk_widget_set_visible (priv->button, TRUE);
+       gtk_widget_set_visible (priv->button, FALSE);
        gtk_widget_set_sensitive (priv->button, TRUE);
 
        context = gtk_widget_get_style_context (priv->button);
@@ -110,7 +110,8 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
                break;
        case GS_APP_STATE_INSTALLED:
                gtk_widget_set_visible (priv->spinner, FALSE);
-               gtk_widget_set_visible (priv->button, TRUE);
+               if (gs_app_get_kind (app_widget->priv->app) != GS_APP_KIND_SYSTEM)
+                       gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * allows the application to be easily removed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
@@ -143,7 +144,6 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Removing"));
                break;
        default:
-               gtk_widget_set_visible (priv->button, FALSE);
                break;
        }
        gtk_widget_set_visible (priv->button_box, gtk_widget_get_visible (priv->spinner) ||
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index d97951c..694dbab 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1055,7 +1055,6 @@ cd_plugin_loader_search_thread_cb (GSimpleAsyncResult *res,
        state->list = gs_plugin_loader_list_uniq (plugin_loader, state->list);
 
        /* success */
-       state->list = gs_plugin_loader_remove_system (state->list);
        state->list = gs_plugin_loader_remove_invalid (state->list);
        if (state->list == NULL) {
                g_set_error (&error,



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