From 9b94304756b1bf8b70cadb5df0505f04ff8d20be Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 11 Oct 2024 02:47:53 +0300 Subject: [PATCH] remove testing data --- src/app/browser/window.rs | 27 +++++++++------------------ src/app/browser/window/tab.rs | 2 +- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/app/browser/window.rs b/src/app/browser/window.rs index 67fcad0c..caa67e79 100644 --- a/src/app/browser/window.rs +++ b/src/app/browser/window.rs @@ -36,16 +36,15 @@ impl Window { action_tab_page_navigation_reload: Arc, action_tab_pin: Arc, ) -> Self { - // @TODO testing - let tab_view = adw::TabView::new(); - - let p1 = tab_view.append(>k::Label::new(Some("test 1"))); - let p2 = tab_view.append(>k::Label::new(Some("test 2"))); - - p1.set_title("title 1"); - p2.set_title("title 2"); - // Init components + let tab = Tab::new_arc( + action_tab_page_navigation_base.clone(), + action_tab_page_navigation_history_back.clone(), + action_tab_page_navigation_history_forward.clone(), + action_tab_page_navigation_reload.clone(), + action_update.clone(), + ); + let header = Header::new_arc( // Actions action_tool_debug.clone(), @@ -60,15 +59,7 @@ impl Window { action_tab_page_navigation_reload.clone(), action_tab_pin.clone(), // Widgets - &tab_view, - ); - - let tab = Tab::new_arc( - action_tab_page_navigation_base, - action_tab_page_navigation_history_back, - action_tab_page_navigation_history_forward, - action_tab_page_navigation_reload, - action_update, + tab.gobject(), ); // GTK diff --git a/src/app/browser/window/tab.rs b/src/app/browser/window/tab.rs index cdbd340c..a20a7d0a 100644 --- a/src/app/browser/window/tab.rs +++ b/src/app/browser/window/tab.rs @@ -90,7 +90,7 @@ impl Tab { self.index.borrow_mut().insert(item.id(), item.clone()); // Append new page - self.widget.gobject().add_page(item.gobject(), None); + self.widget.append(item.gobject()); item.page_navigation_request_grab_focus(); // @TODO