Add Clear Recents history to Recents nav bar context menu
This commit is contained in:
parent
395b4922e4
commit
3fcaaf1ed7
5 changed files with 34 additions and 9 deletions
|
|
@ -1221,6 +1221,13 @@ fn uri_to_path(uri: String) -> Option<PathBuf> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn has_recents() -> bool {
|
||||
match recently_used_xbel::parse_file() {
|
||||
Ok(recent_files) => !recent_files.bookmarks.is_empty(),
|
||||
Err(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn scan_recents(sizes: IconSizes) -> Vec<Item> {
|
||||
let recent_files = match recently_used_xbel::parse_file() {
|
||||
Ok(recent_files) => recent_files,
|
||||
|
|
@ -5928,6 +5935,7 @@ impl Tab {
|
|||
tab_column = tab_column.push(popover);
|
||||
}
|
||||
match &self.location {
|
||||
Location::Recents => {}
|
||||
Location::Trash => {
|
||||
if let Some(items) = self.items_opt()
|
||||
&& !items.is_empty()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue