From 78eaba9db1df42b62f3afd02065ad45a1cb7011e Mon Sep 17 00:00:00 2001 From: Hojjat Date: Tue, 15 Sep 2026 15:03:20 -0600 Subject: [PATCH] chore: tweak context menu items order and wording --- i18n/en/cosmic_term.ftl | 3 ++- src/menu.rs | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/i18n/en/cosmic_term.ftl b/i18n/en/cosmic_term.ftl index c2b0f15..38a0b13 100644 --- a/i18n/en/cosmic_term.ftl +++ b/i18n/en/cosmic_term.ftl @@ -63,6 +63,7 @@ show-pane-borders = Show pane borders ### Advanced advanced = Advanced show-headerbar = Show header +window-header = Window header show-header-description = Reveal the header from the right-click menu tab-new-inherit-working-directory = New tabs and windows use current directory tab-new-inherit-working-directory-description = Open new tabs and windows in the active tab's working directory @@ -133,7 +134,7 @@ next-tab = Next tab previous-tab = Previous tab split-horizontal = Split horizontal split-vertical = Split vertical -pane-toggle-maximize = Toggle maximized +pane-toggle-maximize = Maximize or restore pane menu-color-schemes = Color schemes... menu-settings = Settings... menu-about = About COSMIC Terminal... diff --git a/src/menu.rs b/src/menu.rs index 5cebe50..bc66cac 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -49,6 +49,8 @@ pub fn context_menu( |label: String, action: Action| MenuItem::Button(label, None, TabAction(entity, action)); let mut items = vec![ + item(fl!("new-tab"), Action::TabNew), + MenuItem::Divider, item(fl!("copy"), Action::Copy), item(fl!("paste"), Action::Paste), item(fl!("select-all"), Action::SelectAll), @@ -59,18 +61,17 @@ pub fn context_menu( item(fl!("split-vertical"), Action::PaneSplitVertical), item(fl!("pane-toggle-maximize"), Action::PaneToggleMaximized), MenuItem::Divider, - item(fl!("new-tab"), Action::TabNew), - item(fl!("menu-settings"), Action::Settings), + MenuItem::CheckBox( + fl!("window-header"), + None, + config.show_headerbar, + TabAction(entity, Action::ShowHeaderBar(!config.show_headerbar)), + ), + MenuItem::Divider, ]; #[cfg(feature = "password_manager")] items.push(item(fl!("menu-password-manager"), Action::PasswordManager)); - items.push(MenuItem::CheckBox( - fl!("show-headerbar"), - None, - config.show_headerbar, - TabAction(entity, Action::ShowHeaderBar(!config.show_headerbar)), - )); - + items.push(item(fl!("menu-settings"), Action::Settings)); // If we have a link, prepend the link items if link.is_some() { items.insert(0, item(fl!("open-link"), Action::LaunchUrlByMenu));