cargo: Remove gtk-macros dependency
Using the crate is depreacted. Replaced spawn! macro with our own spawn function
This commit is contained in:
parent
ca672552be
commit
8b3cfd000a
8 changed files with 21 additions and 20 deletions
|
|
@ -20,11 +20,11 @@
|
|||
use crate::deps::*;
|
||||
use crate::i18n::*;
|
||||
|
||||
use crate::util::spawn;
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use glib::clone;
|
||||
use gtk::CompositeTemplate;
|
||||
use gtk_macros::spawn;
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ impl LpWindow {
|
|||
.build();
|
||||
toast.connect_button_clicked(glib::clone!(@weak self as win => move |_| {
|
||||
let path = path.clone();
|
||||
spawn!(async move {
|
||||
spawn(async move {
|
||||
let result = crate::util::untrash(&path).await;
|
||||
match result {
|
||||
Ok(()) => win.image_view().set_image_from_path(&path),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue