From 516547814ca7f78fffba023a261ac955c19c4b8f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 14 Sep 2009 17:59:43 +0200 Subject: [PATCH] Mention why disabled extensions are not available --- extensions/adblock.c | 11 ++++++++++- extensions/toolbar-editor.c | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/extensions/adblock.c b/extensions/adblock.c index 3624be9a..db33e35f 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -566,11 +566,18 @@ extension_test (void) MidoriExtension* extension_init (void) { + #if !WEBKIT_CHECK_VERSION (1, 1, 14) + gchar* desc = g_strdup_printf (_("Not available: %s required"), + "WebKitGTK+ 1.1.14"); + #endif + MidoriExtension* extension = g_object_new (MIDORI_TYPE_EXTENSION, "name", _("Advertisement blocker"), - "description", _("Block advertisements according to a filter list"), #if WEBKIT_CHECK_VERSION (1, 1, 14) + "description", _("Block advertisements according to a filter list"), "version", "0.1", + #else + "description", desc, #endif "authors", "Christian Dywan ", NULL); @@ -579,6 +586,8 @@ extension_init (void) g_signal_connect (extension, "activate", G_CALLBACK (adblock_activate_cb), NULL); + #else + g_free (desc); #endif return extension; diff --git a/extensions/toolbar-editor.c b/extensions/toolbar-editor.c index 2a39057a..13c51b81 100644 --- a/extensions/toolbar-editor.c +++ b/extensions/toolbar-editor.c @@ -610,9 +610,11 @@ MidoriExtension *extension_init(void) { MidoriExtension* extension = g_object_new(MIDORI_TYPE_EXTENSION, "name", _("Toolbar Editor"), - "description", _("Easily edit the toolbar layout"), #if !HAVE_HILDON + "description", _("Easily edit the toolbar layout"), "version", "0.1", + #else + "description", _("Not available on this platform"), #endif "authors", "Enrico Tröger ", NULL);