- Fix displaying web pages, WebKit doesn't like local filenames as URIs

This commit is contained in:
Bastien Nocera 2009-02-16 15:51:20 +00:00
parent 3e2145ef5a
commit 0dd9a7fef6
2 changed files with 40 additions and 0 deletions

33
devhelp-load-uris.patch Normal file
View File

@ -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,

View File

@ -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 <bnocera@redhat.com> - 0.23-3
- Fix displaying web pages, WebKit doesn't like local filenames as URIs
* Fri Jan 23 2009 Matthias Clasen <mclasen@redhat.com> - 0.23-2
- Cosmetic spec fixes