mirror of https://github.com/YGGverse/Yoda.git
yggverse
1 month ago
5 changed files with 87 additions and 50 deletions
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
mod error; |
||||
|
||||
use error::Error; |
||||
|
||||
use adw::StatusPage; |
||||
|
||||
pub struct Status { |
||||
gobject: StatusPage, |
||||
} |
||||
|
||||
impl Status { |
||||
// Construct
|
||||
pub fn new_error(title: &str, description: &str) -> Self { |
||||
Self { |
||||
gobject: Error::new(title, description), |
||||
} |
||||
} |
||||
|
||||
// Getters
|
||||
pub fn gobject(&self) -> &StatusPage { |
||||
&self.gobject |
||||
} |
||||
} |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
use adw::StatusPage; |
||||
|
||||
pub struct Error { |
||||
gobject: StatusPage, |
||||
} |
||||
|
||||
impl Error { |
||||
pub fn new(title: &str, description: &str) -> StatusPage { |
||||
StatusPage::builder() |
||||
.description(description) |
||||
.icon_name("dialog-error-symbolic") |
||||
.title(title) |
||||
.build() |
||||
} |
||||
} |
Loading…
Reference in new issue