add new getters, switch accel target

This commit is contained in:
yggverse 2024-11-10 08:07:44 +02:00
parent 38f945105c
commit 5f280efaf3
4 changed files with 23 additions and 1 deletions

View File

@ -197,6 +197,15 @@ impl App {
),
&["<Primary>u"],
),
// Tab actions
(
gformat!(
"{}.{}",
browser.window().tab().action().id(),
browser.window().tab().action().append().id()
),
&["<Primary>t"],
),
// @TODO
(
gformat!("win.{}", action_page_reload.name()),
@ -211,7 +220,6 @@ impl App {
&["<Primary>Right"],
),
(gformat!("win.{}", action_page_home.name()), &["<Primary>h"]),
(gformat!("win.{}", action_page_new.name()), &["<Primary>t"]),
(gformat!("win.{}", action_page_pin.name()), &["<Primary>p"]),
// @TODO page close missed
] {

View File

@ -253,6 +253,10 @@ impl Browser {
pub fn gobject(&self) -> &ApplicationWindow {
self.widget.gobject()
}
pub fn window(&self) -> &Rc<Window> {
&self.window
}
}
// Tools

View File

@ -165,6 +165,11 @@ impl Window {
}
// Getters
pub fn tab(&self) -> &Rc<Tab> {
&self.tab
}
pub fn gobject(&self) -> &Box {
self.widget.gobject()
}

View File

@ -396,6 +396,11 @@ impl Tab {
}
// Getters
pub fn action(&self) -> &Rc<Action> {
&self.action
}
pub fn gobject(&self) -> &TabView {
self.widget.gobject()
}