create separated wrapper for home action

This commit is contained in:
yggverse 2024-11-10 10:46:46 +02:00
parent b4dee17768
commit 4afa2c204c
15 changed files with 136 additions and 62 deletions

View file

@ -25,7 +25,6 @@ impl Bar {
window_action: Rc<WindowAction>,
action_page_close: SimpleAction,
action_page_close_all: SimpleAction,
action_page_home: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
view: &TabView,
@ -38,7 +37,6 @@ impl Bar {
window_action,
action_page_close,
action_page_close_all,
action_page_home,
action_page_history_back,
action_page_history_forward,
);

View file

@ -21,7 +21,6 @@ impl Menu {
window_action: Rc<WindowAction>,
action_page_close: SimpleAction,
action_page_close_all: SimpleAction,
action_page_home: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
) -> Rc<Self> {
@ -50,7 +49,12 @@ impl Menu {
// Main > Page > Navigation
let main_page_navigation = gio::Menu::new();
main_page_navigation.append(Some("Home"), Some(&detailed_action_name(&action_page_home)));
main_page.append(Some("Home"), Some(&format!(
"{}.{}",
window_action.id(),
window_action.home().id()
)));
// Main > Page > Navigation > History
let main_page_navigation_history = gio::Menu::new();