implement tabs id features

This commit is contained in:
yggverse 2024-10-11 05:01:42 +03:00
parent 09c08b2b6f
commit 06cfd72c62
4 changed files with 30 additions and 29 deletions

View file

@ -11,6 +11,7 @@ pub struct Widget {
impl Widget {
// Construct
pub fn new_arc(
keyword: &str, // ID
tab_view: &TabView,
page: &Box,
title: Option<&str>,
@ -18,6 +19,8 @@ impl Widget {
) -> Arc<Self> {
let gobject = tab_view.append(page);
gobject.set_keyword(keyword);
gobject.set_title(match title {
Some(value) => value,
None => DEFAULT_TITLE,