[yelp] [yelp-uri] Use index.docbook for help: URIs



commit f522c9f534bcd04b6dbee6b27e8215309e882a3c
Author: Shaun McCance <shaunm gnome org>
Date:   Tue Jun 8 09:24:14 2010 -0500

    [yelp-uri] Use index.docbook for help: URIs

 libyelp/yelp-uri.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index a6d7e5e..dc2dba9 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -579,12 +579,22 @@ resolve_data_dirs (YelpUri      *ret,
             }
             g_free (filename);
 
-            filename = g_strdup_printf ("%s/%s.xml", helpdir, pageid);
-            if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
-                priv->tmptype = YELP_URI_DOCUMENT_TYPE_DOCBOOK;
-                continue;
+            if (langfirst) {
+                filename = g_strdup_printf ("%s/index.docbook", helpdir);
+                if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
+                    priv->tmptype = YELP_URI_DOCUMENT_TYPE_DOCBOOK;
+                    continue;
+                }
+                g_free (filename);
+            }
+            else {
+                filename = g_strdup_printf ("%s/%s.xml", helpdir, pageid);
+                if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
+                    priv->tmptype = YELP_URI_DOCUMENT_TYPE_DOCBOOK;
+                    continue;
+                }
+                g_free (filename);
             }
-            g_free (filename);
 
             filename = g_strdup_printf ("%s/%s.html", helpdir, pageid);
             if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {



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