implement recent bookmarks menu item

This commit is contained in:
yggverse 2025-01-12 00:38:22 +02:00
parent c335207b28
commit 9e86e9b29f
13 changed files with 155 additions and 60 deletions

View file

@ -4,7 +4,7 @@ mod header;
mod tab;
mod widget;
use action::Action;
use action::{Action, Position};
use header::Header;
use sqlite::Transaction;
use tab::Tab;
@ -29,7 +29,11 @@ impl Window {
// Init components
let tab = Rc::new(Tab::new(&profile, (&browser_action, &action)));
let header = Header::new((&browser_action, &action), &profile, &tab.widget.tab_view);
let header = Rc::new(Header::new(
(&browser_action, &action),
&profile,
&tab.widget.tab_view,
));
let widget = Rc::new(Widget::new(&header.widget.gobject, &tab.widget.tab_view));
// Init events
@ -110,6 +114,13 @@ impl Window {
} // @TODO rename destination method
});
action.open.on_activate({
let tab = tab.clone();
move |_, request| {
tab.append(Position::End, Some(request), false, true, false, true);
}
});
// Init struct
Self {
action,