Implement desktop view toggles, part of #547

This commit is contained in:
Jeremy Soller 2024-10-04 16:28:30 -06:00
parent cc2a62a14c
commit c511242dd4
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
8 changed files with 459 additions and 125 deletions

View file

@ -62,10 +62,10 @@ impl MounterItem {
}
}
pub fn icon(&self) -> Option<widget::icon::Handle> {
pub fn icon(&self, symbolic: bool) -> Option<widget::icon::Handle> {
match self {
#[cfg(feature = "gvfs")]
Self::Gvfs(item) => item.icon(),
Self::Gvfs(item) => item.icon(symbolic),
Self::None => unreachable!(),
}
}
@ -89,6 +89,7 @@ pub enum MounterMessage {
}
pub trait Mounter: Send + Sync {
fn items(&self, sizes: IconSizes) -> Option<MounterItems>;
//TODO: send result
fn mount(&self, item: MounterItem) -> Command<()>;
fn network_drive(&self, uri: String) -> Command<()>;