|
@@ -1100,6 +1100,17 @@ void __fastcall TNonVisualDataModule::CustomCommandsCustomize(TObject *)
|
|
PreferencesDialog(pmCustomCommands);
|
|
PreferencesDialog(pmCustomCommands);
|
|
}
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------
|
|
|
|
+static void GiveItemPriority(TTBCustomItem * Item)
|
|
|
|
+{
|
|
|
|
+ DebugAssert(Item->GetTopComponent() != NULL);
|
|
|
|
+ TTBCustomToolbar * ToolbarComponent = dynamic_cast<TTBCustomToolbar *>(Item->GetTopComponent());
|
|
|
|
+ if (ToolbarComponent != NULL)
|
|
|
|
+ {
|
|
|
|
+ TTBItemViewer * Viewer = ToolbarComponent->View->Find(Item);
|
|
|
|
+ ToolbarComponent->View->GivePriority(Viewer);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//---------------------------------------------------------------------------
|
|
void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
TTBCustomItem * Menu, bool OnFocused, bool Toolbar, TCustomCommandListType ListType, TStrings * HiddenCommands)
|
|
TTBCustomItem * Menu, bool OnFocused, bool Toolbar, TCustomCommandListType ListType, TStrings * HiddenCommands)
|
|
{
|
|
{
|
|
@@ -1112,6 +1123,7 @@ void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
Item = new TTBXItem(Menu);
|
|
Item = new TTBXItem(Menu);
|
|
Item->Action = OnFocused ? CustomCommandsEnterFocusedAction : CustomCommandsEnterAction;
|
|
Item->Action = OnFocused ? CustomCommandsEnterFocusedAction : CustomCommandsEnterAction;
|
|
Menu->Add(Item);
|
|
Menu->Add(Item);
|
|
|
|
+ GiveItemPriority(Item);
|
|
|
|
|
|
Item = new TTBXItem(Menu);
|
|
Item = new TTBXItem(Menu);
|
|
Item->Action = OnFocused ? CustomCommandsLastFocusedAction : CustomCommandsLastAction;
|
|
Item->Action = OnFocused ? CustomCommandsLastFocusedAction : CustomCommandsLastAction;
|
|
@@ -1120,6 +1132,7 @@ void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
Item->Caption = EscapeHotkey(StripHotkey(LoadStr(CUSTOM_COMMAND_LAST_SHORT)));
|
|
Item->Caption = EscapeHotkey(StripHotkey(LoadStr(CUSTOM_COMMAND_LAST_SHORT)));
|
|
}
|
|
}
|
|
Menu->Add(Item);
|
|
Menu->Add(Item);
|
|
|
|
+ GiveItemPriority(Item);
|
|
}
|
|
}
|
|
|
|
|
|
TTBXSeparatorItem * Separator = AddMenuSeparator(Menu);
|
|
TTBXSeparatorItem * Separator = AddMenuSeparator(Menu);
|
|
@@ -1150,6 +1163,7 @@ void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
Item = new TTBXItem(Menu);
|
|
Item = new TTBXItem(Menu);
|
|
Item->Action = CustomCommandsBandAction;
|
|
Item->Action = CustomCommandsBandAction;
|
|
Menu->Add(Item);
|
|
Menu->Add(Item);
|
|
|
|
+ GiveItemPriority(Item);
|
|
}
|
|
}
|
|
|
|
|
|
Item = new TTBXItem(Menu);
|
|
Item = new TTBXItem(Menu);
|
|
@@ -1160,6 +1174,7 @@ void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
Item->OnClick = CustomCommandsCustomize;
|
|
Item->OnClick = CustomCommandsCustomize;
|
|
}
|
|
}
|
|
Menu->Add(Item);
|
|
Menu->Add(Item);
|
|
|
|
+ GiveItemPriority(Item);
|
|
}
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|
|
void __fastcall TNonVisualDataModule::CreateCustomCommandsMenu(
|