Support more versions of glib and gtk
This commit is contained in:
parent
858cd2750c
commit
050bf5cbac
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -317,7 +317,6 @@ dependencies = [
|
|||||||
"bscreensaver-util",
|
"bscreensaver-util",
|
||||||
"glib",
|
"glib",
|
||||||
"gtk",
|
"gtk",
|
||||||
"log",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -839,6 +838,7 @@ dependencies = [
|
|||||||
"glib-sys",
|
"glib-sys",
|
||||||
"gobject-sys",
|
"gobject-sys",
|
||||||
"libc",
|
"libc",
|
||||||
|
"log",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
@ -8,8 +8,8 @@ anyhow = "1"
|
|||||||
bscreensaver-util = { path = "../util" }
|
bscreensaver-util = { path = "../util" }
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
gethostname = "0.2"
|
gethostname = "0.2"
|
||||||
glib = { version = "0.15", features = ["v2_68"] }
|
glib = { version = "0.15", features = ["log"] }
|
||||||
gtk = { version = "0.15", features = ["v3_24"] }
|
gtk = "0.15"
|
||||||
gtk-sys = "0.15"
|
gtk-sys = "0.15"
|
||||||
gdk-sys = "0.15"
|
gdk-sys = "0.15"
|
||||||
gdkx11 = "0.15"
|
gdkx11 = "0.15"
|
||||||
|
@ -13,6 +13,7 @@ const DIALOG_TIMEOUT: Duration = Duration::from_secs(60);
|
|||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
init_logging("BSCREENSAVER_DIALOG_GTK3_LOG");
|
init_logging("BSCREENSAVER_DIALOG_GTK3_LOG");
|
||||||
|
glib::log_set_default_handler(glib::rust_log_handler);
|
||||||
|
|
||||||
let mut config = Configuration::load()?;
|
let mut config = Configuration::load()?;
|
||||||
let new_login_command = config.new_login_command
|
let new_login_command = config.new_login_command
|
||||||
@ -22,7 +23,6 @@ fn main() -> anyhow::Result<()> {
|
|||||||
|
|
||||||
let standalone = std::env::var("BSCREENSAVER_DIALOG_STANDALONE").is_ok();
|
let standalone = std::env::var("BSCREENSAVER_DIALOG_STANDALONE").is_ok();
|
||||||
|
|
||||||
unsafe { glib::log_writer_default_set_use_stderr(true) };
|
|
||||||
gtk::init()?;
|
gtk::init()?;
|
||||||
|
|
||||||
let top_sg = gtk::SizeGroup::builder()
|
let top_sg = gtk::SizeGroup::builder()
|
||||||
|
@ -6,6 +6,5 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
bscreensaver-util = { path = "../util" }
|
bscreensaver-util = { path = "../util" }
|
||||||
glib = { version = "0.15", features = ["v2_68"] }
|
glib = "0.15"
|
||||||
gtk = { version = "0.15", features = ["v3_24"] }
|
gtk = { version = "0.15", features = ["v3_20"] }
|
||||||
log = "0.4"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user