static void vp_inputbox_activate_cb(GtkEntry* entry, gpointer user_data);
static gboolean vp_inputbox_keyrelease_cb(GtkEntry* entry, GdkEventKey* event);
static void vp_scroll_cb(GtkAdjustment* adjustment, gpointer data);
-#ifdef FEATURE_COOKIE
static void vp_new_request_cb(SoupSession* session, SoupMessage *message, gpointer data);
static void vp_gotheaders_cb(SoupMessage* message, gpointer data);
-#endif
static WebKitWebView* vp_inspect_web_view_cb(gpointer inspector, WebKitWebView* web_view);
static gboolean vp_button_relase_cb(WebKitWebView *webview, GdkEventButton* event, gpointer data);
static gboolean vp_new_window_policy_cb(
static void vp_init_gui(void);
static void vp_init_files(void);
static void vp_setup_signals(void);
-#ifdef FEATURE_COOKIE
static void vp_set_cookie(SoupCookie* cookie);
static const gchar* vp_get_cookies(SoupURI *uri);
-#endif
static gboolean vp_hide_message(void);
static void vp_webview_progress_cb(WebKitWebView* view, GParamSpec* pspec, gpointer data)
vp_update_statusbar();
}
-#ifdef FEATURE_COOKIE
static void vp_new_request_cb(SoupSession* session, SoupMessage *message, gpointer data)
{
SoupMessageHeaders* header = message->request_headers;
}
soup_cookies_free(list);
}
-#endif
static WebKitWebView* vp_inspect_web_view_cb(gpointer inspector, WebKitWebView* web_view)
{
gui->inspector = webkit_web_view_get_inspector(gui->webview);
/* init soup session */
-#ifdef FEATURE_COOKIE
vp.net.soup_session = webkit_get_default_session();
soup_session_remove_feature_by_type(vp.net.soup_session, soup_cookie_jar_get_type());
-#endif
/* Create a scrollable area */
gui->viewport = gtk_scrolled_window_new(NULL, NULL);
NULL
);
-#ifdef FEATURE_COOKIE
g_object_set(vp.net.soup_session, "max-conns", SETTING_MAX_CONNS , NULL);
g_object_set(vp.net.soup_session, "max-conns-per-host", SETTING_MAX_CONNS_PER_HOST, NULL);
g_signal_connect_after(G_OBJECT(vp.net.soup_session), "request-started", G_CALLBACK(vp_new_request_cb), NULL);
-#endif
/* inspector */
g_signal_connect(
static Arg* setting_char_to_arg(const gchar* str, const Type type);
static void setting_print_value(const Setting* s, void* value);
static gboolean setting_webkit(const Setting* s, const gboolean get);
-#ifdef FEATURE_COOKIE
static gboolean setting_cookie_timeout(const Setting* s, const gboolean get);
-#endif
static gboolean setting_scrollstep(const Setting* s, const gboolean get);
static gboolean setting_status_color_bg(const Setting* s, const gboolean get);
static gboolean setting_status_color_fg(const Setting* s, const gboolean get);
{"stylesheet", "user-stylesheet-uri", TYPE_CHAR, setting_webkit, {.s = NULL}},
{"zoomstep", "zoom-step", TYPE_FLOAT, setting_webkit, {.i = 100000}},
/* internal variables */
-#ifdef FEATURE_COOKIE
{NULL, "cookie-timeout", TYPE_INTEGER, setting_cookie_timeout, {.i = 4800}},
-#endif
{NULL, "scrollstep", TYPE_INTEGER, setting_scrollstep, {.i = 40}},
{NULL, "status-color-bg", TYPE_CHAR, setting_status_color_bg, {.s = "#000"}},
{NULL, "status-color-fg", TYPE_CHAR, setting_status_color_fg, {.s = "#fff"}},
return TRUE;
}
-#ifdef FEATURE_COOKIE
static gboolean setting_cookie_timeout(const Setting* s, const gboolean get)
{
if (get) {
return TRUE;
}
-#endif
static gboolean setting_scrollstep(const Setting* s, const gboolean get)
{