recents in dialog mode

This commit is contained in:
Francesco Pio Gaglione 2024-08-20 09:43:25 +02:00
parent 1ffb3b9870
commit 0c299950c9
2 changed files with 13 additions and 0 deletions

View file

@ -6,6 +6,12 @@ edition = "2021"
license = "GPL-3.0-only"
rust-version = "1.71"
[[example]]
name = "dialog" # examples/dialog.rs
[[example]]
name = "gvfs" # examples/gvfs.rs
[build-dependencies]
vergen = { version = "8", features = ["git", "gitcl"] }

View file

@ -440,6 +440,13 @@ impl Application for App {
let accept_label = flags.kind.accept_label();
let mut nav_model = segmented_button::ModelBuilder::default();
nav_model = nav_model.insert(move |b| {
b.text(fl!("recents"))
.icon(widget::icon::from_name("accessories-clock-symbolic").size(16))
.data(Location::Recents)
});
if let Some(dir) = dirs::home_dir() {
nav_model = nav_model.insert(move |b| {
b.text(fl!("home"))