Remove pre-WebKitGTK+ 1.1.4 support from Form History
This commit is contained in:
parent
03254c22af
commit
a95f2f0f7f
3 changed files with 2 additions and 57 deletions
2
README
2
README
|
@ -11,7 +11,7 @@ Midori is a lightweight web browser.
|
||||||
* Customizable and extensible interface.
|
* Customizable and extensible interface.
|
||||||
* Extensions written in C.
|
* 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
|
Optional: Unique 0.9, libidn, docutils, libnotify, Vala
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,6 @@ formhistory_update_main_hash (gchar* key,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WEBKIT_CHECK_VERSION (1, 1, 4)
|
|
||||||
static gboolean
|
static gboolean
|
||||||
formhistory_navigation_decision_cb (WebKitWebView* web_view,
|
formhistory_navigation_decision_cb (WebKitWebView* web_view,
|
||||||
WebKitWebFrame* web_frame,
|
WebKitWebFrame* web_frame,
|
||||||
|
@ -245,50 +244,6 @@ formhistory_navigation_decision_cb (WebKitWebView* web_view,
|
||||||
}
|
}
|
||||||
return FALSE;
|
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
|
static void
|
||||||
formhistory_window_object_cleared_cb (WebKitWebView* web_view,
|
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);
|
GtkWidget* web_view = midori_view_get_web_view (view);
|
||||||
g_signal_connect (web_view, "window-object-cleared",
|
g_signal_connect (web_view, "window-object-cleared",
|
||||||
G_CALLBACK (formhistory_window_object_cleared_cb), NULL);
|
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_signal_connect (web_view, "navigation-policy-decision-requested",
|
||||||
G_CALLBACK (formhistory_navigation_decision_cb), extension);
|
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
|
static void
|
||||||
|
@ -352,13 +302,8 @@ formhistory_deactivate_tabs (MidoriView* view,
|
||||||
GtkWidget* web_view = midori_view_get_web_view (view);
|
GtkWidget* web_view = midori_view_get_web_view (view);
|
||||||
g_signal_handlers_disconnect_by_func (
|
g_signal_handlers_disconnect_by_func (
|
||||||
web_view, formhistory_window_object_cleared_cb, NULL);
|
web_view, formhistory_window_object_cleared_cb, NULL);
|
||||||
#if WEBKIT_CHECK_VERSION (1, 1, 4)
|
|
||||||
g_signal_handlers_disconnect_by_func (
|
g_signal_handlers_disconnect_by_func (
|
||||||
web_view, formhistory_navigation_decision_cb, extension);
|
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
|
static void
|
||||||
|
|
2
wscript
2
wscript
|
@ -203,7 +203,7 @@ def configure (conf):
|
||||||
includes='/usr/X11R6/include', mandatory=False)
|
includes='/usr/X11R6/include', mandatory=False)
|
||||||
conf.check (lib='Xss', libpath='/usr/X11R6/lib', 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 ('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')
|
check_pkg ('libsoup-2.4', '2.25.2')
|
||||||
conf.define ('HAVE_LIBSOUP_2_25_2', 1)
|
conf.define ('HAVE_LIBSOUP_2_25_2', 1)
|
||||||
check_pkg ('libsoup-2.4', '2.27.90', False, var='LIBSOUP_2_27_90')
|
check_pkg ('libsoup-2.4', '2.27.90', False, var='LIBSOUP_2_27_90')
|
||||||
|
|
Loading…
Reference in a new issue