[yelp/wip/amigadave/webkit2-port: 42/53] libyelp: Fix help-list page
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp/wip/amigadave/webkit2-port: 42/53] libyelp: Fix help-list page
- Date: Mon, 22 Jun 2015 14:00:49 +0000 (UTC)
commit 9ecf34cea6296c6fd7fc13ed76e482b6b7bfde82
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Fri Apr 10 09:43:24 2015 +0200
libyelp: Fix help-list page
Handle help-list uris un yelp-uri-builder functions, and fix the mime
type used by help-list documents.
libyelp/yelp-help-list.c | 4 ++--
libyelp/yelp-uri-builder.c | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libyelp/yelp-help-list.c b/libyelp/yelp-help-list.c
index 5607761..f502022 100644
--- a/libyelp/yelp-help-list.c
+++ b/libyelp/yelp-help-list.c
@@ -445,7 +445,7 @@ help_list_handle_page (YelpHelpList *list,
YelpHelpListPrivate *priv = GET_PRIV (list);
GtkTextDirection direction = gtk_widget_get_default_direction ();
GString *string = g_string_new
- ("<html><head><style type='text/css'>\n"
+ ("<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><style type='text/css'>\n"
"html { height: 100%; }\n"
"body { margin: 0; padding: 0; max-width: 100%;");
colors = yelp_settings_get_colors (yelp_settings_get_default ());
@@ -591,7 +591,7 @@ help_list_handle_page (YelpHelpList *list,
yelp_document_give_contents (YELP_DOCUMENT (list), page_id,
string->str,
- "text/html");
+ "application/xhtml+xml");
g_strfreev (colors);
g_string_free (string, FALSE);
yelp_document_signal (YELP_DOCUMENT (list), page_id,
diff --git a/libyelp/yelp-uri-builder.c b/libyelp/yelp-uri-builder.c
index 01a29fb..09639c9 100644
--- a/libyelp/yelp-uri-builder.c
+++ b/libyelp/yelp-uri-builder.c
@@ -48,7 +48,7 @@ build_network_uri (const gchar *uri)
soup_uri_set_path (soup_uri, path);
g_free (path);
}
- else if (g_str_equal (soup_uri->scheme, "help")) {
+ else if (g_str_equal (soup_uri->scheme, "help") || g_str_equal (soup_uri->scheme, "help-list")) {
/* Page is part of the path, add only leading slash */
path = g_strdup_printf ("/%s", soup_uri->path);
soup_uri_set_path (soup_uri, path);
@@ -80,7 +80,9 @@ build_yelp_uri (const gchar *uri_str)
if (!g_str_has_prefix (uri, BOGUS_PREFIX "ghelp:/") &&
!g_str_has_prefix (uri, BOGUS_PREFIX "gnome-help:/") &&
- !g_str_has_prefix (uri, BOGUS_PREFIX "help:/")) {
+ !g_str_has_prefix (uri, BOGUS_PREFIX "help:/") &&
+ !g_str_has_prefix (uri, BOGUS_PREFIX "help-list:/"))
+ {
return uri;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]