Browse Source

remove testing data

master
yggverse 2 months ago
parent
commit
9b94304756
  1. 27
      src/app/browser/window.rs
  2. 2
      src/app/browser/window/tab.rs

27
src/app/browser/window.rs

@ -36,16 +36,15 @@ impl Window {
action_tab_page_navigation_reload: Arc<SimpleAction>, action_tab_page_navigation_reload: Arc<SimpleAction>,
action_tab_pin: Arc<SimpleAction>, action_tab_pin: Arc<SimpleAction>,
) -> Self { ) -> Self {
// @TODO testing
let tab_view = adw::TabView::new();
let p1 = tab_view.append(&gtk::Label::new(Some("test 1")));
let p2 = tab_view.append(&gtk::Label::new(Some("test 2")));
p1.set_title("title 1");
p2.set_title("title 2");
// Init components // 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( let header = Header::new_arc(
// Actions // Actions
action_tool_debug.clone(), action_tool_debug.clone(),
@ -60,15 +59,7 @@ impl Window {
action_tab_page_navigation_reload.clone(), action_tab_page_navigation_reload.clone(),
action_tab_pin.clone(), action_tab_pin.clone(),
// Widgets // Widgets
&tab_view, tab.gobject(),
);
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,
); );
// GTK // GTK

2
src/app/browser/window/tab.rs

@ -90,7 +90,7 @@ impl Tab {
self.index.borrow_mut().insert(item.id(), item.clone()); self.index.borrow_mut().insert(item.id(), item.clone());
// Append new page // Append new page
self.widget.gobject().add_page(item.gobject(), None); self.widget.append(item.gobject());
item.page_navigation_request_grab_focus(); // @TODO item.page_navigation_request_grab_focus(); // @TODO

Loading…
Cancel
Save