Copy to external drives when drag and dropping, part of #828

This commit is contained in:
Jeremy Soller 2025-04-29 18:07:57 -06:00
parent dd98622cfa
commit 5573e36400
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA
5 changed files with 82 additions and 34 deletions

View file

@ -13,7 +13,7 @@ use url::Url;
#[derive(Clone, Copy, Debug)]
pub enum ClipboardKind {
Copy,
Cut,
Cut { is_dnd: bool },
}
#[derive(Clone, Debug)]
@ -37,7 +37,7 @@ impl ClipboardCopy {
let mut text_uri_list = String::new();
let mut x_special_gnome_copied_files = match kind {
ClipboardKind::Copy => "copy",
ClipboardKind::Cut => "cut",
ClipboardKind::Cut { .. } => "cut",
}
.to_string();
//TODO: do we have to use \r\n?
@ -145,7 +145,7 @@ impl TryFrom<(Vec<u8>, String)> for ClipboardPaste {
if i == 0 {
kind = match line {
"copy" => ClipboardKind::Copy,
"cut" => ClipboardKind::Cut,
"cut" => ClipboardKind::Cut { is_dnd: false },
_ => Err(format!("unsupported clipboard operation {:?}", line))?,
};
} else {