Make compatible with latest cargo deps
Based on the issue relating to building with recent gtk-rs the goal of this change is to allow building with the latest versions of some cargo dependencies on distributions that are moving ahead of the current lowest supported version.
Cargo.toml with versions used in cargo build
[package]
name = "rs"
version = "0.1.0"
[lib]
name = "rs"
path = "src/lib.rs"
crate-type = ["staticlib", "rlib"]
[[bin]]
name = "test_layout"
path = "src/bin/test_layout.rs"
[dependencies]
bitflags = "1.3.*"
clap = { version = "3.0.*", default-features = false, features = ["std"] }
maplit = "1.0.*"
serde = { version = "1.0.*", features = ["derive"] }
serde_yaml = "0.8.*"
xkbcommon = { version = "0.4.*", features = ["wayland"] }
[dependencies.cairo-rs]
version = "0.14.*"
[dependencies.cairo-sys-rs]
version = "0.14.*"
[dependencies.gdk]
version = "0.14.*"
[dependencies.gio]
version = "0.14.*"
features = ["v2_58"]
[dependencies.glib]
version = "0.14.*"
features = ["v2_58"]
[dependencies.glib-sys]
version = "0.14.*"
features = ["v2_58"]
[dependencies.gtk]
version = "0.14.*"
features = ["v3_22"]
[dependencies.gtk-sys]
version = "0.14.*"
features = ["v3_22"]
[dependencies.pango]
version = "0.14.*"
TODO: make compatible between older supported versions and the new ones proposed in this change. @dcz I hope you can help me with this
Most of the changes relate to packages includes (use statements) being moved (::prelude::).
In the latest gtk-rs the MainContext no longer has a release() method, instead we need to set a variable to the ctx.acquire() to maintain scope without it being released instantly from being unused.
Edited by Tor