[gnome-software] trivial: Do not show the screenshot fallback for codecs



commit bf38c22737e6ce306d8c4ae90c9e039a84bf0dcc
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jul 13 16:05:14 2016 +0100

    trivial: Do not show the screenshot fallback for codecs

 src/gs-shell-details.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 6456c4b..2279bc6 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -570,11 +570,21 @@ gs_shell_details_refresh_screenshots (GsShellDetails *self)
                return;
        }
 
+       /* fallback warning */
+       screenshots = gs_app_get_screenshots (self->app);
+       switch (gs_app_get_kind (self->app)) {
+       case AS_APP_KIND_CODEC:
+       case AS_APP_KIND_ADDON:
+               gtk_widget_set_visible (self->box_details_screenshot_fallback, FALSE);
+               break;
+       default:
+               gtk_widget_set_visible (self->box_details_screenshot_fallback,
+                                       screenshots->len == 0);
+               break;
+       }
+
        /* set screenshots */
        gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_main));
-       screenshots = gs_app_get_screenshots (self->app);
-       gtk_widget_set_visible (self->box_details_screenshot_fallback,
-                               screenshots->len == 0);
        if (screenshots->len == 0) {
                gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_thumbnails));
                return;


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