From f6d1ab22fa44cb3cdb2b9c51532875357528be7f Mon Sep 17 00:00:00 2001 From: Marcus Behrendt Date: Sun, 9 Jul 2023 12:25:26 +0200 Subject: [PATCH 1/3] feat: Update to GNOME 45 --- Cargo.lock | 1160 +++++++++-------- Cargo.toml | 22 +- build-aux/com.github.marhkb.Pods.Devel.json | 10 +- data/com.github.marhkb.Pods.gschema.xml.in | 4 +- data/resources/glsl/mask.glsl | 14 - .../icons/scalable/actions/about-symbolic.svg | 2 + .../actions/bell-outline-symbolic.svg | 2 + .../icons/scalable/actions/cross-symbolic.svg | 2 + .../scalable/actions/funnel-symbolic.svg | 2 + .../icons/scalable/status/bell-symbolic.svg | 2 - data/resources/resources.gresource.xml | 9 +- data/resources/style-dark.css | 4 +- data/resources/style-hc.css | 7 +- data/resources/style.css | 83 +- meson.build | 6 +- src/application.rs | 27 +- src/config.rs.in | 1 + src/main.rs | 132 +- src/meson.build | 10 + src/model/abstract_container_list.rs | 16 +- src/model/action.rs | 91 +- src/model/action_list.rs | 4 +- src/model/client.rs | 42 +- src/model/connection.rs | 17 +- src/model/connection_manager.rs | 15 +- src/model/container.rs | 28 +- src/model/container_data.rs | 14 +- src/model/container_list.rs | 24 +- src/model/container_volume.rs | 5 +- src/model/device.rs | 8 +- src/model/health_check_log.rs | 15 +- src/model/health_check_log_list.rs | 4 +- src/model/image.rs | 26 +- src/model/image_config.rs | 13 +- src/model/image_data.rs | 15 +- src/model/image_list.rs | 70 +- src/model/image_search_response.rs | 21 +- src/model/key_val.rs | 4 +- src/model/mod.rs | 7 + src/model/mount.rs | 2 +- src/model/pod.rs | 10 +- src/model/pod_data.rs | 7 +- src/model/pod_list.rs | 56 +- src/model/port_mapping.rs | 2 +- src/model/registry.rs | 5 +- src/model/repo_tag.rs | 2 +- src/model/repo_tag_list.rs | 4 +- src/model/selectable.rs | 6 +- src/model/selectable_list.rs | 10 +- src/model/simple_container_list.rs | 8 +- src/model/value.rs | 2 +- src/model/volume.rs | 13 +- src/model/volume_list.rs | 68 +- src/resources.gresource.xml | 101 ++ src/utils.rs | 71 +- src/view/action_page.rs | 23 +- src/view/action_page.ui | 208 ++- src/view/action_row.rs | 31 +- src/view/action_row.ui | 2 +- src/view/actions_button.rs | 141 ++ src/view/actions_button.ui | 35 + src/view/actions_sidebar.rs | 57 +- src/view/actions_sidebar.ui | 124 +- src/view/client_view.rs | 351 +++++ src/view/client_view.ui | 356 +++++ src/view/connection.rs | 3 +- src/view/connection_chooser_page.rs | 6 +- src/view/connection_chooser_page.ui | 98 +- src/view/connection_creation_page.rs | 34 +- src/view/connection_creation_page.ui | 425 +++--- src/view/connection_custom_info_dialog.rs | 50 +- src/view/connection_custom_info_dialog.ui | 6 +- src/view/connection_row.rs | 6 +- src/view/connection_row.ui | 1 - src/view/connection_switcher.rs | 75 +- src/view/connection_switcher.ui | 2 + src/view/connections_sidebar.rs | 6 +- src/view/connections_sidebar.ui | 71 +- src/view/container_commit_page.rs | 41 +- src/view/container_commit_page.ui | 203 ++- src/view/container_creation_page.rs | 173 ++- src/view/container_creation_page.ui | 205 +-- src/view/container_details_page.rs | 81 +- src/view/container_details_page.ui | 405 +++--- src/view/container_files_get_page.rs | 22 +- src/view/container_files_get_page.ui | 164 +-- src/view/container_files_put_page.rs | 22 +- src/view/container_files_put_page.ui | 116 +- src/view/container_health_check_log_row.rs | 9 +- src/view/container_health_check_page.rs | 6 +- src/view/container_health_check_page.ui | 172 ++- src/view/container_log_page.rs | 261 ++-- src/view/container_log_page.ui | 285 ++-- src/view/container_menu_button.rs | 6 +- src/view/container_properties_group.rs | 8 +- src/view/container_properties_group.ui | 7 +- src/view/container_rename_dialog.rs | 151 +-- src/view/container_rename_dialog.ui | 4 + src/view/container_resources.rs | 8 +- src/view/container_resources.ui | 4 + src/view/container_row.rs | 43 +- src/view/container_row.ui | 8 +- src/view/container_terminal.rs | 271 ++-- src/view/container_terminal.ui | 48 +- src/view/container_terminal_page.rs | 81 +- src/view/container_terminal_page.ui | 79 +- src/view/container_volume_row.rs | 124 +- src/view/containers_count_bar.rs | 34 +- src/view/containers_group.rs | 192 +-- src/view/containers_group.ui | 68 - src/view/containers_panel.rs | 485 +++++-- src/view/containers_panel.ui | 536 ++++---- src/view/containers_prune_page.rs | 21 +- src/view/containers_prune_page.ui | 86 +- src/view/containers_row.rs | 59 + src/view/containers_row.ui | 112 ++ src/view/device_row.rs | 18 +- src/view/device_row.ui | 24 +- src/view/image.rs | 3 +- src/view/image_build_page.rs | 67 +- src/view/image_build_page.ui | 226 ++-- src/view/image_details_page.rs | 35 +- src/view/image_details_page.ui | 238 ++-- src/view/image_history_page.rs | 6 +- src/view/image_history_page.ui | 67 +- src/view/image_menu_button.rs | 6 +- src/view/image_pull_page.rs | 56 +- src/view/image_pull_page.ui | 76 +- src/view/image_row.rs | 15 +- src/view/image_search_page.rs | 41 +- src/view/image_search_page.ui | 57 +- src/view/image_search_response_row.rs | 6 +- src/view/image_search_widget.rs | 110 +- src/view/image_search_widget.ui | 11 +- src/view/image_selection_combo_row.rs | 19 +- src/view/image_selection_page.rs | 114 +- src/view/image_selection_page.ui | 138 +- src/view/images_panel.rs | 310 +++-- src/view/images_panel.ui | 405 +++--- src/view/images_prune_page.rs | 29 +- src/view/images_prune_page.ui | 110 +- src/view/images_row.rs | 59 + src/view/images_row.ui | 74 ++ src/view/info_dialog.rs | 288 ---- src/view/info_dialog.ui | 182 --- src/view/info_panel.rs | 303 +++++ src/view/info_panel.ui | 267 ++++ src/view/info_row.rs | 87 ++ src/view/info_row.ui | 63 + src/view/key_val_row.rs | 38 +- src/view/key_val_row.ui | 2 + src/view/mod.rs | 24 +- src/view/mount_row.rs | 17 +- src/view/mount_row.ui | 8 +- src/view/pod.rs | 3 +- src/view/pod_creation_page.rs | 229 ++-- src/view/pod_creation_page.ui | 83 +- src/view/pod_details_page.rs | 40 +- src/view/pod_details_page.ui | 415 +++--- src/view/pod_menu_button.rs | 6 +- src/view/pod_row.rs | 15 +- src/view/pod_selection_page.rs | 93 +- src/view/pod_selection_page.ui | 138 +- src/view/pods_panel.rs | 332 +++-- src/view/pods_panel.ui | 588 +++++---- src/view/pods_prune_page.rs | 21 +- src/view/pods_prune_page.ui | 77 +- src/view/pods_row.rs | 59 + src/view/pods_row.ui | 112 ++ src/view/port_mapping_row.rs | 6 +- src/view/port_mapping_row.ui | 48 +- src/view/repo_tag_add_dialog.rs | 164 ++- src/view/repo_tag_add_dialog.ui | 3 + src/view/repo_tag_push_page.rs | 27 +- src/view/repo_tag_push_page.ui | 219 ++-- src/view/repo_tag_row.rs | 6 +- src/view/repo_tag_simple_row.rs | 32 +- src/view/scalable_text_view_page.rs | 151 +-- src/view/scalable_text_view_page.ui | 143 +- src/view/search_panel.rs | 51 +- src/view/search_panel.ui | 167 +-- src/view/search_row.rs | 41 + src/view/search_row.ui | 29 + {data/resources/ui => src/view}/shortcuts.ui | 2 +- src/view/statusbar.rs | 296 ----- src/view/statusbar.ui | 163 --- src/view/top_page.rs | 24 +- src/view/top_page.ui | 32 +- src/view/value_row.rs | 4 +- src/view/volume.rs | 3 +- src/view/volume_creation_page.rs | 21 +- src/view/volume_creation_page.ui | 86 +- src/view/volume_details_page.rs | 27 +- src/view/volume_details_page.ui | 180 ++- src/view/volume_row.rs | 17 +- src/view/volume_row.ui | 2 + src/view/volume_selection_page.rs | 93 +- src/view/volume_selection_page.ui | 138 +- src/view/volumes_group.rs | 148 +-- src/view/volumes_group.ui | 56 - src/view/volumes_panel.rs | 320 ++++- src/view/volumes_panel.ui | 318 +++-- src/view/volumes_prune_page.rs | 21 +- src/view/volumes_prune_page.ui | 87 +- src/view/volumes_row.rs | 59 + src/view/volumes_row.ui | 74 ++ src/view/welcome_page.rs | 6 +- src/view/welcome_page.ui | 152 +-- src/view/window.rs | 324 +++++ src/view/window.ui | 67 + src/widget/back_navigation_controls.rs | 113 -- src/widget/back_navigation_controls.ui | 15 - src/widget/circular_progress_bar.rs | 175 +-- src/widget/circular_progress_bar.ui | 1 + src/widget/count_badge.rs | 169 +++ src/widget/count_badge.ui | 45 + src/widget/date_time_row.rs | 25 +- src/widget/date_time_row.ui | 2 + src/widget/efficient_spinner.rs | 4 +- src/widget/leaflet_overlay.rs | 80 -- src/widget/leaflet_overlay.ui | 4 - src/widget/main_menu_button.rs | 64 + src/widget/main_menu_button.ui | 37 + src/widget/mod.rs | 10 +- src/widget/property_row.rs | 50 +- src/widget/property_row.ui | 3 + src/widget/property_widget_row.rs | 42 +- src/widget/property_widget_row.ui | 5 +- src/widget/random_name_entry_row.rs | 8 +- src/widget/scalable_text_view.rs | 11 +- src/widget/separator_row.rs | 36 + src/widget/separator_row.ui | 17 + src/widget/source_view_search_widget.rs | 8 +- src/widget/spinner.rs | 91 +- src/widget/spinner.ui | 4 +- src/widget/text_search_entry.rs | 133 +- src/widget/text_search_entry.ui | 15 +- src/widget/zoom_control.rs | 10 +- src/window.rs | 1029 --------------- src/window.ui | 474 ------- 240 files changed, 11200 insertions(+), 10113 deletions(-) delete mode 100644 data/resources/glsl/mask.glsl create mode 100644 data/resources/icons/scalable/actions/about-symbolic.svg create mode 100644 data/resources/icons/scalable/actions/bell-outline-symbolic.svg create mode 100644 data/resources/icons/scalable/actions/cross-symbolic.svg create mode 100644 data/resources/icons/scalable/actions/funnel-symbolic.svg delete mode 100644 data/resources/icons/scalable/status/bell-symbolic.svg create mode 100644 src/resources.gresource.xml create mode 100644 src/view/actions_button.rs create mode 100644 src/view/actions_button.ui create mode 100644 src/view/client_view.rs create mode 100644 src/view/client_view.ui create mode 100644 src/view/containers_row.rs create mode 100644 src/view/containers_row.ui create mode 100644 src/view/images_row.rs create mode 100644 src/view/images_row.ui delete mode 100644 src/view/info_dialog.rs delete mode 100644 src/view/info_dialog.ui create mode 100644 src/view/info_panel.rs create mode 100644 src/view/info_panel.ui create mode 100644 src/view/info_row.rs create mode 100644 src/view/info_row.ui create mode 100644 src/view/pods_row.rs create mode 100644 src/view/pods_row.ui create mode 100644 src/view/search_row.rs create mode 100644 src/view/search_row.ui rename {data/resources/ui => src/view}/shortcuts.ui (99%) delete mode 100644 src/view/statusbar.rs delete mode 100644 src/view/statusbar.ui create mode 100644 src/view/volumes_row.rs create mode 100644 src/view/volumes_row.ui create mode 100644 src/view/window.rs create mode 100644 src/view/window.ui delete mode 100644 src/widget/back_navigation_controls.rs delete mode 100644 src/widget/back_navigation_controls.ui create mode 100644 src/widget/count_badge.rs create mode 100644 src/widget/count_badge.ui delete mode 100644 src/widget/leaflet_overlay.rs delete mode 100644 src/widget/leaflet_overlay.ui create mode 100644 src/widget/main_menu_button.rs create mode 100644 src/widget/main_menu_button.ui create mode 100644 src/widget/separator_row.rs create mode 100644 src/widget/separator_row.ui delete mode 100644 src/window.rs delete mode 100644 src/window.ui diff --git a/Cargo.lock b/Cargo.lock index 7a6d4cfe5..c711c2530 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -10,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher", @@ -22,13 +31,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -40,15 +55,14 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "ashpd" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31688b40eb5d739049f721d8405c33d3796b3f51f2bea84421a542dafe397e41" +version = "0.6.0" +source = "git+https://github.com/bilelmoussaoui/ashpd.git#67bd09afe922f0a7604550e88ab01b7c9c397dab" dependencies = [ "enumflags2", "futures-channel", @@ -75,34 +89,119 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling", + "rustix 0.37.23", + "slab", + "socket2 0.4.9", + "waker-fn", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-process" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +dependencies = [ + "async-io", + "async-lock", + "autocfg", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 0.37.23", + "signal-hook", + "windows-sys", +] + [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] +[[package]] +name = "async-task" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" + [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] +[[package]] +name = "atomic-waker" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" + [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -115,6 +214,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "block" version = "0.1.6" @@ -139,11 +244,26 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blocking" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand 1.9.0", + "futures-lite", + "log", +] + [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byteorder" @@ -159,17 +279,16 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cairo-rs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8af54f5d48af1226928adc1f57edd22f5df1349e7da1fc96ae15cf43db0e871" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ - "bitflags", + "bitflags 2.4.0", "cairo-sys-rs", "glib", "libc", @@ -179,9 +298,8 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55382a01d30e5e53f185eee269124f5e21ab526595b872751278dfbb463594e" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "glib-sys", "libc", @@ -199,15 +317,18 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-expr" -version = "0.15.1" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", "target-lexicon", @@ -221,18 +342,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -246,11 +366,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "concurrent-queue" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "containers-api" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef94b0ff8338282b35bafb408eb0a3e53ba05bdb3b36840589ab9a67a6682593" +checksum = "74a6c297451ce82117ff9090e5174bf18f86e6bcbfbfc3820246abbc4f44fa16" dependencies = [ "chrono", "flate2", @@ -261,7 +390,7 @@ dependencies = [ "log", "mime", "paste", - "pin-project 1.1.0", + "pin-project 1.1.3", "serde", "serde_json", "tar", @@ -278,9 +407,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -294,6 +423,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -305,6 +443,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derivative" version = "2.2.0" @@ -327,32 +471,11 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", "serde", @@ -360,24 +483,30 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -414,33 +543,39 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "field-offset" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.8.0", + "memoffset 0.9.0", "rustc_version", ] [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "redox_syscall", + "windows-sys", ] [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -454,9 +589,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -509,6 +644,21 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-macro" version = "0.3.28" @@ -517,7 +667,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -564,11 +714,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b023fbe0c6b407bd3d9805d107d9800da3829dc5a676653210f1d5f16d7f59bf" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ - "bitflags", "gdk-pixbuf-sys", "gio", "glib", @@ -578,9 +726,8 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b41bd2b44ed49d99277d3925652a163038bd5ed943ec9809338ffb2f4391e3b" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "gio-sys", "glib-sys", @@ -591,11 +738,9 @@ dependencies = [ [[package]] name = "gdk4" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3abf96408a26e3eddf881a7f893a1e111767137136e347745e8ea6ed12731ff" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ - "bitflags", "cairo-rs", "gdk-pixbuf", "gdk4-sys", @@ -607,9 +752,8 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc92aa1608c089c49393d014c38ac0390d01e4841e1fedaa75dbcef77aaed64" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -624,9 +768,8 @@ dependencies = [ [[package]] name = "gdk4-wayland" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fa73894ed86fe10157436123d8baae5f2924ebc4fa48a11d8f093e07b9ecbbd" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "gdk4", "gdk4-wayland-sys", @@ -637,9 +780,8 @@ dependencies = [ [[package]] name = "gdk4-wayland-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af41c5a9cd7e06f612b91ec45ecb423ab57921bbd92f56e46a67b962be198e0c" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "glib-sys", "libc", @@ -648,9 +790,8 @@ dependencies = [ [[package]] name = "gdk4-x11" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17de2c3554d5127b9dfacd4d1801e2e3c9163bce01c6e1c407c054e9b771f2ee" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "gdk4", "gdk4-x11-sys", @@ -661,9 +802,8 @@ dependencies = [ [[package]] name = "gdk4-x11-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ca6c03d5019467d21671936edeba09f908039900af8ce4b834c19646031c72" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "gdk4-sys", "glib-sys", @@ -683,13 +823,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -713,12 +853,16 @@ dependencies = [ ] [[package]] -name = "gio" -version = "0.17.9" +name = "gimli" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14522e56c6bcb6f7a3aebc25cbcfb06776af4c0c25232b601b4383252d7cb92" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + +[[package]] +name = "gio" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ - "bitflags", "futures-channel", "futures-core", "futures-io", @@ -734,9 +878,8 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1d43b0d7968b48455244ecafe41192871257f5740aa6b095eb19db78e362a5" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "glib-sys", "gobject-sys", @@ -747,11 +890,10 @@ dependencies = [ [[package]] name = "glib" -version = "0.17.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f1de7cbde31ea4f0a919453a2dcece5d54d5b70e08f8ad254dc4840f5f09b6" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ - "bitflags", + "bitflags 2.4.0", "futures-channel", "futures-core", "futures-executor", @@ -770,24 +912,21 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.17.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7206c5c03851ef126ea1444990e81fdd6765fb799d5bc694e4897ca01bb97f" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ - "anyhow", "heck", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "glib-sys" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f00ad0a1bf548e61adfff15d83430941d9e1bb620e334f779edd1c745680a5" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "libc", "system-deps", @@ -795,9 +934,8 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e75b0000a64632b2d8ca3cf856af9308e3a970844f6e9659bd197f026793d0" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "glib-sys", "libc", @@ -806,9 +944,8 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cf11565bb0e4dfc2f99d4775b6c329f0d40a2cff9c0066214d31a0e1b46256" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "glib", "graphene-sys", @@ -817,9 +954,8 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf80a4849a8d9565410a8fec6fc3678e9c617f4ac7be182ca55ab75016e07af9" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "glib-sys", "libc", @@ -829,11 +965,9 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f01ef44fa7cac15e2da9978529383e6bee03e570ba5bf7036b4c10a15cc3a3c" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ - "bitflags", "cairo-rs", "gdk4", "glib", @@ -845,9 +979,8 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07a84fb4dcf1323d29435aa85e2f5f58bef564342bef06775ec7bd0da1f01b0" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -861,11 +994,9 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28a32a04cd75cef14a0983f8b0c669e0fe152a0a7725accdeb594e2c764c88b" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ - "bitflags", "cairo-rs", "field-offset", "futures-channel", @@ -878,15 +1009,13 @@ dependencies = [ "gtk4-macros", "gtk4-sys", "libc", - "once_cell", "pango", ] [[package]] name = "gtk4-macros" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a4d6b61570f76d3ee542d984da443b1cd69b6105264c61afec3abed08c2500f" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "anyhow", "proc-macro-crate", @@ -898,9 +1027,8 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8283f707b07e019e76c7f2934bdd4180c277e08aa93f4c0d8dd07b7a34e22f" +version = "0.8.0" +source = "git+https://github.com/gtk-rs/gtk4-rs.git#2910bca1eb59e652b29cc1a6914025430924f92e" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -917,9 +1045,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "heck" @@ -929,18 +1057,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -983,7 +1102,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "itoa", ] @@ -994,7 +1113,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "http", "pin-project-lite", ] @@ -1007,17 +1126,17 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-channel", "futures-core", "futures-util", @@ -1027,7 +1146,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1043,15 +1162,15 @@ dependencies = [ "futures-util", "hex", "hyper", - "pin-project 1.1.0", + "pin-project 1.1.3", "tokio", ] [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1072,9 +1191,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1082,11 +1201,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ - "autocfg", + "equivalent", "hashbrown", "serde", ] @@ -1116,22 +1235,22 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1147,12 +1266,9 @@ dependencies = [ [[package]] name = "libadwaita" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c4efd2020a4fcedbad2c4a97de97bf6045e5dc49d61d5a5d0cfd753db60700" +version = "0.6.0" +source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs#24608c684b8fa59357d0d586fde75c04a464cbf6" dependencies = [ - "bitflags", - "futures-channel", "gdk-pixbuf", "gdk4", "gio", @@ -1160,15 +1276,13 @@ dependencies = [ "gtk4", "libadwaita-sys", "libc", - "once_cell", "pango", ] [[package]] name = "libadwaita-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0727b85b4fe2b1bed5ac90df6343de15cbf8118bfb96d7c3cc1512681a4b34ac" +version = "0.6.0" +source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs#24608c684b8fa59357d0d586fde75c04a464cbf6" dependencies = [ "gdk4-sys", "gio-sys", @@ -1182,9 +1296,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.144" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libm" @@ -1194,24 +1308,23 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libpanel" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5313f06d37cb94e7a54ce3eb8a706e0263c8ed718671d6c775e3935f23abd7a" +version = "0.3.0" +source = "git+https://gitlab.gnome.org/World/Rust/libpanel-rs.git#7dd6d088f92079893f0e5d2afc2c8258b807ddcd" dependencies = [ "futures-core", "gdk4", "gio", "glib", "gtk4", + "libadwaita", + "libc", "libpanel-sys", - "once_cell", ] [[package]] name = "libpanel-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a80572ca80bb4d578cbc1ffe4d848c59815fc567fd67c5a64f2bf53ad78dc0e" +version = "0.3.0" +source = "git+https://gitlab.gnome.org/World/Rust/libpanel-rs.git#7dd6d088f92079893f0e5d2afc2c8258b807ddcd" dependencies = [ "gdk4-sys", "gio-sys", @@ -1229,6 +1342,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" + [[package]] name = "locale_config" version = "0.3.0" @@ -1244,12 +1363,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "malloc_buf" @@ -1268,9 +1384,9 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" @@ -1283,9 +1399,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1307,14 +1423,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "wasi", + "windows-sys", ] [[package]] @@ -1328,22 +1443,21 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", - "static_assertions", ] [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", @@ -1355,9 +1469,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1366,9 +1480,9 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2399c9463abc5f909349d8aa9ba080e0b88b3ce2885389b60b993f39b1a56905" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" dependencies = [ "byteorder", "lazy_static", @@ -1384,9 +1498,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -1426,20 +1540,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -1481,24 +1595,32 @@ dependencies = [ "objc", ] +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oo7" -version = "0.1.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1007a6c292751abc192f8dbeef8341bac074e991be7b0eb27a6aece5ee79b4dd" +checksum = "220729ba847d98e1a9902c05e41dae79ce4a0b913dad68bc540dd3120a8c2b6b" dependencies = [ "aes", "byteorder", "cbc", "cipher", "digest", - "dirs", "futures-util", "hkdf", "hmac", @@ -1514,12 +1636,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-stream" version = "0.2.0" @@ -1532,11 +1648,9 @@ dependencies = [ [[package]] name = "pango" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c280b82a881e4208afb3359a8e7fde27a1b272280981f1f34610bed5770d37" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ - "bitflags", "gio", "glib", "libc", @@ -1546,9 +1660,8 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4293d0f0b5525eb5c24734d30b0ed02cd02aa734f216883f376b54de49625de8" +version = "0.19.0" +source = "git+https://github.com/gtk-rs/gtk-rs-core#5e0be5c791f142ef070fbdc16c04800239a07985" dependencies = [ "glib-sys", "gobject-sys", @@ -1556,17 +1669,23 @@ dependencies = [ "system-deps", ] +[[package]] +name = "parking" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" + [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest", "hmac", @@ -1574,9 +1693,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" @@ -1589,11 +1708,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ - "pin-project-internal 1.1.0", + "pin-project-internal 1.1.3", ] [[package]] @@ -1609,20 +1728,20 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1639,11 +1758,11 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "podman-api" version = "0.10.0" -source = "git+https://github.com/vv9k/podman-api-rs.git#363d945b9b9905c50dfa0bfe0f9331f9fdeef079" +source = "git+https://github.com/vv9k/podman-api-rs.git#f35e6f9f9fdb9d9023aed341252c16c0ad9796d1" dependencies = [ "base64", "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "containers-api", "flate2", "futures-util", @@ -1672,7 +1791,7 @@ dependencies = [ [[package]] name = "pods" -version = "1.3.0-dev" +version = "2.0.0-dev" dependencies = [ "anyhow", "ashpd", @@ -1684,11 +1803,9 @@ dependencies = [ "libpanel", "log", "names", - "once_cell", "oo7", "paste", "podman-api", - "regex", "serde", "serde_json", "sourceview5", @@ -1699,6 +1816,22 @@ dependencies = [ "vte4", ] +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1741,18 +1874,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1787,40 +1920,32 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - [[package]] name = "redox_syscall" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regex" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.8.3" +name = "regex-automata" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -1829,9 +1954,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc_version" @@ -1844,55 +1975,68 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", - "windows-sys 0.48.0", + "linux-raw-sys 0.3.8", + "windows-sys", +] + +[[package]] +name = "rustix" +version = "0.38.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.7", + "windows-sys", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "semver" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -1901,29 +2045,29 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -1932,29 +2076,48 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", "digest", ] +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -1967,12 +2130,20 @@ dependencies = [ ] [[package]] -name = "sourceview5" -version = "0.6.1" +name = "socket2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee960607b1f7fda934dce68e76e925989ebe186ac04d6ab5ea9ce93e13835c03" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "sourceview5" +version = "0.8.0" +source = "git+https://gitlab.gnome.org/World/Rust/sourceview5-rs.git#5baec2e87544136de6c3e1a3614624d60986d530" dependencies = [ - "bitflags", "futures-channel", "futures-core", "gdk-pixbuf", @@ -1987,9 +2158,8 @@ dependencies = [ [[package]] name = "sourceview5-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a23462cd3d696199b56317d35e69b240d655b8c70c12bd8f443b672313776c" +version = "0.8.0" +source = "git+https://gitlab.gnome.org/World/Rust/sourceview5-rs.git#5baec2e87544136de6c3e1a3614624d60986d530" dependencies = [ "gdk-pixbuf-sys", "gdk4-sys", @@ -2033,9 +2203,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -2052,14 +2222,14 @@ dependencies = [ "hostname", "libc", "log", - "time 0.3.21", + "time", ] [[package]] name = "system-deps" -version = "6.1.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fa6fb9ee296c0dc2df41a656ca7948546d061958115ddb0bcaae43ad0d17d2" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" dependencies = [ "cfg-expr", "heck", @@ -2070,9 +2240,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -2081,9 +2251,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "temp-dir" @@ -2093,54 +2263,44 @@ checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", + "fastrand 2.0.0", + "redox_syscall", + "rustix 0.38.14", + "windows-sys", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "syn 2.0.37", ] [[package]] name = "time" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -2157,9 +2317,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -2181,19 +2341,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", - "bytes 1.4.0", + "backtrace", + "bytes 1.5.0", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "signal-hook-registry", + "socket2 0.5.4", "tracing", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2209,24 +2370,23 @@ dependencies = [ [[package]] name = "tokio-tar" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50188549787c32c1c3d9c8c71ad7e003ccf2f102489c5a96e385c84760477f4" +checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" dependencies = [ "filetime", "futures-core", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "tokio", "tokio-stream", - "xattr", ] [[package]] name = "toml" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -2236,18 +2396,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "serde", @@ -2276,13 +2436,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -2302,9 +2462,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uds_windows" @@ -2324,9 +2484,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2339,9 +2499,9 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -2379,11 +2539,10 @@ dependencies = [ [[package]] name = "vte4" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58204be19a32d0925cb4faf05339c769ba699f66471f1f53af1fdecd7125a64b" +version = "0.8.0" +source = "git+https://gitlab.gnome.org/World/Rust/vte4-rs.git#aa466f43ead6190c6c4b8792f78ed766df1c289e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gdk4", "gio", "glib", @@ -2396,9 +2555,8 @@ dependencies = [ [[package]] name = "vte4-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b85a2b09ffbb8acf8147b39ceeb88b0fec74dfad26880004b5f6cb8ffce47" +version = "0.8.0" +source = "git+https://gitlab.gnome.org/World/Rust/vte4-rs.git#aa466f43ead6190c6c4b8792f78ed766df1c289e" dependencies = [ "gdk4-sys", "gio-sys", @@ -2419,22 +2577,21 @@ dependencies = [ "quote", ] +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2443,9 +2600,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2453,24 +2610,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2478,22 +2635,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "winapi" @@ -2523,16 +2680,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", + "windows-targets", ] [[package]] @@ -2541,137 +2689,80 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "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.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -2688,11 +2779,12 @@ dependencies = [ [[package]] name = "zbus" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29242fa5ec5693629ae74d6eb1f69622a9511f600986d6d9779bccf36ac316e3" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" dependencies = [ "async-broadcast", + "async-process", "async-recursion", "async-trait", "byteorder", @@ -2723,9 +2815,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537793e26e9af85f774801dc52c6f6292352b2b517c5cf0449ffd3735732a53a" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2737,9 +2829,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82441e6033be0a741157a72951a3e4957d519698f3a824439cc131c5ba77ac2a" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" dependencies = [ "serde", "static_assertions", @@ -2763,14 +2855,14 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "zvariant" -version = "3.13.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb36cd95352132911c9c99fdcc1635de5c2c139bd34cbcf6dfb8350ee8ff6a7" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" dependencies = [ "byteorder", "enumflags2", @@ -2783,9 +2875,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.13.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34951e1ac64f3a1443fe7181256b9ed6a811a1631917566c3d5ca718d8cf33" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2796,9 +2888,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b22993dbc4d128a17a3b6c92f1c63872dd67198537ee728d8b5d7c40640a8b" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 2455d3aed..2c1f8a697 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,33 +1,31 @@ [package] name = "pods" -version = "1.3.0-dev" +version = "2.0.0-dev" authors = ["Marcus Behrendt "] edition = "2021" [dependencies] -adw = { version = "0.3", package = "libadwaita", features = ["v1_3"] } +adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita", features = ["v1_4"] } anyhow = "1" -ashpd = { version = "0.4", default-features = false, features = ["gtk4", "tokio"] } +ashpd = { git = "https://github.com/bilelmoussaoui/ashpd.git", default-features = false, features = ["gtk4", "tokio"] } futures = { version = "0.3", default-features = false } gettext-rs = { version = "0.7", features = ["gettext-system"] } -gtk = { version = "0.6", package = "gtk4", features = ["gnome_44"] } -indexmap = { version = "1", features = ["serde"] } +gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4", features = ["gnome_45"] } +indexmap = { version = "2", features = ["serde"] } log = "0.4" names = { version = "0.14", default-features = false } -once_cell = "1" -oo7 = { version = "0.1", default-features = false, features = ["native_crypto", "tokio"] } -panel = { version = "0.2", package = "libpanel" } +oo7 = { version = "0.2", default-features = false, features = ["native_crypto", "tokio"] } +panel = { git = "https://gitlab.gnome.org/World/Rust/libpanel-rs.git", package = "libpanel", features = ["adw_v1_2"] } paste = "1" podman-api = { git = "https://github.com/vv9k/podman-api-rs.git", commit = "363d945b9b9905c50dfa0bfe0f9331f9fdeef079", default-features = false } -regex = "1" serde = "1" serde_json = "1" -sourceview5 = "0.6" +sourceview5 = { git = "https://gitlab.gnome.org/World/Rust/sourceview5-rs.git", features = ["gtk_v4_12"] } syslog = "6" tokio = "1" -tokio-tar = "0.3" +tokio-tar = { version = "0.3", default-features = false } vte = { version = "0.11", default-features = false } -vte4 = "0.6" +vte4 = { git = "https://gitlab.gnome.org/World/Rust/vte4-rs.git" } [profile.release] lto = true diff --git a/build-aux/com.github.marhkb.Pods.Devel.json b/build-aux/com.github.marhkb.Pods.Devel.json index 2912c7318..c50ceabdc 100644 --- a/build-aux/com.github.marhkb.Pods.Devel.json +++ b/build-aux/com.github.marhkb.Pods.Devel.json @@ -1,11 +1,11 @@ { "id": "com.github.marhkb.Pods.Devel", "runtime": "org.gnome.Platform", - "runtime-version": "44", + "runtime-version": "45", "sdk": "org.gnome.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust-stable", - "org.freedesktop.Sdk.Extension.llvm15" + "org.freedesktop.Sdk.Extension.llvm16" ], "command": "pods", "finish-args": [ @@ -21,7 +21,7 @@ "--filesystem=xdg-run/podman:ro" ], "build-options": { - "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm15/bin", + "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm16/bin", "env": { "CARGO_REGISTRIES_CRATES_IO_PROTOCOL": "sparse", "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang", @@ -62,7 +62,7 @@ { "type": "git", "url": "https://gitlab.gnome.org/GNOME/libpanel.git", - "tag": "1.2.0" + "tag": "1.4.0" } ] }, @@ -81,7 +81,7 @@ { "type": "git", "url": "https://gitlab.gnome.org/GNOME/vte.git", - "tag": "0.72.1" + "tag": "0.74.0" } ] }, diff --git a/data/com.github.marhkb.Pods.gschema.xml.in b/data/com.github.marhkb.Pods.gschema.xml.in index cc7dff060..ed6c18a63 100644 --- a/data/com.github.marhkb.Pods.gschema.xml.in +++ b/data/com.github.marhkb.Pods.gschema.xml.in @@ -36,9 +36,9 @@ The last used view - + false - Whether to show intermediate images + Whether to hide intermediate images diff --git a/data/resources/glsl/mask.glsl b/data/resources/glsl/mask.glsl deleted file mode 100644 index 602dd5080..000000000 --- a/data/resources/glsl/mask.glsl +++ /dev/null @@ -1,14 +0,0 @@ -uniform sampler2D u_texture1; -uniform sampler2D u_texture2; - -void -mainImage (out vec4 fragColor, - in vec2 fragCoord, - in vec2 resolution, - in vec2 uv) -{ - vec4 source = GskTexture (u_texture1, uv); - vec4 mask = GskTexture (u_texture2, uv); - - fragColor = source * (1.0 - mask.a); -} diff --git a/data/resources/icons/scalable/actions/about-symbolic.svg b/data/resources/icons/scalable/actions/about-symbolic.svg new file mode 100644 index 000000000..396e66951 --- /dev/null +++ b/data/resources/icons/scalable/actions/about-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/data/resources/icons/scalable/actions/bell-outline-symbolic.svg b/data/resources/icons/scalable/actions/bell-outline-symbolic.svg new file mode 100644 index 000000000..c91a75a86 --- /dev/null +++ b/data/resources/icons/scalable/actions/bell-outline-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/data/resources/icons/scalable/actions/cross-symbolic.svg b/data/resources/icons/scalable/actions/cross-symbolic.svg new file mode 100644 index 000000000..107554c51 --- /dev/null +++ b/data/resources/icons/scalable/actions/cross-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/data/resources/icons/scalable/actions/funnel-symbolic.svg b/data/resources/icons/scalable/actions/funnel-symbolic.svg new file mode 100644 index 000000000..e09e1e407 --- /dev/null +++ b/data/resources/icons/scalable/actions/funnel-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/data/resources/icons/scalable/status/bell-symbolic.svg b/data/resources/icons/scalable/status/bell-symbolic.svg deleted file mode 100644 index 08ef0e0e5..000000000 --- a/data/resources/icons/scalable/status/bell-symbolic.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/data/resources/resources.gresource.xml b/data/resources/resources.gresource.xml index 9d2fd105b..278af6ce2 100644 --- a/data/resources/resources.gresource.xml +++ b/data/resources/resources.gresource.xml @@ -3,12 +3,14 @@ assets/welcome.svg - ui/shortcuts.ui - + icons/scalable/actions/about-symbolic.svg icons/scalable/actions/arrow1-right-symbolic.svg + icons/scalable/actions/bell-outline-symbolic.svg icons/scalable/actions/build-configure-symbolic.svg icons/scalable/actions/code-symbolic.svg + icons/scalable/actions/cross-symbolic.svg icons/scalable/actions/eraser5-symbolic.svg + icons/scalable/actions/funnel-symbolic.svg icons/scalable/actions/get-symbolic.svg icons/scalable/actions/hospital-symbolic.svg icons/scalable/actions/memory-symbolic.svg @@ -23,7 +25,6 @@ icons/scalable/actions/stacked-plates-symbolic.svg icons/scalable/actions/uppercase-symbolic.svg icons/scalable/actions/whole-word-symbolic.svg - icons/scalable/status/bell-symbolic.svg icons/scalable/status/degraded-pod-symbolic.svg icons/scalable/status/error-symbolic.svg icons/scalable/status/local-connection-symbolic.svg @@ -32,7 +33,5 @@ style.css style-dark.css style-hc.css - - glsl/mask.glsl diff --git a/data/resources/style-dark.css b/data/resources/style-dark.css index e5d31b1f2..e375b7392 100644 --- a/data/resources/style-dark.css +++ b/data/resources/style-dark.css @@ -11,7 +11,9 @@ } .container-status-running, -.pod-status-running { +.pod-status-running, +.image-used, +.volume-used { color: @blue_1; background-color: alpha(@blue_2, .35); } diff --git a/data/resources/style-hc.css b/data/resources/style-hc.css index 4f8f5f6cf..bb45c7514 100644 --- a/data/resources/style-hc.css +++ b/data/resources/style-hc.css @@ -6,6 +6,7 @@ font-weight: bold; } +.version, .container-status-configured, .container-status-created, .container-status-exited, @@ -15,6 +16,8 @@ .pod-status-created, .pod-status-exited, .pod-status-stopped, +.image-unused, +.volume-unused, .container-health-status-checking, .container-health-status-unconfigured, .rich-expander-row-header #badge { @@ -35,7 +38,9 @@ } .container-status-running, -.pod-status-running { +.pod-status-running, +.image-used, +.volume-used { background-color: @accent_bg_color; color: @accent_fg_color; } diff --git a/data/resources/style.css b/data/resources/style.css index fda830e5f..d88e10824 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -1,14 +1,5 @@ -.flat-headerbar-content scrollbar.vertical { - /* The size a typical headerbar takes: 46px + 1px for the bottom border. */ - margin-top: 47px; - - /* Relevant for scrollbars without .overlay-indicator. */ - background: none; - box-shadow: none; -} - -.flat-headerbar-normal-scrollbar scrollbar.vertical { - margin-top: 0; +.navigation-sidebar .list-separator { + margin: -12px 0; } .text-box textview { @@ -19,6 +10,11 @@ border-radius: 9999px; } +.circle-big { + border-radius: 9999px; + padding: 8px; +} + .dim-icon { color: alpha(@window_fg_color, .75); } @@ -28,8 +24,14 @@ entry button { padding: 0 3px; } +button.medium { + padding: 6px; + -gtk-icon-size: 24px; +} + button.large { padding: 9px; + -gtk-icon-size: 24px; } .action-bar { @@ -40,6 +42,47 @@ button.large { color: @destructive_color; } +.sidebar-row { + margin: 12px 6px; +} + +actionsbutton .action-count-mask { + background-color: @headerbar_bg_color; + border-radius: 9999px; + margin-left: 10px; + padding: 7px; +} + +actionsbutton .action-count-badge { + border-radius: 9999px; + font-feature-settings: "tnum"; + font-size: x-small; + font-weight: bold; + margin-top: 1px; + margin-left: 10px; + padding: 6px; +} + +actionsbutton.good .action-count-badge { + background-color: @accent_bg_color; + color: @accent_fg_color; +} + +actionsbutton.finished .action-count-badge { + background-color: @success_bg_color; + color: @success_fg_color; +} + +actionsbutton.cancelled .action-count-badge { + background-color: @warning_bg_color; + color: @warning_fg_color; +} + +actionsbutton.failed .action-count-badge { + background-color: @error_bg_color; + color: @error_fg_color; +} + connectionswitcher row #selection-indicator #background, actionssidebar #type { background-color: @shade_color; @@ -100,18 +143,28 @@ connectionchooserpage connectionswitcher row { } .status-badge { - font-size: 0.8em; + font-size: 0.9em; font-weight: bold; min-width: 1.7em; border-radius: 9999px; padding: 5px 7px; } +.status-badge-small { + font-size: small; + font-weight: bold; + font-feature-settings: "tnum"; + min-width: 10px; + border-radius: 9999px; + padding: 1px 4px; +} + .repo-tags-small { background-color: transparent; margin: 0 0 -4px -2px; } +.version, .container-status-configured, .container-status-created, .container-status-exited, @@ -122,6 +175,8 @@ connectionchooserpage connectionswitcher row { .pod-status-created, .pod-status-exited, .pod-status-stopped, +.image-unused, +.volume-unused, .container-health-status-checking, .container-health-status-unconfigured, .rich-expander-row-header #badge { @@ -142,7 +197,9 @@ connectionchooserpage connectionswitcher row { } .container-status-running, -.pod-status-running { +.pod-status-running, +.image-used, +.volume-used { color: @blue_4; background-color: alpha(@blue_3, .25); } diff --git a/meson.build b/meson.build index e44b464da..8193cb051 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'pods', 'rust', - version: '1.3.0-dev', + version: '2.0.0-dev', meson_version: '>= 0.59', license: 'GPL3+', ) @@ -13,8 +13,8 @@ base_id = 'com.github.marhkb.Pods' dependency('glib-2.0', version: '>= 2.66') dependency('gio-2.0', version: '>= 2.66') -dependency('gtk4', version: '>= 4.10.0') -dependency('libadwaita-1', version: '>= 1.3') +dependency('gtk4', version: '>= 4.12.0') +dependency('libadwaita-1', version: '>= 1.4') dependency('libpanel-1', version: '>= 1.2.0') dependency('gtksourceview-5', version: '>= 4.90') dependency('vte-2.91-gtk4', version: '>= 0.70.0') diff --git a/src/application.rs b/src/application.rs index 4f7d71564..da120e5c9 100644 --- a/src/application.rs +++ b/src/application.rs @@ -1,20 +1,19 @@ use std::cell::Cell; +use std::cell::OnceCell; -use adw::subclass::prelude::AdwApplicationImpl; +use adw::prelude::*; +use adw::subclass::prelude::*; use gettextrs::gettext; use glib::clone; +use glib::once_cell::sync::Lazy; use gtk::gdk; use gtk::gio; use gtk::glib; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use log::debug; use log::info; -use once_cell::sync::Lazy; -use once_cell::sync::OnceCell; use crate::config; -use crate::window::Window; +use crate::view; mod imp { use super::*; @@ -22,7 +21,7 @@ mod imp { #[derive(Default)] pub(crate) struct Application { pub(super) ticks: Cell, - pub(super) window: OnceCell>, + pub(super) window: OnceCell>, } #[glib::object_subclass] @@ -54,9 +53,9 @@ mod imp { glib::timeout_add_seconds_local( 10, - clone!(@weak obj => @default-return glib::Continue(false), move || { + clone!(@weak obj => @default-return glib::ControlFlow::Break, move || { obj.tick(); - glib::Continue(true) + glib::ControlFlow::Continue }), ); } @@ -75,7 +74,7 @@ mod imp { return; } - let window = Window::new(app); + let window = view::Window::new(app); self.window .set(window.downgrade()) .expect("Window already set."); @@ -127,13 +126,13 @@ impl Application { self.notify("ticks"); } - pub(super) fn main_window(&self) -> Window { + pub(super) fn main_window(&self) -> view::Window { let imp = self.imp(); match imp.window.get() { Some(window) => window.upgrade().unwrap(), None => { - let window = Window::new(self); + let window = view::Window::new(self); imp.window.set(window.downgrade()).unwrap(); window } @@ -207,11 +206,11 @@ impl Application { let controller = gtk::EventControllerKey::new(); controller.connect_key_pressed(clone!( - @weak dialog => @default-return glib::signal::Inhibit(true), move |_, key, _, modifier| { + @weak dialog => @default-return glib::Propagation::Stop, move |_, key, _, modifier| { if key == gdk::Key::w && modifier == gdk::ModifierType::CONTROL_MASK{ dialog.close(); } - glib::signal::Inhibit(false) + glib::Propagation::Proceed } )); dialog.add_controller(controller); diff --git a/src/config.rs.in b/src/config.rs.in index ba0611e0f..c5ac9a376 100644 --- a/src/config.rs.in +++ b/src/config.rs.in @@ -4,4 +4,5 @@ pub(crate) const LOCALEDIR: &str = @LOCALEDIR@; pub(crate) const PKGDATADIR: &str = @PKGDATADIR@; pub(crate) const PROFILE: &str = @PROFILE@; pub(crate) const RESOURCES_FILE: &str = concat!(@PKGDATADIR@, "/resources.gresource"); +pub(crate) const UI_RESOURCES_FILE: &str = concat!(@PKGDATADIR@, "/ui-resources.gresource"); pub(crate) const VERSION: &str = @VERSION@; diff --git a/src/main.rs b/src/main.rs index 33203c765..9a8731b8e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,46 +9,26 @@ mod model; mod utils; mod view; mod widget; -mod window; use std::path::PathBuf; use std::str::FromStr; +use std::sync::OnceLock; +use adw::prelude::*; use gettextrs::gettext; use gettextrs::LocaleCategory; +use glib::once_cell::sync::Lazy; use gtk::gio; use gtk::glib; -use gtk::prelude::ApplicationExt; -use once_cell::sync::Lazy; -use once_cell::sync::OnceCell; use self::application::Application; -use self::config::GETTEXT_PACKAGE; -use self::config::LOCALEDIR; -use self::config::RESOURCES_FILE; -pub(crate) static APPLICATION_OPTS: OnceCell = OnceCell::new(); +pub(crate) static APPLICATION_OPTS: OnceLock = OnceLock::new(); pub(crate) static RUNTIME: Lazy = Lazy::new(|| tokio::runtime::Runtime::new().unwrap()); -pub(crate) static KEYRING: OnceCell = OnceCell::new(); +pub(crate) static KEYRING: OnceLock = OnceLock::new(); fn main() { - glib::log_set_writer_func(glib::log_writer_journald); - - adw::init().expect("Failed to init GTK/libadwaita"); - panel::init(); - sourceview5::init(); - - // Prepare i18n - gettextrs::setlocale(LocaleCategory::LcAll, ""); - gettextrs::bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect("Unable to bind the text domain"); - gettextrs::textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain"); - - glib::set_application_name(&gettext("Pods")); - - let res = gio::Resource::load(RESOURCES_FILE).expect("Could not load gresource file"); - gio::resources_register(&res); - let app = setup_cli(Application::default()); // Command line handling @@ -59,6 +39,31 @@ fn main() { // ... and exit application. 1 } else { + glib::log_set_writer_func(glib::log_writer_journald); + + adw::init().expect("Failed to init GTK/libadwaita"); + panel::init(); + sourceview5::init(); + crate::init(); + + // Prepare i18n + gettextrs::setlocale(LocaleCategory::LcAll, ""); + gettextrs::bindtextdomain(config::GETTEXT_PACKAGE, config::LOCALEDIR) + .expect("Unable to bind the text domain"); + gettextrs::textdomain(config::GETTEXT_PACKAGE) + .expect("Unable to switch to the text domain"); + + glib::set_application_name(&gettext("Pods")); + + gio::resources_register( + &gio::Resource::load(config::RESOURCES_FILE) + .expect("Could not load gresource file"), + ); + gio::resources_register( + &gio::Resource::load(config::UI_RESOURCES_FILE) + .expect("Could not load UI gresource file"), + ); + let log_level_filter = match dict.lookup::("log-level").unwrap() { Some(level) => { log::LevelFilter::from_str(&level).expect("Error on parsing log-level") @@ -136,3 +141,80 @@ fn setup_cli(app: Application) -> Application { app } + +fn init() { + model::Connection::static_type(); + + view::ActionPage::static_type(); + view::ActionRow::static_type(); + view::ActionsButton::static_type(); + view::ActionsSidebar::static_type(); + view::ClientView::static_type(); + view::ConnectionChooserPage::static_type(); + view::ConnectionCustomInfoDialog::static_type(); + view::ConnectionRow::static_type(); + view::ConnectionSwitcher::static_type(); + view::ConnectionsSidebar::static_type(); + view::ContainerCommitPage::static_type(); + view::ContainerFilesGetPage::static_type(); + view::ContainerFilesPutPage::static_type(); + view::ContainerHealthCheckLogRow::static_type(); + view::ContainerHealthCheckPage::static_type(); + view::ContainerLogPage::static_type(); + view::ContainerMenuButton::static_type(); + view::ContainerPropertiesGroup::static_type(); + view::ContainerResources::static_type(); + view::ContainerTerminal::static_type(); + view::ContainerTerminalPage::static_type(); + view::ContainerVolumeRow::static_type(); + view::ContainersCountBar::static_type(); + view::ContainersGroup::static_type(); + view::ContainersPanel::static_type(); + view::ContainersPrunePage::static_type(); + view::ContainersRow::static_type(); + view::ImageBuildPage::static_type(); + view::ImageHistoryPage::static_type(); + view::ImageMenuButton::static_type(); + view::ImageSearchResponseRow::static_type(); + view::ImageSelectionComboRow::static_type(); + view::ImageSelectionPage::static_type(); + view::ImagesPanel::static_type(); + view::ImagesRow::static_type(); + view::InfoPanel::static_type(); + view::InfoRow::static_type(); + view::PodMenuButton::static_type(); + view::PodRow::static_type(); + view::PodSelectionPage::static_type(); + view::PodsPanel::static_type(); + view::PodsPrunePage::static_type(); + view::PodsRow::static_type(); + view::RepoTagAddDialog::static_type(); + view::RepoTagPushPage::static_type(); + view::RepoTagRow::static_type(); + view::RepoTagSimpleRow::static_type(); + view::ScalableTextViewPage::static_type(); + view::SearchPanel::static_type(); + view::SearchRow::static_type(); + view::VolumeRow::static_type(); + view::VolumesGroup::static_type(); + view::VolumesPanel::static_type(); + view::VolumesPrunePage::static_type(); + view::VolumesRow::static_type(); + view::WelcomePage::static_type(); + view::Window::static_type(); + + widget::CircularProgressBar::static_type(); + widget::CountBadge::static_type(); + widget::DateTimeRow::static_type(); + widget::EfficientSpinner::static_type(); + widget::MainMenuButton::static_type(); + widget::PropertyRow::static_type(); + widget::PropertyWidgetRow::static_type(); + widget::RandomNameEntryRow::static_type(); + widget::ScalableTextView::static_type(); + widget::SeparatorRow::static_type(); + widget::SourceViewSearchWidget::static_type(); + widget::Spinner::static_type(); + widget::TextSearchEntry::static_type(); + widget::ZoomControl::static_type(); +} diff --git a/src/meson.build b/src/meson.build index d99036d68..14c467579 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,13 @@ +# UI resources +ui_resources = gnome.compile_resources( + 'ui-resources', + 'resources.gresource.xml', + gresource_bundle: true, + source_dir: meson.current_build_dir(), + install: true, + install_dir: pkgdatadir, +) + global_conf = configuration_data() global_conf.set_quoted('APP_ID', application_id) global_conf.set_quoted('PKGDATADIR', pkgdatadir) diff --git a/src/model/abstract_container_list.rs b/src/model/abstract_container_list.rs index afb165ca6..2a8d25e22 100644 --- a/src/model/abstract_container_list.rs +++ b/src/model/abstract_container_list.rs @@ -1,11 +1,10 @@ -use gio::traits::ListModelExt; +use gio::prelude::*; use glib::clone; -use glib::prelude::*; +use glib::once_cell::sync::Lazy as SyncLazy; use glib::subclass::prelude::*; use glib::subclass::Signal; use gtk::gio; use gtk::glib; -use once_cell::sync::Lazy as SyncLazy; use crate::model; @@ -45,6 +44,9 @@ mod imp { glib::ParamSpecUInt::builder("dead").read_only().build(), glib::ParamSpecUInt::builder("exited").read_only().build(), glib::ParamSpecUInt::builder("paused").read_only().build(), + glib::ParamSpecUInt::builder("not-running") + .read_only() + .build(), glib::ParamSpecUInt::builder("removing").read_only().build(), glib::ParamSpecUInt::builder("running").read_only().build(), glib::ParamSpecUInt::builder("stopped").read_only().build(), @@ -89,6 +91,7 @@ impl AbstractContainerList { list.notify("dead"); list.notify("exited"); list.notify("paused"); + list.notify("not-running"); list.notify("removing"); list.notify("running"); list.notify("stopped"); @@ -97,6 +100,13 @@ impl AbstractContainerList { } pub(crate) trait AbstractContainerListExt: IsA { + fn not_running(&self) -> u32 { + self.property::("len") + - self.property::("running") + - self.property::("paused") + - self.property::("dead") + } + fn container_added(&self, container: &model::Container) { self.emit_by_name::<()>("container-added", &[container]); } diff --git a/src/model/action.rs b/src/model/action.rs index 58e6c4877..71f54d260 100644 --- a/src/model/action.rs +++ b/src/model/action.rs @@ -1,5 +1,6 @@ use std::borrow::Cow; use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; use std::ffi::OsStr; use std::mem; @@ -7,17 +8,15 @@ use std::path::PathBuf; use std::sync::Arc; use std::sync::Mutex; +use adw::prelude::*; use futures::stream; use futures::StreamExt; use gettextrs::gettext; -use gio::prelude::*; use gio::subclass::prelude::*; use glib::clone; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::traits::TextBufferExt; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use serde::Deserialize; use crate::model; @@ -65,17 +64,17 @@ mod imp { #[property(get, nullable)] pub(super) artifact: glib::WeakRef, #[property(get, set, construct_only)] - pub(super) num: UnsyncOnceCell, + pub(super) num: OnceCell, #[property(get, set, construct_only, builder(Type::default()))] - pub(super) action_type: UnsyncOnceCell, + pub(super) action_type: OnceCell, #[property(get, set, construct_only)] - pub(super) description: UnsyncOnceCell, + pub(super) description: OnceCell, #[property(get, builder(State::default()))] pub(super) state: Cell, #[property(get, set, construct_only)] - pub(super) start_timestamp: UnsyncOnceCell, + pub(super) start_timestamp: OnceCell, #[property(get)] - pub(super) end_timestamp: UnsyncOnceCell, + pub(super) end_timestamp: OnceCell, #[property(get)] pub(super) output: gtk::TextBuffer, } @@ -216,35 +215,33 @@ impl Action { image, move |image| stream::Abortable::new(image.push(&opts), abort_registration).boxed(), clone!( - @weak obj => @default-return glib::Continue(false), + @weak obj => @default-return glib::ControlFlow::Break, move |result: podman::Result| { - glib::Continue( - match result.map_err(anyhow::Error::from).and_then(|line| { - serde_json::from_str::(&line).map_err(anyhow::Error::from) - }) { - Ok(report) => match report.stream { - Some(line) => { + match result.map_err(anyhow::Error::from).and_then(|line| { + serde_json::from_str::(&line).map_err(anyhow::Error::from) + }) { + Ok(report) => match report.stream { + Some(line) => { + obj.insert(&line); + glib::ControlFlow::Continue + } + None => { + if let Some(line) = report.error { + log::error!("Error on pushing image: {line}"); obj.insert(&line); - true } - None => { - if let Some(line) = report.error { - log::error!("Error on pushing image: {line}"); - obj.insert(&line); - } - obj.set_state(State::Failed); - false - } - }, - Err(e) => { - log::error!("Error on pushing image: {e}"); - obj.insert_line(&e.to_string()); obj.set_state(State::Failed); - false + glib::ControlFlow::Break } }, - ) + Err(e) => { + log::error!("Error on pushing image: {e}"); + obj.insert_line(&e.to_string()); + obj.set_state(State::Failed); + glib::ControlFlow::Break + } + } }), clone!(@weak obj => move || { if obj.state() != State::Failed { @@ -281,21 +278,21 @@ impl Action { } }, clone!( - @weak obj, @weak client => @default-return glib::Continue(false), + @weak obj, @weak client => @default-return glib::ControlFlow::Break, move |result: podman::Result| { - glib::Continue(match result { + match result { Ok(stream) => { obj.insert(&stream.stream); - true + glib::ControlFlow::Continue } Err(e) => { log::error!("Error on building image: {e}"); obj.insert_line(&e.to_string()); obj.set_state(State::Failed); - false + glib::ControlFlow::Break }, - }) + } }), clone!(@weak obj, @weak client => move || { let output = obj.output(); @@ -585,21 +582,21 @@ impl Action { clone!( @weak obj, @strong buf - => @default-return glib::Continue(false), move |result: podman::Result>| + => @default-return glib::ControlFlow::Break, move |result: podman::Result>| { - glib::Continue(match result { + match result { Ok(chunk) => { let mut buf = buf.lock().unwrap(); buf.extend(chunk); obj.replace_last_line(&gettext!("Size: {}", glib::format_size(buf.len() as u64))); - true + glib::ControlFlow::Continue } Err(e) => { obj.insert_line(&e.to_string()); obj.set_state(State::Failed); - false + glib::ControlFlow::Break } - }) + } }), clone!(@weak obj => move || { let mut buf_ = Vec::::new(); @@ -696,25 +693,25 @@ impl Action { client.podman().images(), move |images| stream::Abortable::new(images.pull(&opts), abort_registration).boxed(), clone!( - @weak self as obj, @weak client => @default-return glib::Continue(false), + @weak self as obj, @weak client => @default-return glib::ControlFlow::Break, move |result: podman::Result| { - glib::Continue(match result { + match result { Ok(report) => match report.error { Some(error) => { log::error!("Error on downloading image: {error}"); obj.insert_line(&error); obj.set_state(State::Failed); - false + glib::ControlFlow::Break } None => match report.stream { Some(stream) => { obj.insert(&stream); - true + glib::ControlFlow::Continue } None => { op.clone()(obj, client, report); - false + glib::ControlFlow::Break } } } @@ -722,9 +719,9 @@ impl Action { log::error!("Error on downloading image: {e}"); obj.insert_line(&e.to_string()); obj.set_state(State::Failed); - false + glib::ControlFlow::Break }, - }) + } }), ); diff --git a/src/model/action_list.rs b/src/model/action_list.rs index a8fb04cd6..d02c4bdfb 100644 --- a/src/model/action_list.rs +++ b/src/model/action_list.rs @@ -1,5 +1,6 @@ use std::cell::Cell; use std::cell::RefCell; +use std::sync::OnceLock; use gio::prelude::*; use gio::subclass::prelude::*; @@ -8,7 +9,6 @@ use glib::Properties; use gtk::gio; use gtk::glib; use indexmap::IndexMap; -use once_cell::sync::OnceCell as SyncOnceCell; use crate::model; use crate::podman; @@ -34,7 +34,7 @@ mod imp { impl ObjectImpl for ActionList { fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() diff --git a/src/model/client.rs b/src/model/client.rs index 7fd21dbd9..0a975428a 100644 --- a/src/model/client.rs +++ b/src/model/client.rs @@ -1,15 +1,15 @@ +use std::cell::OnceCell; use std::rc::Rc; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use futures::StreamExt; -use glib::prelude::ObjectExt; +use gio::prelude::*; +use glib::clone; +use glib::subclass::prelude::*; use glib::Properties; +use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::prelude::ListModelExtManual; -use gtk::subclass::prelude::*; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::model::AbstractContainerListExt; @@ -37,23 +37,23 @@ mod imp { #[properties(wrapper_type = super::Client)] pub(crate) struct Client { #[property(get, set, construct_only)] - pub(super) connection: UnsyncOnceCell, + pub(super) connection: OnceCell, #[property(get, set, construct_only)] - pub(super) podman: UnsyncOnceCell, + pub(super) podman: OnceCell, #[property(get = Self::version, nullable)] - pub(super) version: UnsyncOnceCell>, + pub(super) version: OnceCell>, #[property(get = Self::cpus, nullable)] - pub(super) cpus: UnsyncOnceCell, + pub(super) cpus: OnceCell, #[property(get = Self::image_list)] - pub(super) image_list: UnsyncOnceCell, + pub(super) image_list: OnceCell, #[property(get = Self::container_list)] - pub(super) container_list: UnsyncOnceCell, + pub(super) container_list: OnceCell, #[property(get = Self::pod_list)] - pub(super) pod_list: UnsyncOnceCell, + pub(super) pod_list: OnceCell, #[property(get = Self::volume_list)] - pub(super) volume_list: UnsyncOnceCell, + pub(super) volume_list: OnceCell, #[property(get = Self::action_list)] - pub(super) action_list: UnsyncOnceCell, + pub(super) action_list: OnceCell, } #[glib::object_subclass] @@ -366,10 +366,10 @@ impl Client { .boxed() }, clone!( - @weak self as obj => @default-return glib::Continue(false), + @weak self as obj => @default-return glib::ControlFlow::Break, move |result: podman::Result| { - glib::Continue(match result { + match result { Ok(event) => { log::debug!("Event: {event:?}"); match event.typ.as_str() { @@ -391,14 +391,14 @@ impl Client { }), other => log::warn!("Unhandled event type: {other}"), } - true + glib::ControlFlow::Continue } Err(e) => { log::error!("Stopping image event stream due to error: {e}"); finish_op.clone()(e); - false + glib::ControlFlow::Break } - }) + } }), ); } @@ -408,7 +408,7 @@ impl Client { fn start_refresh_interval(&self) { glib::timeout_add_seconds_local( SYNC_INTERVAL, - clone!(@weak self as obj => @default-return glib::Continue(false), move || { + clone!(@weak self as obj => @default-return glib::ControlFlow::Break, move || { log::debug!("Syncing images, containers and pods"); obj.image_list().refresh(|_| {}); @@ -417,7 +417,7 @@ impl Client { log::debug!("Sleeping for {SYNC_INTERVAL} until next sync"); - glib::Continue(true) + glib::ControlFlow::Continue }), ); } diff --git a/src/model/connection.rs b/src/model/connection.rs index 5b8dbd2cc..7db0c6a27 100644 --- a/src/model/connection.rs +++ b/src/model/connection.rs @@ -1,13 +1,12 @@ use std::cell::Cell; +use std::cell::OnceCell; +use std::sync::OnceLock; +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::Properties; use gtk::gdk; use gtk::glib; -use gtk::prelude::ObjectExt; -use gtk::prelude::ParamSpecBuilderExt; -use gtk::subclass::prelude::*; -use once_cell::sync::OnceCell as SyncOnceCell; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use serde::Deserialize; use serde::Serialize; @@ -34,11 +33,11 @@ mod imp { #[property(get, set)] pub(super) active: Cell, #[property(get, set, construct_only)] - pub(super) uuid: UnsyncOnceCell, + pub(super) uuid: OnceCell, #[property(get, set, construct_only)] - pub(super) name: UnsyncOnceCell, + pub(super) name: OnceCell, #[property(get, set, construct_only)] - pub(super) url: UnsyncOnceCell, + pub(super) url: OnceCell, #[property(get, set, construct_only, nullable)] pub(super) rgb: Cell>, } @@ -51,7 +50,7 @@ mod imp { impl ObjectImpl for Connection { fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() diff --git a/src/model/connection_manager.rs b/src/model/connection_manager.rs index 941b272f1..ac1919799 100644 --- a/src/model/connection_manager.rs +++ b/src/model/connection_manager.rs @@ -2,23 +2,18 @@ use std::cell::Cell; use std::cell::RefCell; use std::io::Read; use std::path::PathBuf; +use std::sync::OnceLock; use futures::future; use gettextrs::gettext; +use gio::prelude::*; +use gio::subclass::prelude::*; +use glib::clone; use glib::Properties; use gtk::gdk; use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::prelude::Cast; -use gtk::prelude::ListModelExt; -use gtk::prelude::ObjectExt; -use gtk::prelude::ParamSpecBuilderExt; -use gtk::prelude::SettingsExt; -use gtk::prelude::StaticType; -use gtk::subclass::prelude::*; use indexmap::IndexMap; -use once_cell::sync::OnceCell as SyncOnceCell; use tokio::io::AsyncWriteExt; use crate::model; @@ -49,7 +44,7 @@ mod imp { impl ObjectImpl for ConnectionManager { fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() diff --git a/src/model/container.rs b/src/model/container.rs index 672f5f349..a37d5a6a1 100644 --- a/src/model/container.rs +++ b/src/model/container.rs @@ -1,4 +1,5 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; use std::collections::HashSet; use std::fmt; @@ -7,14 +8,13 @@ use std::str::FromStr; use futures::Future; use gettextrs::gettext; +use glib::clone; +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::prelude::*; +use glib::subclass::prelude::*; +use glib::subclass::Signal; use glib::Properties; use gtk::glib; -use gtk::glib::clone; -use gtk::glib::subclass::Signal; -use gtk::prelude::ObjectExt; -use gtk::subclass::prelude::*; -use once_cell::sync::Lazy as SyncLazy; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::monad_boxed_type; @@ -139,23 +139,23 @@ mod imp { >, >, >, - pub(super) mounts: UnsyncOnceCell>, + pub(super) mounts: OnceCell>, #[property(get, set, construct_only, nullable)] pub(super) container_list: glib::WeakRef, #[property(get, set)] pub(super) action_ongoing: Cell, #[property(get, set, construct_only)] - pub(super) created: UnsyncOnceCell, + pub(super) created: OnceCell, #[property(get = Self::data, nullable)] - pub(super) data: UnsyncOnceCell>, + pub(super) data: OnceCell>, #[property(get, set, construct, builder(HealthStatus::default()))] pub(super) health_status: Cell, #[property(get, set, construct_only)] - pub(super) id: UnsyncOnceCell, + pub(super) id: OnceCell, #[property(get, set, nullable)] pub(super) image: glib::WeakRef, #[property(get, set, construct_only)] - pub(super) image_id: UnsyncOnceCell, + pub(super) image_id: OnceCell, #[property(get, set, construct, nullable)] pub(super) image_name: RefCell>, #[property(get, set, construct)] @@ -163,9 +163,9 @@ mod imp { #[property(get, set = Self::set_pod, explicit_notify, nullable)] pub(super) pod: glib::WeakRef, #[property(get = Self::pod_id, set, construct_only, nullable)] - pub(super) pod_id: UnsyncOnceCell>, + pub(super) pod_id: OnceCell>, #[property(get = Self::port, set, construct_only, nullable)] - pub(super) port: UnsyncOnceCell>, + pub(super) port: OnceCell>, #[property(get, set, nullable)] pub(super) stats: RefCell>, #[property(get, set = Self::set_status, construct, explicit_notify, builder(Status::default()))] @@ -173,7 +173,7 @@ mod imp { #[property(get, set, construct)] pub(super) up_since: Cell, #[property(get = Self::volume_list)] - pub(super) volume_list: UnsyncOnceCell, + pub(super) volume_list: OnceCell, #[property(get)] pub(super) to_be_deleted: Cell, #[property(get, set)] diff --git a/src/model/container_data.rs b/src/model/container_data.rs index 9d8af3969..5ad2a041d 100644 --- a/src/model/container_data.rs +++ b/src/model/container_data.rs @@ -1,11 +1,11 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::collections::HashMap; +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use gtk::prelude::ObjectExt; -use gtk::subclass::prelude::*; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::monad_boxed_type; @@ -23,15 +23,15 @@ mod imp { pub(crate) struct ContainerData { pub(super) health_check_log_list: model::HealthCheckLogList, #[property(get, set, construct_only)] - pub(super) health_config: UnsyncOnceCell>, + pub(super) health_config: OnceCell>, #[property(get, set, construct_only)] pub(super) health_failing_streak: Cell, #[property(get, set, construct_only)] - pub(super) mounts: UnsyncOnceCell, + pub(super) mounts: OnceCell, #[property(get, set, construct_only)] - pub(super) port_bindings: UnsyncOnceCell>, + pub(super) port_bindings: OnceCell>, #[property(get, set, construct_only)] - pub(super) size: UnsyncOnceCell, + pub(super) size: OnceCell, } #[glib::object_subclass] diff --git a/src/model/container_list.rs b/src/model/container_list.rs index 0bc648cc8..ccf73d670 100644 --- a/src/model/container_list.rs +++ b/src/model/container_list.rs @@ -1,18 +1,18 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; +use std::sync::OnceLock; use anyhow::anyhow; use futures::StreamExt; +use gio::prelude::*; +use gio::subclass::prelude::*; +use glib::clone; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use indexmap::map::Entry; use indexmap::map::IndexMap; -use once_cell::sync::OnceCell as SyncOnceCell; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::model::AbstractContainerListExt; @@ -32,7 +32,7 @@ mod imp { #[property(get)] pub(super) listing: Cell, #[property(get = Self::is_initialized, type = bool)] - pub(super) initialized: UnsyncOnceCell<()>, + pub(super) initialized: OnceCell<()>, #[property(get, set)] pub(super) selection_mode: Cell, } @@ -50,7 +50,7 @@ mod imp { impl ObjectImpl for ContainerList { fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() @@ -60,6 +60,9 @@ mod imp { glib::ParamSpecUInt::builder("created").read_only().build(), glib::ParamSpecUInt::builder("dead").read_only().build(), glib::ParamSpecUInt::builder("exited").read_only().build(), + glib::ParamSpecUInt::builder("not-running") + .read_only() + .build(), glib::ParamSpecUInt::builder("paused").read_only().build(), glib::ParamSpecUInt::builder("removing").read_only().build(), glib::ParamSpecUInt::builder("running").read_only().build(), @@ -84,6 +87,7 @@ mod imp { "created" => obj.created().to_value(), "dead" => obj.dead().to_value(), "exited" => obj.exited().to_value(), + "not-running" => obj.not_running().to_value(), "paused" => obj.paused().to_value(), "removing" => obj.removing().to_value(), "running" => obj.running().to_value(), @@ -113,7 +117,7 @@ mod imp { .boxed() }, clone!( - @weak obj => @default-return glib::Continue(false), + @weak obj => @default-return glib::ControlFlow::Break, move |result: podman::Result| { match result @@ -144,11 +148,9 @@ mod imp { Err(e) => log::warn!("Error occurred on receiving stats stream element: {e}"), } - glib::Continue(true) + glib::ControlFlow::Continue }), ); - - obj.client().unwrap().podman(); } } diff --git a/src/model/container_volume.rs b/src/model/container_volume.rs index d677e103b..248f47715 100644 --- a/src/model/container_volume.rs +++ b/src/model/container_volume.rs @@ -1,8 +1,9 @@ +use std::cell::OnceCell; + use glib::prelude::*; use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::monad_boxed_type; @@ -21,7 +22,7 @@ mod imp { #[property(get, set, construct_only)] pub(super) volume: glib::WeakRef, #[property(get, set, construct_only)] - pub(super) inner: UnsyncOnceCell, + pub(super) inner: OnceCell, } #[glib::object_subclass] diff --git a/src/model/device.rs b/src/model/device.rs index 27fbdebbe..8dc22727e 100644 --- a/src/model/device.rs +++ b/src/model/device.rs @@ -1,12 +1,12 @@ use std::cell::Cell; use std::cell::RefCell; +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::prelude::*; +use glib::subclass::prelude::*; +use glib::subclass::Signal; use glib::Properties; use gtk::glib; -use gtk::glib::subclass::Signal; -use gtk::prelude::ObjectExt; -use gtk::subclass::prelude::*; -use once_cell::sync::Lazy as SyncLazy; mod imp { use super::*; diff --git a/src/model/health_check_log.rs b/src/model/health_check_log.rs index 5a0b5173c..0d98d524d 100644 --- a/src/model/health_check_log.rs +++ b/src/model/health_check_log.rs @@ -1,9 +1,10 @@ +use std::cell::OnceCell; + +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::prelude::*; -use gtk::subclass::prelude::*; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::podman; @@ -15,13 +16,13 @@ mod imp { #[properties(wrapper_type = super::HealthCheckLog)] pub(crate) struct HealthCheckLog { #[property(get, set, construct_only)] - pub(super) end: UnsyncOnceCell, + pub(super) end: OnceCell, #[property(get, set, construct_only)] - pub(super) exit_code: UnsyncOnceCell, + pub(super) exit_code: OnceCell, #[property(get, set, construct_only)] - pub(super) output: UnsyncOnceCell, + pub(super) output: OnceCell, #[property(get, set, construct_only)] - pub(super) start: UnsyncOnceCell, + pub(super) start: OnceCell, } #[glib::object_subclass] diff --git a/src/model/health_check_log_list.rs b/src/model/health_check_log_list.rs index af291cb6d..885816d38 100644 --- a/src/model/health_check_log_list.rs +++ b/src/model/health_check_log_list.rs @@ -1,10 +1,10 @@ use std::cell::RefCell; use std::collections::VecDeque; +use gio::prelude::*; +use gio::subclass::prelude::*; use gtk::gio; use gtk::glib; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use crate::model; use crate::podman; diff --git a/src/model/image.rs b/src/model/image.rs index 2729d0523..b0eb52e3d 100644 --- a/src/model/image.rs +++ b/src/model/image.rs @@ -1,16 +1,16 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; use std::collections::HashSet; use std::ops::Deref; +use glib::clone; +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::prelude::*; +use glib::subclass::prelude::*; +use glib::subclass::Signal; use glib::Properties; -use gtk::glib::clone; -use gtk::glib::subclass::Signal; -use gtk::glib::{self}; -use gtk::prelude::ObjectExt; -use gtk::subclass::prelude::*; -use once_cell::sync::Lazy as SyncLazy; -use once_cell::unsync::OnceCell as UnsyncOnceCell; +use gtk::glib; use crate::model; use crate::podman; @@ -30,21 +30,21 @@ mod imp { #[property(get, set, construct_only, nullable)] pub(super) image_list: glib::WeakRef, #[property(get = Self::container_list)] - pub(super) container_list: UnsyncOnceCell, + pub(super) container_list: OnceCell, #[property(get)] pub(super) containers: Cell, #[property(get, set, construct_only)] - pub(super) created: UnsyncOnceCell, + pub(super) created: OnceCell, #[property(get)] pub(super) dangling: Cell, #[property(get = Self::data, nullable)] - pub(super) data: UnsyncOnceCell>, + pub(super) data: OnceCell>, #[property(get, set, construct_only)] - pub(super) id: UnsyncOnceCell, + pub(super) id: OnceCell, #[property(get = Self::repo_tags)] - pub(super) repo_tags: UnsyncOnceCell, + pub(super) repo_tags: OnceCell, #[property(get, set, construct_only)] - pub(super) size: UnsyncOnceCell, + pub(super) size: OnceCell, #[property(get)] pub(super) shared_size: Cell, #[property(get)] diff --git a/src/model/image_config.rs b/src/model/image_config.rs index 4ae33e544..e97f48787 100644 --- a/src/model/image_config.rs +++ b/src/model/image_config.rs @@ -1,8 +1,9 @@ -use glib::ObjectExt; +use std::cell::OnceCell; + +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use gtk::subclass::prelude::*; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::podman; use crate::utils; @@ -14,11 +15,11 @@ mod imp { #[properties(wrapper_type = super::ImageConfig)] pub(crate) struct ImageConfig { #[property(get, set, construct_only, nullable)] - pub(super) cmd: UnsyncOnceCell>, + pub(super) cmd: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) entrypoint: UnsyncOnceCell>, + pub(super) entrypoint: OnceCell>, #[property(get, set, construct_only)] - pub(super) exposed_ports: UnsyncOnceCell, + pub(super) exposed_ports: OnceCell, } #[glib::object_subclass] diff --git a/src/model/image_data.rs b/src/model/image_data.rs index b01a73d7c..1238ec122 100644 --- a/src/model/image_data.rs +++ b/src/model/image_data.rs @@ -1,8 +1,9 @@ -use glib::ObjectExt; +use std::cell::OnceCell; + +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use gtk::subclass::prelude::*; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::podman; @@ -14,13 +15,13 @@ mod imp { #[properties(wrapper_type = super::ImageData)] pub(crate) struct ImageData { #[property(get, set, construct_only, nullable)] - pub(super) architecture: UnsyncOnceCell>, + pub(super) architecture: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) author: UnsyncOnceCell>, + pub(super) author: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) comment: UnsyncOnceCell>, + pub(super) comment: OnceCell>, #[property(get, set, construct_only)] - pub(super) config: UnsyncOnceCell, + pub(super) config: OnceCell, } #[glib::object_subclass] diff --git a/src/model/image_list.rs b/src/model/image_list.rs index 585fc1bbc..dee2f5009 100644 --- a/src/model/image_list.rs +++ b/src/model/image_list.rs @@ -1,19 +1,19 @@ use std::borrow::Borrow; use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; +use std::sync::OnceLock; +use gio::prelude::*; +use gio::subclass::prelude::*; +use glib::clone; +use glib::once_cell::sync::Lazy; +use glib::subclass::Signal; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::glib::subclass::Signal; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use indexmap::map::Entry; use indexmap::IndexMap; -use once_cell::sync::Lazy; -use once_cell::sync::OnceCell as SyncOnceCell; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::model::SelectableListExt; @@ -32,7 +32,7 @@ mod imp { #[property(get)] pub(super) listing: Cell, #[property(get = Self::is_initialized, type = bool)] - pub(super) initialized: UnsyncOnceCell<()>, + pub(super) initialized: OnceCell<()>, #[property(get, set)] pub(super) selection_mode: Cell, } @@ -47,15 +47,20 @@ mod imp { impl ObjectImpl for ImageList { fn signals() -> &'static [Signal] { static SIGNALS: Lazy> = Lazy::new(|| { - vec![Signal::builder("image-added") - .param_types([model::Image::static_type()]) - .build()] + vec![ + Signal::builder("image-added") + .param_types([model::Image::static_type()]) + .build(), + Signal::builder("image-removed") + .param_types([model::Image::static_type()]) + .build(), + ] }); SIGNALS.as_ref() } fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() @@ -65,6 +70,7 @@ mod imp { glib::ParamSpecUInt::builder("intermediates") .read_only() .build(), + glib::ParamSpecUInt::builder("used").read_only().build(), glib::ParamSpecUInt::builder("num-selected") .read_only() .build(), @@ -81,6 +87,7 @@ mod imp { match pspec.name() { "len" => self.obj().len().to_value(), "intermediates" => self.obj().intermediates().to_value(), + "used" => self.obj().used().to_value(), "num-selected" => self.obj().num_selected().to_value(), _ => self.derived_property(id, pspec), } @@ -88,8 +95,13 @@ mod imp { fn constructed(&self) { self.parent_constructed(); let obj = &*self.obj(); + model::SelectableList::bootstrap(obj.upcast_ref()); + obj.connect_items_changed(|self_, _, _, _| self_.notify("len")); + + obj.connect_image_added(|list, _| list.notify_num_images()); + obj.connect_image_removed(|list, _| list.notify_num_images()); } } @@ -147,6 +159,11 @@ impl From<&model::Client> for ImageList { } impl ImageList { + pub(crate) fn notify_num_images(&self) { + self.notify("intermediates"); + self.notify("used"); + } + pub(crate) fn len(&self) -> u32 { self.n_items() } @@ -160,6 +177,10 @@ impl ImageList { .count() as u32 } + pub(crate) fn used(&self) -> u32 { + self.len() - self.intermediates() + } + pub(crate) fn total_size(&self) -> u64 { self.imp() .list @@ -189,6 +210,7 @@ impl ImageList { drop(list); self.items_changed(idx as u32, 1, 0); + self.image_removed(&image); image.emit_deleted(); } } @@ -269,7 +291,7 @@ impl ImageList { repo_tags.add(model::RepoTag::new(&repo_tags, tag)); if repo_tags_len == 0 { - self.notify("intermediates"); + self.notify_num_images(); } } } @@ -280,7 +302,7 @@ impl ImageList { repo_tags.remove(tag); if repo_tags.len() == 0 { - self.notify("intermediates"); + self.notify_num_images(); } } } @@ -302,9 +324,10 @@ impl ImageList { } fn image_added(&self, image: &model::Image) { + self.notify_num_images(); image.connect_notify_local( Some("repo-tags"), - clone!(@weak self as obj => move |_, _| obj.notify("intermediates")), + clone!(@weak self as obj => move |_, _| obj.notify_num_images()), ); self.emit_by_name::<()>("image-added", &[image]); } @@ -321,4 +344,21 @@ impl ImageList { None }) } + + fn image_removed(&self, image: &model::Image) { + self.emit_by_name::<()>("image-removed", &[image]); + } + + pub(crate) fn connect_image_removed( + &self, + f: F, + ) -> glib::SignalHandlerId { + self.connect_local("image-removed", true, move |values| { + let obj = values[0].get::().unwrap(); + let image = values[1].get::().unwrap(); + f(&obj, &image); + + None + }) + } } diff --git a/src/model/image_search_response.rs b/src/model/image_search_response.rs index c666d2393..29708f01a 100644 --- a/src/model/image_search_response.rs +++ b/src/model/image_search_response.rs @@ -1,8 +1,9 @@ -use glib::ObjectExt; +use std::cell::OnceCell; + +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use gtk::subclass::prelude::*; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::podman; @@ -13,19 +14,19 @@ mod imp { #[properties(wrapper_type = super::ImageSearchResponse)] pub(crate) struct ImageSearchResponse { #[property(get, set, construct_only, nullable)] - pub(super) automated: UnsyncOnceCell>, + pub(super) automated: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) description: UnsyncOnceCell>, + pub(super) description: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) index: UnsyncOnceCell>, + pub(super) index: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) name: UnsyncOnceCell>, + pub(super) name: OnceCell>, #[property(get, set, construct_only, nullable)] - pub(super) official: UnsyncOnceCell>, + pub(super) official: OnceCell>, #[property(get, set, construct_only)] - pub(super) stars: UnsyncOnceCell, + pub(super) stars: OnceCell, #[property(get, set, construct_only, nullable)] - pub(super) tag: UnsyncOnceCell>, + pub(super) tag: OnceCell>, } #[glib::object_subclass] diff --git a/src/model/key_val.rs b/src/model/key_val.rs index 640a8f682..ac7fa187e 100644 --- a/src/model/key_val.rs +++ b/src/model/key_val.rs @@ -1,11 +1,11 @@ use std::cell::RefCell; -use glib::prelude::ObjectExt; +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::prelude::*; use glib::subclass::prelude::*; use glib::subclass::Signal; use glib::Properties; use gtk::glib; -use once_cell::sync::Lazy as SyncLazy; mod imp { use super::*; diff --git a/src/model/mod.rs b/src/model/mod.rs index 6e11fcdbb..111072e17 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -33,6 +33,13 @@ mod value; mod volume; mod volume_list; +#[allow(unused_imports)] +pub(crate) mod prelude { + pub(crate) use super::AbstractContainerListExt; + pub(crate) use super::SelectableExt; + pub(crate) use super::SelectableListExt; +} + pub(crate) use self::abstract_container_list::AbstractContainerList; pub(crate) use self::abstract_container_list::AbstractContainerListExt; pub(crate) use self::action::Action; diff --git a/src/model/mount.rs b/src/model/mount.rs index f5a7db1cf..b75cfbc63 100644 --- a/src/model/mount.rs +++ b/src/model/mount.rs @@ -2,12 +2,12 @@ use std::cell::Cell; use std::cell::RefCell; use std::fmt; +use glib::once_cell::sync::Lazy as SyncLazy; use glib::prelude::*; use glib::subclass::prelude::*; use glib::subclass::Signal; use glib::Properties; use gtk::glib; -use once_cell::sync::Lazy as SyncLazy; use crate::model; diff --git a/src/model/pod.rs b/src/model/pod.rs index b36977438..8d2e0e8eb 100644 --- a/src/model/pod.rs +++ b/src/model/pod.rs @@ -1,20 +1,20 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; use std::fmt; use std::ops::Deref; use std::str::FromStr; +use futures::prelude::*; use futures::Future; -use futures::TryFutureExt; use gettextrs::gettext; use glib::clone; +use glib::once_cell::sync::Lazy; +use glib::prelude::*; +use glib::subclass::prelude::*; use glib::subclass::Signal; -use glib::ObjectExt; use glib::Properties; use gtk::glib; -use gtk::subclass::prelude::*; -use once_cell::sync::Lazy; -use once_cell::unsync::OnceCell; use crate::model; use crate::podman; diff --git a/src/model/pod_data.rs b/src/model/pod_data.rs index d7dba267f..d9f54c5ee 100644 --- a/src/model/pod_data.rs +++ b/src/model/pod_data.rs @@ -1,8 +1,9 @@ +use std::cell::OnceCell; + +use glib::prelude::*; use glib::subclass::prelude::*; -use glib::ObjectExt; use glib::Properties; use gtk::glib; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::podman; @@ -13,7 +14,7 @@ mod imp { #[properties(wrapper_type = super::PodData)] pub(crate) struct PodData { #[property(get, set, construct_only)] - pub(super) hostname: UnsyncOnceCell, + pub(super) hostname: OnceCell, } #[glib::object_subclass] diff --git a/src/model/pod_list.rs b/src/model/pod_list.rs index ade11aec4..22ce49c09 100644 --- a/src/model/pod_list.rs +++ b/src/model/pod_list.rs @@ -1,19 +1,18 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; +use std::sync::OnceLock; +use gio::prelude::*; +use gio::subclass::prelude::*; +use glib::clone; +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::subclass::Signal; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::glib::subclass::Signal; -use gtk::prelude::ParamSpecBuilderExt; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use indexmap::map::Entry; use indexmap::map::IndexMap; -use once_cell::sync::Lazy as SyncLazy; -use once_cell::sync::OnceCell as SyncOnceCell; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::model::SelectableListExt; @@ -32,7 +31,7 @@ mod imp { #[property(get)] pub(super) listing: Cell, #[property(get = Self::is_initialized, type = bool)] - pub(super) initialized: UnsyncOnceCell<()>, + pub(super) initialized: OnceCell<()>, #[property(get, set)] pub(super) selection_mode: Cell, } @@ -55,13 +54,18 @@ mod imp { } fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() .cloned() .chain(vec![ glib::ParamSpecUInt::builder("len").read_only().build(), + glib::ParamSpecUInt::builder("degraded").read_only().build(), + glib::ParamSpecUInt::builder("not-running") + .read_only() + .build(), + glib::ParamSpecUInt::builder("paused").read_only().build(), glib::ParamSpecUInt::builder("running").read_only().build(), glib::ParamSpecUInt::builder("num-selected") .read_only() @@ -78,6 +82,9 @@ mod imp { fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value { match pspec.name() { "len" => self.obj().len().to_value(), + "degraded" => self.obj().degraded().to_value(), + "not-running" => self.obj().not_running().to_value(), + "paused" => self.obj().paused().to_value(), "running" => self.obj().running().to_value(), "num-selected" => self.obj().num_selected().to_value(), _ => self.derived_property(id, pspec), @@ -145,16 +152,39 @@ impl From<&model::Client> for PodList { } impl PodList { + fn notify_num_pods(&self) { + self.notify("degraded"); + self.notify("not-running"); + self.notify("paused"); + self.notify("running"); + } + pub(crate) fn len(&self) -> u32 { self.n_items() } + pub(crate) fn degraded(&self) -> u32 { + self.num_pods_of_status(model::PodStatus::Degraded) + } + + pub(crate) fn not_running(&self) -> u32 { + self.len() - self.running() - self.paused() - self.degraded() + } + + pub(crate) fn paused(&self) -> u32 { + self.num_pods_of_status(model::PodStatus::Paused) + } + pub(crate) fn running(&self) -> u32 { + self.num_pods_of_status(model::PodStatus::Running) + } + + pub(crate) fn num_pods_of_status(&self, status: model::PodStatus) -> u32 { self.imp() .list .borrow() .values() - .filter(|pod| pod.status() == model::PodStatus::Running) + .filter(|pod| pod.status() == status) .count() as u32 } @@ -168,6 +198,7 @@ impl PodList { drop(list); self.items_changed(idx as u32, 1, 0); + self.notify_num_pods(); pod.emit_deleted(); } } @@ -266,9 +297,10 @@ impl PodList { } fn pod_added(&self, pod: &model::Pod) { + self.notify_num_pods(); pod.connect_notify_local( Some("status"), - clone!(@weak self as obj => move |_, _| obj.notify("running")), + clone!(@weak self as obj => move |_, _| obj.notify_num_pods()), ); self.emit_by_name::<()>("pod-added", &[pod]); } diff --git a/src/model/port_mapping.rs b/src/model/port_mapping.rs index 221021442..4105c99df 100644 --- a/src/model/port_mapping.rs +++ b/src/model/port_mapping.rs @@ -2,12 +2,12 @@ use std::cell::Cell; use std::cell::RefCell; use std::fmt; +use glib::once_cell::sync::Lazy as SyncLazy; use glib::prelude::*; use glib::subclass::prelude::*; use glib::subclass::Signal; use glib::Properties; use gtk::glib; -use once_cell::sync::Lazy as SyncLazy; #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, glib::Enum)] #[enum_type(name = "PortMappingProtocol")] diff --git a/src/model/registry.rs b/src/model/registry.rs index f8ac29328..413ab3e74 100644 --- a/src/model/registry.rs +++ b/src/model/registry.rs @@ -1,8 +1,9 @@ +use std::cell::OnceCell; + use glib::prelude::*; use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use once_cell::unsync::OnceCell as UnsyncOnceCell; mod imp { use super::*; @@ -11,7 +12,7 @@ mod imp { #[properties(wrapper_type = super::Registry)] pub(crate) struct Registry { #[property(get, set, construct_only)] - pub(super) name: UnsyncOnceCell, + pub(super) name: OnceCell, } #[glib::object_subclass] diff --git a/src/model/repo_tag.rs b/src/model/repo_tag.rs index a286c993b..a41227dfa 100644 --- a/src/model/repo_tag.rs +++ b/src/model/repo_tag.rs @@ -1,10 +1,10 @@ use std::cell::Cell; +use std::cell::OnceCell; use glib::prelude::*; use glib::subclass::prelude::*; use glib::Properties; use gtk::glib; -use once_cell::unsync::OnceCell; use crate::model; diff --git a/src/model/repo_tag_list.rs b/src/model/repo_tag_list.rs index 9b58d705e..10c8f327a 100644 --- a/src/model/repo_tag_list.rs +++ b/src/model/repo_tag_list.rs @@ -1,5 +1,6 @@ use std::cell::RefCell; use std::collections::HashSet; +use std::sync::OnceLock; use gio::prelude::*; use gio::subclass::prelude::*; @@ -7,7 +8,6 @@ use glib::Properties; use gtk::gio; use gtk::glib; use indexmap::map::IndexMap; -use once_cell::sync::OnceCell as SyncOnceCell; use crate::model; @@ -31,7 +31,7 @@ mod imp { impl ObjectImpl for RepoTagList { fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() diff --git a/src/model/selectable.rs b/src/model/selectable.rs index 8d7155a55..35878fb6b 100644 --- a/src/model/selectable.rs +++ b/src/model/selectable.rs @@ -1,7 +1,7 @@ +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::prelude::*; +use glib::subclass::prelude::*; use gtk::glib; -use gtk::prelude::*; -use gtk::subclass::prelude::*; -use once_cell::sync::Lazy as SyncLazy; mod imp { use super::*; diff --git a/src/model/selectable_list.rs b/src/model/selectable_list.rs index 200d85967..4eba63840 100644 --- a/src/model/selectable_list.rs +++ b/src/model/selectable_list.rs @@ -1,12 +1,12 @@ +use gio::prelude::*; +use gio::subclass::prelude::*; +use glib::clone; +use glib::once_cell::sync::Lazy as SyncLazy; use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::prelude::*; -use gtk::subclass::prelude::*; -use once_cell::sync::Lazy as SyncLazy; use crate::model; -use crate::model::SelectableExt; +use crate::model::prelude::*; mod imp { use super::*; diff --git a/src/model/simple_container_list.rs b/src/model/simple_container_list.rs index 1111dd9b2..70618eeb1 100644 --- a/src/model/simple_container_list.rs +++ b/src/model/simple_container_list.rs @@ -3,13 +3,13 @@ use std::cell::RefCell; use gio::prelude::*; use gio::subclass::prelude::*; +use glib::once_cell::sync::Lazy as SyncLazy; use gtk::gio; use gtk::glib; use indexmap::map::IndexMap; -use once_cell::sync::Lazy as SyncLazy; -use super::AbstractContainerListExt; use crate::model; +use crate::model::prelude::*; mod imp { use super::*; @@ -34,6 +34,9 @@ mod imp { glib::ParamSpecUInt::builder("created").read_only().build(), glib::ParamSpecUInt::builder("dead").read_only().build(), glib::ParamSpecUInt::builder("exited").read_only().build(), + glib::ParamSpecUInt::builder("not-running") + .read_only() + .build(), glib::ParamSpecUInt::builder("paused").read_only().build(), glib::ParamSpecUInt::builder("removing").read_only().build(), glib::ParamSpecUInt::builder("running").read_only().build(), @@ -51,6 +54,7 @@ mod imp { "created" => obj.created().to_value(), "dead" => obj.dead().to_value(), "exited" => obj.exited().to_value(), + "not-running" => obj.not_running().to_value(), "paused" => obj.paused().to_value(), "removing" => obj.removing().to_value(), "running" => obj.running().to_value(), diff --git a/src/model/value.rs b/src/model/value.rs index 08d5a76cc..e4f59d917 100644 --- a/src/model/value.rs +++ b/src/model/value.rs @@ -1,12 +1,12 @@ use std::cell::RefCell; +use glib::once_cell::sync::Lazy as SyncLazy; // use gtk::glib::subclass::Signal; use glib::prelude::*; use glib::subclass::prelude::*; use glib::subclass::Signal; use glib::Properties; use gtk::glib; -use once_cell::sync::Lazy as SyncLazy; mod imp { use super::*; diff --git a/src/model/volume.rs b/src/model/volume.rs index 08e0b57b4..b68794800 100644 --- a/src/model/volume.rs +++ b/src/model/volume.rs @@ -1,16 +1,15 @@ use std::cell::Cell; +use std::cell::OnceCell; use std::ops::Deref; -use gio::prelude::ListModelExt; +use gio::prelude::*; use glib::clone; -use glib::prelude::*; +use glib::once_cell::sync::Lazy as SyncLazy; use glib::subclass::prelude::*; use glib::subclass::Signal; use glib::Properties; use gtk::gio; use gtk::glib; -use once_cell::sync::Lazy as SyncLazy; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; use crate::monad_boxed_type; @@ -28,13 +27,13 @@ mod imp { #[property(get, set, construct_only, nullable)] pub(super) volume_list: glib::WeakRef, #[property(get, set, construct_only)] - pub(super) inner: UnsyncOnceCell, + pub(super) inner: OnceCell, #[property(get, set)] pub(super) searching_containers: Cell, #[property(get, set)] pub(super) action_ongoing: Cell, #[property(get = Self::container_list)] - pub(super) container_list: UnsyncOnceCell, + pub(super) container_list: OnceCell, #[property(get)] pub(super) to_be_deleted: Cell, #[property(get, set)] @@ -72,7 +71,7 @@ mod imp { let obj = &*self.obj(); obj.container_list().connect_items_changed( clone!(@weak obj => move |_, _, _, _| if let Some(volume_list) = obj.volume_list() { - volume_list.notify("used"); + volume_list.notify_num_volumes(); }), ); } diff --git a/src/model/volume_list.rs b/src/model/volume_list.rs index 5e311f11b..b035c237c 100644 --- a/src/model/volume_list.rs +++ b/src/model/volume_list.rs @@ -1,22 +1,22 @@ use std::borrow::Borrow; use std::cell::Cell; +use std::cell::OnceCell; use std::cell::RefCell; +use std::sync::OnceLock; +use gio::prelude::*; +use gio::subclass::prelude::*; +use glib::clone; +use glib::once_cell::sync::Lazy as SyncLazy; +use glib::subclass::Signal; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::glib::clone; -use gtk::glib::subclass::Signal; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use indexmap::map::Entry; use indexmap::IndexMap; -use once_cell::sync::Lazy as SyncLazy; -use once_cell::sync::OnceCell as SyncOnceCell; -use once_cell::unsync::OnceCell as UnsyncOnceCell; use crate::model; -use crate::model::SelectableListExt; +use crate::model::prelude::*; use crate::podman; use crate::utils; @@ -34,7 +34,7 @@ mod imp { #[property(get)] pub(super) listing: Cell, #[property(get = Self::is_initialized, type = bool)] - pub(super) initialized: UnsyncOnceCell<()>, + pub(super) initialized: OnceCell<()>, #[property(get, set)] pub(super) selection_mode: Cell, } @@ -49,20 +49,26 @@ mod imp { impl ObjectImpl for VolumeList { fn signals() -> &'static [Signal] { static SIGNALS: SyncLazy> = SyncLazy::new(|| { - vec![Signal::builder("volume-added") - .param_types([model::Volume::static_type()]) - .build()] + vec![ + Signal::builder("volume-added") + .param_types([model::Volume::static_type()]) + .build(), + Signal::builder("volume-removed") + .param_types([model::Volume::static_type()]) + .build(), + ] }); SIGNALS.as_ref() } fn properties() -> &'static [glib::ParamSpec] { - static PROPERTIES: SyncOnceCell> = SyncOnceCell::new(); + static PROPERTIES: OnceLock> = OnceLock::new(); PROPERTIES.get_or_init(|| { Self::derived_properties() .iter() .cloned() .chain(vec![ glib::ParamSpecUInt::builder("len").read_only().build(), + glib::ParamSpecUInt::builder("unused").read_only().build(), glib::ParamSpecUInt::builder("used").read_only().build(), glib::ParamSpecUInt::builder("num-selected") .read_only() @@ -79,6 +85,7 @@ mod imp { fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value { match pspec.name() { "len" => self.obj().len().to_value(), + "unused" => self.obj().unused().to_value(), "used" => self.obj().used().to_value(), "num-selected" => self.obj().num_selected().to_value(), _ => self.derived_property(id, pspec), @@ -87,8 +94,13 @@ mod imp { fn constructed(&self) { self.parent_constructed(); let obj = &*self.obj(); + model::SelectableList::bootstrap(obj.upcast_ref()); + obj.connect_items_changed(|self_, _, _, _| self_.notify("len")); + + obj.connect_volume_added(|list, _| list.notify_num_volumes()); + obj.connect_volume_removed(|list, _| list.notify_num_volumes()); } } @@ -146,10 +158,19 @@ impl From<&model::Client> for VolumeList { } impl VolumeList { + pub(crate) fn notify_num_volumes(&self) { + self.notify("unused"); + self.notify("used"); + } + pub(crate) fn len(&self) -> u32 { self.n_items() } + pub(crate) fn unused(&self) -> u32 { + self.len() - self.used() + } + pub(crate) fn used(&self) -> u32 { self.imp() .list @@ -166,9 +187,11 @@ impl VolumeList { pub(crate) fn remove_volume(&self, id: &str) { let mut list = self.imp().list.borrow_mut(); if let Some((idx, _, volume)) = list.shift_remove_full(id) { - volume.emit_deleted(); drop(list); + self.items_changed(idx as u32, 1, 0); + self.volume_removed(&volume); + volume.emit_deleted(); } } @@ -261,4 +284,21 @@ impl VolumeList { None }) } + + fn volume_removed(&self, volume: &model::Volume) { + self.emit_by_name::<()>("volume-removed", &[volume]); + } + + pub(crate) fn connect_volume_removed( + &self, + f: F, + ) -> glib::SignalHandlerId { + self.connect_local("volume-removed", true, move |values| { + let obj = values[0].get::().unwrap(); + let volume = values[1].get::().unwrap(); + f(&obj, &volume); + + None + }) + } } diff --git a/src/resources.gresource.xml b/src/resources.gresource.xml new file mode 100644 index 000000000..3bfb1cb4a --- /dev/null +++ b/src/resources.gresource.xml @@ -0,0 +1,101 @@ + + + + + view/action_page.ui + view/action_row.ui + view/actions_button.ui + view/actions_sidebar.ui + view/client_view.ui + view/connection_chooser_page.ui + view/connection_creation_page.ui + view/connection_custom_info_dialog.ui + view/connection_row.ui + view/connection_switcher.ui + view/connections_sidebar.ui + view/container_commit_page.ui + view/container_creation_page.ui + view/container_details_page.ui + view/container_files_get_page.ui + view/container_files_put_page.ui + view/container_health_check_log_row.ui + view/container_health_check_page.ui + view/container_log_page.ui + view/container_menu_button.ui + view/container_properties_group.ui + view/container_rename_dialog.ui + view/container_resources.ui + view/container_row.ui + view/container_terminal.ui + view/container_terminal_page.ui + view/container_volume_row.ui + view/containers_count_bar.ui + view/containers_group.ui + view/containers_panel.ui + view/containers_prune_page.ui + view/containers_row.ui + view/device_row.ui + view/image_build_page.ui + view/image_details_page.ui + view/image_history_page.ui + view/image_menu_button.ui + view/image_pull_page.ui + view/image_row.ui + view/image_search_page.ui + view/image_search_response_row.ui + view/image_search_widget.ui + view/image_selection_combo_row.ui + view/image_selection_page.ui + view/images_panel.ui + view/images_prune_page.ui + view/images_row.ui + view/info_panel.ui + view/info_row.ui + view/key_val_row.ui + view/mount_row.ui + view/pod_creation_page.ui + view/pod_details_page.ui + view/pod_menu_button.ui + view/pod_row.ui + view/pod_selection_page.ui + view/pods_panel.ui + view/pods_prune_page.ui + view/pods_row.ui + view/port_mapping_row.ui + view/repo_tag_add_dialog.ui + view/repo_tag_push_page.ui + view/repo_tag_row.ui + view/repo_tag_simple_row.ui + view/scalable_text_view_page.ui + view/search_panel.ui + view/search_row.ui + view/shortcuts.ui + view/top_page.ui + view/value_row.ui + view/volume_creation_page.ui + view/volume_details_page.ui + view/volume_row.ui + view/volume_selection_page.ui + view/volumes_group.ui + view/volumes_panel.ui + view/volumes_prune_page.ui + view/volumes_row.ui + view/welcome_page.ui + view/window.ui + + widget/circular_progress_bar.ui + widget/count_badge.ui + widget/date_time_row.ui + widget/efficient_spinner.ui + widget/main_menu_button.ui + widget/property_row.ui + widget/property_widget_row.ui + widget/random_name_entry_row.ui + widget/separator_row.ui + widget/source_view_search_widget.ui + widget/spinner.ui + widget/text_search_entry.ui + widget/zoom_control.ui + + + diff --git a/src/utils.rs b/src/utils.rs index 4b51bb426..6f0a664c9 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -3,6 +3,7 @@ use std::ops::Deref; use std::path::PathBuf; use std::rc::Rc; +use adw::prelude::*; use ashpd::desktop::file_chooser::OpenFileRequest; use ashpd::desktop::file_chooser::SaveFileRequest; use ashpd::desktop::file_chooser::SelectedFiles; @@ -11,25 +12,15 @@ use futures::Future; use futures::StreamExt; use gettextrs::gettext; use gettextrs::ngettext; +use glib::clone; use gtk::gdk; use gtk::gio; -use gtk::gio::traits::ActionMapExt; use gtk::glib; -use gtk::glib::clone; -use gtk::prelude::Cast; -use gtk::prelude::StaticType; -use gtk::traits::GtkWindowExt; -use gtk::traits::WidgetExt; -use once_cell::sync::Lazy as SyncLazy; use crate::config; -use crate::widget; use crate::APPLICATION_OPTS; use crate::RUNTIME; -pub(crate) static VOLUME_NAME_REGEX: SyncLazy = - SyncLazy::new(|| regex::Regex::new("^[0-9a-f]{64}$").unwrap()); - #[macro_export] macro_rules! monad_boxed_type { ($vis:vis $boxed:ident($type:ty) $(impls $($trait:tt),+)? $(is $($prop:tt),+)?) => { @@ -192,13 +183,13 @@ pub(crate) fn show_dialog(widget: >k::Widget, content: >k::Widget) { let controller = gtk::EventControllerKey::new(); controller.connect_key_pressed(clone!( - @weak dialog => @default-return glib::signal::Inhibit(true), move |_, key, _, modifier| { + @weak dialog => @default-return glib::Propagation::Stop, move |_, key, _, modifier| { if key == gdk::Key::Escape || (key == gdk::Key::w && modifier == gdk::ModifierType::CONTROL_MASK) { dialog.close(); } - glib::signal::Inhibit(false) + glib::Propagation::Proceed } )); dialog.add_controller(controller); @@ -224,43 +215,14 @@ pub(crate) fn show_error_toast(widget: >k::Widget, title: &str, msg: &str) { show_toast(widget, format!("{title}: {msg}")); } -pub(crate) fn find_leaflet_overlay(widget: >k::Widget) -> widget::LeafletOverlay { - leaflet_overlay( - &widget - .ancestor(adw::Leaflet::static_type()) - .unwrap() - .downcast::() - .unwrap(), - ) -} - -pub(crate) fn leaflet_overlay(leaflet: &adw::Leaflet) -> widget::LeafletOverlay { - leaflet - .child_by_name("overlay") - .unwrap() - .downcast::() - .unwrap() -} - -pub(crate) fn parent_leaflet_overlay(widget: >k::Widget) -> Option { +pub(crate) fn try_navigation_view(widget: >k::Widget) -> Option { widget - .ancestor(widget::LeafletOverlay::static_type()) - .and_then(|ancestor| ancestor.downcast::().ok()) + .ancestor(adw::NavigationView::static_type()) + .and_downcast::() } -pub(crate) fn topmost_leaflet_overlay(widget: >k::Widget) -> Option { - let mut topmost_leaflet_overlay = None; - let mut current_widget = widget.to_owned().upcast(); - - while let Some(leaflet_overlay) = parent_leaflet_overlay(¤t_widget) { - topmost_leaflet_overlay = Some(leaflet_overlay.clone()); - current_widget = match leaflet_overlay.parent() { - Some(parent) => parent, - None => break, - }; - } - - topmost_leaflet_overlay +pub(crate) fn navigation_view(widget: >k::Widget) -> adw::NavigationView { + try_navigation_view(widget).unwrap() } pub(crate) fn escape(text: &str) -> String { @@ -353,7 +315,7 @@ where .borrow_mut() .iter() .for_each(|fun| (*fun)(r.clone())); - glib::Continue(false) + glib::ControlFlow::Break } }); @@ -369,7 +331,7 @@ where A: Send + 'static, for<'r> P: FnOnce(&'r A) -> BoxStream<'r, I> + Send + 'static, I: Send + 'static, - F: FnMut(I) -> glib::Continue + 'static, + F: FnMut(I) -> glib::ControlFlow + 'static, { run_stream_with_finish_handler(api_entity, stream_producer, glib_closure, || {}); } @@ -383,7 +345,7 @@ pub(crate) fn run_stream_with_finish_handler( A: Send + 'static, for<'r> P: FnOnce(&'r A) -> BoxStream<'r, I> + Send + 'static, I: Send + 'static, - F: FnMut(I) -> glib::Continue + 'static, + F: FnMut(I) -> glib::ControlFlow + 'static, X: FnMut() + 'static, { let (tx_payload, rx_payload) = glib::MainContext::sync_channel::(Default::default(), 5); @@ -392,7 +354,7 @@ pub(crate) fn run_stream_with_finish_handler( rx_payload.attach(None, glib_closure); rx_finish.attach(None, move |_| { finish_handler(); - glib::Continue(false) + glib::ControlFlow::Break }); RUNTIME.spawn(async move { @@ -473,11 +435,14 @@ where } pub(crate) fn is_podman_id(name: &str) -> bool { - VOLUME_NAME_REGEX.is_match(name) + name.len() == 64 + && name + .chars() + .all(|c| c.to_ascii_lowercase().is_ascii_hexdigit()) } pub(crate) fn format_volume_name(name: &str) -> String { - if VOLUME_NAME_REGEX.is_match(name) { + if is_podman_id(name) { format_id(name) } else { name.to_owned() diff --git a/src/view/action_page.rs b/src/view/action_page.rs index 24c07a31d..5028c875e 100644 --- a/src/view/action_page.rs +++ b/src/view/action_page.rs @@ -1,10 +1,10 @@ +use adw::prelude::*; use adw::subclass::prelude::*; use gettextrs::gettext; use glib::clone; use glib::Properties; use gtk::gio; use gtk::glib; -use gtk::prelude::*; use gtk::CompositeTemplate; use crate::model; @@ -20,7 +20,7 @@ mod imp { #[derive(Debug, Default, Properties, CompositeTemplate)] #[properties(wrapper_type = super::ActionPage)] - #[template(file = "action_page.ui")] + #[template(resource = "/com/github/marhkb/Pods/ui/view/action_page.ui")] pub(crate) struct ActionPage { #[property(get, set, construct_only, nullable)] pub(super) action: glib::WeakRef, @@ -93,8 +93,8 @@ mod imp { obj.set_description(&action); glib::timeout_add_seconds_local( 1, - clone!(@weak obj, @weak action => @default-return glib::Continue(false), move || { - glib::Continue(obj.set_description(&action)) + clone!(@weak obj, @weak action => @default-return glib::ControlFlow::Break, move || { + obj.set_description(&action) }), ); } @@ -225,7 +225,7 @@ impl ActionPage { ); } - fn set_description(&self, action: &model::Action) -> bool { + fn set_description(&self, action: &model::Action) -> glib::ControlFlow { let state_label = &*self.imp().status_page; match action.state() { @@ -234,7 +234,7 @@ impl ActionPage { glib::DateTime::now_local().unwrap().to_unix() - action.start_timestamp(), ))); - true + glib::ControlFlow::Continue } _ => { state_label.set_description(Some(&gettext!( @@ -244,7 +244,7 @@ impl ActionPage { ) ))); - false + glib::ControlFlow::Break } } } @@ -275,8 +275,13 @@ impl ActionPage { .downcast::() .unwrap() .main_window() - .leaflet_overlay() - .show_details(&page); + .navigation_view() + .push( + &adw::NavigationPage::builder() + .title(gettext("Action")) + .child(&page) + .build(), + ); self.activate_action("action.cancel", None).unwrap(); } diff --git a/src/view/action_page.ui b/src/view/action_page.ui index b1954936f..c58cc6d16 100644 --- a/src/view/action_page.ui +++ b/src/view/action_page.ui @@ -10,153 +10,135 @@