Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsoft-kras committed Jan 3, 2017
1 parent 9937ed9 commit cde9940
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6499,7 +6499,15 @@ function TMainForm.ExecRemoteFile(const FileName: string; SelectFile: boolean):
p:='';
s:=ExtractFilePath(s);
end;
Result:=OpenURL(s, p);

//{$ifdef mswindows}
Result:=OpenURL(s, p);
//{$else}
// using lclintf;
// //Result := OpenURL(s, p); // does not work in latest linux very well!!!!
// Result := OpenDocument(s); // works better
//{$endif mswindows}

AppNormal;
if not Result then begin
ForceAppNormal;
Expand Down
6 changes: 3 additions & 3 deletions utils.pas
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,16 @@ function ParamStrUTF8(Param: Integer): utf8string;
if Length(s) >= 2 then
if (s[1] = '"') and (s[Length(s)] = '"') then
s:=Copy(s, 2, Length(s) - 2);
FParams.Add(UTF8Encode(s)); //FParams.Add((s));// Lazarus 1.4.4
FParams.Add(UTF8Encode(s));
end;
// Getting real executable name
SetLength(s, 1000);
SetLength(s, GetModuleFileNameW(HINSTANCE, PWideChar(s), Length(s) + 1));
if s <> '' then
if FParams.Count > 0 then
FParams[0]:=UTF8Encode(s) //FParams[0]:=(s) // Lazarus 1.4.4
FParams[0]:=UTF8Encode(s)
else
FParams.Add(UTF8Encode(s));//FParams.Add((s)); // Lazarus 1.4.4
FParams.Add(UTF8Encode(s));
end;

if Param >= FParams.Count then
Expand Down

0 comments on commit cde9940

Please sign in to comment.