Feature #627
IDE tool bar should update respect editor state
Status: | Approved | Start date: | 01/05/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Miroslav Fidler | % Done: | 0% | |
Category: | IDE | Spent time: | - | |
Target version: | - |
Description
I think it will be good if ide toolbar will react on editor states. We need to modify several things.
First of all we need to add two following methods(ide.h):
void SetBar();
void SetMenuBar();
void SetToolBar();
Secnondly we need to add toolbar reaction on editor event(idewin.cpp - line 309):
editor.WhenSel = THISBACK(SetToolBar);
At the end we need to improve idebar behavior(idebar.cpp).
--------------------------------------------------------------------------------------------------------
I have found the way how we can speed up setting tool bar process (idebar.cpp - BrowseMenu):
if (menu.IsMenuBar()) { // <- This additional if gives as extra performance. In addition, this should speed up channging tab process. menu.AddMenu(AK_NAVIGATOR, IdeImg::Navigator(), THISBACK(ToggleNavigator)) .Check(editor.IsNavigator()); menu.Add(AK_SEARCHCODE, THISBACK(SearchCode)); menu.Add(!designer, AK_GOTO, THISBACK(Goto)); menu.Add(AK_GOTOGLOBAL, THISBACK(GotoGlobal)); menu.Add(!designer, AK_JUMPS, THISBACK(ContextGoto)); menu.Add(!designer, AK_SWAPS, THISBACK(SwapS)); menu.Add(!designer, AK_ASSIST, callback(&editor, &AssistEditor::Assist)); menu.Add(!designer, AK_DCOPY, callback(&editor, &AssistEditor::DCopy)); menu.Add(!designer, AK_VIRTUALS, callback(&editor, &AssistEditor::Virtuals)); menu.Add(!designer, AK_THISBACKS, callback(&editor, &AssistEditor::Thisbacks)); menu.Add(!designer, AK_COMPLETE, callback(&editor, &AssistEditor::Complete)); menu.Add(!designer, AK_COMPLETE2, callback(&editor, &AssistEditor::Complete2)); menu.Add(!designer, AK_ABBR, callback(&editor, &AssistEditor::Abbr)); menu.Add(!designer, "Insert", THISBACK(InsertMenu)); menu.MenuSeparator(); menu.Add("Rescan code", THISBACK(RescanCode)); menu.MenuSeparator(); menu.AddMenu(AK_CALC, IdeImg::calc(), THISBACK1(ToggleBottom, BCALC)) .Check(IsBottomShown() && btabs.GetCursor() == BCALC); menu.AddMenu(AK_QTF, IdeCommonImg::Qtf(), THISBACK(Qtf)); menu.AddMenu(!designer, AK_XML, IdeCommonImg::xml(), THISBACK(Xml)); menu.AddMenu(!designer, AK_JSON, IdeCommonImg::json(), THISBACK(Json)); }
Related issues
History
#1 Updated by Miroslav Fidler over 11 years ago
Well, I am a bit confused here. Which icons in toolbar should react to editor changes? I think only menu items do and those do not need to be synchronized...
(OTOH, if we ever get to configurable toolbars, this will be necessitty).
Mirek
#2 Updated by Miroslav Fidler over 11 years ago
- Assignee changed from Miroslav Fidler to Zbigniew Rebacz
#3 Updated by Miroslav Fidler over 11 years ago
- Status changed from Patch ready to In Progress
#4 Updated by Zbigniew Rebacz over 11 years ago
- File LockedOperations.png added
I enclose demonstrative screenshot.
#5 Updated by Zbigniew Rebacz over 11 years ago
- Status changed from In Progress to Patch ready
- Assignee changed from Zbigniew Rebacz to Miroslav Fidler
#6 Updated by Miroslav Fidler about 11 years ago
- Status changed from Patch ready to Approved