mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 18:59:19 +02:00
LCLIntf: refactor.
git-svn-id: trunk@52641 -
This commit is contained in:
parent
491870c710
commit
9a90869147
@ -187,7 +187,7 @@ end;
|
|||||||
|
|
||||||
{$ENDIF WinCE}
|
{$ENDIF WinCE}
|
||||||
|
|
||||||
function FindDefaultBrowserAndOpenUrl(AURL: String): Boolean;
|
function FindDefaultBrowserAndOpenUrl(AURL: String; IsFileURI: Boolean=False; IsLocalWithAnchor: Boolean=False): Boolean;
|
||||||
var
|
var
|
||||||
ABrowser, AParams: WideString;
|
ABrowser, AParams: WideString;
|
||||||
H: HINST;
|
H: HINST;
|
||||||
@ -200,7 +200,7 @@ begin
|
|||||||
if (Pos('%s', AParams) > 0) then
|
if (Pos('%s', AParams) > 0) then
|
||||||
begin
|
begin
|
||||||
//at least FireFox does not like -url -osint "%s" for local files, it wants "%s"
|
//at least FireFox does not like -url -osint "%s" for local files, it wants "%s"
|
||||||
if IsFileUriScheme(AURL) and IsHtmlWithAnchor(AURL) then
|
if IsFileUri and IsLocalWithAnchor then
|
||||||
AParams := '"%s"';
|
AParams := '"%s"';
|
||||||
{$IFnDEF ACP_RTL}
|
{$IFnDEF ACP_RTL}
|
||||||
AParamsUtf8 := Utf16ToUtf8(AParams);
|
AParamsUtf8 := Utf16ToUtf8(AParams);
|
||||||
@ -262,7 +262,7 @@ begin
|
|||||||
//if FindDefaultBrowserWide returns 'rundll.exe'
|
//if FindDefaultBrowserWide returns 'rundll.exe'
|
||||||
//See: issue #0030326 and related
|
//See: issue #0030326 and related
|
||||||
if IsFileURI and IsHtmlWithAnchor(AURL) then
|
if IsFileURI and IsHtmlWithAnchor(AURL) then
|
||||||
Result := FindDefaultBrowserAndOpenURL(AURL)
|
Result := FindDefaultBrowserAndOpenURL(AURL, True, True)
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
//Urls that start with file:// are allowed to contain spaces and should be quoted
|
//Urls that start with file:// are allowed to contain spaces and should be quoted
|
||||||
|
Loading…
Reference in New Issue
Block a user