MANDIR ?= $(PREFIX)share/man/
#----------------compile options---------------------
+
+# features
+CPPFLAGS += -DFEATURE_COOKIE
+CPPFLAGS += -DFEATURE_SEARCH_HIGHLIGHT
+CPPFLAGS += -DFEATURE_NO_SCROLLBARS
+
LIBS = libsoup-2.4
GTK3LIBS=gtk+-3.0 webkitgtk-3.0
LDFLAGS += $(shell pkg-config --libs $(LIBS)) -lX11 -lXext -lm
-# features
-CPPFLAGS += -DFEATURE_COOKIE
-CPPFLAGS += -DFEATURE_SEARCH_HIGHLIGHT
-
CPPFLAGS += -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=500
CPPFLAGS += -DPROJECT=\"${PROJECT}\"
ifeq ($(USEGTK3), 1)
/* GTK_POLICY_NEVER with gtk3 disallows window resizing and scrolling */
#ifndef HAS_GTK3
+#ifdef FEATURE_NO_SCROLLBARS
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gui->scroll), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+#endif
#endif
/* Prepare the inputbox */
static void setup_signals()
{
- WebKitWebFrame *frame = webkit_web_view_get_main_frame(vb.gui.webview);
-
/* Set up callbacks so that if either the main window or the browser
* instance is closed, the program will exit */
g_signal_connect(vb.gui.window, "destroy", G_CALLBACK(destroy_window_cb), NULL);
NULL
);
+#ifdef FEATURE_NO_SCROLLBARS
+ WebKitWebFrame *frame = webkit_web_view_get_main_frame(vb.gui.webview);
g_signal_connect(G_OBJECT(frame), "scrollbars-policy-changed", G_CALLBACK(gtk_true), NULL);
-
+#endif
g_object_connect(
G_OBJECT(vb.gui.inputbox),