window: Add Home/End shortcuts for first/last img
This is the same as in EOG. Also add PageUp/Down for image navigation from EOG. Cleanup the navigation enums as well.
This commit is contained in:
parent
169dd454cc
commit
69889820cd
6 changed files with 65 additions and 13 deletions
|
|
@ -207,6 +207,16 @@ impl LpFileModel {
|
|||
.collect()
|
||||
}
|
||||
|
||||
/// Return first path
|
||||
pub fn first(&self) -> Option<PathBuf> {
|
||||
self.imp().files.borrow().first().cloned()
|
||||
}
|
||||
|
||||
/// Returns last path
|
||||
pub fn last(&self) -> Option<PathBuf> {
|
||||
self.imp().files.borrow().last().cloned()
|
||||
}
|
||||
|
||||
/// Currently sorts by name
|
||||
fn sort(files: &mut IndexSet<PathBuf>) {
|
||||
files.sort_by(|x, y| util::compare_by_name(x, y));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue