[epiphany/gnome-3-34] Show placeholders in overview



commit 0503f11c344e9c596f67765b445a96b3838b4271
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Sun Feb 2 10:56:54 2020 +0000

    Show placeholders in overview
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/merge_requests/564
    
    
    (cherry picked from commit 8db75d65d716b423170dae7054c37817ec5ce426)

 embed/ephy-about-handler.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index d5fce9072..029aa64c6 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -347,6 +347,7 @@ history_service_query_urls_cb (EphyHistoryService     *history,
   gsize data_length;
   char *lang;
   GList *l;
+  guint list_length;
 
   snapshot_service = ephy_snapshot_service_get_default ();
   shell = ephy_embed_shell_get_default ();
@@ -371,7 +372,9 @@ history_service_query_urls_cb (EphyHistoryService     *history,
                           _(OVERVIEW_PAGE_TITLE));
   g_free (lang);
 
-  if (g_list_length (urls) == 0 || !success) {
+  list_length = g_list_length (urls);
+
+  if (list_length == 0 || !success) {
     GtkIconInfo *icon_info;
     g_autofree gchar *icon = g_strconcat (APPLICATION_ID, "-symbolic", NULL);
 
@@ -423,6 +426,14 @@ history_service_query_urls_cb (EphyHistoryService     *history,
                             thumbnail_style ? thumbnail_style : "", url->title);
   }
 
+  for (guint idx = list_length; idx < 9; idx++) {
+    g_string_append_printf (data_str,
+                            "<i class=\"overview-item\">"
+                            "  <span class=\"overview-thumbnail\"></span>"
+                            "  <span class=\"overview-title\"></span>"
+                            "</i>");
+  }
+
   data_str = g_string_append (data_str,
                               "  </div>\n"
                               "  </div>\n"


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