implement separated dialogs for the Bookmarks and History menu items

This commit is contained in:
yggverse 2025-07-25 15:52:14 +03:00
parent e548efc93f
commit ebb38008e1
14 changed files with 378 additions and 171 deletions

View file

@ -1,17 +1,13 @@
mod bar;
use super::{Action as WindowAction, BrowserAction, Profile};
use super::{Action as WindowAction, BrowserAction};
use adw::{TabView, ToolbarView};
use bar::Bar;
use gtk::Box;
use std::rc::Rc;
pub trait Header {
fn header(
action: (&Rc<BrowserAction>, &Rc<WindowAction>),
profile: &Rc<Profile>,
tab_view: &TabView,
) -> Self;
fn header(action: (&Rc<BrowserAction>, &Rc<WindowAction>), tab_view: &TabView) -> Self;
}
impl Header for ToolbarView {
@ -20,16 +16,11 @@ impl Header for ToolbarView {
/// Build new `Self`
fn header(
(browser_action, window_action): (&Rc<BrowserAction>, &Rc<WindowAction>),
profile: &Rc<Profile>,
tab_view: &TabView,
) -> Self {
let toolbar_view = ToolbarView::builder().build();
toolbar_view.add_top_bar(&Box::bar(
(browser_action, window_action),
profile,
tab_view,
));
toolbar_view.add_top_bar(&Box::bar((browser_action, window_action), tab_view));
toolbar_view
}