From af75dc8e2e3933875b6b8f04a5de64214add303f Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 4 Nov 2024 19:36:07 +0200 Subject: [PATCH] set default state for page actions --- src/app.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app.rs b/src/app.rs index 70ff86f4..76e4aed3 100644 --- a/src/app.rs +++ b/src/app.rs @@ -47,13 +47,14 @@ impl App { let action_quit = Action::new("win", true, None); let action_update = Action::new("win", true, Some(&String::static_variant_type())); let action_page_new = Action::new("win", true, None); - let action_page_close = Action::new("win", true, None); + let action_page_close = Action::new_stateful("win", true, None, &(-1).to_variant()); let action_page_close_all = Action::new("win", true, None); - let action_page_home = Action::new("win", false, None); - let action_page_history_back = Action::new("win", false, None); - let action_page_history_forward = Action::new("win", false, None); + let action_page_home = Action::new_stateful("win", false, None, &(-1).to_variant()); + let action_page_history_back = Action::new_stateful("win", false, None, &(-1).to_variant()); + let action_page_history_forward = + Action::new_stateful("win", false, None, &(-1).to_variant()); let action_page_reload = Action::new_stateful("win", true, None, &(-1).to_variant()); - let action_page_pin = Action::new("win", true, None); + let action_page_pin = Action::new_stateful("win", true, None, &(-1).to_variant()); // Init GTK let gobject = Application::builder()