From 115d5fdf170a55697081bdc0b58c0729a3d0eca5 Mon Sep 17 00:00:00 2001 From: DK Liao Date: Fri, 20 Oct 2023 03:14:11 +0800 Subject: [PATCH] Upgrade to gtk 0.18 --- Cargo.toml | 10 +++++----- src/platform_impl/gtk/mod.rs | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b7d776f3..7e3841cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,9 +40,9 @@ features = [ ] [target."cfg(target_os = \"linux\")".dependencies] -gtk = "0.16" -gdk = "0.16" -gdk-pixbuf = "0.16" +gtk = "0.18" +gdk = "0.18" +gdk-pixbuf = "0.18" libxdo = { version = "0.6.0", optional = true } [target."cfg(target_os = \"macos\")".dependencies] @@ -52,6 +52,6 @@ png = "0.17" [dev-dependencies] winit = "0.28" -tao = "0.22" -wry = "0.33" +tao = "0.23" +wry = { git = "https://github.com/dklassic/wry.git", branch = "gtk018" } image = "0.24" diff --git a/src/platform_impl/gtk/mod.rs b/src/platform_impl/gtk/mod.rs index 738eb3e5..1e6b34c5 100644 --- a/src/platform_impl/gtk/mod.rs +++ b/src/platform_impl/gtk/mod.rs @@ -15,7 +15,7 @@ use crate::{ IsMenuItem, MenuEvent, MenuId, MenuItemKind, MenuItemType, Position, }; use accelerator::{from_gtk_mnemonic, parse_accelerator, to_gtk_mnemonic}; -use gtk::{prelude::*, Container, Orientation}; +use gtk::{prelude::*, AboutDialog, Container, Orientation}; use std::{ cell::RefCell, collections::HashMap, @@ -1138,9 +1138,7 @@ impl MenuChild { register_accel(&item); item.connect_activate(move |_| { if let Some(metadata) = &metadata { - let mut builder = gtk::builders::AboutDialogBuilder::new() - .modal(true) - .resizable(false); + let mut builder = AboutDialog::builder().modal(true).resizable(false); if let Some(name) = &metadata.name { builder = builder.program_name(name);