mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-02 13:59:59 +00:00
midori: update to 0.4.0 / buildable by upstream patch & LDFLAGS_append / minor cleanup
* LDFLAGS_append was suggested by Bernhard Guillon [1] * run tested on overo [1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-September/034748.html Signed-off-by: Andreas Müller <schnitzeltony@gmx.de> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
committed by
Koen Kooi
parent
6786f31189
commit
fcbb1d26f1
@@ -6,9 +6,6 @@ DEPENDS = "webkit-gtk libsoup-2.4 libsexy openssl vala-native python-native pyth
|
||||
|
||||
inherit gtk-icon-cache pkgconfig
|
||||
|
||||
SRC_URI = "http://archive.xfce.org/src/apps/midori/0.2/midori-${PV}.tar.bz2;name=midori \
|
||||
"
|
||||
|
||||
do_configure() {
|
||||
sed -i -e 's:, shell=False::g' -e s:/usr/X11R6/include::g -e s:/usr/X11R6/lib::g wscript
|
||||
./configure \
|
||||
@@ -27,6 +24,8 @@ do_configure() {
|
||||
--disable-hildon \
|
||||
}
|
||||
|
||||
LDFLAGS_append = " -ljavascriptcoregtk-1.0 "
|
||||
|
||||
do_install() {
|
||||
oe_runmake DESTDIR=${D} install
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From 7f549b89a9e9939a7888d9e4ede628ef9c80df80 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Dywan <christian@twotoasts.de>
|
||||
Date: Fri, 20 May 2011 19:58:35 +0000
|
||||
Subject: Handle missing speedial.json and missing shortcuts array
|
||||
|
||||
---
|
||||
diff --git a/midori/main.c b/midori/main.c
|
||||
index 007b03f..c6b8568 100644
|
||||
--- a/midori/main.c
|
||||
+++ b/midori/main.c
|
||||
@@ -1605,7 +1605,12 @@ speeddial_new_from_file (const gchar* config,
|
||||
}
|
||||
|
||||
katze_assign (config_file, g_build_filename (config, "speeddial.json", NULL));
|
||||
- g_file_get_contents (config_file, &json_content, &json_length, NULL);
|
||||
+ if (!g_file_get_contents (config_file, &json_content, &json_length, NULL))
|
||||
+ {
|
||||
+ katze_assign (json_content, g_strdup ("'{}'"));
|
||||
+ json_length = strlen ("'{}'");
|
||||
+ }
|
||||
+
|
||||
script = g_string_sized_new (json_length);
|
||||
g_string_append (script, "var json = JSON.parse (");
|
||||
g_string_append_len (script, json_content, json_length);
|
||||
@@ -1619,7 +1624,7 @@ speeddial_new_from_file (const gchar* config,
|
||||
" + 'title=' + tile['title'] + '\\n\\n';"
|
||||
"} "
|
||||
"var columns = json['width'] ? json['width'] : 3;"
|
||||
- "var rows = json['shortcuts'].length / columns;"
|
||||
+ "var rows = json['shortcuts'] ? json['shortcuts'].length / columns : 0;"
|
||||
"keyfile += '[settings]\\n'"
|
||||
" + 'columns=' + columns + '\\n'"
|
||||
" + 'rows=' + (rows > 3 ? rows : 3) + '\\n\\n';"
|
||||
--
|
||||
cgit
|
||||
@@ -0,0 +1,60 @@
|
||||
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
|
||||
|
||||
BIN
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
require midori.inc
|
||||
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "http://archive.xfce.org/src/apps/midori/0.3/midori-${PV}.tar.bz2;name=midori \
|
||||
file://speeddial.patch \
|
||||
"
|
||||
SRC_URI[midori.md5sum] = "c4cb0686601b1c470c317de3d3f8e8fd"
|
||||
SRC_URI[midori.sha256sum] = "5fb290ffde81e5e6b39a54d286f5732496bfda10ff65019189cc6bf8408f2410"
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user