aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-10-21 23:43:49 +0800
committerXan Lopez <xan@src.gnome.org>2007-10-21 23:43:49 +0800
commit44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0 (patch)
tree8ff34df1a47dc35a7524e6fa8e8dab887c5d8c48 /src/ephy-window.c
parenta657333db5a36e5377bdb29157d9ac99e86ceefb (diff)
downloadgsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.tar
gsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.tar.gz
gsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.tar.bz2
gsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.tar.lz
gsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.tar.xz
gsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.tar.zst
gsoc2013-epiphany-44f0f0b9e7f1de89a7c83a9c404ed50d6f3b57f0.zip
Move zoom from EphyTab to EphyEmbed.
svn path=/trunk/; revision=7542
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 47c02f5be..efeb48605 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -103,7 +103,7 @@ static void sync_tab_load_status (EphyTab *tab,
static void sync_tab_security (EphyEmbed *embed,
GParamSpec *pspec,
EphyWindow *window);
-static void sync_tab_zoom (EphyTab *tab,
+static void sync_tab_zoom (EphyEmbed *embed,
GParamSpec *pspec,
EphyWindow *window);
@@ -1401,8 +1401,7 @@ sync_tab_document_type (EphyEmbed *embed,
if (priv->closing) return;
/* update zoom actions */
- /* FIXME: need to move zoom to embed to uncomment this
- sync_tab_zoom (tab, NULL, window);*/
+ sync_tab_zoom (embed, NULL, window);
type = ephy_embed_get_document_type (embed);
can_find = (type != EPHY_EMBED_DOCUMENT_IMAGE);
@@ -1719,7 +1718,7 @@ sync_tab_title (EphyTab *tab,
}
static void
-sync_tab_zoom (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
+sync_tab_zoom (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
{
GtkActionGroup *action_group;
GtkAction *action;
@@ -1729,8 +1728,8 @@ sync_tab_zoom (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
if (window->priv->closing) return;
- zoom = ephy_tab_get_zoom (tab);
- type = ephy_embed_get_document_type (ephy_tab_get_embed (tab));
+ zoom = ephy_embed_get_zoom (embed);
+ type = ephy_embed_get_document_type (embed);
can_zoom = (type != EPHY_EMBED_DOCUMENT_IMAGE);
if (zoom >= ZOOM_MAXIMAL)
@@ -2173,9 +2172,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_handlers_disconnect_by_func (old_tab,
G_CALLBACK (sync_tab_title),
window);
- g_signal_handlers_disconnect_by_func (old_tab,
- G_CALLBACK (sync_tab_zoom),
- window);
embed = ephy_tab_get_embed (old_tab);
@@ -2185,6 +2181,10 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_handlers_disconnect_by_func (embed,
G_CALLBACK (sync_tab_document_type),
window);
+ g_signal_handlers_disconnect_by_func (embed,
+ G_CALLBACK (sync_tab_zoom),
+ window);
+
g_signal_handlers_disconnect_by_func
(embed, G_CALLBACK (tab_context_menu_cb), window);
@@ -2201,6 +2201,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
sync_tab_security (embed, NULL, window);
sync_tab_document_type (embed, NULL, window);
+ sync_tab_zoom (embed, NULL, window);
sync_tab_address (new_tab, NULL, window);
sync_tab_icon (new_tab, NULL, window);
@@ -2211,7 +2212,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
sync_tab_popup_windows (new_tab, NULL, window);
sync_tab_popups_allowed (new_tab, NULL, window);
sync_tab_title (new_tab, NULL, window);
- sync_tab_zoom (new_tab, NULL, window);
g_signal_connect_object (new_tab, "notify::address",
G_CALLBACK (sync_tab_address),
@@ -2240,9 +2240,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_connect_object (new_tab, "notify::title",
G_CALLBACK (sync_tab_title),
window, 0);
- g_signal_connect_object (new_tab, "notify::zoom",
- G_CALLBACK (sync_tab_zoom),
- window, 0);
g_signal_connect_object (embed, "notify::security-level",
G_CALLBACK (sync_tab_security),
@@ -2250,6 +2247,9 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
g_signal_connect_object (embed, "notify::document-type",
G_CALLBACK (sync_tab_document_type),
window, 0);
+ g_signal_connect_object (embed, "notify::zoom",
+ G_CALLBACK (sync_tab_zoom),
+ window, 0);
g_signal_connect_object (embed, "ge-context-menu",
G_CALLBACK (tab_context_menu_cb),
window, G_CONNECT_AFTER);