[gnome-software] trivial: Ensure thumbnails are removed when there are no screenshots



commit 9b4a559c92f8c438d6aec1838e662c69d2ec3e0a
Author: Richard Hughes <richard hughsie com>
Date:   Fri Oct 11 21:36:31 2013 +0100

    trivial: Ensure thumbnails are removed when there are no screenshots

 src/gs-shell-details.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 733ccc6..3451d29 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -229,8 +229,12 @@ gs_shell_details_refresh_screenshots (GsShellDetails *shell_details)
                                                     "box_details_screenshot_main"));
        gs_container_remove_all (GTK_CONTAINER (widget));
        screenshots = gs_app_get_screenshots (priv->app);
-       if (screenshots->len == 0)
+       if (screenshots->len == 0) {
+               widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
+                                                            "box_details_screenshot_thumbnails"));
+               gs_container_remove_all (GTK_CONTAINER (widget));
                return;
+       }
 
        /* set the default image */
        ss = g_ptr_array_index (screenshots, 0);


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