mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
add optional download button for unknown mime types
This commit is contained in:
parent
549c3fd946
commit
f2dadee082
4 changed files with 39 additions and 12 deletions
|
|
@ -4,8 +4,12 @@ mod identity;
|
|||
mod loading;
|
||||
mod mime;
|
||||
|
||||
use super::TabAction;
|
||||
use adw::StatusPage;
|
||||
use gtk::gio::{Cancellable, File};
|
||||
use gtk::{
|
||||
gio::{Cancellable, File},
|
||||
glib::GString,
|
||||
};
|
||||
use std::{rc::Rc, time::Duration};
|
||||
|
||||
pub struct Status {
|
||||
|
|
@ -38,9 +42,9 @@ impl Status {
|
|||
/// Create new mime issue preset
|
||||
///
|
||||
/// Useful as placeholder widget for mime issue handlers
|
||||
pub fn new_mime(mime: &str) -> Self {
|
||||
pub fn new_mime(mime: &str, download: Option<(Rc<TabAction>, GString)>) -> Self {
|
||||
Self {
|
||||
gobject: mime::new_gobject(mime),
|
||||
gobject: mime::new_gobject(mime, download),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue