delegate history_snap action to protocol driver implementation

This commit is contained in:
yggverse 2025-03-12 11:00:16 +02:00
parent 68b3119bb1
commit 33d5d414ac
16 changed files with 124 additions and 147 deletions

View file

@ -20,18 +20,16 @@ impl Directory {
{
let page = page.clone();
move |file| {
page.item_action.load.activate(
Some(&format!(
"file://{}",
file.path().unwrap().to_str().unwrap()
)),
true,
)
page.item_action.load.activate(Some(&format!(
"file://{}",
file.path().unwrap().to_str().unwrap()
)))
}
},
),
);
page.set_title(&self.file.parse_name());
page.snap_history();
page.window_action.find.simple_action.set_enabled(false);
page.window_action.save_as.simple_action.set_enabled(false);
}

View file

@ -15,6 +15,7 @@ impl Image {
};
page.set_title(&crate::tool::uri_to_title(uri));
page.set_progress(0.0);
page.snap_history();
page.window_action.find.simple_action.set_enabled(false);
}
}

View file

@ -10,6 +10,7 @@ impl Status {
widget.set_description(Some(message));
page.set_title(&widget.title());
page.set_progress(0.0);
page.snap_history();
page.window_action.find.simple_action.set_enabled(false);
}
}

View file

@ -19,6 +19,7 @@ impl Text {
None => crate::tool::uri_to_title(uri),
});
page.set_progress(0.0);
page.snap_history();
page.window_action.find.simple_action.set_enabled(true);
}
}