diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-10-02 21:31:09 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-10-02 21:31:09 +0000 |
commit | 681f0d02b32d7078f5d5d93fd9504f562d1a8e7a (patch) | |
tree | 5eb3b186eb2d3fa0a1339d329fc1772e804dea40 /www-client | |
parent | Small ebuild improvement. (diff) | |
download | gentoo-2-681f0d02b32d7078f5d5d93fd9504f562d1a8e7a.tar.gz gentoo-2-681f0d02b32d7078f5d5d93fd9504f562d1a8e7a.tar.bz2 gentoo-2-681f0d02b32d7078f5d5d93fd9504f562d1a8e7a.zip |
Fix building with webkit-gtk >= 1.5.1 wrt #385371 by Hanno Meyer-Thurow
(Portage version: 2.2.0_alpha60/cvs/Linux x86_64)
Diffstat (limited to 'www-client')
-rw-r--r-- | www-client/midori/ChangeLog | 6 | ||||
-rw-r--r-- | www-client/midori/files/midori-0.4.0-webkit151.patch | 59 | ||||
-rw-r--r-- | www-client/midori/midori-0.4.0.ebuild | 3 |
3 files changed, 66 insertions, 2 deletions
diff --git a/www-client/midori/ChangeLog b/www-client/midori/ChangeLog index e84568e20482..ae70675e8254 100644 --- a/www-client/midori/ChangeLog +++ b/www-client/midori/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for www-client/midori # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/midori/ChangeLog,v 1.65 2011/09/09 16:39:59 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-client/midori/ChangeLog,v 1.66 2011/10/02 21:31:09 ssuominen Exp $ + + 02 Oct 2011; Samuli Suominen <ssuominen@gentoo.org> midori-0.4.0.ebuild, + +files/midori-0.4.0-webkit151.patch: + Fix building with webkit-gtk >= 1.5.1 wrt #385371 by Hanno Meyer-Thurow 09 Sep 2011; Christoph Mende <angelos@gentoo.org> midori-0.4.0.ebuild: Restore keywords diff --git a/www-client/midori/files/midori-0.4.0-webkit151.patch b/www-client/midori/files/midori-0.4.0-webkit151.patch new file mode 100644 index 000000000000..620cdc96f464 --- /dev/null +++ b/www-client/midori/files/midori-0.4.0-webkit151.patch @@ -0,0 +1,59 @@ +From 648d869e4ff69f121da97484a0fd553b005ca751 Mon Sep 17 00:00:00 2001 +From: Christian Dywan <christian@twotoasts.de> +Date: Wed, 21 Sep 2011 21:50:51 +0000 +Subject: Use DOM API to get selected text in WebKitGTK+ 1.5.1 + +Fixes: https://bugs.launchpad.net/midori/+bug/799603 +--- +diff --git a/midori/midori-view.c b/midori/midori-view.c +index 0d7a96e..e426e7f 100644 +--- a/midori/midori-view.c ++++ b/midori/midori-view.c +@@ -39,9 +39,11 @@ + #include <sys/utsname.h> + #endif + ++#if !WEBKIT_CHECK_VERSION (1, 5, 1) + /* This is unstable API, so we need to declare it */ + gchar* + webkit_web_view_get_selected_text (WebKitWebView* web_view); ++#endif + + static void + midori_view_construct_web_view (MidoriView* view); +@@ -4167,10 +4169,33 @@ midori_view_get_link_uri (MidoriView* view) + gboolean + midori_view_has_selection (MidoriView* view) + { ++#if WEBKIT_CHECK_VERSION (1, 5, 1) ++ WebKitDOMDocument* doc; ++ WebKitDOMDOMWindow* window; ++ WebKitDOMDOMSelection* selection; ++ WebKitDOMRange* range; ++#endif ++ + g_return_val_if_fail (MIDORI_IS_VIEW (view), FALSE); + ++ ++#if WEBKIT_CHECK_VERSION (1, 5, 1) ++ doc = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view->web_view)); ++ window = webkit_dom_document_get_default_view (doc); ++ selection = webkit_dom_dom_window_get_selection (window); ++ if (selection == NULL) ++ return FALSE; ++ ++ range = webkit_dom_dom_selection_get_range_at (selection, 0, NULL); ++ if (range == NULL) ++ return FALSE; ++ ++ katze_assign (view->selected_text, webkit_dom_range_get_text (range)); ++#else + katze_assign (view->selected_text, webkit_web_view_get_selected_text ( + WEBKIT_WEB_VIEW (view->web_view))); ++#endif ++ + if (view->selected_text && *view->selected_text) + return TRUE; + else +-- +cgit diff --git a/www-client/midori/midori-0.4.0.ebuild b/www-client/midori/midori-0.4.0.ebuild index ec33e109e570..95c1890395a4 100644 --- a/www-client/midori/midori-0.4.0.ebuild +++ b/www-client/midori/midori-0.4.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/midori/midori-0.4.0.ebuild,v 1.2 2011/09/09 16:39:59 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-client/midori/midori-0.4.0.ebuild,v 1.3 2011/10/02 21:31:09 ssuominen Exp $ EAPI=3 inherit eutils fdo-mime gnome2-utils python waf-utils @@ -36,6 +36,7 @@ pkg_setup() { DOCS=( AUTHORS ChangeLog HACKING INSTALL TODO TRANSLATE ) HTML_DOCS=( data/faq.html data/faq.css ) + PATCHES=( "${FILESDIR}"/${P}-webkit151.patch ) } src_configure() { |