[gnome-tour/gnome-40] update to latest gtk-rs stack
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tour/gnome-40] update to latest gtk-rs stack
- Date: Wed, 23 Feb 2022 09:27:03 +0000 (UTC)
commit f49e0aab5517e7787de81870efd7a7bf8a57ade1
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Wed Feb 23 10:24:38 2022 +0100
update to latest gtk-rs stack
Cargo.lock | 586 +++++++++++++++++--------------------------
Cargo.toml | 16 +-
src/application.rs | 9 +-
src/utils.rs | 5 +-
src/widgets/pages/image.rs | 14 +-
src/widgets/pages/welcome.rs | 34 +--
src/widgets/paginator.rs | 26 +-
src/widgets/window.rs | 8 +-
8 files changed, 275 insertions(+), 423 deletions(-)
---
diff --git a/Cargo.lock b/Cargo.lock
index 4c9fb89..129c83f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,39 +1,39 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
+version = 3
+
[[package]]
name = "aho-corasick"
-version = "0.7.15"
+version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
"memchr",
]
[[package]]
name = "anyhow"
-version = "1.0.38"
+version = "1.0.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1"
+checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd"
[[package]]
name = "atk"
-version = "0.9.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "812b4911e210bd51b24596244523c856ca749e6223c50a7fbbba3f89ee37c426"
+checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd"
dependencies = [
"atk-sys",
"bitflags",
"glib",
- "glib-sys",
- "gobject-sys",
"libc",
]
[[package]]
name = "atk-sys"
-version = "0.10.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f530e4af131d94cc4fa15c5c9d0348f0ef28bac64ba660b6b2a1cf2605dedfce"
+checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -54,15 +54,15 @@ dependencies = [
[[package]]
name = "autocfg"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
-version = "1.2.1"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "block"
@@ -72,24 +72,22 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "cairo-rs"
-version = "0.9.1"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5c0f2e047e8ca53d0ff249c54ae047931d7a6ebe05d00af73e0ffeb6e34bdb8"
+checksum = "e8b14c80d8d1a02fa6d914b9d1afeeca9bc34257f8300d9696e1e331ae114223"
dependencies = [
"bitflags",
"cairo-sys-rs",
"glib",
- "glib-sys",
- "gobject-sys",
"libc",
"thiserror",
]
[[package]]
name = "cairo-sys-rs"
-version = "0.10.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ed2639b9ad5f1d6efa76de95558e11339e7318426d84ac4890b86c03e828ca7"
+checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8"
dependencies = [
"glib-sys",
"libc",
@@ -98,21 +96,24 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.66"
+version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
+checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
[[package]]
-name = "cfg-if"
-version = "1.0.0"
+name = "cfg-expr"
+version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+checksum = "295b6eb918a60a25fec0b23a5e633e74fddbaf7bb04411e65a10c366aca4b5cd"
+dependencies = [
+ "smallvec",
+]
[[package]]
-name = "either"
-version = "1.6.1"
+name = "cfg-if"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "env_logger"
@@ -128,41 +129,35 @@ dependencies = [
]
[[package]]
-name = "futures"
-version = "0.3.12"
+name = "field-offset"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150"
+checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92"
dependencies = [
- "futures-channel",
- "futures-core",
- "futures-executor",
- "futures-io",
- "futures-sink",
- "futures-task",
- "futures-util",
+ "memoffset",
+ "rustc_version",
]
[[package]]
name = "futures-channel"
-version = "0.3.12"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846"
+checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
dependencies = [
"futures-core",
- "futures-sink",
]
[[package]]
name = "futures-core"
-version = "0.3.12"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65"
+checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
[[package]]
name = "futures-executor"
-version = "0.3.12"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9"
+checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
dependencies = [
"futures-core",
"futures-task",
@@ -171,97 +166,63 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500"
-
-[[package]]
-name = "futures-macro"
-version = "0.3.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd"
-dependencies = [
- "proc-macro-hack",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "futures-sink"
-version = "0.3.12"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6"
+checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
[[package]]
name = "futures-task"
-version = "0.3.12"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86"
-dependencies = [
- "once_cell",
-]
+checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
[[package]]
name = "futures-util"
-version = "0.3.12"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b"
+checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
dependencies = [
- "futures-channel",
"futures-core",
- "futures-io",
- "futures-macro",
- "futures-sink",
"futures-task",
- "memchr",
"pin-project-lite",
"pin-utils",
- "proc-macro-hack",
- "proc-macro-nested",
"slab",
]
[[package]]
name = "gdk"
-version = "0.13.2"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db00839b2a68a7a10af3fa28dfb3febaba3a20c3a9ac2425a33b7df1f84a6b7d"
+checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8"
dependencies = [
"bitflags",
"cairo-rs",
- "cairo-sys-rs",
"gdk-pixbuf",
"gdk-sys",
"gio",
- "gio-sys",
"glib",
- "glib-sys",
- "gobject-sys",
"libc",
"pango",
]
[[package]]
name = "gdk-pixbuf"
-version = "0.9.0"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f6dae3cb99dd49b758b88f0132f8d401108e63ae8edd45f432d42cdff99998a"
+checksum = "d8750501d75f318c2ec0314701bc8403901303210def80bafd13f6b6059a3f45"
dependencies = [
+ "bitflags",
"gdk-pixbuf-sys",
"gio",
- "gio-sys",
"glib",
- "glib-sys",
- "gobject-sys",
"libc",
]
[[package]]
name = "gdk-pixbuf-sys"
-version = "0.10.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bfe468a7f43e97b8d193a762b6c5cf67a7d36cacbc0b9291dbcae24bfea1e8f"
+checksum = "413424d9818621fa3cfc8a3a915cdb89a7c3c507d56761b4ec83a9a98e587171"
dependencies = [
"gio-sys",
"glib-sys",
@@ -272,9 +233,9 @@ dependencies = [
[[package]]
name = "gdk-sys"
-version = "0.10.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a9653cfc500fd268015b1ac055ddbc3df7a5c9ea3f4ccef147b3957bd140d69"
+checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
@@ -287,22 +248,11 @@ dependencies = [
"system-deps",
]
-[[package]]
-name = "getrandom"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
-dependencies = [
- "cfg-if",
- "libc",
- "wasi",
-]
-
[[package]]
name = "gettext-rs"
-version = "0.6.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3df4e7a9dc238dddd30f183d43e4f497990885daa211fcf01657159ade8f1610"
+checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364"
dependencies = [
"gettext-sys",
"locale_config",
@@ -310,30 +260,26 @@ dependencies = [
[[package]]
name = "gettext-sys"
-version = "0.21.0"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "885d118016f633f99f741afe6c1433c040813a3cbc755cbfdf85f963e02fad80"
+checksum = "afa9e06ab9e7514cc9ae668ea3b71ea1536259d767dff0289ac23ad134f99929"
dependencies = [
"cc",
- "tempfile",
+ "temp-dir",
]
[[package]]
name = "gio"
-version = "0.9.1"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fb60242bfff700772dae5d9e3a1f7aa2e4ebccf18b89662a16acb2822568561"
+checksum = "96efd8a1c00d890f6b45671916e165b5e43ccec61957d443aff6d7e44f62d348"
dependencies = [
"bitflags",
- "futures",
"futures-channel",
"futures-core",
"futures-io",
- "futures-util",
"gio-sys",
"glib",
- "glib-sys",
- "gobject-sys",
"libc",
"once_cell",
"thiserror",
@@ -341,9 +287,9 @@ dependencies = [
[[package]]
name = "gio-sys"
-version = "0.10.1"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac"
+checksum = "1d0fa5052773f5a56b8ae47dab09d040f5d9ce1311f4f99006e16e9a08269296"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -354,32 +300,32 @@ dependencies = [
[[package]]
name = "glib"
-version = "0.10.3"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5"
+checksum = "aa570813c504bdf7539a9400180c2dd4b789a819556fb86da7226d7d1b037b49"
dependencies = [
"bitflags",
"futures-channel",
"futures-core",
"futures-executor",
"futures-task",
- "futures-util",
"glib-macros",
"glib-sys",
"gobject-sys",
"libc",
"once_cell",
+ "smallvec",
+ "thiserror",
]
[[package]]
name = "glib-macros"
-version = "0.10.1"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039"
+checksum = "41bfd8d227dead0829ac142454e97531b93f576d0805d779c42bfd799c65c572"
dependencies = [
"anyhow",
"heck",
- "itertools",
"proc-macro-crate",
"proc-macro-error",
"proc-macro2",
@@ -389,9 +335,9 @@ dependencies = [
[[package]]
name = "glib-sys"
-version = "0.10.1"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1"
+checksum = "f4366377bd56697de8aaee24e673c575d2694d72e7756324ded2b0428829a7b8"
dependencies = [
"libc",
"system-deps",
@@ -415,9 +361,9 @@ dependencies = [
[[package]]
name = "gobject-sys"
-version = "0.10.0"
+version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c"
+checksum = "df6859463843c20cf3837e3a9069b6ab2051aeeadf4c899d33344f4aea83189a"
dependencies = [
"glib-sys",
"libc",
@@ -426,9 +372,9 @@ dependencies = [
[[package]]
name = "gstreamer"
-version = "0.16.7"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ff5d0f7ff308ae37e6eb47b6ded17785bdea06e438a708cd09e0288c1862f33"
+checksum = "8564e2f284af8050f02252c5bb563ef8cbd4363403013ad4755852f743ca8c43"
dependencies = [
"bitflags",
"cfg-if",
@@ -436,13 +382,13 @@ dependencies = [
"futures-core",
"futures-util",
"glib",
- "glib-sys",
- "gobject-sys",
"gstreamer-sys",
"libc",
"muldiv",
+ "num-integer",
"num-rational",
"once_cell",
+ "option-operations",
"paste",
"pretty-hex",
"thiserror",
@@ -450,25 +396,23 @@ dependencies = [
[[package]]
name = "gstreamer-base"
-version = "0.16.5"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf"
+checksum = "224f35f36582407caf58ded74854526beeecc23d0cf64b8d1c3e00584ed6863f"
dependencies = [
"bitflags",
+ "cfg-if",
"glib",
- "glib-sys",
- "gobject-sys",
"gstreamer",
"gstreamer-base-sys",
- "gstreamer-sys",
"libc",
]
[[package]]
name = "gstreamer-base-sys"
-version = "0.9.1"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4b7b6dc2d6e160a1ae28612f602bd500b3fa474ce90bf6bb2f08072682beef5"
+checksum = "a083493c3c340e71fa7c66eebda016e9fafc03eb1b4804cf9b2bad61994b078e"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -479,26 +423,24 @@ dependencies = [
[[package]]
name = "gstreamer-player"
-version = "0.16.5"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34edf65e48e0d29c18101d77a2e004488a61f81a852a75e19d9c73e03d35cb77"
+checksum = "5f14ee02352ba73cadebe640bfb33f12fe8d03cbcad816a102d55a0251fb99bb"
dependencies = [
"bitflags",
"glib",
- "glib-sys",
- "gobject-sys",
"gstreamer",
"gstreamer-player-sys",
- "gstreamer-sys",
"gstreamer-video",
"libc",
+ "once_cell",
]
[[package]]
name = "gstreamer-player-sys"
-version = "0.9.1"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53aaf79503e691a32266670bc631edb6c52bdb854984da76a0ce2756f49584a2"
+checksum = "1f9b674b39a4d0e18710f6e3d2b109f1793d8028ee4e39da3909b55b4529d399"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -510,9 +452,9 @@ dependencies = [
[[package]]
name = "gstreamer-sys"
-version = "0.9.1"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc1f154082d01af5718c5f8a8eb4f565a4ea5586ad8833a8fc2c2aa6844b601d"
+checksum = "e3517a65d3c2e6f8905b456eba5d53bda158d664863aef960b44f651cb7d33e2"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -522,20 +464,16 @@ dependencies = [
[[package]]
name = "gstreamer-video"
-version = "0.16.7"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7bbb1485d87469849ec45c08e03c2f280d3ea20ff3c439d03185be54e3ce98e"
+checksum = "bfbeef259fe286d6271402160daf7692b6bc56d52b2a9437dead797f3f60c222"
dependencies = [
"bitflags",
+ "cfg-if",
"futures-channel",
- "futures-util",
"glib",
- "glib-sys",
- "gobject-sys",
"gstreamer",
"gstreamer-base",
- "gstreamer-base-sys",
- "gstreamer-sys",
"gstreamer-video-sys",
"libc",
"once_cell",
@@ -543,9 +481,9 @@ dependencies = [
[[package]]
name = "gstreamer-video-sys"
-version = "0.9.1"
+version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92347e46438007d6a2386302125f62cb9df6769cdacb931af5c0f12c1ee21de4"
+checksum = "33331b1675e73b5b000c796354278eca7fdde9327015971d9f41afe28b96e0dc"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -557,37 +495,32 @@ dependencies = [
[[package]]
name = "gtk"
-version = "0.9.2"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f022f2054072b3af07666341984562c8e626a79daa8be27b955d12d06a5ad6a"
+checksum = "5f2d1326b36af927fe46ae2f89a8fec38c6f0d279ebc5ef07ffeeabb70300bfc"
dependencies = [
"atk",
"bitflags",
"cairo-rs",
- "cairo-sys-rs",
- "cc",
+ "field-offset",
+ "futures-channel",
"gdk",
"gdk-pixbuf",
- "gdk-pixbuf-sys",
- "gdk-sys",
"gio",
- "gio-sys",
"glib",
- "glib-sys",
- "gobject-sys",
"gtk-sys",
+ "gtk3-macros",
"libc",
"once_cell",
"pango",
- "pango-sys",
"pkg-config",
]
[[package]]
name = "gtk-sys"
-version = "0.10.0"
+version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89acda6f084863307d948ba64a4b1ef674e8527dddab147ee4cdcc194c880457"
+checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84"
dependencies = [
"atk-sys",
"cairo-sys-rs",
@@ -602,19 +535,30 @@ dependencies = [
]
[[package]]
-name = "heck"
-version = "0.3.2"
+name = "gtk3-macros"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
+checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9"
dependencies = [
- "unicode-segmentation",
+ "anyhow",
+ "proc-macro-crate",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
]
+[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+
[[package]]
name = "hermit-abi"
-version = "0.1.18"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
@@ -628,15 +572,6 @@ dependencies = [
"quick-error",
]
-[[package]]
-name = "itertools"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
-dependencies = [
- "either",
-]
-
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -645,28 +580,22 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.86"
+version = "0.2.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
+checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
[[package]]
name = "libhandy"
-version = "0.7.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d776bf5b92993b8006688652cda2683261317dcc82bb4d91d3996bda2f7019e0"
+checksum = "3c4a9a0bc88fb8ba74c1cc8ff6b8c34dfb6dc0e97bc62cd96cc2fdc9a47aebe2"
dependencies = [
"bitflags",
"gdk",
"gdk-pixbuf",
- "gdk-pixbuf-sys",
- "gdk-sys",
"gio",
- "gio-sys",
"glib",
- "glib-sys",
- "gobject-sys",
"gtk",
- "gtk-sys",
"lazy_static",
"libc",
"libhandy-sys",
@@ -675,14 +604,12 @@ dependencies = [
[[package]]
name = "libhandy-sys"
-version = "0.7.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0017044b92ade6704a301212feea9e754be62f58d39d01aae8fcf2c1a982e3d9"
+checksum = "fcb7c1c11d53e8a2a0c19742f23f36ff0ccf39d9a1e96c7f44054db217adc609"
dependencies = [
- "gdk",
"gdk-pixbuf-sys",
"gdk-sys",
- "gio",
"gio-sys",
"glib-sys",
"gobject-sys",
@@ -726,15 +653,24 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.3.4"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
+
+[[package]]
+name = "memoffset"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
+checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+dependencies = [
+ "autocfg",
+]
[[package]]
name = "muldiv"
-version = "0.2.1"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204"
+checksum = "b5136edda114182728ccdedb9f5eda882781f35fa6e80cc360af12a8932507f3"
[[package]]
name = "num-integer"
@@ -748,9 +684,9 @@ dependencies = [
[[package]]
name = "num-rational"
-version = "0.3.2"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
+checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a"
dependencies = [
"autocfg",
"num-integer",
@@ -797,20 +733,27 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.5.2"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
+
+[[package]]
+name = "option-operations"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0"
+checksum = "95d6113415f41b268f1195907427519769e40ee6f28cbb053795098a2c16f447"
+dependencies = [
+ "paste",
+]
[[package]]
name = "pango"
-version = "0.9.1"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9937068580bebd8ced19975938573803273ccbcbd598c58d4906efd4ac87c438"
+checksum = "78c7420fc01a390ec200da7395b64d705f5d82fe03e5d0708aee422c46538be7"
dependencies = [
"bitflags",
"glib",
- "glib-sys",
- "gobject-sys",
"libc",
"once_cell",
"pango-sys",
@@ -818,9 +761,9 @@ dependencies = [
[[package]]
name = "pango-sys"
-version = "0.10.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d2650c8b62d116c020abd0cea26a4ed96526afda89b1c4ea567131fdefc890"
+checksum = "7022c2fb88cd2d9d55e1a708a8c53a3ae8678234c4a54bf623400aeb7f31fac2"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -830,15 +773,24 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.4"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"
+
+[[package]]
+name = "pest"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1"
+checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
+dependencies = [
+ "ucd-trie",
+]
[[package]]
name = "pin-project-lite"
-version = "0.2.4"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827"
+checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]]
name = "pin-utils"
@@ -848,15 +800,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
-version = "0.3.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
-
-[[package]]
-name = "ppv-lite86"
-version = "0.2.10"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
+checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
[[package]]
name = "pretty-hex"
@@ -876,10 +822,11 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "0.1.5"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
+checksum = "9dada8c9981fcf32929c3c0f0cd796a9284aca335565227ed88c83babb1d43dc"
dependencies = [
+ "thiserror",
"toml",
]
@@ -907,23 +854,11 @@ dependencies = [
"version_check",
]
-[[package]]
-name = "proc-macro-hack"
-version = "0.5.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
-
-[[package]]
-name = "proc-macro-nested"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
-
[[package]]
name = "proc-macro2"
-version = "1.0.24"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
@@ -936,124 +871,80 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
-version = "1.0.9"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
+checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]
[[package]]
-name = "rand"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
-dependencies = [
- "libc",
- "rand_chacha",
- "rand_core",
- "rand_hc",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
-dependencies = [
- "ppv-lite86",
- "rand_core",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.6.2"
+name = "regex"
+version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
+checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
dependencies = [
- "getrandom",
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
]
[[package]]
-name = "rand_hc"
-version = "0.3.0"
+name = "regex-syntax"
+version = "0.6.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
-dependencies = [
- "rand_core",
-]
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
[[package]]
-name = "redox_syscall"
-version = "0.2.5"
+name = "rustc_version"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
+checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
dependencies = [
- "bitflags",
+ "semver",
]
[[package]]
-name = "regex"
-version = "1.4.3"
+name = "semver"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a"
+checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
- "thread_local",
+ "semver-parser",
]
[[package]]
-name = "regex-syntax"
-version = "0.6.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
-
-[[package]]
-name = "remove_dir_all"
-version = "0.5.3"
+name = "semver-parser"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
dependencies = [
- "winapi",
+ "pest",
]
[[package]]
name = "serde"
-version = "1.0.123"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
[[package]]
name = "slab"
-version = "0.4.2"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
+checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
[[package]]
-name = "strum"
-version = "0.18.0"
+name = "smallvec"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b"
-
-[[package]]
-name = "strum_macros"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "syn",
-]
+checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]]
name = "syn"
-version = "1.0.60"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
+checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",
@@ -1062,32 +953,22 @@ dependencies = [
[[package]]
name = "system-deps"
-version = "1.3.2"
+version = "6.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b"
+checksum = "a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"
dependencies = [
+ "cfg-expr",
"heck",
"pkg-config",
- "strum",
- "strum_macros",
- "thiserror",
"toml",
"version-compare",
]
[[package]]
-name = "tempfile"
-version = "3.2.0"
+name = "temp-dir"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
-dependencies = [
- "cfg-if",
- "libc",
- "rand",
- "redox_syscall",
- "remove_dir_all",
- "winapi",
-]
+checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab"
[[package]]
name = "termcolor"
@@ -1100,33 +981,24 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.23"
+version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146"
+checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.23"
+version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1"
+checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
-[[package]]
-name = "thread_local"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
-dependencies = [
- "once_cell",
-]
-
[[package]]
name = "toml"
version = "0.5.8"
@@ -1137,34 +1009,28 @@ dependencies = [
]
[[package]]
-name = "unicode-segmentation"
-version = "1.7.1"
+name = "ucd-trie"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
+checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
[[package]]
name = "unicode-xid"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
[[package]]
name = "version-compare"
-version = "0.0.10"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1"
+checksum = "fe88247b92c1df6b6de80ddc290f3976dbdf2f5f5d3fd049a9fb598c6dd5ca73"
[[package]]
name = "version_check"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
-
-[[package]]
-name = "wasi"
-version = "0.10.2+wasi-snapshot-preview1"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "winapi"
diff --git a/Cargo.toml b/Cargo.toml
index 8b3ecb8..04f7eca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,22 +8,22 @@ edition = "2018"
video = ["gst_player", "gst"]
[dependencies]
-glib = { version = "0.10", features = ["v2_64"] }
-gdk = "0.13"
-gtk = { version = "0.9", features= ["v3_16"] }
-gio = "0.9"
+glib = { version = "0.15", features = ["v2_64"] }
+gdk = "0.15"
+gtk = { version = "0.15"}
+gio = "0.15"
log = "0.4"
-gettext-rs = { version = "0.6", features = ["gettext-system"] }
-libhandy = "0.7"
+gettext-rs = { version = "0.7", features = ["gettext-system"] }
+libhandy = "0.9"
pretty_env_logger = "0.4"
[dependencies.gst_player]
-version = "0.16"
+version = "0.18"
package = "gstreamer-player"
optional = true
[dependencies.gst]
-version = "0.16"
+version = "0.18"
package = "gstreamer"
optional = true
diff --git a/src/application.rs b/src/application.rs
index d09df27..38c9dbf 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -5,7 +5,6 @@ use gio::prelude::*;
use glib::clone;
use gtk::prelude::*;
use log::info;
-use std::env;
use std::{cell::RefCell, rc::Rc};
pub struct Application {
@@ -15,8 +14,7 @@ pub struct Application {
impl Application {
pub fn new() -> Rc<Self> {
- let app =
- gtk::Application::new(Some(config::APP_ID), gio::ApplicationFlags::FLAGS_NONE).unwrap();
+ let app = gtk::Application::new(Some(config::APP_ID), gio::ApplicationFlags::FLAGS_NONE);
let application = Rc::new(Self {
app,
@@ -103,7 +101,7 @@ impl Application {
fn setup_css(&self) {
let p = gtk::CssProvider::new();
gtk::CssProvider::load_from_resource(&p, "/org/gnome/Tour/style.css");
- if let Some(screen) = gdk::Screen::get_default() {
+ if let Some(screen) = gdk::Screen::default() {
gtk::StyleContext::add_provider_for_screen(&screen, &p, 500);
}
}
@@ -113,7 +111,6 @@ impl Application {
info!("Version: {} ({})", config::VERSION, config::PROFILE);
info!("Datadir: {}", config::PKGDATADIR);
- let args: Vec<String> = env::args().collect();
- self.app.run(&args);
+ self.app.run();
}
}
diff --git a/src/utils.rs b/src/utils.rs
index c3eb8fe..178979c 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,9 +1,10 @@
// based on https://gitlab.gnome.org/World/podcasts/-/blob/master/podcasts-gtk/src/i18n|utils.rs
use gettextrs::gettext;
+use gio::prelude::*;
pub fn action<T, F>(thing: &T, name: &str, action: F)
where
- T: gio::ActionMapExt,
+ T: glib::IsA<gio::ActionMap>,
for<'r, 's> F: Fn(&'r gio::SimpleAction, Option<&glib::Variant>) + 'static,
{
// Create a stateless, parameterless action
@@ -11,7 +12,7 @@ where
// Connect the handler
act.connect_activate(action);
// Add it to the map
- thing.add_action(&act);
+ thing.as_ref().add_action(&act);
}
pub fn i18n_f(format: &str, args: &[&str]) -> String {
diff --git a/src/widgets/pages/image.rs b/src/widgets/pages/image.rs
index d53ee5c..11369c3 100644
--- a/src/widgets/pages/image.rs
+++ b/src/widgets/pages/image.rs
@@ -15,12 +15,12 @@ impl ImagePageWidget {
}
fn init(&self, resource_uri: &str, head: String, body: String) {
- self.widget.set_property_expand(true);
- self.widget.get_style_context().add_class("page");
+ self.widget.set_expand(true);
+ self.widget.style_context().add_class("page");
self.widget.set_halign(gtk::Align::Fill);
self.widget.set_valign(gtk::Align::Fill);
- let container = gtk::BoxBuilder::new()
+ let container = gtk::Box::builder()
.orientation(gtk::Orientation::Vertical)
.spacing(12)
.halign(gtk::Align::Center)
@@ -37,17 +37,17 @@ impl ImagePageWidget {
image.show();
container.add(&image);
- let head_label = gtk::LabelBuilder::new()
+ let head_label = gtk::Label::builder()
.label(&head)
.justify(gtk::Justification::Center)
.valign(gtk::Align::Center)
.margin_top(36)
.build();
- head_label.get_style_context().add_class("page-title");
+ head_label.style_context().add_class("page-title");
head_label.show();
container.add(&head_label);
- let body_label = gtk::LabelBuilder::new()
+ let body_label = gtk::Label::builder()
.label(&body)
.lines(2)
.wrap(true)
@@ -55,7 +55,7 @@ impl ImagePageWidget {
.valign(gtk::Align::Center)
.margin_top(12)
.build();
- body_label.get_style_context().add_class("page-body");
+ body_label.style_context().add_class("page-body");
body_label.show();
container.add(&body_label);
diff --git a/src/widgets/pages/welcome.rs b/src/widgets/pages/welcome.rs
index f7facc2..4cd7678 100644
--- a/src/widgets/pages/welcome.rs
+++ b/src/widgets/pages/welcome.rs
@@ -64,7 +64,7 @@ impl WelcomePageWidget {
}
fn init(&self) {
- let container = gtk::BoxBuilder::new()
+ let container = gtk::Box::builder()
.orientation(gtk::Orientation::Vertical)
.spacing(0)
.expand(true)
@@ -73,8 +73,8 @@ impl WelcomePageWidget {
.margin_top(24)
.margin_bottom(24)
.build();
- self.widget.get_style_context().add_class("page");
- self.widget.get_style_context().add_class("welcome-page");
+ self.widget.style_context().add_class("page");
+ self.widget.style_context().add_class("welcome-page");
#[cfg(not(feature = "video"))]
let header = {
@@ -88,22 +88,14 @@ impl WelcomePageWidget {
let header = {
let video_widget = self
.player
- .get_pipeline()
- .get_property("video-sink")
- .unwrap()
- .get::<gst::Element>()
- .expect("The player of a VideoPlayerWidget should not use the default sink.")
- .unwrap()
- .get_property("widget")
- .unwrap()
- .get::<gtk::Widget>()
- .unwrap()
- .unwrap();
+ .pipeline()
+ .property::<gst::Element>("video-sink")
+ .property::<gtk::Widget>("widget");
video_widget.set_size_request(-1, 360);
video_widget.set_property("ignore-alpha", &false).unwrap();
video_widget.show();
- video_widget.get_style_context().add_class("video");
+ video_widget.style_context().add_class("video");
video_widget
};
@@ -117,7 +109,7 @@ impl WelcomePageWidget {
clone!(@strong self.player as player => move |action| {
match action {
Action::VideoReady => player.play(),
- Action::VideoUp => header.get_style_context().add_class("playing"),
+ Action::VideoUp => header.style_context().add_class("playing"),
};
glib::Continue(true)
}),
@@ -142,7 +134,7 @@ impl WelcomePageWidget {
gtk::timeout_add(
500,
clone!(@strong self.player as player => move || {
- player.set_uri(&video_file.get_uri());
+ player.set_uri(&video_file.uri());
glib::Continue(false)
}),
);
@@ -150,18 +142,18 @@ impl WelcomePageWidget {
let title = gtk::Label::new(Some(&gettext("Start the Tour")));
title.set_margin_top(36);
- title.get_style_context().add_class("large-title");
+ title.style_context().add_class("large-title");
title.show();
container.add(&title);
- let name = glib::get_os_info("NAME").unwrap_or_else(|| "GNOME".into());
- let version = glib::get_os_info("VERSION").unwrap_or_else(|| "".into());
+ let name = glib::os_info("NAME").unwrap_or_else(|| "GNOME".into());
+ let version = glib::os_info("VERSION").unwrap_or_else(|| "".into());
// Translators: The following string is formated as "Learn about new and essential features in GNOME
3.36" for example
let text = gtk::Label::new(Some(&i18n_f(
"Learn about new and essential features in {} {}.",
&[&name, &version],
)));
- text.get_style_context().add_class("body");
+ text.style_context().add_class("body");
text.set_margin_top(12);
text.show();
container.add(&text);
diff --git a/src/widgets/paginator.rs b/src/widgets/paginator.rs
index 4766e74..626dbe7 100644
--- a/src/widgets/paginator.rs
+++ b/src/widgets/paginator.rs
@@ -4,7 +4,7 @@ use gtk::prelude::*;
use std::cell::RefCell;
use std::rc::Rc;
-use libhandy::prelude::{CarouselExt, CarouselIndicatorDotsExt, HeaderBarExt};
+use libhandy::prelude::*;
pub struct PaginatorWidget {
pub widget: gtk::Box,
@@ -43,7 +43,7 @@ impl PaginatorWidget {
pub fn try_next(&self) -> Option<()> {
let p = *self.current_page.borrow() + 1;
- if p == self.carousel.get_n_pages() {
+ if p == self.carousel.n_pages() {
return None;
}
self.set_page(p);
@@ -68,10 +68,10 @@ impl PaginatorWidget {
}
fn update_position(&self) {
- let position = self.carousel.get_position();
+ let position = self.carousel.position();
let page_nr = position.round() as u32;
- let n_pages = self.carousel.get_n_pages() as f64;
+ let n_pages = self.carousel.n_pages() as f64;
let forelast_page = n_pages - 2.0;
let last_page = n_pages - 1.0;
@@ -104,24 +104,20 @@ impl PaginatorWidget {
fn init(&self, p: Rc<Self>) {
self.carousel_dots.show();
self.carousel_dots.set_carousel(Some(&self.carousel));
- self.carousel.set_property_expand(true);
+ self.carousel.set_expand(true);
self.carousel.set_animation_duration(300);
self.carousel.show();
self.carousel
- .connect_property_position_notify(clone!(@weak p => move |_| {
+ .connect_position_notify(clone!(@weak p => move |_| {
p.update_position();
}));
- self.start_btn
- .get_style_context()
- .add_class("suggested-action");
+ self.start_btn.style_context().add_class("suggested-action");
self.start_btn.set_use_underline(true);
self.start_btn.set_action_name(Some("app.start-tour"));
self.start_btn.show();
- self.next_btn
- .get_style_context()
- .add_class("suggested-action");
+ self.next_btn.style_context().add_class("suggested-action");
self.next_btn.set_use_underline(true);
self.next_btn.set_action_name(Some("app.next-page"));
@@ -130,7 +126,7 @@ impl PaginatorWidget {
self.close_btn.show();
self.finish_btn
- .get_style_context()
+ .style_context()
.add_class("suggested-action");
self.finish_btn.set_use_underline(true);
self.finish_btn.set_action_name(Some("app.quit"));
@@ -173,11 +169,11 @@ impl PaginatorWidget {
}
pub fn set_page(&self, page_nr: u32) {
- if page_nr < self.carousel.get_n_pages() {
+ if page_nr < self.carousel.n_pages() {
let pages = &self.pages.borrow();
let page = pages.get(page_nr as usize).unwrap();
self.carousel.scroll_to(page);
- if page_nr == self.carousel.get_n_pages() - 1 {
+ if page_nr == self.carousel.n_pages() - 1 {
self.finish_btn.grab_focus();
} else if page_nr >= 1 {
self.next_btn.grab_focus();
diff --git a/src/widgets/window.rs b/src/widgets/window.rs
index 3dcfb2f..90d7b63 100644
--- a/src/widgets/window.rs
+++ b/src/widgets/window.rs
@@ -40,7 +40,7 @@ impl Window {
// Devel Profile
if PROFILE == "Devel" {
- self.widget.get_style_context().add_class("devel");
+ self.widget.style_context().add_class("devel");
}
self.paginator
.borrow_mut()
@@ -95,8 +95,8 @@ impl Window {
.upcast::<gtk::Widget>(),
);
- let name = glib::get_os_info("NAME").unwrap_or_else(|| "GNOME".into());
- let version = glib::get_os_info("VERSION").unwrap_or_else(|| "".into());
+ let name = glib::os_info("NAME").unwrap_or_else(|| "GNOME".into());
+ let version = glib::os_info("VERSION").unwrap_or_else(|| "".into());
let last_page = ImagePageWidget::new(
"/org/gnome/Tour/ready-to-go.svg",
// Translators: The following string is formatted as "We hope that you enjoy GNOME 40"
@@ -106,7 +106,7 @@ impl Window {
),
gettext("To get more advice and tips, see the Help app."),
);
- last_page.widget.get_style_context().add_class("last-page");
+ last_page.widget.style_context().add_class("last-page");
self.paginator
.borrow_mut()
.add_page(last_page.widget.upcast::<gtk::Widget>());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]