Only show networks in side bar if a mounter is found
This commit is contained in:
parent
a40e6cdff4
commit
8668c18607
1 changed files with 15 additions and 13 deletions
28
src/app.rs
28
src/app.rs
|
|
@ -671,19 +671,21 @@ impl App {
|
||||||
.divider_above()
|
.divider_above()
|
||||||
});
|
});
|
||||||
|
|
||||||
nav_model = nav_model.insert(|b| {
|
if !self.mounters.is_empty() {
|
||||||
b.text(fl!("networks"))
|
nav_model = nav_model.insert(|b| {
|
||||||
.icon(widget::icon::icon(
|
b.text(fl!("networks"))
|
||||||
widget::icon::from_name("network-workgroup-symbolic")
|
.icon(widget::icon::icon(
|
||||||
.size(16)
|
widget::icon::from_name("network-workgroup-symbolic")
|
||||||
.handle(),
|
.size(16)
|
||||||
))
|
.handle(),
|
||||||
.data(Location::Network(
|
))
|
||||||
"network:///".to_string(),
|
.data(Location::Network(
|
||||||
fl!("networks"),
|
"network:///".to_string(),
|
||||||
))
|
fl!("networks"),
|
||||||
.divider_above()
|
))
|
||||||
});
|
.divider_above()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Collect all mounter items
|
// Collect all mounter items
|
||||||
let mut nav_items = Vec::new();
|
let mut nav_items = Vec::new();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue