[epiphany] ephy-history-window: update the list of hosts after a url is deleted
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-history-window: update the list of hosts after a url is deleted
- Date: Wed, 7 Mar 2012 16:14:34 +0000 (UTC)
commit 50715d718d83a09c1bbe76b99002b72c359a5754
Author: Claudio Saavedra <csaavedra igalia com>
Date: Wed Mar 7 16:47:02 2012 +0200
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.
https://bugzilla.gnome.org/show_bug.cgi?id=671559
src/ephy-history-window.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 461a064..90f18b1 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -436,7 +436,7 @@ on_browse_history_deleted_cb (gpointer service,
if (success != TRUE)
return;
- filter_now (editor, FALSE, TRUE);
+ filter_now (editor, TRUE, TRUE);
}
static void
@@ -1029,15 +1029,21 @@ on_get_hosts_cb (gpointer service,
gpointer user_data)
{
EphyHistoryWindow *window = EPHY_HISTORY_WINDOW (user_data);
+ EphyHistoryHost *selected_host;
GList *hosts;
if (success != TRUE)
goto out;
hosts = (GList *) result_data;
+ selected_host = get_selected_host (window);
gtk_list_store_clear (GTK_LIST_STORE (window->priv->hosts_store));
ephy_hosts_store_add_hosts (window->priv->hosts_store, hosts);
-
+ if (selected_host) {
+ ephy_hosts_view_select_host (EPHY_HOSTS_VIEW (window->priv->hosts_view),
+ selected_host);
+ ephy_history_host_free (selected_host);
+ }
out:
g_list_free_full (hosts, (GDestroyNotify)ephy_history_host_free);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]