mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 01:09:25 +02:00
+ Command-line filenames support
This commit is contained in:
parent
67779d5035
commit
865131946b
@ -81,6 +81,7 @@ Type
|
|||||||
Procedure SaveEditorAs(E : TEditorPage);
|
Procedure SaveEditorAs(E : TEditorPage);
|
||||||
Procedure SaveEditor(E : TEditorPage);
|
Procedure SaveEditor(E : TEditorPage);
|
||||||
Function CloseEditor(E : TEditorPage) : Boolean;
|
Function CloseEditor(E : TEditorPage) : Boolean;
|
||||||
|
Procedure LoadCommandLine;
|
||||||
Procedure LoadRecent;
|
Procedure LoadRecent;
|
||||||
Procedure SaveRecent;
|
Procedure SaveRecent;
|
||||||
Procedure CreateForm;
|
Procedure CreateForm;
|
||||||
@ -322,6 +323,7 @@ begin
|
|||||||
FRecent:=TStringList.Create;
|
FRecent:=TStringList.Create;
|
||||||
Inherited Create(gtk_window_dialog);
|
Inherited Create(gtk_window_dialog);
|
||||||
CreateForm;
|
CreateForm;
|
||||||
|
LoadCommandLine;
|
||||||
LoadOptions;
|
LoadOptions;
|
||||||
LoadRecent;
|
LoadRecent;
|
||||||
end;
|
end;
|
||||||
@ -334,6 +336,21 @@ begin
|
|||||||
Inherited;
|
Inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure TMainForm.LoadCommandLine;
|
||||||
|
|
||||||
|
Var
|
||||||
|
I : Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
I:=1;
|
||||||
|
While I<=ParamCount do
|
||||||
|
begin
|
||||||
|
If FileExists(ParamStr(i)) then
|
||||||
|
OpenFile(Paramstr(I));
|
||||||
|
Inc(I);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMainForm.LoadRecent;
|
Procedure TMainForm.LoadRecent;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user