|
@@ -323,6 +323,7 @@ type
|
|
procedure VReopenTabsClick(Sender: TObject);
|
|
procedure VReopenTabsClick(Sender: TObject);
|
|
procedure MemosTabSetPopup(Sender: TObject);
|
|
procedure MemosTabSetPopup(Sender: TObject);
|
|
procedure MemosTabSetOnCloseButtonClick(Sender: TObject);
|
|
procedure MemosTabSetOnCloseButtonClick(Sender: TObject);
|
|
|
|
+ procedure StatusBarClick(Sender: TObject);
|
|
private
|
|
private
|
|
{ Private declarations }
|
|
{ Private declarations }
|
|
FMemos: TList<TCompScintEdit>; { FMemos[0] is the main memo and FMemos[1] the preprocessor output memo - also see MemosTabSet comment above }
|
|
FMemos: TList<TCompScintEdit>; { FMemos[0] is the main memo and FMemos[1] the preprocessor output memo - also see MemosTabSet comment above }
|
|
@@ -688,7 +689,6 @@ constructor TCompileForm.Create(AOwner: TComponent);
|
|
end;
|
|
end;
|
|
SyncEditorOptions;
|
|
SyncEditorOptions;
|
|
UpdateNewMainFileButtons;
|
|
UpdateNewMainFileButtons;
|
|
- UpdateHiddenFilesPanel;
|
|
|
|
UpdateTheme;
|
|
UpdateTheme;
|
|
|
|
|
|
{ Window state }
|
|
{ Window state }
|
|
@@ -3173,6 +3173,7 @@ begin
|
|
|
|
|
|
UpdateCaption;
|
|
UpdateCaption;
|
|
UpdatePreprocMemos;
|
|
UpdatePreprocMemos;
|
|
|
|
+ UpdateHiddenFilesPanel;
|
|
for Memo in FMemos do begin
|
|
for Memo in FMemos do begin
|
|
{ Move caret to start of line to ensure it doesn't end up in the middle
|
|
{ Move caret to start of line to ensure it doesn't end up in the middle
|
|
of a double-byte character if the code page changes from SBCS to DBCS }
|
|
of a double-byte character if the code page changes from SBCS to DBCS }
|
|
@@ -3344,7 +3345,7 @@ end;
|
|
|
|
|
|
procedure TCompileForm.UpdateHiddenFilesPanel;
|
|
procedure TCompileForm.UpdateHiddenFilesPanel;
|
|
begin
|
|
begin
|
|
- if FOptions.OpenIncludedFiles and (FHiddenFiles.Count > 0) then begin
|
|
|
|
|
|
+ if MemosTabSet.Visible and (FHiddenFiles.Count > 0) then begin
|
|
StatusBar.Panels[spHiddenFilesCount].Text := Format('Tabs closed: %d', [FHiddenFiles.Count]);
|
|
StatusBar.Panels[spHiddenFilesCount].Text := Format('Tabs closed: %d', [FHiddenFiles.Count]);
|
|
end else
|
|
end else
|
|
StatusBar.Panels[spHiddenFilesCount].Text := '';
|
|
StatusBar.Panels[spHiddenFilesCount].Text := '';
|
|
@@ -4955,6 +4956,24 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TCompileForm.StatusBarClick(Sender: TObject);
|
|
|
|
+begin
|
|
|
|
+ if MemosTabSet.Visible and (FHiddenFiles.Count > 0) then begin
|
|
|
|
+ var Point := SmallPointToPoint(TSmallPoint(DWORD(GetMessagePos)));
|
|
|
|
+ var X := StatusBar.ScreenToClient(Point).X;
|
|
|
|
+ var W := 0;
|
|
|
|
+ for var I := 0 to StatusBar.Panels.Count-1 do begin
|
|
|
|
+ Inc(W, StatusBar.Panels[I].Width);
|
|
|
|
+ if X < W then begin
|
|
|
|
+ if I = spHiddenFilesCount then
|
|
|
|
+ MemosTabSetPopupMenu.Popup(Point.X, Point.Y);
|
|
|
|
+ Break;
|
|
|
|
+ end else if I = spHiddenFilesCount then
|
|
|
|
+ Break;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TCompileForm.StatusBarDrawPanel(StatusBar: TStatusBar;
|
|
procedure TCompileForm.StatusBarDrawPanel(StatusBar: TStatusBar;
|
|
Panel: TStatusPanel; const Rect: TRect);
|
|
Panel: TStatusPanel; const Rect: TRect);
|
|
var
|
|
var
|