[yelp/wip/webkit2-port: 5/18] yelp-uri: Use 'index' as default page for help: uris when resolving a xref



commit e4084169ddfc2858047c27d02ca0398435d19e9c
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Thu Aug 30 13:18:14 2012 +0200

    yelp-uri: Use 'index' as default page for help: uris when resolving a xref
    
    If a xref: uri for a help: document has no page, use index as the
    default one like resolve_help_uri does.

 libyelp/yelp-uri.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index 81f2c3c..b140d7b 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -1188,7 +1188,10 @@ resolve_xref_uri (YelpUri *uri)
     }
     if (priv->page_id && priv->page_id[0] == '\0') {
         g_free (priv->page_id);
-        priv->page_id = NULL;
+        if (g_str_has_prefix (priv->docuri, "help:"))
+            priv->page_id = g_strdup ("index");
+        else
+            priv->page_id = NULL;
     }
 
     if (priv->page_id &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]