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
|
||||
type-to-search = Type to search...
|
||||
keyboard-shortcuts = Keyboard shortcuts
|
||||
menu-keyboard-shortcuts = Keyboard shortcuts...
|
||||
customize-shortcuts = Customize shortcuts
|
||||
shortcut-capture-hint = Press new shortcut, or Esc to cancel
|
||||
cancel = Cancel
|
||||
|
|
|
|||
13
src/main.rs
13
src/main.rs
|
|
@ -237,6 +237,7 @@ pub enum Action {
|
|||
CopyOrSigint,
|
||||
CopyPrimary,
|
||||
Find,
|
||||
KeyboardShortcuts,
|
||||
LaunchUrlByMenu,
|
||||
PaneFocusDown,
|
||||
PaneFocusLeft,
|
||||
|
|
@ -288,6 +289,7 @@ impl Action {
|
|||
Self::CopyOrSigint => Message::CopyOrSigint(entity_opt),
|
||||
Self::CopyPrimary => Message::CopyPrimary(entity_opt),
|
||||
Self::Find => Message::Find(true),
|
||||
Self::KeyboardShortcuts => Message::ToggleContextPage(ContextPage::KeyboardShortcuts),
|
||||
Self::LaunchUrlByMenu => Message::LaunchUrlByMenu,
|
||||
Self::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down),
|
||||
Self::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left),
|
||||
|
|
@ -1442,16 +1444,6 @@ impl App {
|
|||
.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(
|
||||
widget::settings::item::builder(fl!("show-headerbar"))
|
||||
.description(fl!("show-header-description"))
|
||||
|
|
@ -1462,7 +1454,6 @@ impl App {
|
|||
appearance_section.into(),
|
||||
font_section.into(),
|
||||
splits_section.into(),
|
||||
shortcuts_section.into(),
|
||||
advanced_section.into(),
|
||||
])
|
||||
.into()
|
||||
|
|
|
|||
|
|
@ -265,6 +265,11 @@ pub fn menu_bar<'a>(
|
|||
None,
|
||||
Action::ColorSchemes(config.color_scheme_kind()),
|
||||
),
|
||||
MenuItem::Button(
|
||||
fl!("menu-keyboard-shortcuts"),
|
||||
None,
|
||||
Action::KeyboardShortcuts,
|
||||
),
|
||||
MenuItem::Button(fl!("menu-settings"), None, Action::Settings),
|
||||
#[cfg(feature = "password_manager")]
|
||||
MenuItem::Button(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue