Simplify async code
- Update Cargo.lock - Use new gtk-core API - Remove unneeded async - Remove unneeded clones Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/310>
This commit is contained in:
parent
8d185e1e10
commit
cd8188a1bb
10 changed files with 26 additions and 40 deletions
|
|
@ -272,12 +272,12 @@ mod imp {
|
|||
Self::bind_template(klass);
|
||||
Self::Type::bind_template_callbacks(klass);
|
||||
|
||||
klass.install_action_async("print.print", None, |print, _, _| async move {
|
||||
klass.install_action("print.print", None, |print, _, _| {
|
||||
print.print();
|
||||
});
|
||||
|
||||
klass.install_action_async("print.back", None, |print, _, _| async move {
|
||||
print.back().await;
|
||||
klass.install_action("print.back", None, |print, _, _| {
|
||||
print.back();
|
||||
});
|
||||
|
||||
klass.install_property_action("print.orientation", "orientation");
|
||||
|
|
@ -813,7 +813,7 @@ impl LpPrint {
|
|||
}
|
||||
|
||||
/// Go back to print dialog from image layout
|
||||
async fn back(&self) {
|
||||
fn back(&self) {
|
||||
self.close();
|
||||
let print = Self::new(
|
||||
self.image(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue