move new tab button into the tabs start widget

This commit is contained in:
yggverse 2024-10-31 16:16:02 +02:00
parent 1ffc5c1edb
commit 6aee2edd75
6 changed files with 12 additions and 21 deletions

View file

@ -1,8 +1,11 @@
mod append;
mod widget;
use append::Append;
use widget::Widget;
use adw::{TabBar, TabView};
use gtk::gio::SimpleAction;
use std::sync::Arc;
pub struct Tab {
@ -11,9 +14,9 @@ pub struct Tab {
impl Tab {
// Construct
pub fn new_arc(view: &TabView) -> Arc<Self> {
pub fn new_arc(action_tab_append: SimpleAction, view: &TabView) -> Arc<Self> {
Arc::new(Self {
widget: Widget::new_arc(view),
widget: Widget::new_arc(view, Append::new_arc(action_tab_append).gobject()),
})
}