static void
extension_activate (gconstpointer data)
{
+ MidoriExtension* extension;
MidoriApp* app = midori_app_new ();
- MidoriExtension* extension = MIDORI_EXTENSION (data);
- if (extension == NULL)
- return;
g_object_set (app, "settings", midori_web_settings_new (), NULL);
- g_signal_emit_by_name (extension, "activate", app);
- midori_extension_deactivate (extension);
+
+ if (MIDORI_IS_EXTENSION (data))
+ {
+ extension = MIDORI_EXTENSION (data);
+ g_signal_emit_by_name (extension, "activate", app);
+ midori_extension_deactivate (extension);
+ }
+ else if (KATZE_IS_ARRAY (data))
+ {
+ KATZE_ARRAY_FOREACH_ITEM (extension, KATZE_ARRAY (data))
+ {
+ g_signal_emit_by_name (extension, "activate", app);
+ midori_extension_deactivate (extension);
+ }
+ }
+
g_object_unref (app);
}