aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-23 05:52:45 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-23 05:52:45 +0800
commit2432ddfee8e21a62a80e94d875508242a8034015 (patch)
treeb283f4bea9b74dd426cd5a1c1e265e9919b25850
parent64ff5c590db02cddccc6088162747c2b69ccd87d (diff)
downloadgsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.tar
gsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.tar.gz
gsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.tar.bz2
gsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.tar.lz
gsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.tar.xz
gsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.tar.zst
gsoc2013-epiphany-2432ddfee8e21a62a80e94d875508242a8034015.zip
Only multiplex [attach|detach]_window to extensions implementing the
2004-10-22 Christian Persch <chpe@cvs.gnome.org> * src/ephy-extensions-manager.c: (load_extension), (unload_extension): Only multiplex [attach|detach]_window to extensions implementing the EphyExtension interface.
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-extensions-manager.c19
2 files changed, 22 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b42e1fc3..fa253509d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2004-10-22 Christian Persch <chpe@cvs.gnome.org>
+ * src/ephy-extensions-manager.c: (load_extension),
+ (unload_extension):
+
+ Only multiplex [attach|detach]_window to extensions implementing the
+ EphyExtension interface.
+
+2004-10-22 Christian Persch <chpe@cvs.gnome.org>
+
* lib/ephy-string.c: (ephy_string_double_underscores):
* lib/ephy-string.h:
* lib/widgets/ephy-node-view.c: (drag_data_received_cb):
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index 0473bb273..c68d90dde 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -693,7 +693,8 @@ load_extension (EphyExtensionsManager *manager,
info->extension = ephy_loader_get_object (loader,
&info->loader_attributes);
- if (info->extension != NULL)
+ /* attach if the extension implements EphyExtensionIface */
+ if (EPHY_IS_EXTENSION (info->extension))
{
manager->priv->extensions =
g_list_prepend (manager->priv->extensions,
@@ -701,13 +702,17 @@ load_extension (EphyExtensionsManager *manager,
g_list_foreach (manager->priv->windows, (GFunc) attach_window,
info->extension);
+ }
+ if (info->extension != NULL)
+ {
info->info.active = TRUE;
g_signal_emit (manager, signals[CHANGED], 0, info);
}
else
{
+ info->info.active = FALSE;
info->load_failed = TRUE;
}
}
@@ -730,11 +735,15 @@ unload_extension (EphyExtensionsManager *manager,
if (info->load_failed) return;
- g_list_foreach (manager->priv->windows, (GFunc) detach_window,
- info->extension);
+ /* detach if the extension implements EphyExtensionIface */
+ if (EPHY_IS_EXTENSION (info->extension))
+ {
+ g_list_foreach (manager->priv->windows, (GFunc) detach_window,
+ info->extension);
- manager->priv->extensions =
- g_list_remove (manager->priv->extensions, info->extension);
+ manager->priv->extensions =
+ g_list_remove (manager->priv->extensions, info->extension);
+ }
ephy_loader_release_object (info->loader, G_OBJECT (info->extension));
g_object_unref (info->extension);