Check webextension at startup by default.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 27 Aug 2018 21:05:53 +0000 (23:05 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 27 Aug 2018 21:05:53 +0000 (23:05 +0200)
Also fail with error if webextension could not be read.

src/config.def.h
src/main.c

index 829a30e..5d36c4b 100644 (file)
@@ -55,3 +55,6 @@
 /* default window dimensions */
 #define WIN_WIDTH                  800
 #define WIN_HEIGHT                 600
+
+/* if set to 1 vimb will check if the webextension could be found. */
+#define CHECK_WEBEXTENSION_ON_STARTUP 1
index 46d6fcb..071078f 100644 (file)
@@ -1044,10 +1044,10 @@ static void on_webctx_init_web_extension(WebKitWebContext *webctx, gpointer data
     const char *name;
     GVariant *vdata;
 
-#ifdef DEBUG
+#if (CHECK_WEBEXTENSION_ON_STARTUP)
     char *extension = g_build_filename(EXTENSIONDIR,  "webext_main.so", NULL);
     if (!g_file_test(extension, G_FILE_TEST_IS_REGULAR)) {
-        g_warning("Cannot access web extension %s", extension);
+        g_error("Cannot access web extension %s", extension);
     }
     g_free(extension);
 #endif