[arch-commits] Commit in epiphany/trunk (3 files)

Jan de Groot jgc at archlinux.org
Mon Oct 19 19:27:16 UTC 2009


    Date: Monday, October 19, 2009 @ 15:27:16
  Author: jgc
Revision: 56115

upgpkg: epiphany 2.28.1-1
    Update to 2.28.1 - add patches to fix mailto and javascript links. FTP browsing is still broken, will be fixed in 2.30

Added:
  epiphany/trunk/execute-javascript.patch
  epiphany/trunk/mailto-fix.patch
Modified:
  epiphany/trunk/PKGBUILD

--------------------------+
 PKGBUILD                 |   14 +++++++++----
 execute-javascript.patch |   37 ++++++++++++++++++++++++++++++++++++
 mailto-fix.patch         |   46 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-10-19 19:11:15 UTC (rev 56114)
+++ PKGBUILD	2009-10-19 19:27:16 UTC (rev 56115)
@@ -2,22 +2,28 @@
 # Maintainer: dale <dale at archlinux.org>
 
 pkgname=epiphany
-pkgver=2.28.0
+pkgver=2.28.1
 pkgrel=1
 install=epiphany.install
 pkgdesc="A GNOME2 web browser based on the WebKit rendering engine."
 arch=(i686 x86_64)
 license=('GPL')
-depends=('libwebkit>=1.1.15' 'startup-notification>=0.10' 'iso-codes>=3.10.1' 'desktop-file-utils' 'libxslt>=1.1.24' 'libnotify>=0.4.5' 'avahi>=0.6.25' 'libsoup-gnome>=2.28.0')
+depends=('libwebkit>=1.1.15.1' 'startup-notification>=0.10' 'iso-codes>=3.10.1' 'desktop-file-utils' 'libxslt>=1.1.24' 'libnotify>=0.4.5' 'avahi>=0.6.25' 'libsoup-gnome>=2.28.0')
 makedepends=('gnome-doc-utils>=0.18.0' 'pkgconfig' 'networkmanager' 'intltool')
 options=('!libtool' '!emptydirs')
 groups=('gnome')
 url="http://www.gnome.org/projects/epiphany/"
-source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/2.28/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('23e0379c41c378221338fb327d747f3e42b2b98cdf1512c9df7cbeab45f311ea')
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/2.28/${pkgname}-${pkgver}.tar.bz2
+        execute-javascript.patch
+        mailto-fix.patch)
+sha256sums=('95ccdd36bc7fdf95c6085da3b76cee6467f3c9a8745541cfb09fdd8d33a1f04d'
+            'b9e47e1fb6a38d76f529bc7ae8f754adea05eee4f8c024d302a0e84dd6147ef3'
+            '0ba4e4b6708fd2394ff2868a6f793627906f45230d0ef80d268c10b69502fe73')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np1 -i "${srcdir}/execute-javascript.patch" || return 1
+  patch -Np1 -i "${srcdir}/mailto-fix.patch" || return 1
   ./configure --prefix=/usr --sysconfdir=/etc \
       --localstatedir=/var \
       --disable-scrollkeeper \

Added: execute-javascript.patch
===================================================================
--- execute-javascript.patch	                        (rev 0)
+++ execute-javascript.patch	2009-10-19 19:27:16 UTC (rev 56115)
@@ -0,0 +1,37 @@
+From 437e08e9303dfe186d14b1cd3b2e9226c61feb4e Mon Sep 17 00:00:00 2001
+From: Chris Lamb <lamby at debian.org>
+Date: Sun, 11 Oct 2009 15:44:44 +0000
+Subject: Execute "javascript:" URIs instead of browsing for them.
+
+Signed-off-by: Xan Lopez <xan at gnome.org>
+---
+diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
+index 0405de7..d937d2e 100644
+--- a/embed/ephy-embed-utils.c
++++ b/embed/ephy-embed-utils.c
+@@ -91,6 +91,7 @@ ephy_embed_utils_address_has_web_scheme (const char *address)
+ 			  g_str_has_prefix (address, "file:") ||
+ 			  g_str_has_prefix (address, "data:") ||
+ 			  g_str_has_prefix (address, "about:") ||
++			  g_str_has_prefix (address, "javascript:") ||
+ 			  g_str_has_prefix (address, "gopher:"));
+ 
+ 	return has_web_scheme;
+diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
+index acf3e5f..0d3be0d 100644
+--- a/embed/ephy-web-view.c
++++ b/embed/ephy-web-view.c
+@@ -1118,7 +1118,10 @@ ephy_web_view_load_url (EphyWebView *view,
+   } else
+     effective_url = ephy_embed_utils_normalize_address (url);
+ 
+-  webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
++  if (g_str_has_prefix (effective_url, "javascript:"))
++    webkit_web_view_execute_script (WEBKIT_WEB_VIEW (view), effective_url);
++  else
++    webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
+ 
+   if (soup_uri)
+     soup_uri_free (soup_uri);
+--
+cgit v0.8.2

Added: mailto-fix.patch
===================================================================
--- mailto-fix.patch	                        (rev 0)
+++ mailto-fix.patch	2009-10-19 19:27:16 UTC (rev 56115)
@@ -0,0 +1,46 @@
+From 7a31aae32f3638ec99f432795f5c721b60e67268 Mon Sep 17 00:00:00 2001
+From: Frédéric Péters <fpeters at 0d.be>
+Date: Fri, 09 Oct 2009 18:07:20 +0000
+Subject: Pass mailto: URI to gtk_show_uri()
+
+(Part of) Bug #584537
+
+Signed-off-by: Xan Lopez <xan at gnome.org>
+---
+diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
+index d937d2e..eb7c434 100644
+--- a/embed/ephy-embed-utils.c
++++ b/embed/ephy-embed-utils.c
+@@ -92,6 +92,7 @@ ephy_embed_utils_address_has_web_scheme (const char *address)
+ 			  g_str_has_prefix (address, "data:") ||
+ 			  g_str_has_prefix (address, "about:") ||
+ 			  g_str_has_prefix (address, "javascript:") ||
++			  g_str_has_prefix (address, "mailto:") ||
+ 			  g_str_has_prefix (address, "gopher:"));
+ 
+ 	return has_web_scheme;
+diff --git a/src/ephy-window.c b/src/ephy-window.c
+index 59a06c7..61cc17c 100644
+--- a/src/ephy-window.c
++++ b/src/ephy-window.c
+@@ -2529,10 +2529,18 @@ policy_decision_required_cb (WebKitWebView *web_view,
+ 	WebKitWebNavigationReason reason;
+ 	gint button;
+ 	gint state;
++	const char *uri;
+ 
+ 	reason = webkit_web_navigation_action_get_reason (action);
+ 	button = webkit_web_navigation_action_get_button (action);
+ 	state = webkit_web_navigation_action_get_modifier_state (action);
++	uri = webkit_network_request_get_uri (request);
++
++	if (g_str_has_prefix (uri, "mailto:")) {
++		webkit_web_policy_decision_ignore (decision);
++		gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL);
++		return TRUE;
++	}
+ 
+ 	/* Open in new tab for middle click or ctrl+click */
+ 	if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&
+--
+cgit v0.8.2




More information about the arch-commits mailing list