Mercurial > hg > forks > geeqie
changeset 2722:977b97448cbe
Use web help files if local files do not exist
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Sat, 03 Feb 2018 11:29:16 +0000 |
parents | bd779e9f82fc |
children | c3417ff92722 |
files | src/window.c |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.c Sat Feb 03 10:51:17 2018 +0000 +++ b/src/window.c Sat Feb 03 11:29:16 2018 +0000 @@ -244,7 +244,18 @@ if (key && strstr(key, ".html") != 0) { - gchar *path = g_build_filename("file://", GQ_HTMLDIR, key, NULL); + path = g_build_filename(GQ_HTMLDIR, key, NULL); + if (!isfile(path)) + { + if (g_strcmp0(key, "index.html") == 0) + { + path = g_build_filename("http://geeqie.org/help/", "GuideIndex.html", NULL); + } + else + { + path = g_build_filename("http://geeqie.org/help/", key, NULL); + } + } help_browser_run(path); g_free(path); return;