diff --git a/Cargo.lock b/Cargo.lock index 2484a1d..4f72ec4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "async-lock" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener", "event-listener-strategy", @@ -36,9 +36,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block" @@ -48,23 +48,22 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "cairo-rs" -version = "0.18.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +checksum = "bc1c415b7088381c53c575420899c34c9e6312df5ac5defd05614210e9fd6e1b" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", - "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.18.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +checksum = "75b6a5fefce2eadb8333e3c604ac964ba6573ec4f28bdd17f67032c4a2831831" dependencies = [ "glib-sys", "libc", @@ -107,12 +106,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "delineate" @@ -127,6 +123,7 @@ dependencies = [ "gtk4", "indexmap", "libadwaita", + "once_cell", "regex", "serde", "serde_json", @@ -144,9 +141,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "event-listener" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218a870470cce1469024e9fb66b901aa983929d81304a1cdb299f28118e550d5" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -213,7 +210,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -249,22 +246,21 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.18.5" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +checksum = "c311c47800051b87de1335e8792774d7cec551c91a0a3d109ab21d76b36f208f" dependencies = [ "gdk-pixbuf-sys", "gio", "glib", "libc", - "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +checksum = "3dcbd04c1b2c4834cc008b4828bc917d062483b88d26effde6342e5622028f96" dependencies = [ "gio-sys", "glib-sys", @@ -275,9 +271,9 @@ dependencies = [ [[package]] name = "gdk4" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edb019ad581f8ecf8ea8e4baa6df7c483a95b5a59be3140be6a9c3b0c632af6" +checksum = "6771942f85a2beaa220c64739395e4401b9fab4a52aba9b503fa1e6ed4d4d806" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -290,9 +286,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbab43f332a3cf1df9974da690b5bb0e26720ed09a228178ce52175372dcfef0" +checksum = "1eb95854fab65072023a7814434f003db571d6e45c287c0b0c540c1c78bdf6ae" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -327,9 +323,9 @@ dependencies = [ [[package]] name = "gio" -version = "0.18.4" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +checksum = "b3d1aaa2d926710a27f3b35822806b1513b393b71174dd2601c9d02fdab0cb82" dependencies = [ "futures-channel", "futures-core", @@ -338,7 +334,6 @@ dependencies = [ "gio-sys", "glib", "libc", - "once_cell", "pin-project-lite", "smallvec", "thiserror", @@ -346,22 +341,22 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +checksum = "bcf8e1d9219bb294636753d307b030c1e8a032062cba74f493c431a5c8b81ce4" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", - "winapi", + "windows-sys", ] [[package]] name = "glib" -version = "0.18.5" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +checksum = "170ee82b9b44b3b5fd1cf4971d6cf0eadec38303bb84c7bcc4e6b95a18934e71" dependencies = [ "bitflags", "futures-channel", @@ -375,30 +370,28 @@ dependencies = [ "gobject-sys", "libc", "memchr", - "once_cell", "smallvec", "thiserror", ] [[package]] name = "glib-macros" -version = "0.18.5" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +checksum = "2ff52fff7e4d1bb8598ae744e9bb90c8c76271712483c3f0ce931bee9814de85" dependencies = [ "heck", - "proc-macro-crate 2.0.1", - "proc-macro-error", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] name = "glib-sys" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +checksum = "630f097773d7c7a0bb3258df4e8157b47dc98bbfa0e60ad9ab56174813feced4" dependencies = [ "libc", "system-deps", @@ -406,9 +399,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +checksum = "c85e2b1080b9418dd0c58b498da3a5c826030343e0ef07bde6a955d28de54979" dependencies = [ "glib-sys", "libc", @@ -417,9 +410,9 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2228cda1505613a7a956cca69076892cfbda84fc2b7a62b94a41a272c0c401" +checksum = "147827e4f506f8073ac3ec5b28cc2255bdf3abc30f5b4e101a80506eebe11d2c" dependencies = [ "glib", "graphene-sys", @@ -428,9 +421,9 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4144cee8fc8788f2a9b73dc5f1d4e1189d1f95305c4cb7bd9c1af1cfa31f59" +checksum = "236ed66cc9b18d8adf233716f75de803d0bf6fc806f60d14d948974a12e240d0" dependencies = [ "glib-sys", "libc", @@ -440,9 +433,9 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d958e351d2f210309b32d081c832d7de0aca0b077aa10d88336c6379bd01f7e" +checksum = "0e8ce8dee0fd87a11002214b1204ff18c9272fbd530408f0884a0f9b25dc31de" dependencies = [ "cairo-rs", "gdk4", @@ -455,9 +448,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bd9e3effea989f020e8f1ff3fa3b8c63ba93d43b899c11a118868853a56d55" +checksum = "2660a652da5b662d43924df19ba40d73f015ed427329ef51d2b1360a4e0dc0e4" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -471,9 +464,9 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeb51aa3e9728575a053e1f43543cd9992ac2477e1b186ad824fd4adfb70842" +checksum = "7d26ffa3ec6316ccaa1df62d3e7f5bae1637c0acbb43f250fabef38319f73c64" dependencies = [ "cairo-rs", "field-offset", @@ -492,12 +485,12 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d57ec49cf9b657f69a05bca8027cff0a8dfd0c49e812be026fc7311f2163832f" +checksum = "c8b86439e9896f6f3f47c3d8077c5c8205174078760afdabd9098a8e9e937d97" dependencies = [ "anyhow", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", @@ -506,9 +499,9 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54d8c4aa23638ce9faa2caf7e2a27d4a1295af2155c8e8d28c4d4eeca7a65eb8" +checksum = "2abc0a6d356d59a3806021829ce6ed3e70bba3509b41a535fedcb09fae13fbc0" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -537,9 +530,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", "hashbrown", @@ -553,9 +546,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "javascriptcore6" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab2e7a6ba3112cf23e7bf63f0aefe5058e6b4f1f759d47bf22922f73ed17e79" +checksum = "d95a69260c40bbf52066f2c6fa520c00c1ec8ab8208636cf3070c0157c5221f8" dependencies = [ "glib", "javascriptcore6-sys", @@ -564,9 +557,9 @@ dependencies = [ [[package]] name = "javascriptcore6-sys" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5a26b89c59d679b0d57dd98235e3125b132407cc14c3fb6382df4b84475c39f" +checksum = "fc104f99c5adcd7ed53dd491121c111e05e3e8d40020d3519e98c346ca64186b" dependencies = [ "glib-sys", "gobject-sys", @@ -582,9 +575,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libadwaita" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe7e70c06507ed10a16cda707f358fbe60fe0dc237498f78c686ade92fd979c" +checksum = "91b4990248b9e1ec5e72094a2ccaea70ec3809f88f6fd52192f2af306b87c5d9" dependencies = [ "gdk-pixbuf", "gdk4", @@ -598,9 +591,9 @@ dependencies = [ [[package]] name = "libadwaita-sys" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e10aaa38de1d53374f90deeb4535209adc40cc5dba37f9704724169bceec69a" +checksum = "23a748e4e92be1265cd9e93d569c0b5dfc7814107985aa6743d670ab281ea1a8" dependencies = [ "gdk4-sys", "gio-sys", @@ -614,9 +607,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "locale_config" @@ -714,22 +707,21 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +checksum = "78d7f779b957728c74fd1a060dfa6d89a0bea792ebc50cc2da80e4e87282d69e" dependencies = [ "gio", "glib", "libc", - "once_cell", "pango-sys", ] [[package]] name = "pango-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +checksum = "f52ef6a881c19fbfe3b1484df5cad411acaaba29dbec843941c3110d19f340ea" dependencies = [ "glib-sys", "gobject-sys", @@ -757,28 +749,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" -dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] @@ -807,9 +788,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -825,9 +806,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -837,9 +818,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -875,29 +856,29 @@ checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.194" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.194" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.112" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d1bd37ce2324cf3bf85e5a25f96eb4baf0d5aa6eba43e7ae8958870c4ec48ed" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -933,15 +914,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "soup3" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +checksum = "3fb6bbb0e56d089517432ca8aac0879e5f343b309783384a7fdbdd6d5232e681" dependencies = [ "futures-channel", "gio", @@ -952,9 +933,9 @@ dependencies = [ [[package]] name = "soup3-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +checksum = "f9c6d7beef555a91c6129f5e71ecf4b6e9eac8b48914098d713b1537ebbf6917" dependencies = [ "gio-sys", "glib-sys", @@ -965,9 +946,9 @@ dependencies = [ [[package]] name = "sourceview5" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c5f976a113e947bc5ec67758b2960c0db4ca76f80fb410d7cd86cd456d9ee5" +checksum = "9f0bf70f2f1ac4624af22056f9c4cf58dccff73dafc7207b46fbd3df7b57410f" dependencies = [ "futures-channel", "futures-core", @@ -983,9 +964,9 @@ dependencies = [ [[package]] name = "sourceview5-sys" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29637cccd56075a37ba72c0cc8b8d599dbc1d857e30dadea97eaacbc29b7fd46" +checksum = "eac236ad7ce6dad2b819ced8b68b5a1cf4d968aa301cb9a7692470eb21f657be" dependencies = [ "gdk-pixbuf-sys", "gdk4-sys", @@ -1011,9 +992,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.47" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1726efe18f42ae774cc644f330953a5e7b3c3003d3edcecf18850fe9d4dd9afb" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -1062,7 +1043,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -1077,41 +1058,30 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "serde", @@ -1139,7 +1109,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -1203,9 +1173,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "webkit6" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111922d85b0f570bc1468d190037299fd0eca36f24147f74c1ad20fae5e21370" +checksum = "9d82bda18116290a9effc1e0f8dbd00236807bf4a9b990b9484bad5ba852fc06" dependencies = [ "gdk4", "gio", @@ -1213,16 +1183,15 @@ dependencies = [ "gtk4", "javascriptcore6", "libc", - "once_cell", "soup3", "webkit6-sys", ] [[package]] name = "webkit6-sys" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc4fbaf44fd645711e36a97437443e7f06b401fb66ccc3e5ae17eeb6f5cb681" +checksum = "6c459941f1b22750cbda435ede3f94ed8e8dd8c8608d324ecb0b9a8556b49abd" dependencies = [ "gdk4-sys", "gio-sys", @@ -1257,11 +1226,77 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.32" +version = "0.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6" +checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index c410f42..f0c4d6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,19 +8,20 @@ edition = "2021" lto = true [dependencies] -adw = { package = "libadwaita", version = "0.5", features = ["v1_4"] } +adw = { package = "libadwaita", version = "0.6", features = ["v1_5"] } anyhow = "1.0.75" async-lock = "3.2" futures-util = { version = "0.3.29", features = ["io"] } futures-channel = "0.3.29" fuzzy-matcher = "0.3.7" gettext-rs = { version = "0.7", features = ["gettext-system"] } -gtk = { version = "0.7", package = "gtk4", features = ["gnome_45"] } -gtk_source = { package = "sourceview5", version = "0.7", features = ["v5_10"] } +gtk = { version = "0.8", package = "gtk4", features = ["gnome_45"] } +gtk_source = { package = "sourceview5", version = "0.8", features = ["v5_10"] } indexmap = "2.1" +once_cell = "1.19.0" regex = "1.10.2" serde = { version = "1", features = ["derive"] } serde_json = "1.0.112" tracing = "0.1.37" tracing-subscriber = "0.3" -webkit = { package = "webkit6", version = "0.2.0", features = ["v2_42"] } +webkit = { package = "webkit6", version = "0.3.0", features = ["v2_42"] } diff --git a/src/document.rs b/src/document.rs index 0770f9f..02fb8c3 100644 --- a/src/document.rs +++ b/src/document.rs @@ -31,7 +31,8 @@ const FILE_SAVER_FLAGS: gtk_source::FileSaverFlags = mod imp { use std::{cell::Cell, marker::PhantomData}; - use glib::{once_cell::sync::Lazy, subclass::Signal}; + use glib::subclass::Signal; + use once_cell::sync::Lazy; use super::*; diff --git a/src/graph_view.rs b/src/graph_view.rs index fa1915d..0954905 100644 --- a/src/graph_view.rs +++ b/src/graph_view.rs @@ -64,7 +64,8 @@ mod imp { use std::{cell::Cell, marker::PhantomData}; use async_lock::OnceCell; - use glib::{once_cell::sync::Lazy, subclass::Signal}; + use glib::subclass::Signal; + use once_cell::sync::Lazy; use super::*; diff --git a/src/main.rs b/src/main.rs index ba84ce9..4fa1792 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,10 +47,8 @@ mod window; use std::{fs, path::PathBuf}; use gettextrs::LocaleCategory; -use gtk::{ - gio, - glib::{self, once_cell::sync::Lazy}, -}; +use gtk::{gio, glib}; +use once_cell::sync::Lazy; use self::{ application::Application, diff --git a/src/page.rs b/src/page.rs index a09a553..34dd056 100644 --- a/src/page.rs +++ b/src/page.rs @@ -5,10 +5,11 @@ use anyhow::{Context, Result}; use gettextrs::gettext; use gtk::{ gdk, gdk_pixbuf, gio, - glib::{self, clone, closure, once_cell::sync::Lazy}, + glib::{self, clone, closure}, subclass::prelude::*, }; use gtk_source::prelude::*; +use once_cell::sync::Lazy; use regex::Regex; use crate::{ @@ -117,43 +118,36 @@ mod imp { gdk::Key::plus, gdk::ModifierType::CONTROL_MASK, "page.zoom-graph-in", - None, ); klass.add_binding_action( gdk::Key::KP_Add, gdk::ModifierType::CONTROL_MASK, "page.zoom-graph-in", - None, ); klass.add_binding_action( gdk::Key::equal, gdk::ModifierType::CONTROL_MASK, "page.zoom-graph-in", - None, ); klass.add_binding_action( gdk::Key::minus, gdk::ModifierType::CONTROL_MASK, "page.zoom-graph-out", - None, ); klass.add_binding_action( gdk::Key::KP_Subtract, gdk::ModifierType::CONTROL_MASK, "page.zoom-graph-out", - None, ); klass.add_binding_action( gdk::Key::_0, gdk::ModifierType::CONTROL_MASK, "page.reset-graph-zoom", - None, ); klass.add_binding_action( gdk::Key::KP_0, gdk::ModifierType::CONTROL_MASK, "page.reset-graph-zoom", - None, ); } diff --git a/src/recent_item.rs b/src/recent_item.rs index 29009e9..ed1f808 100644 --- a/src/recent_item.rs +++ b/src/recent_item.rs @@ -1,10 +1,6 @@ use fuzzy_matcher::{skim::SkimMatcherV2, FuzzyMatcher}; -use gtk::{ - gio, - glib::{self, once_cell::sync::Lazy}, - prelude::*, - subclass::prelude::*, -}; +use gtk::{gio, glib, prelude::*, subclass::prelude::*}; +use once_cell::sync::Lazy; static FUZZY_MATCHER: Lazy = Lazy::new(SkimMatcherV2::default); diff --git a/src/recent_popover.rs b/src/recent_popover.rs index 083f3ae..e433c4e 100644 --- a/src/recent_popover.rs +++ b/src/recent_popover.rs @@ -12,7 +12,8 @@ use crate::{ mod imp { use std::cell::OnceCell; - use glib::{once_cell::sync::Lazy, subclass::Signal}; + use glib::subclass::Signal; + use once_cell::sync::Lazy; use super::*; diff --git a/src/recent_row.rs b/src/recent_row.rs index 451a05a..25e2e36 100644 --- a/src/recent_row.rs +++ b/src/recent_row.rs @@ -12,7 +12,8 @@ use crate::{i18n::ngettext_f, recent_item::RecentItem, utils}; mod imp { use std::cell::OnceCell; - use glib::{once_cell::sync::Lazy, subclass::Signal}; + use glib::subclass::Signal; + use once_cell::sync::Lazy; use super::*; diff --git a/src/window.rs b/src/window.rs index 50890a9..7400035 100644 --- a/src/window.rs +++ b/src/window.rs @@ -146,38 +146,46 @@ mod imp { }, ); - klass.install_action_async("win.export-graph", Some("s"), |obj, _, arg| async move { - let raw_format = arg.unwrap().get::().unwrap(); - - let format = match raw_format.as_str() { - "svg" => ExportFormat::Svg, - "png" => ExportFormat::Png, - "jpeg" => ExportFormat::Jpeg, - _ => unreachable!("unknown format `{}`", raw_format), - }; - - let page = obj.selected_page().unwrap(); - debug_assert!(page.can_export_graph()); + klass.install_action_async( + "win.export-graph", + Some(glib::VariantTy::STRING), + |obj, _, arg| async move { + let raw_format = arg.unwrap().get::().unwrap(); + + let format = match raw_format.as_str() { + "svg" => ExportFormat::Svg, + "png" => ExportFormat::Png, + "jpeg" => ExportFormat::Jpeg, + _ => unreachable!("unknown format `{}`", raw_format), + }; - if let Err(err) = page.export_graph(format).await { - if !err - .downcast_ref::() - .is_some_and(|error| error.matches(gtk::DialogError::Dismissed)) - { - tracing::error!("Failed to export graph: {:?}", err); - obj.add_message_toast(&gettext("Failed to export graph")); + let page = obj.selected_page().unwrap(); + debug_assert!(page.can_export_graph()); + + if let Err(err) = page.export_graph(format).await { + if !err + .downcast_ref::() + .is_some_and(|error| error.matches(gtk::DialogError::Dismissed)) + { + tracing::error!("Failed to export graph: {:?}", err); + obj.add_message_toast(&gettext("Failed to export graph")); + } } - } - }); + }, + ); - klass.install_action("win.select-page", Some("i"), |obj, _, args| { - let index = args.unwrap().get::().unwrap(); + klass.install_action( + "win.select-page", + Some(glib::VariantTy::INT32), + |obj, _, args| { + let index = args.unwrap().get::().unwrap(); - if index < obj.n_pages() { - let page = obj.nth_page(index); - obj.set_selected_page(&page); - } - }); + if index < obj.n_pages() { + let page = obj.nth_page(index); + obj.set_selected_page(&page); + } + }, + ); klass.install_action("win.move-page-to-left", None, |obj, _, _| { let imp = obj.imp(); @@ -239,124 +247,68 @@ mod imp { gdk::Key::T, gdk::ModifierType::CONTROL_MASK, "win.new-document", - None, ); klass.add_binding_action( gdk::Key::O, gdk::ModifierType::CONTROL_MASK, "win.open-document", - None, ); klass.add_binding_action( gdk::Key::S, gdk::ModifierType::CONTROL_MASK, "win.save-document", - None, ); klass.add_binding_action( gdk::Key::S, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.save-document-as", - None, ); - klass.add_binding_action( - gdk::Key::_1, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&0.into()), - ); - klass.add_binding_action( - gdk::Key::_2, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&1.into()), - ); - klass.add_binding_action( - gdk::Key::_3, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&2.into()), - ); - klass.add_binding_action( - gdk::Key::_4, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&3.into()), - ); - klass.add_binding_action( - gdk::Key::_5, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&4.into()), - ); - klass.add_binding_action( - gdk::Key::_6, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&5.into()), - ); - klass.add_binding_action( - gdk::Key::_7, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&6.into()), - ); - klass.add_binding_action( - gdk::Key::_8, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&7.into()), - ); - klass.add_binding_action( - gdk::Key::_9, - gdk::ModifierType::CONTROL_MASK, - "win.select-page", - Some(&8.into()), - ); + add_select_page_action(klass, gdk::Key::_1, 0); + add_select_page_action(klass, gdk::Key::_2, 1); + add_select_page_action(klass, gdk::Key::_3, 2); + add_select_page_action(klass, gdk::Key::_4, 3); + add_select_page_action(klass, gdk::Key::_5, 4); + add_select_page_action(klass, gdk::Key::_6, 5); + add_select_page_action(klass, gdk::Key::_7, 6); + add_select_page_action(klass, gdk::Key::_8, 7); + add_select_page_action(klass, gdk::Key::_9, 8); klass.add_binding_action( gdk::Key::Page_Up, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.move-page-to-left", - None, ); klass.add_binding_action( gdk::Key::KP_Page_Up, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.move-page-to-left", - None, ); klass.add_binding_action( gdk::Key::Page_Down, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.move-page-to-right", - None, ); klass.add_binding_action( gdk::Key::KP_Page_Down, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.move-page-to-right", - None, ); klass.add_binding_action( gdk::Key::N, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.move-page-to-new-window", - None, ); klass.add_binding_action( gdk::Key::W, gdk::ModifierType::CONTROL_MASK, "win.close-page-or-window", - None, ); klass.add_binding_action( gdk::Key::T, gdk::ModifierType::CONTROL_MASK | gdk::ModifierType::SHIFT_MASK, "win.undo-close-page", - None, ); } @@ -883,3 +835,20 @@ impl Window { self.action_set_enabled("win.undo-close-page", !is_empty); } } + +fn add_select_page_action( + klass: &mut ::Class, + key: gdk::Key, + page_index: i32, +) { + klass.add_shortcut( + >k::Shortcut::builder() + .trigger(>k::KeyvalTrigger::new( + key, + gdk::ModifierType::CONTROL_MASK, + )) + .action(>k::NamedAction::new("win.select-page")) + .arguments(&page_index.into()) + .build(), + ); +}