From 37f6334c9fae66e48b61068fece62973d50ba544 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Tue, 14 Nov 2023 10:05:56 -0500 Subject: [PATCH] Update the gtk dependencies for all packages This breaks the hex-grid application. set_source_pixbuf got removed and I have not figured out a replacement for drawing a pixbuf to a context. --- Cargo.lock | 331 +++++++++++------------------------ cyberpunk-splash/Cargo.toml | 8 +- cyberpunk-splash/src/main.rs | 4 +- dashboard/Cargo.toml | 12 +- dashboard/src/main.rs | 4 +- gm-control-panel/Cargo.toml | 10 +- gm-control-panel/src/main.rs | 6 +- hex-grid/Cargo.toml | 10 +- hex-grid/build.rs | 2 +- hex-grid/src/tile.rs | 5 +- kifu/gtk/Cargo.toml | 10 +- kifu/gtk/src/main.rs | 4 +- kifu/gtk/src/ui/home.rs | 2 +- kifu/gtk/src/ui/library.rs | 2 +- screenplay/Cargo.toml | 3 +- screenplay/src/lib.rs | 6 +- 16 files changed, 152 insertions(+), 267 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 75465e2..7854549 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,13 +278,13 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cairo-rs" -version = "0.17.10" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3603c4028a5e368d09b51c8b624b9a46edcd7c3778284077a6125af73c9f0a" +checksum = "f33613627f0dea6a731b0605101fad59ba4f193a52c96c4687728d822605a8a1" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cairo-sys-rs", - "glib 0.17.10", + "glib", "libc", "once_cell", "thiserror", @@ -292,11 +292,11 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.17.10" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "691d0c66b1fb4881be80a760cb8fe76ea97218312f9dfe2c9cc0f496ca279cb1" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ - "glib-sys 0.17.10", + "glib-sys", "libc", "system-deps", ] @@ -645,8 +645,8 @@ name = "cyberpunk-splash" version = "0.1.0" dependencies = [ "cairo-rs", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "gtk4", ] @@ -661,8 +661,8 @@ dependencies = [ "futures", "gdk4", "geo-types", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "glib-build-tools 0.16.3", "gtk4", "ifc", @@ -1211,60 +1211,58 @@ checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" [[package]] name = "gdk-pixbuf" -version = "0.17.10" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695d6bc846438c5708b07007537b9274d883373dd30858ca881d7d71b5540717" +checksum = "446f32b74d22c33b7b258d4af4ffde53c2bf96ca2e29abdf1a785fe59bd6c82c" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "libc", "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.17.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9285ec3c113c66d7d0ab5676599176f1f42f4944ca1b581852215bf5694870cb" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ - "gio-sys 0.17.10", - "glib-sys 0.17.10", - "gobject-sys 0.17.10", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] [[package]] name = "gdk4" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3abf96408a26e3eddf881a7f893a1e111767137136e347745e8ea6ed12731ff" +checksum = "7edb019ad581f8ecf8ea8e4baa6df7c483a95b5a59be3140be6a9c3b0c632af6" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk4-sys", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "libc", - "pango 0.17.10", + "pango", ] [[package]] name = "gdk4-sys" -version = "0.6.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc92aa1608c089c49393d014c38ac0390d01e4841e1fedaa75dbcef77aaed64" +checksum = "dbab43f332a3cf1df9974da690b5bb0e26720ed09a228178ce52175372dcfef0" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", - "gio-sys 0.17.10", - "glib-sys 0.17.10", - "gobject-sys 0.17.10", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", - "pango-sys 0.17.10", + "pango-sys", "pkg-config", "system-deps", ] @@ -1329,26 +1327,6 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" -[[package]] -name = "gio" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6973e92937cf98689b6a054a9e56c657ed4ff76de925e36fc331a15f0c5d30a" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys 0.17.10", - "glib 0.17.10", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror", -] - [[package]] name = "gio" version = "0.18.2" @@ -1359,8 +1337,8 @@ dependencies = [ "futures-core", "futures-io", "futures-util", - "gio-sys 0.18.1", - "glib 0.18.2", + "gio-sys", + "glib", "libc", "once_cell", "pin-project-lite", @@ -1368,55 +1346,19 @@ dependencies = [ "thiserror", ] -[[package]] -name = "gio-sys" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ccf87c30a12c469b6d958950f6a9c09f2be20b7773f7e70d20b867fdf2628c3" -dependencies = [ - "glib-sys 0.17.10", - "gobject-sys 0.17.10", - "libc", - "system-deps", - "winapi", -] - [[package]] name = "gio-sys" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", "winapi", ] -[[package]] -name = "glib" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fad45ba8d4d2cea612b432717e834f48031cd8853c8aaf43b2c79fec8d144b" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys 0.17.10", - "glib-macros 0.17.10", - "glib-sys 0.17.10", - "gobject-sys 0.17.10", - "libc", - "memchr", - "once_cell", - "smallvec", - "thiserror", -] - [[package]] name = "glib" version = "0.18.2" @@ -1429,10 +1371,10 @@ dependencies = [ "futures-executor", "futures-task", "futures-util", - "gio-sys 0.18.1", - "glib-macros 0.18.2", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", "libc", "memchr", "once_cell", @@ -1453,19 +1395,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a65d79efe318ef2cbbbb37032b125866fd82c34ea44c816132621bbc552e716" [[package]] -name = "glib-macros" -version = "0.17.10" +name = "glib-build-tools" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca5c79337338391f1ab8058d6698125034ce8ef31b72a442437fa6c8580de26" -dependencies = [ - "anyhow", - "heck", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "3431c56f463443cba9bc3600248bc6d680cb614c2ee1cdd39dab5415bd12ac5c" [[package]] name = "glib-macros" @@ -1481,16 +1414,6 @@ dependencies = [ "syn 2.0.37", ] -[[package]] -name = "glib-sys" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80aa6ea7bba0baac79222204aa786a6293078c210abe69ef1336911d4bdc4f0" -dependencies = [ - "libc", - "system-deps", -] - [[package]] name = "glib-sys" version = "0.18.1" @@ -1509,8 +1432,8 @@ dependencies = [ "config-derive", "futures", "gdk4", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "glib-build-tools 0.16.3", "gtk4", "libadwaita", @@ -1519,46 +1442,35 @@ dependencies = [ "tokio", ] -[[package]] -name = "gobject-sys" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd34c3317740a6358ec04572c1bcfd3ac0b5b6529275fae255b237b314bb8062" -dependencies = [ - "glib-sys 0.17.10", - "libc", - "system-deps", -] - [[package]] name = "gobject-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ - "glib-sys 0.18.1", + "glib-sys", "libc", "system-deps", ] [[package]] name = "graphene-rs" -version = "0.17.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def4bb01265b59ed548b05455040d272d989b3012c42d4c1bbd39083cb9b40d9" +checksum = "3b2228cda1505613a7a956cca69076892cfbda84fc2b7a62b94a41a272c0c401" dependencies = [ - "glib 0.17.10", + "glib", "graphene-sys", "libc", ] [[package]] name = "graphene-sys" -version = "0.17.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1856fc817e6a6675e36cea0bd9a3afe296f5d9709d1e2d3182803ac77f0ab21d" +checksum = "cc4144cee8fc8788f2a9b73dc5f1d4e1189d1f95305c4cb7bd9c1af1cfa31f59" dependencies = [ - "glib-sys 0.17.10", + "glib-sys", "libc", "pkg-config", "system-deps", @@ -1575,64 +1487,61 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f01ef44fa7cac15e2da9978529383e6bee03e570ba5bf7036b4c10a15cc3a3c" +checksum = "0d958e351d2f210309b32d081c832d7de0aca0b077aa10d88336c6379bd01f7e" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk4", - "glib 0.17.10", + "glib", "graphene-rs", "gsk4-sys", "libc", - "pango 0.17.10", + "pango", ] [[package]] name = "gsk4-sys" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07a84fb4dcf1323d29435aa85e2f5f58bef564342bef06775ec7bd0da1f01b0" +checksum = "12bd9e3effea989f020e8f1ff3fa3b8c63ba93d43b899c11a118868853a56d55" dependencies = [ "cairo-sys-rs", "gdk4-sys", - "glib-sys 0.17.10", - "gobject-sys 0.17.10", + "glib-sys", + "gobject-sys", "graphene-sys", "libc", - "pango-sys 0.17.10", + "pango-sys", "system-deps", ] [[package]] name = "gtk4" -version = "0.6.6" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28a32a04cd75cef14a0983f8b0c669e0fe152a0a7725accdeb594e2c764c88b" +checksum = "5aeb51aa3e9728575a053e1f43543cd9992ac2477e1b186ad824fd4adfb70842" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", "gdk-pixbuf", "gdk4", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "graphene-rs", "gsk4", "gtk4-macros", "gtk4-sys", "libc", - "once_cell", - "pango 0.17.10", + "pango", ] [[package]] name = "gtk4-macros" -version = "0.6.6" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a4d6b61570f76d3ee542d984da443b1cd69b6105264c61afec3abed08c2500f" +checksum = "d57ec49cf9b657f69a05bca8027cff0a8dfd0c49e812be026fc7311f2163832f" dependencies = [ "anyhow", "proc-macro-crate", @@ -1644,20 +1553,20 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8283f707b07e019e76c7f2934bdd4180c277e08aa93f4c0d8dd07b7a34e22f" +checksum = "54d8c4aa23638ce9faa2caf7e2a27d4a1295af2155c8e8d28c4d4eeca7a65eb8" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gdk4-sys", - "gio-sys 0.17.10", - "glib-sys 0.17.10", - "gobject-sys 0.17.10", + "gio-sys", + "glib-sys", + "gobject-sys", "graphene-sys", "gsk4-sys", "libc", - "pango-sys 0.17.10", + "pango-sys", "system-deps", ] @@ -1765,9 +1674,9 @@ version = "0.1.0" dependencies = [ "cairo-rs", "coordinates", - "gio 0.17.10", - "glib 0.17.10", - "glib-build-tools 0.16.3", + "gio", + "glib", + "glib-build-tools 0.18.0", "gtk4", "image 0.24.7", ] @@ -2142,14 +2051,14 @@ name = "kifu-gtk" version = "0.1.0" dependencies = [ "cairo-rs", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "glib-build-tools 0.17.10", "gtk4", "image 0.24.7", "kifu-core", "libadwaita", - "pango 0.18.0", + "pango", "sgf", "tokio", ] @@ -2177,42 +2086,41 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libadwaita" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab9c0843f9f23ff25634df2743690c3a1faffe0a190e60c490878517eb81abf" +checksum = "2fe7e70c06507ed10a16cda707f358fbe60fe0dc237498f78c686ade92fd979c" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf", "gdk4", - "gio 0.17.10", - "glib 0.17.10", + "gio", + "glib", "gtk4", "libadwaita-sys", "libc", - "pango 0.17.10", + "pango", ] [[package]] name = "libadwaita-sys" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4231cb2499a9f0c4cdfa4885414b33e39901ddcac61150bc0bb4ff8a57ede404" +checksum = "5e10aaa38de1d53374f90deeb4535209adc40cc5dba37f9704724169bceec69a" dependencies = [ "gdk4-sys", - "gio-sys 0.17.10", - "glib-sys 0.17.10", - "gobject-sys 0.17.10", + "gio-sys", + "glib-sys", + "gobject-sys", "gtk4-sys", "libc", - "pango-sys 0.17.10", + "pango-sys", "system-deps", ] [[package]] name = "libc" -version = "0.2.148" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libm" @@ -2389,9 +2297,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -2638,43 +2546,17 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "pango" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35be456fc620e61f62dff7ff70fbd54dcbaf0a4b920c0f16de1107c47d921d48" -dependencies = [ - "bitflags 1.3.2", - "gio 0.17.10", - "glib 0.17.10", - "libc", - "once_cell", - "pango-sys 0.17.10", -] - [[package]] name = "pango" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06a9e54b831d033206160096b825f2070cf5fda7e35167b1c01e9e774f9202d1" dependencies = [ - "gio 0.18.2", - "glib 0.18.2", + "gio", + "glib", "libc", "once_cell", - "pango-sys 0.18.0", -] - -[[package]] -name = "pango-sys" -version = "0.17.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da69f9f3850b0d8990d462f8c709561975e95f689c1cdf0fecdebde78b35195" -dependencies = [ - "glib-sys 0.17.10", - "gobject-sys 0.17.10", - "libc", - "system-deps", + "pango-sys", ] [[package]] @@ -2683,8 +2565,8 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -3538,6 +3420,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" name = "screenplay" version = "0.1.0" dependencies = [ + "glib", "gtk4", ] @@ -3747,9 +3630,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys", @@ -4215,9 +4098,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes", @@ -4227,16 +4110,16 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.4", + "socket2 0.5.5", "tokio-macros", "windows-sys", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", diff --git a/cyberpunk-splash/Cargo.toml b/cyberpunk-splash/Cargo.toml index 778a542..8bb7aaf 100644 --- a/cyberpunk-splash/Cargo.toml +++ b/cyberpunk-splash/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cairo-rs = { version = "0.17" } -gio = { version = "0.17" } -glib = { version = "0.17" } -gtk = { version = "0.6", package = "gtk4" } +cairo-rs = { version = "0.18" } +gio = { version = "0.18" } +glib = { version = "0.18" } +gtk = { version = "0.7", package = "gtk4" } diff --git a/cyberpunk-splash/src/main.rs b/cyberpunk-splash/src/main.rs index 12bcf3c..849bbd3 100644 --- a/cyberpunk-splash/src/main.rs +++ b/cyberpunk-splash/src/main.rs @@ -703,7 +703,7 @@ fn main() { app.connect_activate(move |app| { let (gtk_tx, gtk_rx) = - gtk::glib::MainContext::channel::(gtk::glib::PRIORITY_DEFAULT); + gtk::glib::MainContext::channel::(gtk::glib::Priority::DEFAULT); let window = gtk::ApplicationWindow::new(app); window.present(); @@ -736,7 +736,7 @@ fn main() { gtk_rx.attach(None, move |state| { splash.set_state(state); - Continue(true) + glib::ControlFlow::Continue }); std::thread::spawn({ diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index 39a8597..928c206 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -6,17 +6,17 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -adw = { version = "0.4", package = "libadwaita", features = [ "v1_2" ] } -cairo-rs = { version = "0.17" } +adw = { version = "0.5", package = "libadwaita", features = [ "v1_2" ] } +cairo-rs = { version = "0.18" } chrono = { version = "0.4", features = ["serde"] } fluent-ergonomics = { path = "../fluent-ergonomics/" } fluent = { version = "0.16" } futures = { version = "0.3" } geo-types = { path = "../geo-types/" } -gio = { version = "0.17" } -glib = { version = "0.17" } -gdk = { version = "0.6", package = "gdk4" } -gtk = { version = "0.6", package = "gtk4" } +gio = { version = "0.18" } +glib = { version = "0.18" } +gdk = { version = "0.7", package = "gdk4" } +gtk = { version = "0.7", package = "gtk4" } ifc = { path = "../ifc/" } lazy_static = { version = "1.4" } memorycache = { path = "../memorycache/" } diff --git a/dashboard/src/main.rs b/dashboard/src/main.rs index fc932ae..b65eaf8 100644 --- a/dashboard/src/main.rs +++ b/dashboard/src/main.rs @@ -120,7 +120,7 @@ pub fn main() { app.connect_activate(move |app| { let (gtk_tx, gtk_rx) = - gtk::glib::MainContext::channel::(gtk::glib::PRIORITY_DEFAULT); + gtk::glib::MainContext::channel::(gtk::glib::Priority::DEFAULT); *core.tx.write().unwrap() = Some(gtk_tx); @@ -133,7 +133,7 @@ pub fn main() { let Message::Refresh(state) = msg; ApplicationWindow::update_state(&window, state); - Continue(true) + glib::ControlFlow::Continue } }); }); diff --git a/gm-control-panel/Cargo.toml b/gm-control-panel/Cargo.toml index 81029d6..63a914d 100644 --- a/gm-control-panel/Cargo.toml +++ b/gm-control-panel/Cargo.toml @@ -6,14 +6,14 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -adw = { version = "0.4", package = "libadwaita", features = [ "v1_2", "gtk_v4_6" ] } +adw = { version = "0.5", package = "libadwaita", features = [ "v1_2", "gtk_v4_6" ] } config = { path = "../config" } config-derive = { path = "../config-derive" } futures = { version = "0.3" } -gio = { version = "0.17" } -glib = { version = "0.17" } -gdk = { version = "0.6", package = "gdk4" } -gtk = { version = "0.6", package = "gtk4", features = [ "v4_6" ] } +gio = { version = "0.18" } +glib = { version = "0.18" } +gdk = { version = "0.7", package = "gdk4" } +gtk = { version = "0.7", package = "gtk4", features = [ "v4_6" ] } serde = { version = "1" } serde_json = { version = "*" } tokio = { version = "1", features = ["full"] } diff --git a/gm-control-panel/src/main.rs b/gm-control-panel/src/main.rs index da86db8..d1973ef 100644 --- a/gm-control-panel/src/main.rs +++ b/gm-control-panel/src/main.rs @@ -1,4 +1,4 @@ -use glib::{Continue, Sender}; +use glib::Sender; use gtk::prelude::*; use std::{ env, @@ -43,14 +43,14 @@ pub fn main() { app.connect_activate(move |app| { let (gtk_tx, gtk_rx) = - gtk::glib::MainContext::channel::(gtk::glib::PRIORITY_DEFAULT); + gtk::glib::MainContext::channel::(gtk::glib::Priority::DEFAULT); *core.tx.write().unwrap() = Some(gtk_tx); let window = ApplicationWindow::new(app); window.window.present(); - gtk_rx.attach(None, move |_msg| Continue(true)); + gtk_rx.attach(None, move |_msg| glib::ControlFlow::Continue); }); let args: Vec = env::args().collect(); diff --git a/hex-grid/Cargo.toml b/hex-grid/Cargo.toml index 4c02dbb..81b8427 100644 --- a/hex-grid/Cargo.toml +++ b/hex-grid/Cargo.toml @@ -7,12 +7,12 @@ license = "GPL-3.0-only" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cairo-rs = "0.17" -gio = "0.17" -glib = "0.17" -gtk = { version = "0.6", package = "gtk4" } +cairo-rs = "0.18" +gio = "0.18" +glib = "0.18" +gtk = { version = "0.7", package = "gtk4" } coordinates = { path = "../coordinates" } image = { version = "0.24" } [build-dependencies] -glib-build-tools = "0.16" +glib-build-tools = "0.18" diff --git a/hex-grid/build.rs b/hex-grid/build.rs index 4c6ea61..5e4084b 100644 --- a/hex-grid/build.rs +++ b/hex-grid/build.rs @@ -1,6 +1,6 @@ fn main() { glib_build_tools::compile_resources( - "resources", + &["resources"], "resources/resources.gresources.xml", "com.luminescent-dreams.hex-grid.gresource", ); diff --git a/hex-grid/src/tile.rs b/hex-grid/src/tile.rs index ced3870..0a9586d 100644 --- a/hex-grid/src/tile.rs +++ b/hex-grid/src/tile.rs @@ -1,6 +1,6 @@ use crate::utilities; use cairo::Context; -use gtk::{gdk_pixbuf::Pixbuf, prelude::*}; +use gtk::gdk_pixbuf::Pixbuf; use image::DynamicImage; #[derive(Clone, Debug)] @@ -89,7 +89,8 @@ impl Tile { 88., )); context.clip(); - context.set_source_pixbuf(&self.image, translate_x, translate_y); + // panic!("content.set_source_pixbuf got deprecated and I haven't figured out the replacement yet."); + // context.set_source_pixbuf(&self.image, translate_x, translate_y); context.paint().expect("paint should succeed"); context.restore().unwrap(); } diff --git a/kifu/gtk/Cargo.toml b/kifu/gtk/Cargo.toml index 14d015a..96484c3 100644 --- a/kifu/gtk/Cargo.toml +++ b/kifu/gtk/Cargo.toml @@ -9,11 +9,11 @@ screenplay = [] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -adw = { version = "0.4", package = "libadwaita", features = [ "v1_2" ] } -cairo-rs = { version = "0.17" } -gio = { version = "0.17" } -glib = { version = "0.17" } -gtk = { version = "0.6", package = "gtk4", features = [ "v4_8" ] } +adw = { version = "0.5", package = "libadwaita", features = [ "v1_2" ] } +cairo-rs = { version = "0.18" } +gio = { version = "0.18" } +glib = { version = "0.18" } +gtk = { version = "0.7", package = "gtk4", features = [ "v4_8" ] } image = { version = "0.24" } kifu-core = { path = "../core" } pango = { version = "*" } diff --git a/kifu/gtk/src/main.rs b/kifu/gtk/src/main.rs index a8869f8..e6089b2 100644 --- a/kifu/gtk/src/main.rs +++ b/kifu/gtk/src/main.rs @@ -85,7 +85,7 @@ fn main() { let runtime = runtime.clone(); move |app| { let (gtk_tx, gtk_rx) = - gtk::glib::MainContext::channel::(gtk::glib::PRIORITY_DEFAULT); + gtk::glib::MainContext::channel::(gtk::glib::Priority::DEFAULT); let app_window = AppWindow::new(app); @@ -112,7 +112,7 @@ fn main() { perftrace("handle_response", || { handle_response(api.clone(), &app_window, message) }); - Continue(true) + glib::ControlFlow::Continue } }); diff --git a/kifu/gtk/src/ui/home.rs b/kifu/gtk/src/ui/home.rs index 1ace82e..3cc2d94 100644 --- a/kifu/gtk/src/ui/home.rs +++ b/kifu/gtk/src/ui/home.rs @@ -41,7 +41,7 @@ impl PlayerDataEntry { pub fn new(element: PlayerElement) -> PlayerDataEntry { let s: Self = Object::builder().build(); - let rank_model = gio::ListStore::new(gtk::StringObject::static_type()); + let rank_model = gio::ListStore::new::(); s.imp().rank.set_model(Some(&rank_model)); match element { diff --git a/kifu/gtk/src/ui/library.rs b/kifu/gtk/src/ui/library.rs index 034d3dc..46603ad 100644 --- a/kifu/gtk/src/ui/library.rs +++ b/kifu/gtk/src/ui/library.rs @@ -41,7 +41,7 @@ pub struct LibraryPrivate { impl Default for LibraryPrivate { fn default() -> Self { let vector: Vec = vec![]; - let model = gio::ListStore::new(glib::types::Type::OBJECT); + let model = gio::ListStore::new::(); model.extend_from_slice(&vector); /* diff --git a/screenplay/Cargo.toml b/screenplay/Cargo.toml index d71ab95..04e9ab1 100644 --- a/screenplay/Cargo.toml +++ b/screenplay/Cargo.toml @@ -7,4 +7,5 @@ license = "GPL-3.0-only" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -gtk = { version = "0.6", package = "gtk4" } +glib = { version = "0.18" } +gtk = { version = "0.7", package = "gtk4" } diff --git a/screenplay/src/lib.rs b/screenplay/src/lib.rs index 8ae46e7..9b7e5e0 100644 --- a/screenplay/src/lib.rs +++ b/screenplay/src/lib.rs @@ -68,7 +68,7 @@ impl Screenplay { let window = gtk::ApplicationWindow::new(gtk_app); window.show(); - let (sender, receiver) = gtk::glib::MainContext::channel(gtk::glib::PRIORITY_DEFAULT); + let (sender, receiver) = gtk::glib::MainContext::channel(gtk::glib::Priority::DEFAULT); let layout = gtk::Box::builder() .orientation(gtk::Orientation::Horizontal) @@ -116,7 +116,7 @@ impl Screenplay { } /// Handle an application action. This generally means changing the current screen. - fn process_action(&mut self, message: Action) -> Continue { + fn process_action(&mut self, message: Action) -> glib::ControlFlow { let nothing: Option<>k::Widget> = None; match message { Action::SelectPage(index) => match self.screens.get(index) { @@ -141,6 +141,6 @@ impl Screenplay { Action::Deselect => self.frame.set_child(nothing), } - Continue(true) + glib::ControlFlow::Continue } }