mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
update totals on loading
This commit is contained in:
parent
1d03e98b89
commit
6447b2279f
3 changed files with 34 additions and 23 deletions
|
|
@ -34,27 +34,23 @@ impl Content {
|
|||
// Actions
|
||||
pub fn set_image(&self, buffer: &Pixbuf) {
|
||||
self.clean();
|
||||
|
||||
let image = Image::new_from_pixbuf(buffer);
|
||||
|
||||
self.gobject.append(image.gobject());
|
||||
}
|
||||
|
||||
pub fn set_status_failure(&self, title: Option<&str>, description: Option<&str>) {
|
||||
pub fn set_status_failure(&self, title: Option<&str>, description: Option<&str>) -> Status {
|
||||
self.clean();
|
||||
|
||||
let status_default = Status::new_failure(title, description);
|
||||
|
||||
self.gobject.append(status_default.gobject());
|
||||
let status = Status::new_failure(title, description);
|
||||
self.gobject.append(status.gobject());
|
||||
status
|
||||
}
|
||||
|
||||
/// Loading placeholder
|
||||
pub fn set_status_loading(&self, title: Option<&str>, description: Option<&str>) {
|
||||
pub fn set_status_loading(&self, title: Option<&str>, description: Option<&str>) -> Status {
|
||||
self.clean();
|
||||
|
||||
let status_default = Status::new_loading(title, description);
|
||||
|
||||
self.gobject.append(status_default.gobject());
|
||||
let status = Status::new_loading(title, description);
|
||||
self.gobject.append(status.gobject());
|
||||
status
|
||||
}
|
||||
|
||||
/// Default reading widget for [Gemtext](https://geminiprotocol.net/docs/gemtext.gmi),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue