[gnome-software/gnome-3-20] Hide the kudo details panel for non desktop components



commit de32e7a1fcad7817a562f6d0da524464ce119ba8
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 29 18:34:24 2016 +0000

    Hide the kudo details panel for non desktop components
    
    Fixes the other half of: https://bugzilla.gnome.org/show_bug.cgi?id=762882

 src/gs-shell-details.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index dcbbd5d..3990b5e 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -101,6 +101,7 @@ struct _GsShellDetails
        GtkWidget               *spinner_details;
        GtkWidget               *spinner_install_remove;
        GtkWidget               *stack_details;
+       GtkWidget               *grid_details_kudo;
        GtkWidget               *image_details_kudo_docs;
        GtkWidget               *image_details_kudo_integration;
        GtkWidget               *image_details_kudo_translated;
@@ -792,6 +793,16 @@ gs_shell_details_refresh_all (GsShellDetails *self)
                }
        }
 
+       /* hide the kudo details for non-desktop software */
+       switch (gs_app_get_kind (self->app)) {
+       case AS_APP_KIND_DESKTOP:
+               gtk_widget_set_visible (self->grid_details_kudo, TRUE);
+               break;
+       default:
+               gtk_widget_set_visible (self->grid_details_kudo, FALSE);
+               break;
+       }
+
        /* make history button insensitive if there is none */
        history = gs_app_get_history (self->app);
        switch (gs_app_get_kind (self->app)) {
@@ -1560,6 +1571,7 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, spinner_details);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, spinner_install_remove);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, stack_details);
+       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, grid_details_kudo);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_docs);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_integration);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_translated);


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