Jelajahi Sumber

+ Command-line filenames support

michael 21 tahun lalu
induk
melakukan
865131946b
1 mengubah file dengan 17 tambahan dan 0 penghapusan
  1. 17 0
      utils/fpdoc/fpde/frmmain.pp

+ 17 - 0
utils/fpdoc/fpde/frmmain.pp

@@ -81,6 +81,7 @@ Type
     Procedure SaveEditorAs(E : TEditorPage);
     Procedure SaveEditor(E : TEditorPage);
     Function  CloseEditor(E : TEditorPage) : Boolean;
+    Procedure LoadCommandLine;
     Procedure LoadRecent;
     Procedure SaveRecent;
     Procedure CreateForm;
@@ -322,6 +323,7 @@ begin
   FRecent:=TStringList.Create;
   Inherited Create(gtk_window_dialog);
   CreateForm;
+  LoadCommandLine;
   LoadOptions;
   LoadRecent;
 end;
@@ -334,6 +336,21 @@ begin
   Inherited;
 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;