cargo: Remove gtk-macros dependency

Using the crate is depreacted. Replaced spawn! macro
with our own spawn function
This commit is contained in:
Sophie Herold 2023-04-06 21:14:27 +02:00 • committed by Christopher Davis
parent ca672552be
commit 8b3cfd000a
8 changed files with 21 additions and 20 deletions

View file

@ -24,11 +24,11 @@
use crate::deps::*;
use crate::widgets::LpImage;
use crate::util::spawn;
use adw::subclass::prelude::*;
use glib::clone;
use gtk::prelude::*;
use gtk::CompositeTemplate;
use gtk_macros::spawn;
use once_cell::sync::Lazy;
use std::path::{Path, PathBuf};
@ -155,7 +155,7 @@ impl LpImagePage {
obj.imp().image.set_file(&file);
spawn!(clone!(@weak obj, @strong path => async move {
spawn(clone!(@weak obj, @strong path => async move {
let imp = obj.imp();
imp.image.load(&path).await;
}));