summaryrefslogtreecommitdiff
path: root/libyelp
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2015-04-10 09:43:24 +0200
committerDavid King <amigadave@amigadave.com>2015-06-22 14:55:26 +0100
commit9ecf34cea6296c6fd7fc13ed76e482b6b7bfde82 (patch)
tree41044131e4adddf1c862db9099503ad525cb5d8e /libyelp
parent89833ecee9ca22f1d5cb390a5efeed088ff406ad (diff)
downloadyelp-9ecf34cea6296c6fd7fc13ed76e482b6b7bfde82.tar.gz
libyelp: Fix help-list page
Handle help-list uris un yelp-uri-builder functions, and fix the mime type used by help-list documents.
Diffstat (limited to 'libyelp')
-rw-r--r--libyelp/yelp-help-list.c4
-rw-r--r--libyelp/yelp-uri-builder.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/libyelp/yelp-help-list.c b/libyelp/yelp-help-list.c
index 5607761d..f5020229 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 01a29fbf..09639c95 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;
}