mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update tab title on loading indicator inactive
This commit is contained in:
parent
b1f30fbd1e
commit
4759ce4815
2 changed files with 11 additions and 5 deletions
|
|
@ -159,10 +159,12 @@ impl Tab {
|
|||
// Update item components
|
||||
item.update();
|
||||
|
||||
// Update tab title
|
||||
if let Some(title) = item.page_meta_title() {
|
||||
item.gobject().set_title(title.as_str())
|
||||
};
|
||||
// Update tab title on loading indicator inactive
|
||||
if !item.page_is_loading() {
|
||||
if let Some(title) = item.page_meta_title() {
|
||||
item.gobject().set_title(title.as_str())
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ impl Item {
|
|||
self.page.update();
|
||||
|
||||
// Update tab loading indicator
|
||||
self.widget.gobject().set_loading(self.page.is_loading());
|
||||
self.widget.gobject().set_loading(self.page_is_loading());
|
||||
}
|
||||
|
||||
pub fn clean(
|
||||
|
|
@ -198,6 +198,10 @@ impl Item {
|
|||
self.id.clone()
|
||||
}
|
||||
|
||||
pub fn page_is_loading(&self) -> bool {
|
||||
self.page.is_loading()
|
||||
}
|
||||
|
||||
pub fn page_meta_title(&self) -> Option<GString> {
|
||||
self.page.meta_title()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue