diff options
author | Adam Hooper <adamh@src.gnome.org> | 2004-12-18 02:03:35 +0800 |
---|---|---|
committer | Adam Hooper <adamh@src.gnome.org> | 2004-12-18 02:03:35 +0800 |
commit | 9bf71295e9a4e5cdfe9dc4380343616c49b161c6 (patch) | |
tree | 6b3aa6ef7d872a5cdc84da940b240e723b93c800 /src/ephy-extension.c | |
parent | c5b4d13e2e64dd3e28de75b17f6a436f339d5dc2 (diff) | |
download | gsoc2013-epiphany-9bf71295e9a4e5cdfe9dc4380343616c49b161c6.tar.gz gsoc2013-epiphany-9bf71295e9a4e5cdfe9dc4380343616c49b161c6.tar.zst gsoc2013-epiphany-9bf71295e9a4e5cdfe9dc4380343616c49b161c6.zip |
Add attach_tab and detach_tab functions to extension interface (bug
#153732). Thanks to Crispin for almost all of the code.
Diffstat (limited to 'src/ephy-extension.c')
-rw-r--r-- | src/ephy-extension.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/ephy-extension.c b/src/ephy-extension.c index 6b90876c4..b4e92b891 100644 --- a/src/ephy-extension.c +++ b/src/ephy-extension.c @@ -50,7 +50,10 @@ ephy_extension_attach_window (EphyExtension *extension, EphyWindow *window) { EphyExtensionIface *iface = EPHY_EXTENSION_GET_IFACE (extension); - iface->attach_window (extension, window); + if (iface->attach_window) + { + iface->attach_window (extension, window); + } } void @@ -58,5 +61,32 @@ ephy_extension_detach_window (EphyExtension *extension, EphyWindow *window) { EphyExtensionIface *iface = EPHY_EXTENSION_GET_IFACE (extension); - iface->detach_window (extension, window); + if (iface->detach_window) + { + iface->detach_window (extension, window); + } +} + +void +ephy_extension_attach_tab (EphyExtension *extension, + EphyWindow *window, + EphyTab *tab) +{ + EphyExtensionIface *iface = EPHY_EXTENSION_GET_IFACE (extension); + if (iface->attach_tab) + { + iface->attach_tab (extension, window, tab); + } +} + +void +ephy_extension_detach_tab (EphyExtension *extension, + EphyWindow *window, + EphyTab *tab) +{ + EphyExtensionIface *iface = EPHY_EXTENSION_GET_IFACE (extension); + if (iface->detach_tab) + { + iface->detach_tab (extension, window, tab); + } } |