[gnome-software] Do not show empty categories in the overview screen



commit 43efc31be8bba34584d2f8652023ef08741311e7
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 16 10:46:55 2013 +0100

    Do not show empty categories in the overview screen

 src/gs-shell-overview.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-overview.c b/src/gs-shell-overview.c
index 18d042f..c55da82 100644
--- a/src/gs-shell-overview.c
+++ b/src/gs-shell-overview.c
@@ -198,6 +198,8 @@ gs_shell_overview_get_categories_cb (GObject *source_object,
        grid = GTK_WIDGET (gtk_builder_get_object (priv->builder, "grid_categories"));
        for (l = list, i = 0; l; l = l->next, i++) {
                cat = GS_CATEGORY (l->data);
+               if (gs_category_get_size (cat) == 0)
+                       continue;
                tile = gs_category_tile_new (cat);
                g_signal_connect (tile, "clicked",
                                  G_CALLBACK (category_tile_clicked), shell);


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