added check marks to the view componentpalette and view ide speedbuttons menu (issue #1546)

git-svn-id: trunk@8356 -
This commit is contained in:
vincents 2005-12-22 09:58:12 +00:00
parent 096aee4574
commit 78c009e32a
2 changed files with 18 additions and 8 deletions

View File

@ -2670,14 +2670,22 @@ begin
end; end;
procedure TMainIDE.DoToggleViewComponentPalette; procedure TMainIDE.DoToggleViewComponentPalette;
var
ComponentPalleteVisible: boolean;
begin begin
MainIDEBar.ComponentNotebook.Visible:=not MainIDEBar.ComponentNotebook.Visible; ComponentPalleteVisible:=not MainIDEBar.ComponentNotebook.Visible;
EnvironmentOptions.ComponentPaletteVisible:=MainIDEBar.ComponentNotebook.Visible; MainIDEBar.itmViewComponentPalette.Checked:=ComponentPalleteVisible;
MainIDEBar.ComponentNotebook.Visible:=ComponentPalleteVisible;
EnvironmentOptions.ComponentPaletteVisible:=ComponentPalleteVisible;
end; end;
procedure TMainIDE.DoToggleViewIDESpeedButtons; procedure TMainIDE.DoToggleViewIDESpeedButtons;
var
SpeedButtonsVisible: boolean;
begin begin
MainIDEBar.pnlSpeedButtons.Visible:=not MainIDEBar.pnlSpeedButtons.Visible; SpeedButtonsVisible:=not MainIDEBar.pnlSpeedButtons.Visible;
MainIDEBar.itmViewIDESpeedButtons.Checked:=SpeedButtonsVisible;
MainIDEBar.pnlSpeedButtons.Visible:=SpeedButtonsVisible;
EnvironmentOptions.IDESpeedButtonsVisible:=MainIDEBar.pnlSpeedButtons.Visible; EnvironmentOptions.IDESpeedButtonsVisible:=MainIDEBar.pnlSpeedButtons.Visible;
end; end;

View File

@ -86,7 +86,8 @@ type
var MenuItem: TIDEMenuCommand; var MenuItem: TIDEMenuCommand;
const MenuItemName, MenuItemCaption: String; const MenuItemName, MenuItemCaption: String;
const bmpName: String = ''; const bmpName: String = '';
mnuEnabled: Boolean = true); mnuEnabled: Boolean = true;
mnuChecked: Boolean = false);
procedure CreateMenuSeparatorSection(ParentSection: TIDEMenuSection; procedure CreateMenuSeparatorSection(ParentSection: TIDEMenuSection;
var Section: TIDEMenuSection; const AName: String); var Section: TIDEMenuSection; const AName: String);
procedure CreateMenuSubSection(ParentSection: TIDEMenuSection; procedure CreateMenuSubSection(ParentSection: TIDEMenuSection;
@ -279,10 +280,11 @@ end;
procedure TMainIDEBase.CreateMenuItem(Section: TIDEMenuSection; procedure TMainIDEBase.CreateMenuItem(Section: TIDEMenuSection;
var MenuItem: TIDEMenuCommand; const MenuItemName, MenuItemCaption: String; var MenuItem: TIDEMenuCommand; const MenuItemName, MenuItemCaption: String;
const bmpName: String; mnuEnabled: Boolean); const bmpName: String; mnuEnabled: Boolean; mnuChecked: Boolean);
begin begin
MenuItem:=RegisterIDEMenuCommand(Section,MenuItemName,MenuItemCaption); MenuItem:=RegisterIDEMenuCommand(Section,MenuItemName,MenuItemCaption);
MenuItem.Enabled:=mnuEnabled; MenuItem.Enabled:=mnuEnabled;
MenuItem.Checked:=mnuChecked;
if bmpName<>'' then if bmpName<>'' then
MenuItem.Bitmap.LoadFromLazarusResource(bmpName); MenuItem.Bitmap.LoadFromLazarusResource(bmpName);
end; end;
@ -531,8 +533,8 @@ begin
CreateMenuItem(ParentMI,itmViewMessage,'itmViewMessage',lisMenuViewMessages); CreateMenuItem(ParentMI,itmViewMessage,'itmViewMessage',lisMenuViewMessages);
CreateMenuItem(ParentMI,itmViewSearchResults,'itmViewSearchResults',lisMenuViewSearchResults); CreateMenuItem(ParentMI,itmViewSearchResults,'itmViewSearchResults',lisMenuViewSearchResults);
CreateMenuItem(ParentMI,itmViewAnchorEditor,'itmViewAnchorEditor',lisMenuViewAnchorEditor); CreateMenuItem(ParentMI,itmViewAnchorEditor,'itmViewAnchorEditor',lisMenuViewAnchorEditor);
CreateMenuItem(ParentMI,itmViewComponentPalette,'itmViewComponentPalette',lisMenuViewComponentPalette); CreateMenuItem(ParentMI,itmViewComponentPalette,'itmViewComponentPalette',lisMenuViewComponentPalette, '', true, EnvironmentOptions.ComponentPaletteVisible);
CreateMenuItem(ParentMI,itmViewIDESpeedButtons,'itmViewIDESpeedButtons',lisMenuViewIDESpeedButtons); CreateMenuItem(ParentMI,itmViewIDESpeedButtons,'itmViewIDESpeedButtons',lisMenuViewIDESpeedButtons, '', true, EnvironmentOptions.IDESpeedButtonsVisible);
CreateMenuSubSection(ParentMI,itmViewDebugWindows,'itmViewDebugWindows',lisMenuDebugWindows,'menu_debugger'); CreateMenuSubSection(ParentMI,itmViewDebugWindows,'itmViewDebugWindows',lisMenuDebugWindows,'menu_debugger');
begin begin
CreateMenuItem(itmViewDebugWindows,itmViewWatches,'itmViewWatches',lisMenuViewWatches,'menu_watches'); CreateMenuItem(itmViewDebugWindows,itmViewWatches,'itmViewWatches',lisMenuViewWatches,'menu_watches');