From 36f199f8280e27ccacc93b3d13ab9a37c8922356 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 8 Feb 2016 18:35:56 +0100 Subject: [PATCH] first run, changed default option + add a runnable --- src/ce_editoroptions.pas | 5 +++++ src/ce_main.pas | 19 +++++++++++++++---- src/ce_symlist.pas | 3 ++- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/ce_editoroptions.pas b/src/ce_editoroptions.pas index b1c60a1c..269d17f4 100644 --- a/src/ce_editoroptions.pas +++ b/src/ce_editoroptions.pas @@ -165,10 +165,15 @@ begin inherited; // fFont := TFont.Create; + {$IFDEF WINDOWS} fFont.Name := 'Courier New'; + {$ELSE} + fFont.Name := 'DejaVu Sans Mono'; + {$ENDIF} fFont.Quality := fqProof; fFont.Pitch := fpFixed; fFont.Size := 10; + fResetFontSize:=true; // fD2Syn := TSynD2Syn.Create(self); fD2Syn.Assign(D2Syn); diff --git a/src/ce_main.pas b/src/ce_main.pas index 57b89578..1ab0cb89 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -202,6 +202,7 @@ type fCovModUt: boolean; fDoc: TCESynMemo; + fFirstTimeCoedit: boolean; fActionHandler: TCEActionProviderSubject; fMultidoc: ICEMultiDocHandler; fScCollectCount: Integer; @@ -996,7 +997,8 @@ begin begin fAppliOpts.loadFromFile(fname); fAppliOpts.assignTo(self); - end; + end + else fFirstTimeCoedit := true; end; procedure TCEMainForm.SaveSettings; @@ -1175,6 +1177,9 @@ begin // TODO-cgonnawork: when Laz 1.6 is rlzd, remove etc/anchordocking and use Laz package DockMaster.ResetSplitters; + if fFirstTimeCoedit then + actFileNewRun.Execute; + fFirstShown := true; end; end; @@ -1609,6 +1614,14 @@ begin end; procedure TCEMainForm.actFileNewRunExecute(Sender: TObject); +const + body: array[boolean] of string = + ( + LineEnding, + ' // this file can be directly executed using menu file/compile & run' + LineEnding + + ' // phobos and libman imports are allowed' + LineEnding + + ' writeln("hello runnable module");' + LineEnding + ); begin newFile; fDoc.Text := @@ -1618,9 +1631,7 @@ begin LineEnding + 'void main(string[] args)' + LineEnding + '{' + LineEnding + - ' // this file can be directly executed using menu file/compile & run' + LineEnding + - ' // phobos and libman imports are allowed' + LineEnding + - ' writeln("hello runnable module");' + LineEnding + + body[fFirstTimeCoedit] + '}'; fDoc.setFocus; end; diff --git a/src/ce_symlist.pas b/src/ce_symlist.pas index 9b29dfb9..d2f5beef 100644 --- a/src/ce_symlist.pas +++ b/src/ce_symlist.pas @@ -258,9 +258,10 @@ begin fRefreshOnFocus := true; fShowChildCategories := true; fAutoExpandErrors := true; + fAutoRefresh := true; fSmartFilter := true; fSortSymbols := false; - fAutoRefreshDelay := 1500; + fAutoRefreshDelay := 750; end; procedure TCESymbolListOptions.Assign(Source: TPersistent);