mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement tab title update
This commit is contained in:
parent
06cfd72c62
commit
0c2658825e
3 changed files with 17 additions and 0 deletions
|
|
@ -155,7 +155,16 @@ impl Tab {
|
|||
pub fn update(&self) {
|
||||
if let Some(id) = self.widget.current_page_keyword() {
|
||||
if let Some(item) = self.index.borrow().get(&id) {
|
||||
// Update item components
|
||||
item.update();
|
||||
|
||||
// Update tab title
|
||||
let title = match item.page_meta_title() {
|
||||
Some(value) => value,
|
||||
None => GString::new(),
|
||||
};
|
||||
|
||||
item.gobject().set_title(title.as_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue