Adding in new functionality to open / open-with based off of MIME subclasses where needed
This commit is contained in:
parent
3e5b14dd23
commit
e3226d8dc2
2 changed files with 118 additions and 2 deletions
|
|
@ -73,3 +73,9 @@ pub fn mime_icon(mime: Mime, size: u16) -> icon::Handle {
|
|||
None => icon::from_name(FALLBACK_MIME_ICON).size(size).handle(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parent_mime_types(mime: &Mime) -> Option<Vec<Mime>> {
|
||||
let mut mime_icon_cache = MIME_ICON_CACHE.lock().unwrap();
|
||||
|
||||
mime_icon_cache.shared_mime_info.get_parents_aliased(mime)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue