# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
+LIBPREFIX = ${PREFIX}/lib/surf
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0
# flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
+CPPFLAGS = -DVERSION=\"${VERSION}\" -DWEBEXTDIR=\"${LIBPREFIX}\" -D_DEFAULT_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}
/* GTK/WebKit */
static WebKitWebView *newview(Client *c, WebKitWebView *rv);
+static void initwebextensions(WebKitWebContext *wc, Client *c);
static GtkWidget *createview(WebKitWebView *v, WebKitNavigationAction *a,
Client *c);
static gboolean buttonreleased(GtkWidget *w, GdkEvent *e, Client *c);
g_signal_connect(G_OBJECT(context), "download-started",
G_CALLBACK(downloadstarted), c);
+ g_signal_connect(G_OBJECT(context), "initialize-web-extensions",
+ G_CALLBACK(initwebextensions), c);
v = g_object_new(WEBKIT_TYPE_WEB_VIEW,
"settings", settings,
return v;
}
+void
+initwebextensions(WebKitWebContext *wc, Client *c)
+{
+ webkit_web_context_set_web_extensions_directory(wc, WEBEXTDIR);
+}
+
GtkWidget *
createview(WebKitWebView *v, WebKitNavigationAction *a, Client *c)
{