cargo: Update to gtk4-rs 0.9 and core 0.20
This commit is contained in:
parent
dfd74b060f
commit
4650e6766a
10 changed files with 398 additions and 177 deletions
|
|
@ -88,7 +88,7 @@ impl LpErrorDetails {
|
|||
);
|
||||
}));
|
||||
|
||||
obj.present(root);
|
||||
obj.present(Some(root));
|
||||
obj
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.",
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue