File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ impl<'clipboard> Get<'clipboard> {
135
135
match self . clipboard {
136
136
Clipboard :: X11 ( clipboard) => clipboard. get_file_list ( self . selection ) ,
137
137
#[ cfg( feature = "wayland-data-control" ) ]
138
- Clipboard :: WlDataControl ( _ ) => todo ! ( ) ,
138
+ Clipboard :: WlDataControl ( clipboard ) => clipboard . get_file_list ( self . selection ) ,
139
139
}
140
140
}
141
141
}
Original file line number Diff line number Diff line change @@ -182,4 +182,12 @@ impl Clipboard {
182
182
opts. copy ( source, MimeType :: Specific ( MIME_PNG . into ( ) ) ) . map_err ( into_unknown) ?;
183
183
Ok ( ( ) )
184
184
}
185
+
186
+ pub ( crate ) fn get_file_list (
187
+ & mut self ,
188
+ selection : LinuxClipboardKind ,
189
+ ) -> Result < Vec < String > , Error > {
190
+ self . string_for_mime ( selection, paste:: MimeType :: Specific ( "text/uri-list" ) )
191
+ . map ( |res| res. lines ( ) . map ( |s| s. to_string ( ) ) . collect ( ) )
192
+ }
185
193
}
You can’t perform that action at this time.
0 commit comments