summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2010-06-02 00:51:11 -0500
committerShaun McCance <shaunm@gnome.org>2010-06-02 00:51:11 -0500
commit4c8152d1bd1dabeefda9b4e1f8454e7868b59172 (patch)
tree28841c4224c2ecebad6b72ad29eaa5dc4715ff3d
parent3e580f0d5143726390f4fd21bdcd3f223ed8fd3c (diff)
downloadyelp-4c8152d1bd1dabeefda9b4e1f8454e7868b59172.tar.gz
[yelp-uri] Recognize Mallard docs by index.page.stub in editor mode
-rw-r--r--libyelp/yelp-uri.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index 8e0c414c..ee39fbb7 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -1074,6 +1074,19 @@ resolve_gfile (YelpUri *uri, const gchar *hash)
priv->frag_id = g_strdup (splithash[1]);
}
}
+ else if (yelp_settings_get_editor_mode (yelp_settings_get_default ())) {
+ g_object_unref (child);
+ child = g_file_get_child (priv->gfile, "index.page.stub");
+ if (g_file_query_exists (child, NULL)) {
+ priv->tmptype = YELP_URI_DOCUMENT_TYPE_MALLARD;
+ if (splithash) {
+ if (priv->page_id == NULL)
+ priv->page_id = g_strdup (splithash[0]);
+ if (priv->frag_id == NULL && splithash[0])
+ priv->frag_id = g_strdup (splithash[1]);
+ }
+ }
+ }
g_object_unref (child);
}
else {