mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 10:54:14 +00:00
update status controller name
This commit is contained in:
parent
d2fd77f178
commit
c1bc99125e
@ -458,10 +458,10 @@ impl Page {
|
|||||||
scheme => {
|
scheme => {
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = gformat!("Oops");
|
let title = gformat!("Oops");
|
||||||
let description = gformat!("Protocol {scheme} not supported");
|
let description = gformat!("Protocol `{scheme}` not supported");
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
content.set_status_error(title.as_str(), description.as_str());
|
content.set_status_failure(title.as_str(), description.as_str());
|
||||||
|
|
||||||
// Update meta
|
// Update meta
|
||||||
meta.borrow_mut().status = Some(status);
|
meta.borrow_mut().status = Some(status);
|
||||||
|
@ -33,7 +33,7 @@ impl Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
pub fn set_status_error(&self, title: &str, description: &str) {
|
pub fn set_status_failure(&self, title: &str, description: &str) {
|
||||||
self.clean();
|
self.clean();
|
||||||
|
|
||||||
let status_default = Status::new_error(title, description);
|
let status_default = Status::new_error(title, description);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
mod error;
|
mod failure;
|
||||||
|
|
||||||
use error::Error;
|
use failure::Failure;
|
||||||
|
|
||||||
use adw::StatusPage;
|
use adw::StatusPage;
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ impl Status {
|
|||||||
// Construct
|
// Construct
|
||||||
pub fn new_error(title: &str, description: &str) -> Self {
|
pub fn new_error(title: &str, description: &str) -> Self {
|
||||||
Self {
|
Self {
|
||||||
gobject: Error::new(title, description),
|
gobject: Failure::new(title, description),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use adw::StatusPage;
|
use adw::StatusPage;
|
||||||
|
|
||||||
pub struct Error {
|
pub struct Failure {
|
||||||
// nothing yet..
|
// nothing yet..
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error {
|
impl Failure {
|
||||||
pub fn new(title: &str, description: &str) -> StatusPage {
|
pub fn new(title: &str, description: &str) -> StatusPage {
|
||||||
StatusPage::builder()
|
StatusPage::builder()
|
||||||
.description(description)
|
.description(description)
|
Loading…
x
Reference in New Issue
Block a user