]> spindle.queued.net Git - midori/commitdiff
Remove pre-WebKitGTK+ 1.1.4 support from Form History
authorChristian Dywan <christian@twotoasts.de>
Sun, 22 May 2011 12:35:14 +0000 (14:35 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 22 May 2011 12:35:14 +0000 (14:35 +0200)
README
extensions/formhistory.c
wscript

diff --git a/README b/README
index 36f5ac630eb0c0ff2ce98143664908e1e0a83cea..a740a930f6af837ec76e3c30af2fae9ce114879b 100644 (file)
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ Midori is a lightweight web browser.
 * 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
 
index 3190cf8feb86b217fe6f81f672c8bb28fe20111a..dc5daedab790729593aa81d4e3643d8d665bbf0e 100644 (file)
@@ -185,7 +185,6 @@ formhistory_update_main_hash (gchar* key,
     return TRUE;
 }
 
-#if WEBKIT_CHECK_VERSION (1, 1, 4)
 static gboolean
 formhistory_navigation_decision_cb (WebKitWebView*             web_view,
                                     WebKitWebFrame*            web_frame,
@@ -245,50 +244,6 @@ formhistory_navigation_decision_cb (WebKitWebView*             web_view,
     }
     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,
@@ -310,13 +265,8 @@ formhistory_add_tab_cb (MidoriBrowser*   browser,
     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
@@ -352,13 +302,8 @@ formhistory_deactivate_tabs (MidoriView*      view,
     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
diff --git a/wscript b/wscript
index 8fa7a6b3bc1e3f2c4995e46efa7725caaf5458b4..2f81d37da617730b800c5854c52916123c64a4fa 100644 (file)
--- a/wscript
+++ b/wscript
@@ -203,7 +203,7 @@ def configure (conf):
                     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')