#define STATUS_BAR_FONT "monospace bold 8"
#define URL_BOX_FONT "monospace 8"
+#define SETTING_DEFAUL_FONT_SIZE 12
+#define SETTING_USER_AGENT PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"
+#define SETTING_MAX_CONNS 25
+#define SETTING_MAX_CONNS_PER_HOST 5
+
#define SCROLLSTEP (40) /* cursor difference in pixel for scrolling */
#endif /* end of include guard: CONFIG_H */
static void vp_print_version(void);
static void vp_init(void);
static void vp_init_gui(void);
+static void vp_setup_settings(void);
static void vp_setup_signals(void);
/* Create a browser instance */
gui->webview = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ vp_setup_settings();
+
/* Create a scrollable area */
gui->viewport = gtk_scrolled_window_new(gui->adjust_h, gui->adjust_v);
gtk_scrolled_window_set_policy(
gtk_widget_show_all(gui->window);
}
+static void vp_setup_settings(void)
+{
+ WebKitWebSettings *settings = webkit_web_view_get_settings(vp.gui.webview);
+
+ g_object_set(G_OBJECT(settings), "user-agent", SETTING_USER_AGENT, NULL);
+ g_object_set(G_OBJECT(settings), "max-conns", SETTING_MAX_CONNS, NULL);
+ g_object_set(G_OBJECT(settings), "max-conns-per-host", SETTING_MAX_CONNS_PER_HOST, NULL);
+ webkit_web_view_set_settings(vp.gui.webview, settings);
+}
+
+
static void vp_setup_signals(void)
{
Gui* gui = &vp.gui;