Disable commandline parameter handling on Darwin

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2309 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
lazarus-bart
2012-02-22 17:54:51 +00:00
parent cce35768f7
commit db4f915436

View File

@ -1558,6 +1558,7 @@ begin
if Dummy = 12345 then Exit; //Get rid of annoying hint if Dummy = 12345 then Exit; //Get rid of annoying hint
Count := 0; Count := 0;
OpenBlankPage := False; OpenBlankPage := False;
{$ifndef darwin}
for i := 1 to ParamCount do for i := 1 to ParamCount do
begin begin
S := ParamStrUtf8(i); S := ParamStrUtf8(i);
@ -1574,6 +1575,9 @@ begin
end end
else if S = opt_short_prefix + opt_short_blankpage then OpenBlankPage := True; else if S = opt_short_prefix + opt_short_blankpage then OpenBlankPage := True;
end; end;
{$else}
OpenBlankPage := True; //we cannot pass -n on darwin, so offer blank page to the user
{$endif}
if (Count = 0) and OpenBlankPage then DoFileNewByType(eftNone); if (Count = 0) and OpenBlankPage then DoFileNewByType(eftNone);
end; end;
@ -1583,6 +1587,7 @@ var
i: Integer; i: Integer;
begin begin
//debugln('TLazEditMainForm.ParseCommandlineSwitches'); //debugln('TLazEditMainForm.ParseCommandlineSwitches');
{$ifndef darwin}
_PCP := EmptyStr; _PCP := EmptyStr;
for i := 1 to ParamCount do for i := 1 to ParamCount do
begin begin
@ -1601,6 +1606,7 @@ begin
//inifiles uses system-encoding //inifiles uses system-encoding
ConfigFileDir := Utf8ToSys(_PCP); ConfigFileDir := Utf8ToSys(_PCP);
end; end;
{$endif}
end; end;