aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);