aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-10-22 06:23:35 +0800
committerXan Lopez <xan@src.gnome.org>2007-10-22 06:23:35 +0800
commit21970860f6d87a62764bdafadae76f4d2f9a1691 (patch)
treebefb7c5925ba0cfa93c2a45a061f801caf949a0b /src/ephy-window.c
parent20abb0405c42012e470173fc82dba03d7d4fe268 (diff)
downloadgsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.tar
gsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.tar.gz
gsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.tar.bz2
gsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.tar.lz
gsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.tar.xz
gsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.tar.zst
gsoc2013-epiphany-21970860f6d87a62764bdafadae76f4d2f9a1691.zip
Move navigation property from EphyTab to EphyEmbed.
svn path=/trunk/; revision=7549
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e7c13c8b7..1f4b47555 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1468,30 +1468,29 @@ sync_tab_message (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
}
static void
-sync_tab_navigation (EphyTab *tab,
+sync_tab_navigation (EphyEmbed *embed,
GParamSpec *pspec,
EphyWindow *window)
{
- EphyTabNavigationFlags flags;
+ EphyEmbedNavigationFlags flags;
gboolean up = FALSE, back = FALSE, forward = FALSE;
- EphyEmbed *embed;
char *back_url = NULL, *forward_url = NULL;
char *back_title = NULL, *forward_title = NULL;
gint position;
if (window->priv->closing) return;
- flags = ephy_tab_get_navigation_flags (tab);
+ flags = ephy_embed_get_navigation_flags (embed);
- if (flags & EPHY_TAB_NAV_UP)
+ if (flags & EPHY_EMBED_NAV_UP)
{
up = TRUE;
}
- if (flags & EPHY_TAB_NAV_BACK)
+ if (flags & EPHY_EMBED_NAV_BACK)
{
back = TRUE;
}
- if (flags & EPHY_TAB_NAV_FORWARD)
+ if (flags & EPHY_EMBED_NAV_FORWARD)
{
forward = TRUE;
}
@@ -1499,9 +1498,6 @@ sync_tab_navigation (EphyTab *tab,
ephy_toolbar_set_navigation_actions (window->priv->toolbar,
back, forward, up);
- embed = ephy_tab_get_embed (tab);
- if (embed == NULL) return;
-
position = ephy_embed_shistory_get_pos (embed);
if (position > 0)
@@ -2155,9 +2151,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
G_CALLBACK (sync_tab_message),
window);
g_signal_handlers_disconnect_by_func (old_tab,
- G_CALLBACK (sync_tab_navigation),
- window);
- g_signal_handlers_disconnect_by_func (old_tab,
G_CALLBACK (sync_tab_popup_windows),
window);
g_signal_handlers_disconnect_by_func (old_tab,
@@ -2184,6 +2177,9 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_handlers_disconnect_by_func (embed,
G_CALLBACK (sync_tab_load_status),
window);
+ g_signal_handlers_disconnect_by_func (embed,
+ G_CALLBACK (sync_tab_navigation),
+ window);
g_signal_handlers_disconnect_by_func
(embed, G_CALLBACK (tab_context_menu_cb), window);
@@ -2203,11 +2199,11 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
sync_tab_zoom (embed, NULL, window);
sync_tab_load_progress (embed, NULL, window);
sync_tab_load_status (embed, NULL, window);
+ sync_tab_navigation (embed, NULL, window);
sync_tab_address (new_tab, NULL, window);
sync_tab_icon (new_tab, NULL, window);
sync_tab_message (new_tab, NULL, window);
- sync_tab_navigation (new_tab, NULL, window);
sync_tab_popup_windows (new_tab, NULL, window);
sync_tab_popups_allowed (new_tab, NULL, window);
sync_tab_title (new_tab, NULL, window);
@@ -2221,9 +2217,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_connect_object (new_tab, "notify::message",
G_CALLBACK (sync_tab_message),
window, 0);
- g_signal_connect_object (new_tab, "notify::navigation",
- G_CALLBACK (sync_tab_navigation),
- window, 0);
g_signal_connect_object (new_tab, "notify::hidden-popup-count",
G_CALLBACK (sync_tab_popup_windows),
window, 0);
@@ -2246,6 +2239,9 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_connect_object (embed, "notify::load-status",
G_CALLBACK (sync_tab_load_status),
window, 0);
+ g_signal_connect_object (embed, "notify::navigation",
+ G_CALLBACK (sync_tab_navigation),
+ window, 0);
g_signal_connect_object (embed, "ge-context-menu",
G_CALLBACK (tab_context_menu_cb),
window, G_CONNECT_AFTER);