DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2127
Version: 1.3-feature





Link: http://www.fltk.org/str.php?L2127
Version: 1.3-feature
--- Fl_Help_View.cxx.old        2008-12-14 21:47:12.000000000 -0800
+++ Fl_Help_View.cxx    2009-01-19 13:43:56.000000000 -0800
@@ -62,6 +62,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <FL/fl_utf8.h>
+#include <FL/filename.h>               // fl_open_uri()
 #include "flstring.h"
 #include <ctype.h>
 #include <errno.h>
@@ -3084,14 +3085,17 @@
       strncmp(localname, "mailto:";, 7) == 0 ||
       strncmp(localname, "news:";, 5) == 0)
   {
-    // Remote link wasn't resolved...
-    snprintf(error, sizeof(error),
-             "<HTML><HEAD><TITLE>Error</TITLE></HEAD>"
-             "<BODY><H1>Error</H1>"
-            "<P>Unable to follow the link \"%s\" - "
-            "no handler exists for this URI scheme.</P></BODY>",
-            localname);
-    value_ = strdup(error);
+    char urimsg[256];
+    if ( fl_open_uri(localname, urimsg, sizeof(urimsg)) == 0 ) {
+       // Remote link wasn't resolved...
+       snprintf(error, sizeof(error),
+                "<HTML><HEAD><TITLE>Error</TITLE></HEAD>"
+                "<BODY><H1>Error</H1>"
+                "<P>Unable to follow the link \"%s\" - "
+                "%s.</P></BODY>",
+                localname, urimsg);
+       value_ = strdup(error);
+    }
   }
   else
   {
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to