cargo: Update to glycin 1.0.beta.2
This commit is contained in:
parent
cde03f844f
commit
006d3dc5b4
7 changed files with 24 additions and 23 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
|
@ -990,11 +990,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glycin"
|
name = "glycin"
|
||||||
version = "1.0.0-beta.1"
|
version = "1.0.0-beta.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "79edaeeb158aa9e3ae9323ea4e82795d6aead292f777b7e7c3a6b8410cf41eca"
|
checksum = "957cc6aa64f96d55a1b56b77b650ae12ca800ed3f29448b8fd06e475f758e387"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
|
||||||
"async-fs",
|
"async-fs",
|
||||||
"async-global-executor",
|
"async-global-executor",
|
||||||
"async-lock 3.3.0",
|
"async-lock 3.3.0",
|
||||||
|
|
@ -1010,19 +1009,20 @@ dependencies = [
|
||||||
"memfd",
|
"memfd",
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"nix",
|
"nix",
|
||||||
|
"thiserror",
|
||||||
"zbus",
|
"zbus",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glycin-utils"
|
name = "glycin-utils"
|
||||||
version = "1.0.0-beta.1"
|
version = "1.0.0-beta.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1c0a26dfad24b01886bb76ad449378341e339b007fa950fa11d243def8523470"
|
checksum = "0f5bc84076438db6800083027ab7266c80c1868d915865467157bc2845c236e9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
|
||||||
"gettext-rs",
|
|
||||||
"libseccomp",
|
"libseccomp",
|
||||||
|
"memmap2",
|
||||||
"serde",
|
"serde",
|
||||||
|
"thiserror",
|
||||||
"zbus",
|
"zbus",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,14 @@ disable-glycin-sandbox = []
|
||||||
x11 = ["ashpd/gtk4_x11"]
|
x11 = ["ashpd/gtk4_x11"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
glycin = { version = "1.0.0-beta.2" }
|
||||||
anyhow = { version = "1.0.66", features = ["backtrace"] }
|
anyhow = { version = "1.0.66", features = ["backtrace"] }
|
||||||
arc-swap = "1.6.0"
|
arc-swap = "1.6.0"
|
||||||
async-channel = "2.1.0"
|
async-channel = "2.1.0"
|
||||||
env_logger = "0.11.0"
|
env_logger = "0.11.0"
|
||||||
futures-channel = "0.3.25"
|
futures-channel = "0.3.25"
|
||||||
futures-lite = "2.1.0"
|
futures-lite = "2.1.0"
|
||||||
glycin = "1.0.0-beta.1"
|
|
||||||
gvdb-macros = "0.1.6"
|
gvdb-macros = "0.1.6"
|
||||||
indexmap = "2.0.0"
|
indexmap = "2.0.0"
|
||||||
kamadak-exif = "0.5.5"
|
kamadak-exif = "0.5.5"
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
{
|
{
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitlab.gnome.org/sophie-h/glycin.git",
|
"url": "https://gitlab.gnome.org/sophie-h/glycin.git",
|
||||||
"commit": "ea409998d8170535a7880201d3f72da4b313d09b"
|
"commit": "1ab8fbd1d5bb7e3712f06d61a2d4ff31eff4f58e"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -49,14 +49,14 @@ impl Glycin {
|
||||||
|
|
||||||
updater.clone().spawn_error_handled(async move {
|
updater.clone().spawn_error_handled(async move {
|
||||||
log::trace!("Setting up loader");
|
log::trace!("Setting up loader");
|
||||||
let mut image_request = glycin::Loader::new(file);
|
let mut loader = glycin::Loader::new(file);
|
||||||
|
|
||||||
#[cfg(feature = "disable-glycin-sandbox")]
|
#[cfg(feature = "disable-glycin-sandbox")]
|
||||||
image_request.sandbox_mechanism(Some(glycin::SandboxMechanism::NotSandboxed));
|
loader.sandbox_mechanism(Some(glycin::SandboxMechanism::NotSandboxed));
|
||||||
|
|
||||||
image_request.cancellable(cancellable_);
|
loader.cancellable(cancellable_);
|
||||||
|
|
||||||
let image = image_request.request().await?;
|
let image = loader.load().await?;
|
||||||
log::trace!("Image info received");
|
log::trace!("Image info received");
|
||||||
|
|
||||||
let mut metadata: Metadata = Metadata::default();
|
let mut metadata: Metadata = Metadata::default();
|
||||||
|
|
|
||||||
|
|
@ -69,14 +69,14 @@ impl Svg {
|
||||||
let (wakeup, wakeup_resv) = mpsc::unbounded();
|
let (wakeup, wakeup_resv) = mpsc::unbounded();
|
||||||
|
|
||||||
updater.clone().spawn_error_handled(async move {
|
updater.clone().spawn_error_handled(async move {
|
||||||
let mut image_request = glycin::Loader::new(file);
|
let mut loader = glycin::Loader::new(file);
|
||||||
|
|
||||||
#[cfg(feature = "disable-glycin-sandbox")]
|
#[cfg(feature = "disable-glycin-sandbox")]
|
||||||
image_request.sandbox_mechanism(Some(glycin::SandboxMechanism::NotSandboxed));
|
loader.sandbox_mechanism(Some(glycin::SandboxMechanism::NotSandboxed));
|
||||||
|
|
||||||
image_request.cancellable(cancellable.clone());
|
loader.cancellable(cancellable.clone());
|
||||||
|
|
||||||
let image = image_request.request().await?;
|
let image = loader.load().await?;
|
||||||
|
|
||||||
let mut metadata: Metadata = Metadata::default();
|
let mut metadata: Metadata = Metadata::default();
|
||||||
metadata.set_image_info(image.info().details.clone());
|
metadata.set_image_info(image.info().details.clone());
|
||||||
|
|
@ -174,12 +174,12 @@ impl Svg {
|
||||||
|
|
||||||
pub fn render_print(file: &gio::File, width: i32, height: i32) -> anyhow::Result<gdk::Texture> {
|
pub fn render_print(file: &gio::File, width: i32, height: i32) -> anyhow::Result<gdk::Texture> {
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut image_request = glycin::Loader::new(file.clone());
|
let mut loader = glycin::Loader::new(file.clone());
|
||||||
|
|
||||||
#[cfg(feature = "disable-glycin-sandbox")]
|
#[cfg(feature = "disable-glycin-sandbox")]
|
||||||
image_request.sandbox_mechanism(Some(glycin::SandboxMechanism::NotSandboxed));
|
loader.sandbox_mechanism(Some(glycin::SandboxMechanism::NotSandboxed));
|
||||||
|
|
||||||
let image = futures_lite::future::block_on(image_request.request())?;
|
let image = futures_lite::future::block_on(loader.load())?;
|
||||||
let frame_request = glycin::FrameRequest::new().scale(width as u32, height as u32);
|
let frame_request = glycin::FrameRequest::new().scale(width as u32, height as u32);
|
||||||
let frame = futures_lite::future::block_on(image.specific_frame(frame_request))?;
|
let frame = futures_lite::future::block_on(image.specific_frame(frame_request))?;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ impl Metadata {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_image_info(&mut self, image_info: ImageInfoDetails) {
|
pub fn set_image_info(&mut self, image_info: ImageInfoDetails) {
|
||||||
if let Some(exif_raw) = image_info.exif.as_ref() {
|
if let Some(exif_raw) = image_info.exif.as_ref().and_then(|x| x.get_full().ok()) {
|
||||||
self.set_exif_bytes(exif_raw.clone());
|
self.set_exif_bytes(exif_raw);
|
||||||
}
|
}
|
||||||
self.image_info = Some(image_info);
|
self.image_info = Some(image_info);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,7 @@ impl LpWindow {
|
||||||
|
|
||||||
let filter_supported_formats = gtk::FileFilter::new();
|
let filter_supported_formats = gtk::FileFilter::new();
|
||||||
filter_supported_formats.set_name(Some(&gettext("Supported image formats")));
|
filter_supported_formats.set_name(Some(&gettext("Supported image formats")));
|
||||||
for mime_type in glycin::image_formats().await {
|
for mime_type in glycin::supported_mime_types().await {
|
||||||
filter_supported_formats.add_mime_type(&mime_type);
|
filter_supported_formats.add_mime_type(&mime_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue