After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724697 - [overview] removed thumbnails are no longer replaced
[overview] removed thumbnails are no longer replaced
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Mac OS
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-18 23:06 UTC by Frederic Peters
Modified: 2014-02-25 17:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
overview: adding a new thumbnail after removing another one (10.00 KB, patch)
2014-02-24 08:10 UTC, Lorenzo Tilve
needs-work Details | Review
overview: adding a new thumbnail after removing another one (4.88 KB, patch)
2014-02-25 11:35 UTC, Lorenzo Tilve
none Details | Review
overview: adding a new thumbnail after removing another one (4.88 KB, patch)
2014-02-25 11:38 UTC, Lorenzo Tilve
reviewed Details | Review
overview: adding a new thumbnail after removing another one (4.75 KB, patch)
2014-02-25 16:07 UTC, Lorenzo Tilve
committed Details | Review

Description Frederic Peters 2014-02-18 23:06:26 UTC
When a thumbnail was removed from the overview it used to be replaced by a new one; with the change to an HTML based overview (bug 723950) this is no longer the case.
Comment 1 Lorenzo Tilve 2014-02-24 08:10:35 UTC
Created attachment 270098 [details] [review]
 overview: adding a new thumbnail after removing another one
Comment 2 Lorenzo Tilve 2014-02-24 08:14:43 UTC
On top of the missing functionality reported on the bug, the CSS animation that should happen when removing elements from the overview was not working fine after some revamps on the layout. There is a pathc for it on this bug https://bugzilla.gnome.org/show_bug.cgi?id=724652.
Comment 3 Carlos Garcia Campos 2014-02-24 08:35:39 UTC
Review of attachment 270098 [details] [review]:

Thanks for the patch, I don't understand why you need to move the code from frecent store to ephy-embed-shell.

::: embed/ephy-embed-shell.c
@@ +215,3 @@
+static void
+ephy_embed_shell_update_urls (EphyHistoryService *history,
+                              EphyEmbedShell *shell)

EphyEmbedShell should be the first parameter, not the second. We don't need to pass the history service object, since it's already in the embed shell private struct..

@@ +234,3 @@
+                                 EphyEmbedShell *shell)
+{
+   ephy_embed_shell_update_urls (history, shell);

update_urls is very generic name. I think this should be something like update_history_urls, or update_visited_urls, or even update_overview_urls

@@ +238,3 @@
+
+static gboolean
+ephy_embed_shell_reload_overview (EphyEmbedShell *shell)

I would use update instead of reload

@@ +242,3 @@
+    EphyHistoryService *service;
+
+    g_object_get (ephy_embed_shell_get_frecent_store (shell), "history-service", &service, NULL);

You don't need this, and you are leaking the service, since g_object_get returns a new reference.
Comment 4 Lorenzo Tilve 2014-02-25 11:35:03 UTC
Created attachment 270254 [details] [review]
overview: adding a new thumbnail after removing another one

Thanks for the review, I've fixed the commented issues.
Comment 5 Lorenzo Tilve 2014-02-25 11:38:35 UTC
Created attachment 270255 [details] [review]
overview: adding a new thumbnail after removing another one

Fixed coding style issue.
Comment 6 Carlos Garcia Campos 2014-02-25 13:07:42 UTC
Review of attachment 270255 [details] [review]:

LGTM.

::: embed/ephy-embed-shell.c
@@ +187,3 @@
+  EphyHistoryService *service;
+
+  g_object_get (ephy_embed_shell_get_frecent_store (shell), "history-service", &service, NULL);

You don't need this, you can use shell->priv->global_history_service directly here.

@@ +198,3 @@
+                                   shell);
+  ephy_history_query_free (query);
+  g_object_unref (service);

And then you don't need this.
Comment 7 Lorenzo Tilve 2014-02-25 16:07:11 UTC
Created attachment 270292 [details] [review]
overview: adding a new thumbnail after removing another one

Fixed the issue commented.
Comment 8 Carlos Garcia Campos 2014-02-25 17:30:29 UTC
Comment on attachment 270292 [details] [review]
overview: adding a new thumbnail after removing another one

Perfect, thanks!