Support more versions of glib and gtk

This commit is contained in:
2022-05-05 14:50:51 -07:00
parent 858cd2750c
commit 050bf5cbac
4 changed files with 6 additions and 7 deletions

View File

@ -8,8 +8,8 @@ anyhow = "1"
bscreensaver-util = { path = "../util" }
chrono = "0.4"
gethostname = "0.2"
glib = { version = "0.15", features = ["v2_68"] }
gtk = { version = "0.15", features = ["v3_24"] }
glib = { version = "0.15", features = ["log"] }
gtk = "0.15"
gtk-sys = "0.15"
gdk-sys = "0.15"
gdkx11 = "0.15"

View File

@ -13,6 +13,7 @@ const DIALOG_TIMEOUT: Duration = Duration::from_secs(60);
fn main() -> anyhow::Result<()> {
init_logging("BSCREENSAVER_DIALOG_GTK3_LOG");
glib::log_set_default_handler(glib::rust_log_handler);
let mut config = Configuration::load()?;
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();
unsafe { glib::log_writer_default_set_use_stderr(true) };
gtk::init()?;
let top_sg = gtk::SizeGroup::builder()