From 9bf71295e9a4e5cdfe9dc4380343616c49b161c6 Mon Sep 17 00:00:00 2001 From: Adam Hooper Date: Fri, 17 Dec 2004 18:03:35 +0000 Subject: Add attach_tab and detach_tab functions to extension interface (bug #153732). Thanks to Crispin for almost all of the code. --- src/ephy-window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ephy-window.c') diff --git a/src/ephy-window.c b/src/ephy-window.c index c0ec381fc..3c08bf238 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2007,6 +2007,7 @@ tab_added_cb (EphyNotebook *notebook, EphyTab *tab, EphyWindow *window) { + EphyExtension *manager; EphyEmbed *embed; g_return_if_fail (EPHY_IS_TAB (tab)); @@ -2023,6 +2024,10 @@ tab_added_cb (EphyNotebook *notebook, g_signal_connect_after (embed, "ge-modal-alert", G_CALLBACK (modal_alert_cb), window); + + /* Let the extensions attach themselves to the tab */ + manager = EPHY_EXTENSION (ephy_shell_get_extensions_manager (ephy_shell)); + ephy_extension_attach_tab (manager, window, tab); } static void @@ -2030,10 +2035,15 @@ tab_removed_cb (EphyNotebook *notebook, EphyTab *tab, EphyWindow *window) { + EphyExtension *manager; EphyEmbed *embed; g_return_if_fail (EPHY_IS_TAB (tab)); + /* Let the extensions remove themselves from the tab */ + manager = EPHY_EXTENSION (ephy_shell_get_extensions_manager (ephy_shell)); + ephy_extension_detach_tab (manager, window, tab); + g_signal_handlers_disconnect_by_func (G_OBJECT (tab), G_CALLBACK (sync_tab_visibility), window); -- cgit v1.2.3