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