mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
implement recent bookmarks menu item
This commit is contained in:
parent
c335207b28
commit
9e86e9b29f
13 changed files with 155 additions and 60 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue