Skip to content

Commit

Permalink
Merge pull request #2 from mattiaverga/multifile
Browse files Browse the repository at this point in the history
Support multiple file open in command line args
  • Loading branch information
pchev committed Oct 25, 2021
2 parents 95f882f + 889b90a commit 80cbd07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 6 additions & 10 deletions skychart/cdc.lpr
Expand Up @@ -74,20 +74,16 @@
{$endif}

Params:=TStringList.Create;
buf:='';
WantUnique:=false;
for i:=1 to Paramcount do begin
for i:=1 to ParamCount() do begin
p:=ParamStr(i);
if copy(p,1,2)='--' then begin
if buf<>'' then Params.Add(buf);
if buf='--verbose' then VerboseMsg:=true;
if buf='--unique' then WantUnique:=true;
buf:=p;
end
if p='--verbose' then
VerboseMsg:=true
else if p='--unique' then
WantUnique:=true
else
buf:=buf+blank+p;
Params.Add(p);
end;
if buf<>'' then Params.Add(buf);

Application.Title:='Skychart';
Application.Initialize;
Expand Down
Expand Up @@ -5,7 +5,7 @@ Name=Skychart
GenericName=Planetarium
Comment=Planetarium software for the advanced amateur astronomer
TryExec=skychart
Exec=skychart %f
Exec=skychart %F
Icon=skychart
Terminal=false
Categories=Science;Astronomy;
Expand Down

0 comments on commit 80cbd07

Please sign in to comment.