Text correction (as suggested by Dan Kegel) - Winebrowser: Pass any
given argument that is not a mailto URL to the browser
Stefan Siebert
stefan.siebert at web.de
Thu Jul 27 11:08:23 CDT 2006
This is an enhancement for the winebrowser. Currently http urls are only
accepted if they are prefixed (http://). Although the browser should
know how to handle a given argument best (ie. add the http:// or www
prefix). The patch passes any given argument to the browser (if it is
not a mailto: url).
So programs like the Notes Client may use the winebrowser wrapper like
any other browser and the user is not forced to type the http:// URL
prefix.
Changelog: programs/winebrowser/main.c - Assume any address given
by the user is a web page unless a protocol prefix is present
which indicates that the address is a mailto URL
- Stefan
-------------- next part --------------
diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c
index ca07c44..b9b51c8 100644
--- a/programs/winebrowser/main.c
+++ b/programs/winebrowser/main.c
@@ -28,7 +28,7 @@
* taken from a registry key.
*
* The argument may be a regular Windows file name, a file URL, an
- * http(s) URL or a mailto URL. In the first three cases the argument
+ * URL or a mailto URL. In the first three cases the argument
* will be fed to a web browser. In the last case the argument is fed
* to a mail client. A mailto URL is composed as follows:
*
@@ -209,12 +209,9 @@ int main(int argc, char *argv[])
}
}
- if (!strncasecmp( url, "http:", 5 ) || !strncasecmp( url, "https:", 6 ))
- return open_http_url( url );
-
if (!strncasecmp( url, "mailto:", 7 ))
return open_mailto_url( url );
- fprintf( stderr, "winebrowser: cannot handle this type of URL: %s\n", url );
- return 1;
+ // let the browser decide how to handle the given url
+ return open_http_url( url );
}
More information about the wine-patches
mailing list