create separated wrapper for reload action

This commit is contained in:
yggverse 2024-11-10 10:30:10 +02:00
parent baea14de95
commit b4dee17768
16 changed files with 144 additions and 64 deletions

View file

@ -28,7 +28,6 @@ impl Bar {
action_page_home: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
action_page_reload: SimpleAction,
view: &TabView,
) -> Rc<Self> {
// Init components
@ -42,7 +41,6 @@ impl Bar {
action_page_home,
action_page_history_back,
action_page_history_forward,
action_page_reload,
);
// Build result

View file

@ -24,7 +24,6 @@ impl Menu {
action_page_home: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
action_page_reload: SimpleAction,
) -> Rc<Self> {
// Main
let main = gio::Menu::new();
@ -37,7 +36,12 @@ impl Menu {
window_action.append().id()
)));
main_page.append(Some("Reload"), Some(&detailed_action_name(&action_page_reload)));
main_page.append(Some("Reload"), Some(&format!(
"{}.{}",
window_action.id(),
window_action.reload().id()
)));
main_page.append(Some("Pin"), Some(&format!(
"{}.{}",
window_action.id(),