summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorAli Abdin <aliabdin@aucegypt.edu>2000-08-12 16:04:21 +0000
committerAli Abdin <rakholh@src.gnome.org>2000-08-12 16:04:21 +0000
commitb762c8c5e95154f5389f5bbeee3ec613941d5c3f (patch)
tree635ad43d058bfc5e482bd02a1006bf388c2c475d /components
parent4de56b6291f318662cc8ed7dd373484b24022e37 (diff)
downloadnautilus-b762c8c5e95154f5389f5bbeee3ec613941d5c3f.tar.gz
New function to return the old doc path. (transform_file): If we can not
2000-08-12 Ali Abdin <aliabdin@aucegypt.edu> * components/help/help-method.c: (old_help_file): New function to return the old doc path. (transform_file): If we can not find the SGML or XML path use the old doc file (index.html)
Diffstat (limited to 'components')
-rw-r--r--components/help/help-method.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/components/help/help-method.c b/components/help/help-method.c
index 78e813c31..055f0df68 100644
--- a/components/help/help-method.c
+++ b/components/help/help-method.c
@@ -57,6 +57,7 @@ typedef struct {
static gboolean file_in_info_path (const char *file);
+static char *old_help_file (const char *old_uri);
static HelpURI *
@@ -250,7 +251,9 @@ transform_file (const char *old_uri,
return help_uri;
}
g_free (new_uri_with_extension);
-
+
+ g_free (new_uri);
+ new_uri = old_help_file (base);
/* Try with an html extension. */
new_uri_with_extension = g_strconcat (new_uri, ".html", NULL);
if (convert_file_to_uri (help_uri, new_uri_with_extension)) {
@@ -318,6 +321,23 @@ file_from_path (const char *path)
}
static char *
+old_help_file (const char *old_uri)
+{
+ char *base_name, *new_uri;
+
+ base_name = file_from_path (old_uri);
+ if (base_name == NULL || base_name[0] == '\0') {
+ g_free (base_name);
+ return NULL;
+ }
+
+ new_uri = gnome_help_file_path (base_name, "index");
+ g_free (base_name);
+
+ return new_uri;
+}
+
+static char *
find_help_file (const char *old_uri)
{
char *base_name, *new_uri;