Commit 96afeaba authored by Andreas Müller's avatar Andreas Müller Committed by Koen Kooi

midori: update to 0.4.1

minor cleanups:
* remove r0
* pack all files

Run tested on overo
Signed-off-by: default avatarAndreas Müller <schnitzeltony@gmx.de>
Signed-off-by: default avatarKoen Kooi <koen@dominion.thruhere.net>
parent 375b2e6c
......@@ -32,4 +32,6 @@ do_install() {
RRECOMMENDS_${PN} += "glib-networking"
FILES_${PN}-dev += "${datadir}/vala/vapi"
TARGET_CC_ARCH += "${LDFLAGS}"
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
require midori.inc
PR = "r0"
SRC_URI = "http://archive.xfce.org/src/apps/midori/0.4/midori-${PV}.tar.bz2;name=midori \
file://use_dom_api_to_get_selected_text.patch \
"
SRC_URI[midori.md5sum] = "14aa14ccabf3d003903f1584dab15d7a"
SRC_URI[midori.sha256sum] = "0ac31b008b44e08cf0536a38405a0ecc2da7c28e3d549915325dbba74f74cd75"
SRC_URI[midori.md5sum] = "33dde203cd71ae2b1d2adcc7f5739f65"
SRC_URI[midori.sha256sum] = "b3c77ddb6f562a0ea3d2e6fbb756ca0dc158ad8410f4b60f8e5998c2f7305f07"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment