From adfea7bd0eb8a34d64d98cc215a0c97bf9465633 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sat, 17 Nov 2007 17:11:40 +0000 Subject: Put visibility property into EphyBaseEmbed, we need it for popups. svn path=/trunk/; revision=7712 --- src/ephy-window.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/ephy-window.c b/src/ephy-window.c index 1f2390e5f..1dd6a56eb 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2419,6 +2419,19 @@ ephy_window_dom_mouse_click_cb (EphyEmbed *embed, return handled; } +static void +ephy_window_visibility_cb (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window) +{ + gboolean visibility; + + visibility = ephy_embed_get_visibility (embed); + + if (visibility) + gtk_widget_show (GTK_WIDGET (window)); + else + gtk_widget_hide (GTK_WIDGET (window)); +} + static void ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed) { @@ -2472,6 +2485,9 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed) g_signal_handlers_disconnect_by_func (embed, G_CALLBACK (sync_tab_message), window); + g_signal_handlers_disconnect_by_func (embed, + G_CALLBACK (ephy_window_visibility_cb), + window); g_signal_handlers_disconnect_by_func (embed, G_CALLBACK (tab_context_menu_cb), window); @@ -2546,6 +2562,9 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed) g_signal_connect_object (embed, "ge_dom_mouse_click", G_CALLBACK (ephy_window_dom_mouse_click_cb), window, 0); + g_signal_connect_object (embed, "notify::visibility", + G_CALLBACK (ephy_window_visibility_cb), + window, 0); g_object_notify (G_OBJECT (window), "active-child"); } -- cgit v1.2.3