* Customizable and extensible interface.
* Extensions written in C.
-Requirements: GTK+ 2.10, WebkitGTK+ 1.1.1, libXML2, libsoup 2.25.2, sqlite 3.0
+Requirements: GTK+ 2.10, WebkitGTK+ 1.1.4, libXML2, libsoup 2.25.2, sqlite 3.0
Optional: Unique 0.9, libidn, docutils, libnotify, Vala
return TRUE;
}
-#if WEBKIT_CHECK_VERSION (1, 1, 4)
static gboolean
formhistory_navigation_decision_cb (WebKitWebView* web_view,
WebKitWebFrame* web_frame,
}
return FALSE;
}
-#else
-static void
-formhistory_feed_keys (GHashTable* keys,
- gpointer db)
-{
- GHashTableIter iter;
- gchar* key;
- gchar* value;
-
- g_hash_table_iter_init (&iter, keys);
- while (g_hash_table_iter_next (&iter, (gpointer)&key, (gpointer)&value))
- {
- if (formhistory_update_main_hash (key, value))
- formhistory_update_database (db, key, value);
- }
-}
-
-static void
-formhistory_session_request_queued_cb (SoupSession* session,
- SoupMessage* msg,
- MidoriExtension* extension)
-{
- gchar* method = katze_object_get_string (msg, "method");
- if (method && !strncmp (method, "POST", 4))
- {
- SoupMessageBody* body = msg->request_body;
- if (soup_message_body_get_accumulate (body))
- {
- SoupBuffer* buffer;
- GHashTable* keys;
- gpointer db;
-
- buffer = soup_message_body_flatten (body);
- keys = soup_form_decode (body->data);
-
- db = g_object_get_data (G_OBJECT (extension), "formhistory-db");
- formhistory_feed_keys (keys, db);
- soup_buffer_free (buffer);
- g_hash_table_destroy (keys);
- }
- }
- g_free (method);
-}
-#endif
static void
formhistory_window_object_cleared_cb (WebKitWebView* web_view,
GtkWidget* web_view = midori_view_get_web_view (view);
g_signal_connect (web_view, "window-object-cleared",
G_CALLBACK (formhistory_window_object_cleared_cb), NULL);
- #if WEBKIT_CHECK_VERSION (1, 1, 4)
g_signal_connect (web_view, "navigation-policy-decision-requested",
G_CALLBACK (formhistory_navigation_decision_cb), extension);
- #else
- g_signal_connect (webkit_get_default_session (), "request-queued",
- G_CALLBACK (formhistory_session_request_queued_cb), extension);
- #endif
}
static void
GtkWidget* web_view = midori_view_get_web_view (view);
g_signal_handlers_disconnect_by_func (
web_view, formhistory_window_object_cleared_cb, NULL);
- #if WEBKIT_CHECK_VERSION (1, 1, 4)
g_signal_handlers_disconnect_by_func (
web_view, formhistory_navigation_decision_cb, extension);
- #else
- g_signal_handlers_disconnect_by_func (
- webkit_get_default_session (), formhistory_session_request_queued_cb, extension);
- #endif
}
static void
includes='/usr/X11R6/include', mandatory=False)
conf.check (lib='Xss', libpath='/usr/X11R6/lib', mandatory=False)
check_pkg ('gtk+-2.0', '2.10.0', var='GTK', args=args)
- check_pkg ('webkit-1.0', '1.1.1', args=args)
+ check_pkg ('webkit-1.0', '1.1.4', args=args)
check_pkg ('libsoup-2.4', '2.25.2')
conf.define ('HAVE_LIBSOUP_2_25_2', 1)
check_pkg ('libsoup-2.4', '2.27.90', False, var='LIBSOUP_2_27_90')