[oe-commits] Michael : midori: add iPhone useragend string. Closes #565

git version control git at git.openembedded.org
Tue Aug 25 17:53:43 UTC 2009


Module: openembedded.git
Branch: shr/import
Commit: bcf6b2b5c154698ccd9b25b1162a90dbf14f2200
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=bcf6b2b5c154698ccd9b25b1162a90dbf14f2200

Author: Michael <lists at bitcloner.org>
Date:   Sun Aug 23 11:26:06 2009 +0000

midori: add iPhone useragend string. Closes #565

---

 recipes/gtk-webcore/files/ua-iphone.patch |   36 +++++++++++++++++++++++++++++
 recipes/gtk-webcore/midori_0.1.2.bb       |    3 +-
 2 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/recipes/gtk-webcore/files/ua-iphone.patch b/recipes/gtk-webcore/files/ua-iphone.patch
new file mode 100644
index 0000000..e622794
--- /dev/null
+++ b/recipes/gtk-webcore/files/ua-iphone.patch
@@ -0,0 +1,36 @@
+diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
+index b0e5607..4931d6b 100644
+--- a/midori/midori-websettings.c
++++ b/midori/midori-websettings.c
+@@ -235,6 +235,7 @@ midori_identity_get_type (void)
+     {
+         static const GEnumValue values[] = {
+          { MIDORI_IDENT_MIDORI, "MIDORI_IDENT_MIDORI", N_("Midori") },
++         { MIDORI_IDENT_IPHONE, "MIDORI_IDENT_IPHONE", N_("iPhone") },
+          { MIDORI_IDENT_SAFARI, "MIDORI_IDENT_SAFARI", N_("Safari") },
+          { MIDORI_IDENT_FIREFOX, "MIDORI_IDENT_FIREFOX", N_("Firefox") },
+          { MIDORI_IDENT_EXPLORER, "MIDORI_IDENT_EXPLORER", N_("Internet Explorer") },
+@@ -826,6 +827,11 @@ generate_ident_string (MidoriIdentity identify_as)
+     case MIDORI_IDENT_MIDORI:
+         return g_strdup_printf ("%s (%s; %s; U; %s) WebKit/532+",
+                                 appname, platform, os, lang);
++    case MIDORI_IDENT_IPHONE:
++        return g_strdup_printf ("Mozilla/5.0 (iPhone; U; %s; %s) "
++            "AppleWebKit/532+ (KHTML, like Gecko) Version/3.0 Mobile/1A538b" 
++            "Safari/419.3 %s",
++                                os, lang, appname);
+     case MIDORI_IDENT_SAFARI:
+         return g_strdup_printf ("Mozilla/5.0 (%s; U; %s; %s) "
+             "AppleWebKit/532+ (KHTML, like Gecko) Safari/419.3 %s",
+diff --git a/midori/midori-websettings.h b/midori/midori-websettings.h
+index 96e5816..588f66a 100644
+--- a/midori/midori-websettings.h
++++ b/midori/midori-websettings.h
+@@ -107,6 +107,7 @@ midori_accept_cookies_get_type (void) G_GNUC_CONST;
+ typedef enum
+ {
+     MIDORI_IDENT_MIDORI,
++    MIDORI_IDENT_IPHONE,
+     MIDORI_IDENT_SAFARI,
+     MIDORI_IDENT_FIREFOX,
+     MIDORI_IDENT_EXPLORER,
diff --git a/recipes/gtk-webcore/midori_0.1.2.bb b/recipes/gtk-webcore/midori_0.1.2.bb
index 067e900..d25c309 100644
--- a/recipes/gtk-webcore/midori_0.1.2.bb
+++ b/recipes/gtk-webcore/midori_0.1.2.bb
@@ -3,7 +3,8 @@ require midori.inc
 DEPENDS += "python-native"
 
 SRC_URI = "http://goodies.xfce.org/releases/midori/midori-${PV}.tar.bz2"
-
+SRC_URI += "file://ua-iphone.patch;patch=1"
+PR = "r1"
 
 do_configure() {
 	./configure \





More information about the Openembedded-commits mailing list