mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
remove extras
This commit is contained in:
parent
1706f14e96
commit
d674edc7d0
3 changed files with 12 additions and 69 deletions
|
|
@ -157,30 +157,9 @@ impl Content {
|
|||
/// `text/markdown`
|
||||
pub fn to_text_markdown(&self, base: &Uri, data: &str) -> Text {
|
||||
self.clean();
|
||||
match Text::markdown((&self.window_action, &self.item_action), base, data) {
|
||||
Ok(text) => {
|
||||
self.g_box.append(&text.scrolled_window);
|
||||
text
|
||||
}
|
||||
Err((message, text)) => {
|
||||
self.g_box.append(&{
|
||||
let banner = adw::Banner::builder()
|
||||
.title(message)
|
||||
.revealed(true)
|
||||
.button_label("Ok")
|
||||
.build();
|
||||
banner.connect_button_clicked(|this| this.set_revealed(false));
|
||||
banner
|
||||
});
|
||||
match text {
|
||||
Some(text) => {
|
||||
self.g_box.append(&text.scrolled_window);
|
||||
text
|
||||
}
|
||||
None => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
let m = Text::markdown((&self.window_action, &self.item_action), base, data);
|
||||
self.g_box.append(&m.scrolled_window);
|
||||
m
|
||||
}
|
||||
|
||||
/// `text/plain`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue