Commit f52b4c01 authored by claes's avatar claes

Web link in xtt help files

parent 36cc0901
......@@ -275,6 +275,37 @@ int NavHelp::help( char *help_key, char *help_bookmark,
link_filename_p = link_filename;
}
}
else if ( (s = strstr( line, "<weblink>")) || (s = strstr( line, "<WEBLINK>")))
{
help_remove_spaces( s + 9, link);
*s = 0;
link_nr = dcli_parse( link, ",", "", (char *)link_part,
sizeof( link_part) / sizeof( link_part[0]),
sizeof( link_part[0]), 0);
if ( link_nr == 1)
{
strcpy( link, "$web:");
help_remove_spaces( link_part[0], &link[5]);
strcpy( link_bookmark, "");
link_filename_p = file_name;
}
else if ( link_nr == 2)
{
strcpy( link, "$web:");
help_remove_spaces( link_part[0], &link[5]);
help_remove_spaces( link_part[1], link_bookmark);
link_filename_p = file_name;
}
else if ( link_nr > 2)
{
strcpy( link, "$web:");
help_remove_spaces( link_part[0], &link[5]);
help_remove_spaces( link_part[1], link_bookmark);
help_remove_spaces( link_part[2], link_filename);
link_filename_p = link_filename;
}
}
else
{
strcpy( link, "");
......
......@@ -802,7 +802,11 @@ int HItemHelpImage::doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpn
if ( strcmp( link, "") != 0)
{
if ( (strstr( link, ".htm") != 0) || (strstr( link, ".pdf") != 0)) {
if ( strncmp( link, "$web:", 5) == 0) {
// Open the url
xhelpnav_open_URL( xhelpnav, &link[5]);
}
else if ( (strstr( link, ".htm") != 0) || (strstr( link, ".pdf") != 0)) {
// Open the url
xhelpnav_open_URL( xhelpnav, link);
}
......@@ -924,7 +928,11 @@ int HItemHelp::doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpnav, d
}
else if ( strcmp( link, "") != 0)
{
if ( (strstr( link, ".htm") != 0) || (strstr( link, ".pdf") != 0)) {
if ( strncmp( link, "$web:", 5) == 0) {
// Open the url
xhelpnav_open_URL( xhelpnav, &link[5]);
}
else if ( (strstr( link, ".htm") != 0) || (strstr( link, ".pdf") != 0)) {
// Open the url
xhelpnav_open_URL( xhelpnav, link);
}
......@@ -991,7 +999,11 @@ int HItemHelpBold::doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpna
}
else if ( strcmp( link, "") != 0)
{
if ( (strstr( link, ".htm") != 0) || (strstr( link, ".pdf") != 0)) {
if ( strncmp( link, "$web:", 5) == 0) {
// Open the url
xhelpnav_open_URL( xhelpnav, &link[5]);
}
else if ( (strstr( link, ".htm") != 0) || (strstr( link, ".pdf") != 0)) {
// Open the url
xhelpnav_open_URL( xhelpnav, link);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment