add request state

This commit is contained in:
yggverse 2024-11-11 12:52:46 +02:00
parent 3a0deabc14
commit 7bc2d478d0
5 changed files with 72 additions and 23 deletions

View file

@ -99,7 +99,13 @@ impl Tab {
}
// Actions
pub fn append(&self, position: Option<i32>, is_pinned: bool, is_selected: bool) -> Rc<Item> {
pub fn append(
&self,
position: Option<i32>,
request: Option<String>,
is_pinned: bool,
is_selected: bool,
) -> Rc<Item> {
// Init new tab item
let item = Rc::new(Item::new(
self.widget.gobject(),
@ -107,6 +113,7 @@ impl Tab {
self.window_action.clone(),
// Options
position,
request,
is_pinned,
is_selected,
));
@ -305,7 +312,7 @@ impl Tab {
pub fn init(&self) {
// Append just one blank page if no tabs available after last session restore
if self.index.borrow().is_empty() {
self.append(None, false, true);
self.append(None, None, false, true);
}
// @TODO other/child features..