[gnome-software/gnome-3-18] Show an empty space for no category results



commit 9f2c472193038e55f7e36fe949680e4d90737a26
Author: Richard Hughes <richard hughsie com>
Date:   Fri Sep 18 10:10:05 2015 +0100

    Show an empty space for no category results
    
    This can happen when the AppStream metadata references applications which do
    not exist, or which get filtered out because they have no AppData information.

 src/gs-shell-category.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-shell-category.c b/src/gs-shell-category.c
index 7595208..908bfd5 100644
--- a/src/gs-shell-category.c
+++ b/src/gs-shell-category.c
@@ -94,6 +94,10 @@ gs_shell_category_get_apps_cb (GObject *source_object,
        g_autoptr(GError) error = NULL;
        g_autoptr(GsAppList) list = NULL;
 
+       /* show an empty space for no results */
+       gtk_grid_remove_column (GTK_GRID (self->category_detail_grid), 1);
+       gtk_grid_remove_column (GTK_GRID (self->category_detail_grid), 0);
+
        list = gs_plugin_loader_get_category_apps_finish (plugin_loader,
                                                          res,
                                                          &error);
@@ -102,8 +106,6 @@ gs_shell_category_get_apps_cb (GObject *source_object,
                        g_warning ("failed to get apps for category apps: %s", error->message);
                return;
        }
-       gtk_grid_remove_column (GTK_GRID (self->category_detail_grid), 1);
-       gtk_grid_remove_column (GTK_GRID (self->category_detail_grid), 0);
 
        for (l = list, i = 0; l != NULL; l = l->next, i++) {
                app = GS_APP (l->data);


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