aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-session.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2013-02-09 00:14:02 +0800
committerXan Lopez <xan@igalia.com>2013-02-09 01:51:30 +0800
commitb23b0b805fd475246018b0d7441fe3a9a5cd2303 (patch)
tree1676f47d7e3886410bb79f69458c5988812bfce0 /src/ephy-session.c
parent0d728a011be9ff6f96c5296f5fe3b33564114a81 (diff)
downloadgsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.tar
gsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.tar.gz
gsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.tar.bz2
gsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.tar.lz
gsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.tar.xz
gsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.tar.zst
gsoc2013-epiphany-b23b0b805fd475246018b0d7441fe3a9a5cd2303.zip
Use GtkApplication method to get the list of windows
We have one in EphyShell, but should be redundant (since we stopped tracking non-EphyWindow windows some time ago).
Diffstat (limited to 'src/ephy-session.c')
-rw-r--r--src/ephy-session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 9fa15be8b..d4b9a6837 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -378,7 +378,7 @@ ephy_session_tab_closed (EphySession *session,
g_object_notify (G_OBJECT (session), "can-undo-tab-closed");
LOG ("Added: %s to the list (%d elements)",
- address, g_queue_get_legth (priv->closed_tabs));
+ address, g_queue_get_length (priv->closed_tabs));
}
gboolean
@@ -717,7 +717,7 @@ save_data_new (EphySession *session,
data->session = g_object_ref (session);
data->save_file = get_session_file (filename);
- windows = ephy_shell_get_windows (shell);
+ windows = gtk_application_get_windows (GTK_APPLICATION (shell));
for (w = windows; w != NULL ; w = w->next)
{
SessionWindow *session_window;
@@ -726,7 +726,6 @@ save_data_new (EphySession *session,
if (session_window)
data->windows = g_list_prepend (data->windows, session_window);
}
- g_list_free (windows);
data->windows = g_list_reverse (data->windows);
return data;
@@ -1632,9 +1631,10 @@ ephy_session_clear (EphySession *session)
g_return_if_fail (EPHY_IS_SESSION (session));
shell = ephy_shell_get_default ();
- windows = ephy_shell_get_windows (shell);
+ windows = g_list_copy (gtk_application_get_windows (GTK_APPLICATION (shell)));
for (p = windows; p; p = p->next)
gtk_widget_destroy (GTK_WIDGET (p->data));
+ g_list_free (windows);
g_queue_foreach (session->priv->closed_tabs,
(GFunc)closed_tab_free, NULL);
g_queue_clear (session->priv->closed_tabs);