Move keyboard shortcuts to menu item
This commit is contained in:
parent
92d22621e4
commit
182e1549fd
3 changed files with 8 additions and 11 deletions
|
|
@ -65,6 +65,7 @@ show-header-description = Reveal the header from the right-click menu.
|
||||||
### Keyboard shortcuts
|
### Keyboard shortcuts
|
||||||
type-to-search = Type to search...
|
type-to-search = Type to search...
|
||||||
keyboard-shortcuts = Keyboard shortcuts
|
keyboard-shortcuts = Keyboard shortcuts
|
||||||
|
menu-keyboard-shortcuts = Keyboard shortcuts...
|
||||||
customize-shortcuts = Customize shortcuts
|
customize-shortcuts = Customize shortcuts
|
||||||
shortcut-capture-hint = Press new shortcut, or Esc to cancel
|
shortcut-capture-hint = Press new shortcut, or Esc to cancel
|
||||||
cancel = Cancel
|
cancel = Cancel
|
||||||
|
|
|
||||||
13
src/main.rs
13
src/main.rs
|
|
@ -237,6 +237,7 @@ pub enum Action {
|
||||||
CopyOrSigint,
|
CopyOrSigint,
|
||||||
CopyPrimary,
|
CopyPrimary,
|
||||||
Find,
|
Find,
|
||||||
|
KeyboardShortcuts,
|
||||||
LaunchUrlByMenu,
|
LaunchUrlByMenu,
|
||||||
PaneFocusDown,
|
PaneFocusDown,
|
||||||
PaneFocusLeft,
|
PaneFocusLeft,
|
||||||
|
|
@ -288,6 +289,7 @@ impl Action {
|
||||||
Self::CopyOrSigint => Message::CopyOrSigint(entity_opt),
|
Self::CopyOrSigint => Message::CopyOrSigint(entity_opt),
|
||||||
Self::CopyPrimary => Message::CopyPrimary(entity_opt),
|
Self::CopyPrimary => Message::CopyPrimary(entity_opt),
|
||||||
Self::Find => Message::Find(true),
|
Self::Find => Message::Find(true),
|
||||||
|
Self::KeyboardShortcuts => Message::ToggleContextPage(ContextPage::KeyboardShortcuts),
|
||||||
Self::LaunchUrlByMenu => Message::LaunchUrlByMenu,
|
Self::LaunchUrlByMenu => Message::LaunchUrlByMenu,
|
||||||
Self::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down),
|
Self::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down),
|
||||||
Self::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left),
|
Self::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left),
|
||||||
|
|
@ -1442,16 +1444,6 @@ impl App {
|
||||||
.toggler(self.config.focus_follow_mouse, Message::FocusFollowMouse),
|
.toggler(self.config.focus_follow_mouse, Message::FocusFollowMouse),
|
||||||
);
|
);
|
||||||
|
|
||||||
let shortcuts_section = widget::settings::section()
|
|
||||||
.title(fl!("keyboard-shortcuts"))
|
|
||||||
.add(
|
|
||||||
widget::settings::item::builder(fl!("customize-shortcuts")).control(
|
|
||||||
widget::button::custom(icon_cache_get("go-next-symbolic", 16))
|
|
||||||
.on_press(Message::ToggleContextPage(ContextPage::KeyboardShortcuts))
|
|
||||||
.class(style::Button::Icon),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
let advanced_section = widget::settings::section().title(fl!("advanced")).add(
|
let advanced_section = widget::settings::section().title(fl!("advanced")).add(
|
||||||
widget::settings::item::builder(fl!("show-headerbar"))
|
widget::settings::item::builder(fl!("show-headerbar"))
|
||||||
.description(fl!("show-header-description"))
|
.description(fl!("show-header-description"))
|
||||||
|
|
@ -1462,7 +1454,6 @@ impl App {
|
||||||
appearance_section.into(),
|
appearance_section.into(),
|
||||||
font_section.into(),
|
font_section.into(),
|
||||||
splits_section.into(),
|
splits_section.into(),
|
||||||
shortcuts_section.into(),
|
|
||||||
advanced_section.into(),
|
advanced_section.into(),
|
||||||
])
|
])
|
||||||
.into()
|
.into()
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,11 @@ pub fn menu_bar<'a>(
|
||||||
None,
|
None,
|
||||||
Action::ColorSchemes(config.color_scheme_kind()),
|
Action::ColorSchemes(config.color_scheme_kind()),
|
||||||
),
|
),
|
||||||
|
MenuItem::Button(
|
||||||
|
fl!("menu-keyboard-shortcuts"),
|
||||||
|
None,
|
||||||
|
Action::KeyboardShortcuts,
|
||||||
|
),
|
||||||
MenuItem::Button(fl!("menu-settings"), None, Action::Settings),
|
MenuItem::Button(fl!("menu-settings"), None, Action::Settings),
|
||||||
#[cfg(feature = "password_manager")]
|
#[cfg(feature = "password_manager")]
|
||||||
MenuItem::Button(
|
MenuItem::Button(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue