cpw.masca.webkit: b89ab385: Handle better webkit's navigation-policy...
masca at cpw.pidgin.im
masca at cpw.pidgin.im
Tue Aug 23 02:26:03 EDT 2011
----------------------------------------------------------------------
Revision: b89ab3856a07e9d3544d89c0e4c18653ebed9d1b
Parent: 1aca173a8d356d2a5e2cd857ddaf838af01f6719
Author: masca at cpw.pidgin.im
Date: 08/23/11 02:21:27
Branch: im.pidgin.cpw.masca.webkit
URL: http://d.pidgin.im/viewmtn/revision/info/b89ab3856a07e9d3544d89c0e4c18653ebed9d1b
Changelog:
Handle better webkit's navigation-policy-decision-requested signal to be able to manage external files, links and theme files.
Changes against parent 1aca173a8d356d2a5e2cd857ddaf838af01f6719
patched pidgin/gtkwebview.c
-------------- next part --------------
============================================================
--- pidgin/gtkwebview.c 8f31051509a9f73693b35e57eaebeb2930c8a265
+++ pidgin/gtkwebview.c 27c55e838fd42a5d9d1e575d361f2d6e40b226c3
@@ -184,12 +184,19 @@ webview_link_clicked (WebKitWebView *vie
WebKitWebPolicyDecision *policy_decision)
{
const gchar *uri;
+ WebKitWebNavigationReason reason;
uri = webkit_network_request_get_uri (request);
+ reason = webkit_web_navigation_action_get_reason(navigation_action);
- /* the gtk imhtml way was to create an idle cb, not sure
- * why, so right now just using purple_notify_uri directly */
- purple_notify_uri (NULL, uri);
+ if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED) {
+ /* the gtk imhtml way was to create an idle cb, not sure
+ * why, so right now just using purple_notify_uri directly */
+ purple_notify_uri (NULL, uri);
+ }
+
+ webkit_web_policy_decision_use(policy_decision);
+
return TRUE;
}
More information about the Commits
mailing list