Mention why disabled extensions are not available

This commit is contained in:
Christian Dywan 2009-09-14 17:59:43 +02:00
parent 178098d886
commit 516547814c
2 changed files with 13 additions and 2 deletions

View file

@ -566,11 +566,18 @@ extension_test (void)
MidoriExtension* MidoriExtension*
extension_init (void) 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, MidoriExtension* extension = g_object_new (MIDORI_TYPE_EXTENSION,
"name", _("Advertisement blocker"), "name", _("Advertisement blocker"),
"description", _("Block advertisements according to a filter list"),
#if WEBKIT_CHECK_VERSION (1, 1, 14) #if WEBKIT_CHECK_VERSION (1, 1, 14)
"description", _("Block advertisements according to a filter list"),
"version", "0.1", "version", "0.1",
#else
"description", desc,
#endif #endif
"authors", "Christian Dywan <christian@twotoasts.de>", "authors", "Christian Dywan <christian@twotoasts.de>",
NULL); NULL);
@ -579,6 +586,8 @@ extension_init (void)
g_signal_connect (extension, "activate", g_signal_connect (extension, "activate",
G_CALLBACK (adblock_activate_cb), NULL); G_CALLBACK (adblock_activate_cb), NULL);
#else
g_free (desc);
#endif #endif
return extension; return extension;

View file

@ -610,9 +610,11 @@ MidoriExtension *extension_init(void)
{ {
MidoriExtension* extension = g_object_new(MIDORI_TYPE_EXTENSION, MidoriExtension* extension = g_object_new(MIDORI_TYPE_EXTENSION,
"name", _("Toolbar Editor"), "name", _("Toolbar Editor"),
"description", _("Easily edit the toolbar layout"),
#if !HAVE_HILDON #if !HAVE_HILDON
"description", _("Easily edit the toolbar layout"),
"version", "0.1", "version", "0.1",
#else
"description", _("Not available on this platform"),
#endif #endif
"authors", "Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>", "authors", "Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>",
NULL); NULL);