mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
IDE: Changed menu item Windows to singular, show menu item check for active form
git-svn-id: trunk@12826 -
This commit is contained in:
parent
cf4069023c
commit
7f51d24813
@ -142,7 +142,7 @@ resourcestring
|
||||
lisMenuComponents = '&Components';
|
||||
lisMenuTools = '&Tools';
|
||||
lisMenuEnvironent = 'E&nvironment';
|
||||
lisMenuWindows = '&Windows';
|
||||
lisMenuWindow = '&Window';
|
||||
lisMenuHelp = '&Help';
|
||||
|
||||
lisMenuNewUnit = 'New Unit';
|
||||
|
@ -1133,7 +1133,7 @@ begin
|
||||
// load package configs
|
||||
HelpBoss.LoadHelpOptions;
|
||||
|
||||
UpdateWindowsMenu;
|
||||
UpdateWindowMenu;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.StartIDE;
|
||||
@ -1744,7 +1744,7 @@ begin
|
||||
// create new project
|
||||
DoNewProject(ProjectDescriptorApplication);
|
||||
|
||||
UpdateWindowsMenu;
|
||||
UpdateWindowMenu;
|
||||
|
||||
// load the cmd line files
|
||||
if CmdLineFiles<>nil then begin
|
||||
@ -12381,7 +12381,7 @@ var
|
||||
AnUnitInfo: TUnitInfo;
|
||||
AnIDesigner: TIDesigner;
|
||||
begin
|
||||
UpdateWindowsMenu;
|
||||
UpdateWindowMenu;
|
||||
GetDefaultProcessList.FreeStoppedProcesses;
|
||||
EnvironmentOptions.ExternalTools.FreeStoppedProcesses;
|
||||
if (SplashForm<>nil) then FreeThenNil(SplashForm);
|
||||
|
@ -301,7 +301,7 @@ type
|
||||
itmEnvRescanFPCSrcDir: TIDEMenuCommand;
|
||||
|
||||
// windows menu
|
||||
//mnuWindows: TIDEMenuSection;
|
||||
//mnuWindow: TIDEMenuSection;
|
||||
|
||||
// help menu
|
||||
//mnuHelp: TIDEMenuSection;
|
||||
|
@ -113,7 +113,7 @@ type
|
||||
function GetToolStatus: TIDEToolStatus; override;
|
||||
procedure SetToolStatus(const AValue: TIDEToolStatus); virtual;
|
||||
|
||||
procedure mnuWindowsItemClick(Sender: TObject); virtual;
|
||||
procedure mnuWindowItemClick(Sender: TObject); virtual;
|
||||
procedure OnMainBarDestroy(Sender: TObject); virtual;
|
||||
|
||||
procedure ConnectOutputFilter;
|
||||
@ -149,7 +149,7 @@ type
|
||||
function DoOpenMacroFile(Sender: TObject; const AFilename: string
|
||||
): TModalResult; override;
|
||||
|
||||
procedure UpdateWindowsMenu; override;
|
||||
procedure UpdateWindowMenu; override;
|
||||
procedure SetRecentSubMenu(Section: TIDEMenuSection; FileList: TStringList;
|
||||
OnClickEvent: TNotifyEvent); override;
|
||||
|
||||
@ -178,7 +178,7 @@ uses
|
||||
|
||||
{ TMainIDEBase }
|
||||
|
||||
procedure TMainIDEBase.mnuWindowsItemClick(Sender: TObject);
|
||||
procedure TMainIDEBase.mnuWindowItemClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -314,7 +314,7 @@ begin
|
||||
CreateMainMenuItem(mnuComponents,'Components',lisMenuComponents);
|
||||
CreateMainMenuItem(mnuTools,'Tools',lisMenuTools);
|
||||
CreateMainMenuItem(mnuEnvironment,'Environment',lisMenuEnvironent);
|
||||
CreateMainMenuItem(mnuWindows,'Windows',lisMenuWindows);
|
||||
CreateMainMenuItem(mnuWindow,'Window',lisMenuWindow);
|
||||
CreateMainMenuItem(mnuHelp,'Help',lisMenuHelp);
|
||||
end;
|
||||
end;
|
||||
@ -957,7 +957,7 @@ begin
|
||||
[ofOnlyIfExists,ofAddToRecent,ofRegularFile,ofConvertMacros]);
|
||||
end;
|
||||
|
||||
procedure TMainIDEBase.UpdateWindowsMenu;
|
||||
procedure TMainIDEBase.UpdateWindowMenu;
|
||||
var
|
||||
WindowsList: TFPList;
|
||||
i: Integer;
|
||||
@ -984,20 +984,22 @@ begin
|
||||
if (AForm.Designer<>nil) and (WindowsList.IndexOf(AForm)<0) then
|
||||
WindowsList.Add(AForm);
|
||||
end;
|
||||
|
||||
// create menuitems
|
||||
for i:=0 to WindowsList.Count-1 do begin
|
||||
if mnuWindows.Count>i then
|
||||
CurMenuItem:=mnuWindows.Items[i]
|
||||
if mnuWindow.Count>i then
|
||||
CurMenuItem:=mnuWindow.Items[i]
|
||||
else begin
|
||||
CurMenuItem:=RegisterIDEMenuCommand(mnuWindows.GetPath,
|
||||
CurMenuItem:=RegisterIDEMenuCommand(mnuWindow.GetPath,
|
||||
'Window'+IntToStr(i),'');
|
||||
CurMenuItem.OnClick:=@mnuWindowsItemClick;
|
||||
CurMenuItem.OnClick:=@mnuWindowItemClick;
|
||||
end;
|
||||
CurMenuItem.Caption:=TCustomForm(WindowsList[i]).Caption;
|
||||
CurMenuItem.MenuItem.Checked := Screen.ActiveCustomForm = TCustomForm(WindowsList[i]);
|
||||
end;
|
||||
// remove unused menuitems
|
||||
while mnuWindows.Count>WindowsList.Count do
|
||||
mnuWindows.Items[mnuWindows.Count-1].Free;
|
||||
while mnuWindow.Count>WindowsList.Count do
|
||||
mnuWindow.Items[mnuWindow.Count-1].Free;
|
||||
// clean up
|
||||
WindowsList.Free;
|
||||
end;
|
||||
|
@ -160,7 +160,7 @@ type
|
||||
const SrcDirectory, DestDirectory: string
|
||||
): TModalResult; virtual; abstract;
|
||||
|
||||
procedure UpdateWindowsMenu; virtual; abstract;
|
||||
procedure UpdateWindowMenu; virtual; abstract;
|
||||
procedure SaveEnvironment; virtual; abstract;
|
||||
procedure SetRecentSubMenu(Section: TIDEMenuSection; FileList: TStringList;
|
||||
OnClickEvent: TNotifyEvent); virtual; abstract;
|
||||
|
@ -350,8 +350,8 @@ var
|
||||
itmIDECacheSection: TIDEMenuSection;
|
||||
|
||||
// windows menu
|
||||
mnuWindows: TIDEMenuSection;
|
||||
itmDesignerWindows: TIDEMenuSection;
|
||||
mnuWindow: TIDEMenuSection;
|
||||
itmDesignerWindow: TIDEMenuSection;
|
||||
|
||||
// help menu
|
||||
mnuHelp: TIDEMenuSection;
|
||||
|
Loading…
Reference in New Issue
Block a user