Rename KeepConfirmKeybindings to KeepConflictingKeybindings

After the change in the previous commit this expresses better what it is about.
This commit is contained in:
Stefan Haller committed 2025-12-22 09:37:06 +01:00
1 parent 7e3b24d496
commit f996e47199
3 files changed
+14 -14

No files matched your search

+6 -6
View File
@@ -46,12 +46,12 @@ func (self *OptionsMenuAction) Call() error {
appendBindings(navigation, &types.MenuSection{Title: self.c.Tr.KeybindingsMenuSectionNavigation, Column: 1})
return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.Keybindings,
Items: menuItems,
HideCancel: true,
ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft},
AllowFilteringKeybindings: true,
KeepConfirmKeybindings: true,
Title: self.c.Tr.Keybindings,
Items: menuItems,
HideCancel: true,
ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft},
AllowFilteringKeybindings: true,
KeepConflictingKeybindings: true,
})
}
+1 -1
View File
@@ -42,7 +42,7 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
maxColumnSize = max(maxColumnSize, len(item.LabelColumns))
// Remove all item keybindings that are the same as one of the essential bindings
if !opts.KeepConfirmKeybindings && lo.Contains(essentialKeys, item.Key) {
if !opts.KeepConflictingKeybindings && lo.Contains(essentialKeys, item.Key) {
item.Key = nil
}
}
+7 -7
View File
@@ -150,13 +150,13 @@ const (
)
type CreateMenuOptions struct {
Title string
Prompt string // a message that will be displayed above the menu options
Items []*MenuItem
HideCancel bool
ColumnAlignment []utils.Alignment
AllowFilteringKeybindings bool
KeepConfirmKeybindings bool // if true, the keybindings that match the confirm binding will not be removed from menu items
Title string
Prompt string // a message that will be displayed above the menu options
Items []*MenuItem
HideCancel bool
ColumnAlignment []utils.Alignment
AllowFilteringKeybindings bool
KeepConflictingKeybindings bool // if true, the keybindings that match essential bindings such as confirm or return will not be removed from menu items
}
type CreatePopupPanelOpts struct {