GNOME Bugzilla – Bug 671559
ephy-history-service: remove orphan hosts from database
Last modified: 2012-03-07 16:14:47 UTC
After removing all the urls in a host, we don't need that host anymore.
Created attachment 209164 [details] [review] ephy-history-service: remove orphan hosts from database
Created attachment 209165 [details] [review] ephy-hosts-view: add a method to select a given host
Created attachment 209166 [details] [review] ephy-history-window: update the list of hosts after a url is deleted Since now we remove orphan hosts, we need to update the list of hosts after url removal, too. Do this while preserving the currently selected host, if any.
Review of attachment 209164 [details] [review]: ::: lib/history/ephy-history-service-hosts-table.c @@ +383,3 @@ + " (SELECT hosts.id FROM hosts LEFT JOIN urls " + " ON hosts.id = urls.host WHERE urls.host is NULL);", + &error); Can you add a comment explaining a bit how this works? @@ +385,3 @@ + &error); + if (error) { + g_error ("Couldn't clear history database: %s", error->message); Copy&Pasta error is Copy&Pasta error.
Review of attachment 209165 [details] [review]: ::: lib/widgets/ephy-hosts-view.h @@ +25,2 @@ #include "ephy-history-view.h" No empty line, and the alphabetical order is backwards.
Review of attachment 209166 [details] [review]: ::: src/ephy-history-window.c @@ +437,3 @@ return; + filter_now (editor, TRUE, TRUE); It's always difficult to remember what these functions with two or more boolean parameters do.
Attachment 209164 [details] pushed as 5d2779a - ephy-history-service: remove orphan hosts from database Attachment 209165 [details] pushed as 5596d5f - ephy-hosts-view: add a method to select a given host Attachment 209166 [details] pushed as 50715d7 - ephy-history-window: update the list of hosts after a url is deleted