[gnome-software/wip/kalev/category-tile-revert] category page: Revert back to using SummaryTiles for addons



commit 3e01e4c9d739cb9235289f580bf0b0dfaf0fe24f
Author: Kalev Lember <klember redhat com>
Date:   Thu Feb 22 00:00:14 2018 +0100

    category page: Revert back to using SummaryTiles for addons
    
    We need further work on the addon tiles to make sure they both look good
    and are usable. Right now we lose too much information with
    PopularTiles, e.g. all the codecs show up as "GStreamer Mul..." with no
    way to distinguish between them.
    
    This commit switches back to using SummaryTiles that provide more
    information.
    
    https://raw.githubusercontent.com/gnome-design-team/gnome-mockups-software/master/wireframes/app-tiles.png
    provides guidance how we should evolve with addon tiles in the future.

 src/gs-category-page.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index 03957c67..aba3da3b 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -150,10 +150,14 @@ gs_category_page_get_apps_cb (GObject *source_object,
 
        for (i = 0; i < gs_app_list_length (list); i++) {
                app = gs_app_list_index (list, i);
-               tile = gs_popular_tile_new (app);
-               if (!gs_app_has_quirk (app, AS_APP_QUIRK_PROVENANCE) ||
-                   gs_utils_list_has_app_fuzzy (list, app))
-                       gs_popular_tile_show_source (GS_POPULAR_TILE (tile), TRUE);
+               if (g_strcmp0 (gs_category_get_id (self->category), "addons") == 0) {
+                       tile = gs_summary_tile_new (app);
+               } else {
+                       tile = gs_popular_tile_new (app);
+                       if (!gs_app_has_quirk (app, AS_APP_QUIRK_PROVENANCE) ||
+                           gs_utils_list_has_app_fuzzy (list, app))
+                               gs_popular_tile_show_source (GS_POPULAR_TILE (tile), TRUE);
+               }
 
                g_signal_connect (tile, "clicked",
                                  G_CALLBACK (app_tile_clicked), self);
@@ -361,7 +365,10 @@ gs_category_page_reload (GsPage *page)
 
        count = MIN(30, gs_category_get_size (self->subcategory));
        for (i = 0; i < count; i++) {
-               tile = gs_popular_tile_new (NULL);
+               if (g_strcmp0 (gs_category_get_id (self->category), "addons") == 0)
+                       tile = gs_summary_tile_new (NULL);
+               else
+                       tile = gs_popular_tile_new (NULL);
                gtk_container_add (GTK_CONTAINER (self->category_detail_box), tile);
                gtk_widget_set_can_focus (gtk_widget_get_parent (tile), FALSE);
        }


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