cargo: Update to gtk4-rs 0.9 and core 0.20

This commit is contained in:
Sophie Herold 2024-06-14 17:46:33 +02:00
parent dfd74b060f
commit 4650e6766a
10 changed files with 398 additions and 177 deletions

View file

@ -88,7 +88,7 @@ impl LpErrorDetails {
);
}));
obj.present(root);
obj.present(Some(root));
obj
}
}

View file

@ -193,7 +193,7 @@ impl LpImagePage {
let image = self.image();
if image.is_unsupported() {
let message = if glycin::supported_mime_types().await.is_empty() {
let message = if glycin::supported_loader_mime_types().await.is_empty() {
// Translators: {} is replace with a version number
gettext_f(
"No image loaders available. Maybe the “glycin-loaders” package with compatibility version “{}+” is not installed.",

View file

@ -446,9 +446,9 @@ impl LpPrint {
.build();
let print_settings = if let Some(print_setup) = print_setup {
print_dialog.set_page_setup(&print_setup.page_setup().unwrap());
print_dialog.set_page_setup(&print_setup.page_setup());
print_setup.print_settings().unwrap()
print_setup.print_settings()
} else {
gtk::PrintSettings::new()
};
@ -465,7 +465,7 @@ impl LpPrint {
log::warn!("Failed to print: {err}");
return;
}
Ok(print_setup) => print_setup.unwrap(),
Ok(print_setup) => print_setup,
};
Self::new(image, parent, print_dialog, print_setup);
@ -513,7 +513,7 @@ impl LpPrint {
}
pub fn print_settings(&self) -> gtk::PrintSettings {
self.print_setup().print_settings().unwrap()
self.print_setup().print_settings()
}
pub fn file(&self) -> gio::File {
@ -836,7 +836,7 @@ impl LpPrint {
}
pub fn page_setup(&self) -> gtk::PageSetup {
self.print_setup().page_setup().unwrap()
self.print_setup().page_setup()
}
/// Go back to print dialog from image layout
@ -862,7 +862,7 @@ impl LpPrint {
log::warn!("Print error: {err}");
return;
}
Ok(output_stream) => obj.draw_page(output_stream.unwrap()).await,
Ok(output_stream) => obj.draw_page(output_stream).await,
};
if let Err(err) = draw_result {