From 0dd9a7fef6e31ce557bdbbe2a9e943f56652a23b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 16 Feb 2009 15:51:20 +0000 Subject: [PATCH] - Fix displaying web pages, WebKit doesn't like local filenames as URIs --- devhelp-load-uris.patch | 33 +++++++++++++++++++++++++++++++++ devhelp.spec | 7 +++++++ 2 files changed, 40 insertions(+) create mode 100644 devhelp-load-uris.patch diff --git a/devhelp-load-uris.patch b/devhelp-load-uris.patch new file mode 100644 index 0000000..f0e5d60 --- /dev/null +++ b/devhelp-load-uris.patch @@ -0,0 +1,33 @@ +Index: src/dh-parser.c +=================================================================== +--- src/dh-parser.c (revision 1263) ++++ src/dh-parser.c (working copy) +@@ -66,6 +66,7 @@ + { + gint i; + gint line, col; ++ gchar *tmp_base; + const gchar *title = NULL; + const gchar *base = NULL; + const gchar *name = NULL; +@@ -126,11 +127,18 @@ + } + + if (base) { +- parser->base = g_strdup (base); ++ tmp_base = g_strdup (base); + } else { +- parser->base = g_path_get_dirname (parser->path); ++ tmp_base = g_path_get_dirname (parser->path); + } ++ parser->base = g_filename_to_uri (tmp_base, NULL, NULL); + ++ /* In case the conversion didn't work */ ++ if (parser->base) ++ g_free (tmp_base); ++ else ++ parser->base = tmp_base; ++ + link = dh_link_new (DH_LINK_TYPE_BOOK, + parser->base, + name, diff --git a/devhelp.spec b/devhelp.spec index eccbec5..7ac41dc 100644 --- a/devhelp.spec +++ b/devhelp.spec @@ -29,6 +29,9 @@ BuildRequires: libwnck-devel >= %{libwnck_version} BuildRequires: gtk2-devel BuildRequires: WebKit-gtk-devel +# http://bugzilla.gnome.org/show_bug.cgi?id=572022 +Patch0: devhelp-load-uris.patch + %description Devhelp is an API documentation browser for the GNOME desktop. It works natively with API documentation generated by gtk-doc. @@ -49,6 +52,7 @@ into other applications such as IDEs. %prep %setup -q -n devhelp-%{version} +%patch0 -p0 -b .uris %build %configure --disable-static @@ -132,6 +136,9 @@ fi %{_libdir}/pkgconfig/* %changelog +* Mon Feb 16 2009 - Bastien Nocera - 0.23-3 +- Fix displaying web pages, WebKit doesn't like local filenames as URIs + * Fri Jan 23 2009 Matthias Clasen - 0.23-2 - Cosmetic spec fixes