window: Add reload button and F5 shortcut
Reloading makes sense for out of memory situations or filesystems that don't support inotify.
This commit is contained in:
parent
c3547f82fc
commit
053aa5da7e
6 changed files with 56 additions and 7 deletions
|
|
@ -290,6 +290,15 @@ impl LpImage {
|
|||
self.imp().file.replace(Some(file.clone()));
|
||||
}
|
||||
|
||||
pub async fn reload(&self) {
|
||||
dbg!("reloadking");
|
||||
if let Some(file) = self.file() {
|
||||
self.load(&file).await;
|
||||
} else {
|
||||
log::error!("Trying to reload image without file");
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn load(&self, file: &gio::File) {
|
||||
let imp = self.imp();
|
||||
log::debug!("Loading file {}", file.uri());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue