aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-tab.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-10 03:16:35 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-10 03:16:35 +0800
commitd68d147c784bde6f5d13c200eb2d92a40141a5a3 (patch)
tree8d9d57cc6cf037c32acc56aecac0fa99be7169bd /src/ephy-tab.c
parentc135299f16ff6d9669ccc12a7f670d9e574bbaa0 (diff)
downloadgsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.gz
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.bz2
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.lz
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.xz
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.zst
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.zip
Cleanup session. Persist also history and bookmarks.
2003-11-09 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-embed.h: * idl/EphyAutomation.idl: * src/ephy-automation.c: (impl_ephy_automation_loadurl), (impl_ephy_automation_open_bookmarks_editor), (ephy_automation_init), (ephy_automation_object_finalize), (ephy_automation_class_init): * src/ephy-completion-model.c: (root_child_removed_cb): * src/ephy-main.c: (ephy_main_start): * src/ephy-shell.c: (ephy_shell_get_active_window), (toolwindow_show_cb), (toolwindow_hide_cb), (ephy_shell_get_bookmarks_editor), (ephy_shell_get_history_window): * src/ephy-shell.h: * src/ephy-tab.c: (ephy_tab_net_state_cb), (ephy_tab_size_to_cb): * src/ephy-window.c: (remove_from_session), (ephy_window_init): * src/session.c: (session_autoresume), (session_close), (session_dispose), (save_window_geometry), (save_tool_window), (save_ephy_window), (session_save), (session_load), (session_get_windows), (net_stop_cb), (tab_added_cb), (tab_removed_cb), (tabs_reordered_cb), (session_add_window), (session_remove_window), (save_yourself_cb), (session_die_cb), (gnome_session_init), (session_init): * src/session.h: * src/window-commands.c: (window_cmd_go_bookmarks), (window_cmd_go_history): Cleanup session. Persist also history and bookmarks.
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r--src/ephy-tab.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 822405d04..3f016a7a5 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -32,7 +32,6 @@
#include "ephy-notebook.h"
#include "ephy-file-helpers.h"
#include "ephy-zoom.h"
-#include "session.h"
#include "ephy-favicon-cache.h"
#include <glib/gi18n.h>
@@ -853,12 +852,6 @@ ephy_tab_net_state_cb (EphyEmbed *embed, const char *uri,
}
else if (state & EMBED_STATE_STOP)
{
- /* tab load completed, save in session */
- Session *s;
-
- s = EPHY_SESSION (ephy_shell_get_session (ephy_shell));
- session_save (s, SESSION_CRASHED);
-
ephy_tab_set_load_percent (tab, 0);
ephy_tab_set_load_status (tab, FALSE);
ephy_tab_update_navigation_flags (tab);
@@ -932,7 +925,7 @@ static void
ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height,
EphyTab *tab)
{
- GList *tabs = NULL;
+ GtkWidget *notebook;
EphyWindow *window;
GtkWidget *widget;
EmbedChromeMask chromemask;
@@ -941,7 +934,7 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height,
tab->priv->height = height;
window = tab->priv->window;
- tabs = ephy_window_get_tabs (window);
+ notebook = ephy_window_get_notebook (window);
widget = GTK_WIDGET (embed);
chromemask = ephy_window_get_chrome (window);
@@ -949,7 +942,8 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height,
* Do not resize window already showed because
* it's not possible to calculate a sensible window
* size based on the embed size */
- if (g_list_length (tabs) == 1 && !tab->priv->visibility)
+ if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) == 1 &&
+ !tab->priv->visibility)
{
gtk_widget_set_size_request
(widget, width, height);
@@ -966,8 +960,6 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height,
g_idle_add (let_me_resize_hack, embed);
}
}
-
- g_list_free (tabs);
}
static void