start to implement save and dnd for files
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Chris Cochrun 2025-10-02 11:39:20 -05:00
parent 61fdc288b6
commit f9f3f7f95f
5 changed files with 426 additions and 303 deletions

View file

@ -47,6 +47,12 @@ impl TryFrom<(Vec<u8>, String)> for ServiceItem {
fn try_from(
value: (Vec<u8>, String),
) -> std::result::Result<Self, Self::Error> {
let (data, mime) = value;
match mime.as_str() {
"application/service_item" => {}
"text/uri-list" => {}
"x-special/gnome-copied-files" => {}
}
debug!(?value);
ron::de::from_bytes(&value.0).into_diagnostic()
}
@ -54,7 +60,11 @@ impl TryFrom<(Vec<u8>, String)> for ServiceItem {
impl AllowedMimeTypes for ServiceItem {
fn allowed() -> Cow<'static, [String]> {
Cow::from(vec!["application/service-item".to_string()])
Cow::from(vec![
"application/service-item".to_string(),
"text/uri-list".to_string(),
"x-special/gnome-copied-files".to_string(),
])
}
}