chore: update cosmic-settings
also refactors the active device handling, which didn't seem quite correct before.
This commit is contained in:
parent
d4f62852f3
commit
cbf2a82fb7
2 changed files with 173 additions and 125 deletions
213
Cargo.lock
generated
213
Cargo.lock
generated
|
|
@ -273,9 +273,6 @@ dependencies = [
|
||||||
"serde_repr",
|
"serde_repr",
|
||||||
"tokio",
|
"tokio",
|
||||||
"url",
|
"url",
|
||||||
"wayland-backend",
|
|
||||||
"wayland-client",
|
|
||||||
"wayland-protocols",
|
|
||||||
"zbus 5.13.2",
|
"zbus 5.13.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1515,8 +1512,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-config"
|
name = "cosmic-config"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomicwrites",
|
"atomicwrites",
|
||||||
"cosmic-config-derive",
|
"cosmic-config-derive",
|
||||||
|
|
@ -1526,7 +1523,7 @@ dependencies = [
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
"known-folders",
|
"known-folders",
|
||||||
"notify",
|
"notify",
|
||||||
"ron",
|
"ron 0.12.0",
|
||||||
"serde",
|
"serde",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
|
@ -1536,8 +1533,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-config-derive"
|
name = "cosmic-config-derive"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.114",
|
"syn 2.0.114",
|
||||||
|
|
@ -1581,7 +1578,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-notifications-config"
|
name = "cosmic-notifications-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-notifications#23e39eca29cf7f7c59f8ec6b80e0f847e080c240"
|
source = "git+https://github.com/pop-os/cosmic-notifications#970b7672cae313c1934edd922e3271e8ae651f9b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -1590,7 +1587,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-notifications-util"
|
name = "cosmic-notifications-util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-notifications#23e39eca29cf7f7c59f8ec6b80e0f847e080c240"
|
source = "git+https://github.com/pop-os/cosmic-notifications#970b7672cae313c1934edd922e3271e8ae651f9b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fast_image_resize",
|
"fast_image_resize",
|
||||||
"libcosmic",
|
"libcosmic",
|
||||||
|
|
@ -1630,7 +1627,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-pipewire"
|
name = "cosmic-pipewire"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"intmap",
|
"intmap",
|
||||||
"libspa",
|
"libspa",
|
||||||
|
|
@ -1658,7 +1655,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-a11y-manager-subscription"
|
name = "cosmic-settings-a11y-manager-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-protocols",
|
"cosmic-protocols",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -1672,7 +1669,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-accessibility-subscription"
|
name = "cosmic-settings-accessibility-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-dbus-a11y",
|
"cosmic-dbus-a11y",
|
||||||
"futures",
|
"futures",
|
||||||
|
|
@ -1685,7 +1682,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-airplane-mode-subscription"
|
name = "cosmic-settings-airplane-mode-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -1700,7 +1697,7 @@ version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings-daemon#ef024bfd06bf9fbd57246a25c91d1fdd28153d05"
|
source = "git+https://github.com/pop-os/cosmic-settings-daemon#ef024bfd06bf9fbd57246a25c91d1fdd28153d05"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"ron",
|
"ron 0.11.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
|
@ -1718,7 +1715,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-daemon-subscription"
|
name = "cosmic-settings-daemon-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -1731,7 +1728,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-network-manager-subscription"
|
name = "cosmic-settings-network-manager-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"cosmic-dbus-networkmanager",
|
"cosmic-dbus-networkmanager",
|
||||||
|
|
@ -1750,7 +1747,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-sound-subscription"
|
name = "cosmic-settings-sound-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-pipewire",
|
"cosmic-pipewire",
|
||||||
"futures",
|
"futures",
|
||||||
|
|
@ -1765,7 +1762,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-upower-subscription"
|
name = "cosmic-settings-upower-subscription"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings#6b4a3d565cd58ee69d777c19255f8276520d4f55"
|
source = "git+https://github.com/pop-os/cosmic-settings#f48bcde63bb54134e21246ca0edb5bbefc453c3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -1778,8 +1775,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-text"
|
name = "cosmic-text"
|
||||||
version = "0.16.0"
|
version = "0.17.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-text.git#ee702e50901d90cd842dbd88154687bd2512b52c"
|
source = "git+https://github.com/pop-os/cosmic-text.git#bdd6657fd7268dc8882214f540a6150eb78cfae0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"fontdb 0.23.0",
|
"fontdb 0.23.0",
|
||||||
|
|
@ -1787,10 +1784,10 @@ dependencies = [
|
||||||
"linebender_resource_handle",
|
"linebender_resource_handle",
|
||||||
"log",
|
"log",
|
||||||
"rangemap",
|
"rangemap",
|
||||||
"rustc-hash 1.1.0",
|
"rustc-hash 2.1.1",
|
||||||
"self_cell",
|
"self_cell",
|
||||||
"skrifa 0.39.0",
|
"skrifa 0.36.0",
|
||||||
"smol_str",
|
"smol_str 0.3.5",
|
||||||
"swash",
|
"swash",
|
||||||
"sys-locale",
|
"sys-locale",
|
||||||
"unicode-bidi",
|
"unicode-bidi",
|
||||||
|
|
@ -1801,15 +1798,15 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-theme"
|
name = "cosmic-theme"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"almost",
|
"almost",
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"csscolorparser",
|
"csscolorparser",
|
||||||
"dirs",
|
"dirs",
|
||||||
"palette",
|
"palette",
|
||||||
"ron",
|
"ron 0.12.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror 2.0.18",
|
"thiserror 2.0.18",
|
||||||
|
|
@ -1872,12 +1869,14 @@ checksum = "42aaeae719fd78ce501d77c6cdf01f7e96f26bcd5617a4903a1c2b97e388543a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "csscolorparser"
|
name = "csscolorparser"
|
||||||
version = "0.7.2"
|
version = "0.8.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5fda6aace1fbef3aa217b27f4c8d7d071ef2a70a5ca51050b1f17d40299d3f16"
|
checksum = "02ee6eae4d99456f92dc379ba21cf08f783ef5525f193c3854b4e921ece045c5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"phf 0.11.3",
|
"num-traits",
|
||||||
|
"phf 0.13.1",
|
||||||
"serde",
|
"serde",
|
||||||
|
"uncased",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2552,6 +2551,15 @@ version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "font-types"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "02a596f5713680923a2080d86de50fe472fb290693cf0f701187a1c8b36996b7"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "font-types"
|
name = "font-types"
|
||||||
version = "0.10.1"
|
version = "0.10.1"
|
||||||
|
|
@ -2974,14 +2982,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "harfrust"
|
name = "harfrust"
|
||||||
version = "0.4.1"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e0caaee032384c10dd597af4579c67dee16650d862a9ccbe1233ff1a379abc07"
|
checksum = "75a4c970f1a00edc1626f1e3cc039492b15b73df28b9fff70f95404a571b4fae"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"core_maths",
|
"core_maths",
|
||||||
"read-fonts 0.36.0",
|
"read-fonts 0.34.0",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -3144,9 +3152,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iana-time-zone"
|
name = "iana-time-zone"
|
||||||
version = "0.1.64"
|
version = "0.1.65"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
|
checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android_system_properties",
|
"android_system_properties",
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
|
|
@ -3169,7 +3177,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced"
|
name = "iced"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -3187,7 +3195,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_accessibility"
|
name = "iced_accessibility"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"accesskit",
|
"accesskit",
|
||||||
"accesskit_winit",
|
"accesskit_winit",
|
||||||
|
|
@ -3196,7 +3204,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_core"
|
name = "iced_core"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -3211,7 +3219,7 @@ dependencies = [
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"serde",
|
"serde",
|
||||||
"smol_str",
|
"smol_str 0.2.2",
|
||||||
"thiserror 1.0.69",
|
"thiserror 1.0.69",
|
||||||
"web-time",
|
"web-time",
|
||||||
"window_clipboard",
|
"window_clipboard",
|
||||||
|
|
@ -3220,7 +3228,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_futures"
|
name = "iced_futures"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
|
|
@ -3246,7 +3254,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_graphics"
|
name = "iced_graphics"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
|
@ -3268,7 +3276,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_renderer"
|
name = "iced_renderer"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_tiny_skia",
|
"iced_tiny_skia",
|
||||||
|
|
@ -3280,7 +3288,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_runtime"
|
name = "iced_runtime"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
|
|
@ -3295,7 +3303,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_tiny_skia"
|
name = "iced_tiny_skia"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cosmic-text",
|
"cosmic-text",
|
||||||
|
|
@ -3311,7 +3319,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_wgpu"
|
name = "iced_wgpu"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
|
|
@ -3342,7 +3350,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_widget"
|
name = "iced_widget"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
|
|
@ -3361,7 +3369,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_winit"
|
name = "iced_winit"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
|
|
@ -4124,8 +4132,8 @@ checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libcosmic"
|
name = "libcosmic"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#927035809f1564674434c27cbecdc67e199db28e"
|
source = "git+https://github.com/pop-os/libcosmic#fdcba7d8ececc35c09a7871b018930f752ac784b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"ashpd 0.12.1",
|
"ashpd 0.12.1",
|
||||||
|
|
@ -4160,7 +4168,7 @@ dependencies = [
|
||||||
"phf 0.13.1",
|
"phf 0.13.1",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"rfd",
|
"rfd",
|
||||||
"ron",
|
"ron 0.12.0",
|
||||||
"rust-embed",
|
"rust-embed",
|
||||||
"rustix 1.1.3",
|
"rustix 1.1.3",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -5332,6 +5340,7 @@ dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.114",
|
"syn 2.0.114",
|
||||||
|
"uncased",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5359,6 +5368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"siphasher",
|
"siphasher",
|
||||||
|
"uncased",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5738,6 +5748,17 @@ version = "0.6.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
|
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "read-fonts"
|
||||||
|
version = "0.34.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8941f8e9d5f8ad3aebea330d01ac68c0167600eb31a86ecd86e97be4d13b51f5"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
"core_maths",
|
||||||
|
"font-types 0.9.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "read-fonts"
|
name = "read-fonts"
|
||||||
version = "0.35.0"
|
version = "0.35.0"
|
||||||
|
|
@ -5745,18 +5766,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358"
|
checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"font-types",
|
"font-types 0.10.1",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "read-fonts"
|
|
||||||
version = "0.36.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5eaa2941a4c05443ee3a7b26ab076a553c343ad5995230cc2b1d3e993bdc6345"
|
|
||||||
dependencies = [
|
|
||||||
"bytemuck",
|
|
||||||
"core_maths",
|
|
||||||
"font-types",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5870,9 +5880,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rfd"
|
name = "rfd"
|
||||||
version = "0.15.4"
|
version = "0.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed"
|
checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ashpd 0.11.1",
|
"ashpd 0.11.1",
|
||||||
"block2 0.6.2",
|
"block2 0.6.2",
|
||||||
|
|
@ -5889,7 +5899,7 @@ dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.60.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5914,6 +5924,20 @@ dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ron"
|
||||||
|
version = "0.12.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.10.0",
|
||||||
|
"once_cell",
|
||||||
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
|
"typeid",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "roxmltree"
|
name = "roxmltree"
|
||||||
version = "0.20.0"
|
version = "0.20.0"
|
||||||
|
|
@ -6292,9 +6316,19 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
|
checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "skrifa"
|
||||||
|
version = "0.36.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "37004372610e83ee2a4c69c7d896b41f33da6a3dc1a4fe07dd9b2629a549b1dc"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
"read-fonts 0.34.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "skrifa"
|
name = "skrifa"
|
||||||
|
|
@ -6306,16 +6340,6 @@ dependencies = [
|
||||||
"read-fonts 0.35.0",
|
"read-fonts 0.35.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "skrifa"
|
|
||||||
version = "0.39.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9c9eb0b904a04d09bd68c65d946617b8ff733009999050f3b851c32fb3cfb60e"
|
|
||||||
dependencies = [
|
|
||||||
"bytemuck",
|
|
||||||
"read-fonts 0.36.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slab"
|
name = "slab"
|
||||||
version = "0.4.11"
|
version = "0.4.11"
|
||||||
|
|
@ -6412,6 +6436,12 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "smol_str"
|
||||||
|
version = "0.3.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "socket2"
|
name = "socket2"
|
||||||
version = "0.4.10"
|
version = "0.4.10"
|
||||||
|
|
@ -7018,6 +7048,12 @@ dependencies = [
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "typeid"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.19.0"
|
version = "1.19.0"
|
||||||
|
|
@ -7047,6 +7083,15 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "uncased"
|
||||||
|
version = "0.9.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697"
|
||||||
|
dependencies = [
|
||||||
|
"version_check",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unic-langid"
|
name = "unic-langid"
|
||||||
version = "0.9.6"
|
version = "0.9.6"
|
||||||
|
|
@ -8144,7 +8189,7 @@ dependencies = [
|
||||||
"rustix 0.38.44",
|
"rustix 0.38.44",
|
||||||
"sctk-adwaita",
|
"sctk-adwaita",
|
||||||
"smithay-client-toolkit 0.19.2",
|
"smithay-client-toolkit 0.19.2",
|
||||||
"smol_str",
|
"smol_str 0.2.2",
|
||||||
"tracing",
|
"tracing",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
|
@ -8507,18 +8552,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy"
|
name = "zerocopy"
|
||||||
version = "0.8.34"
|
version = "0.8.36"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d"
|
checksum = "dafd85c832c1b68bbb4ec0c72c7f6f4fc5179627d2bc7c26b30e4c0cc11e76cc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zerocopy-derive",
|
"zerocopy-derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy-derive"
|
name = "zerocopy-derive"
|
||||||
version = "0.8.34"
|
version = "0.8.36"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d"
|
checksum = "7cb7e4e8436d9db52fbd6625dbf2f45243ab84994a72882ec8227b99e72b439a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -8600,9 +8645,9 @@ checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zune-jpeg"
|
name = "zune-jpeg"
|
||||||
version = "0.5.11"
|
version = "0.5.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2959ca473aae96a14ecedf501d20b3608d2825ba280d5adb57d651721885b0c2"
|
checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zune-core",
|
"zune-core",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,9 @@ struct CosmicNetworkApplet {
|
||||||
toggle_wifi_ctr: u128,
|
toggle_wifi_ctr: u128,
|
||||||
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
||||||
failed_known_ssids: FxHashSet<Arc<str>>,
|
failed_known_ssids: FxHashSet<Arc<str>>,
|
||||||
hw_device_to_show: Option<HwAddress>,
|
|
||||||
|
/// When defined, displays connections for the specific device.
|
||||||
|
active_device: Option<Arc<network_manager::devices::DeviceInfo>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wifi_icon(strength: u8) -> &'static str {
|
fn wifi_icon(strength: u8) -> &'static str {
|
||||||
|
|
@ -463,7 +465,6 @@ pub(crate) enum Message {
|
||||||
Token(TokenUpdate),
|
Token(TokenUpdate),
|
||||||
OpenSettings,
|
OpenSettings,
|
||||||
ResetFailedKnownSsid(String, HwAddress),
|
ResetFailedKnownSsid(String, HwAddress),
|
||||||
OpenHwDevice(Option<HwAddress>),
|
|
||||||
TogglePasswordVisibility,
|
TogglePasswordVisibility,
|
||||||
Surface(surface::Action),
|
Surface(surface::Action),
|
||||||
ActivateVpn(Arc<str>), // UUID of VPN to activate
|
ActivateVpn(Arc<str>), // UUID of VPN to activate
|
||||||
|
|
@ -502,6 +503,8 @@ pub(crate) enum Message {
|
||||||
ConnectVPNWithPassword,
|
ConnectVPNWithPassword,
|
||||||
VPNPasswordUpdate(SecureString),
|
VPNPasswordUpdate(SecureString),
|
||||||
CancelVPNConnection,
|
CancelVPNConnection,
|
||||||
|
/// Selects a device to display connections from
|
||||||
|
SelectDevice(Option<Arc<network_manager::devices::DeviceInfo>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
@ -849,9 +852,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
if let Err(err) =
|
if let Err(err) =
|
||||||
tx.unbounded_send(network_manager::Request::SelectAccessPoint(
|
tx.unbounded_send(network_manager::Request::SelectAccessPoint(
|
||||||
access_point.ssid.clone(),
|
access_point.ssid.clone(),
|
||||||
access_point.hw_address,
|
|
||||||
access_point.network_type,
|
access_point.network_type,
|
||||||
self.secret_tx.clone(),
|
self.secret_tx.clone(),
|
||||||
|
self.active_device.as_ref().map(|d| d.interface.clone()),
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
if err.is_disconnected() {
|
if err.is_disconnected() {
|
||||||
|
|
@ -871,9 +874,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
if let Err(err) =
|
if let Err(err) =
|
||||||
tx.unbounded_send(network_manager::Request::SelectAccessPoint(
|
tx.unbounded_send(network_manager::Request::SelectAccessPoint(
|
||||||
access_point.ssid.clone(),
|
access_point.ssid.clone(),
|
||||||
access_point.hw_address,
|
|
||||||
access_point.network_type,
|
access_point.network_type,
|
||||||
self.secret_tx.clone(),
|
self.secret_tx.clone(),
|
||||||
|
self.active_device.as_ref().map(|d| d.interface.clone()),
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
if err.is_disconnected() {
|
if err.is_disconnected() {
|
||||||
|
|
@ -944,7 +947,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
tokio::spawn(cosmic::process::spawn(cmd));
|
tokio::spawn(cosmic::process::spawn(cmd));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Message::OpenHwDevice(hw_address) => self.hw_device_to_show = hw_address,
|
Message::SelectDevice(device) => {
|
||||||
|
self.active_device = device;
|
||||||
|
}
|
||||||
Message::ResetFailedKnownSsid(ssid, hw_address) => {
|
Message::ResetFailedKnownSsid(ssid, hw_address) => {
|
||||||
let ap = if let Some(pos) = self
|
let ap = if let Some(pos) = self
|
||||||
.nm_state
|
.nm_state
|
||||||
|
|
@ -1034,9 +1039,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
};
|
};
|
||||||
if let Err(err) = tx.unbounded_send(network_manager::Request::SelectAccessPoint(
|
if let Err(err) = tx.unbounded_send(network_manager::Request::SelectAccessPoint(
|
||||||
ssid,
|
ssid,
|
||||||
hw_address,
|
|
||||||
network_type,
|
network_type,
|
||||||
self.secret_tx.clone(),
|
self.secret_tx.clone(),
|
||||||
|
self.active_device.as_ref().map(|d| d.interface.clone()),
|
||||||
)) {
|
)) {
|
||||||
if err.is_disconnected() {
|
if err.is_disconnected() {
|
||||||
return system_conn().map(cosmic::Action::App);
|
return system_conn().map(cosmic::Action::App);
|
||||||
|
|
@ -1064,8 +1069,8 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
ssid: access_point.ssid.to_string(),
|
ssid: access_point.ssid.to_string(),
|
||||||
identity: is_enterprise.then(|| identity.clone()),
|
identity: is_enterprise.then(|| identity.clone()),
|
||||||
password,
|
password,
|
||||||
hw_address: access_point.hw_address,
|
|
||||||
secret_tx: self.secret_tx.clone(),
|
secret_tx: self.secret_tx.clone(),
|
||||||
|
interface: self.active_device.as_ref().map(|d| d.interface.clone()),
|
||||||
}) {
|
}) {
|
||||||
if err.is_disconnected() {
|
if err.is_disconnected() {
|
||||||
return system_conn().map(cosmic::Action::App);
|
return system_conn().map(cosmic::Action::App);
|
||||||
|
|
@ -1158,7 +1163,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
let conn_match = self
|
let conn_match = self
|
||||||
.new_connection
|
.new_connection
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.is_some_and(|c| c.ssid() == ssid.as_ref() && c.hw_address() == *hw_address);
|
.is_some_and(|c| c.ssid() == ssid.as_ref() );
|
||||||
|
|
||||||
if conn_match && success {
|
if conn_match && success {
|
||||||
if let Some(ActiveConnectionInfo::WiFi { state, .. }) = state
|
if let Some(ActiveConnectionInfo::WiFi { state, .. }) = state
|
||||||
|
|
@ -1172,7 +1177,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
}
|
}
|
||||||
ActiveConnectionInfo::Vpn { .. } => HwAddress::default(),
|
ActiveConnectionInfo::Vpn { .. } => HwAddress::default(),
|
||||||
};
|
};
|
||||||
ap.name().as_str() == ssid.as_ref() && ap_hw_address == *hw_address})
|
ap.name().as_str() == ssid.as_ref()})
|
||||||
{
|
{
|
||||||
*state = ActiveConnectionState::Activated;
|
*state = ActiveConnectionState::Activated;
|
||||||
}
|
}
|
||||||
|
|
@ -1189,8 +1194,8 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
ssid,
|
ssid,
|
||||||
identity: _,
|
identity: _,
|
||||||
password: _,
|
password: _,
|
||||||
hw_address,
|
secret_tx,
|
||||||
secret_tx
|
interface
|
||||||
} = &req
|
} = &req
|
||||||
{
|
{
|
||||||
if let Some(NewConnectionState::Waiting(access_point)) =
|
if let Some(NewConnectionState::Waiting(access_point)) =
|
||||||
|
|
@ -1198,7 +1203,6 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
{
|
{
|
||||||
if !success
|
if !success
|
||||||
&& ssid.as_str() == access_point.ssid.as_ref()
|
&& ssid.as_str() == access_point.ssid.as_ref()
|
||||||
&& *hw_address == access_point.hw_address
|
|
||||||
{
|
{
|
||||||
self.new_connection =
|
self.new_connection =
|
||||||
Some(NewConnectionState::Failure(access_point.clone()));
|
Some(NewConnectionState::Failure(access_point.clone()));
|
||||||
|
|
@ -1209,7 +1213,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
access_point, ..
|
access_point, ..
|
||||||
}) = self.new_connection.as_ref()
|
}) = self.new_connection.as_ref()
|
||||||
{
|
{
|
||||||
if success && ssid.as_str() == access_point.ssid.as_ref() && *hw_address == access_point.hw_address {
|
if success && ssid.as_str() == access_point.ssid.as_ref() {
|
||||||
self.new_connection = None;
|
self.new_connection = None;
|
||||||
self.show_visible_networks = false;
|
self.show_visible_networks = false;
|
||||||
}
|
}
|
||||||
|
|
@ -1398,7 +1402,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
for conn in &self.nm_state.nm_state.active_conns {
|
for conn in &self.nm_state.nm_state.active_conns {
|
||||||
match conn {
|
match conn {
|
||||||
ActiveConnectionInfo::Vpn { name, ip_addresses } => {
|
ActiveConnectionInfo::Vpn { name, ip_addresses } => {
|
||||||
if self.hw_device_to_show.is_some() {
|
if self.active_device.as_ref().is_some_and(|d| {
|
||||||
|
d.active_connection.as_ref().is_none_or(|a| a.0.id != *name)
|
||||||
|
}) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
||||||
|
|
@ -1432,9 +1438,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
speed,
|
speed,
|
||||||
ip_addresses,
|
ip_addresses,
|
||||||
} => {
|
} => {
|
||||||
if self.hw_device_to_show.is_some()
|
if self.active_device.as_ref().is_some_and(|d| {
|
||||||
&& HwAddress::from_str(&hw_address) != self.hw_device_to_show
|
d.active_connection.as_ref().is_none_or(|a| a.0.id != *name)
|
||||||
{
|
}) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
||||||
|
|
@ -1494,9 +1500,9 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
strength,
|
strength,
|
||||||
hw_address,
|
hw_address,
|
||||||
} => {
|
} => {
|
||||||
if self.hw_device_to_show.is_some()
|
if self.active_device.as_ref().is_some_and(|d| {
|
||||||
&& HwAddress::from_str(&hw_address) != self.hw_device_to_show
|
d.active_connection.as_ref().is_none_or(|a| a.0.id != *name)
|
||||||
{
|
}) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let mut ipv4 = Vec::with_capacity(ip_addresses.len());
|
let mut ipv4 = Vec::with_capacity(ip_addresses.len());
|
||||||
|
|
@ -1561,7 +1567,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut content = if let Some(hw_device_to_show) = self.hw_device_to_show {
|
let mut content = if let Some(active_device) = self.active_device.as_ref() {
|
||||||
column![
|
column![
|
||||||
vpn_ethernet_col,
|
vpn_ethernet_col,
|
||||||
menu_button(row![
|
menu_button(row![
|
||||||
|
|
@ -1574,12 +1580,12 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
.align_y(Alignment::Center)
|
.align_y(Alignment::Center)
|
||||||
.width(Length::Fixed(24.0))
|
.width(Length::Fixed(24.0))
|
||||||
.height(Length::Fixed(24.0)),
|
.height(Length::Fixed(24.0)),
|
||||||
text::body(hw_device_to_show.to_string())
|
text::body(&active_device.interface)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fixed(24.0))
|
.height(Length::Fixed(24.0))
|
||||||
.align_y(Alignment::Center),
|
.align_y(Alignment::Center),
|
||||||
])
|
])
|
||||||
.on_press(Message::OpenHwDevice(None))
|
.on_press(Message::SelectDevice(None))
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
column![
|
column![
|
||||||
|
|
@ -1663,22 +1669,19 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
content = content
|
content = content
|
||||||
.push(padded_control(divider::horizontal::default()).padding([space_xxs, space_s]));
|
.push(padded_control(divider::horizontal::default()).padding([space_xxs, space_s]));
|
||||||
|
|
||||||
|
// TODO sorting?
|
||||||
let wireless_hw_devices = self
|
let wireless_hw_devices = self
|
||||||
.nm_state
|
.nm_state
|
||||||
.nm_state
|
.devices
|
||||||
.wireless_access_points
|
|
||||||
.iter()
|
.iter()
|
||||||
.map(|ap| ap.hw_address)
|
.filter(|d| matches!(d.device_type, network_manager::devices::DeviceType::Wifi))
|
||||||
.collect::<std::collections::BTreeSet<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
if wireless_hw_devices.len() > 1 && self.hw_device_to_show.is_none() {
|
if wireless_hw_devices.len() > 1 && self.active_device.is_none() {
|
||||||
for hw_device in wireless_hw_devices {
|
for interface in wireless_hw_devices {
|
||||||
let display_name = hw_device.to_string();
|
let display_name = interface.interface.to_string();
|
||||||
|
|
||||||
let is_connected = self.nm_state.nm_state.active_conns.iter().any(|conn| {
|
let is_connected = interface.active_connection.is_some();
|
||||||
let hw_address = active_conn_hw_address(conn);
|
|
||||||
hw_address == hw_device
|
|
||||||
});
|
|
||||||
let mut btn_content = vec![
|
let mut btn_content = vec![
|
||||||
column![
|
column![
|
||||||
text::body(display_name),
|
text::body(display_name),
|
||||||
|
|
@ -1707,7 +1710,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
.align_y(Alignment::Center)
|
.align_y(Alignment::Center)
|
||||||
.spacing(8),
|
.spacing(8),
|
||||||
)
|
)
|
||||||
.on_press(Message::OpenHwDevice(Some(hw_device))),
|
.on_press(Message::SelectDevice(Some(interface.clone()))),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1715,8 +1718,12 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
for known in &self.nm_state.nm_state.known_access_points {
|
for known in &self.nm_state.nm_state.known_access_points {
|
||||||
if let Some(filter_hw_address) = self.hw_device_to_show {
|
if let Some(active_device) = self.active_device.as_ref() {
|
||||||
if filter_hw_address != known.hw_address {
|
if active_device
|
||||||
|
.known_connections
|
||||||
|
.iter()
|
||||||
|
.all(|c| &c.id != known.ssid.as_ref())
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1938,10 +1945,6 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
let mut list_col =
|
let mut list_col =
|
||||||
Vec::with_capacity(self.nm_state.nm_state.wireless_access_points.len());
|
Vec::with_capacity(self.nm_state.nm_state.wireless_access_points.len());
|
||||||
for ap in &self.nm_state.nm_state.wireless_access_points {
|
for ap in &self.nm_state.nm_state.wireless_access_points {
|
||||||
if ap.hw_address != self.hw_device_to_show.unwrap_or(ap.hw_address) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if self.nm_state.nm_state.active_conns.iter().any(|a| {
|
if self.nm_state.nm_state.active_conns.iter().any(|a| {
|
||||||
let hw_address = active_conn_hw_address(a);
|
let hw_address = active_conn_hw_address(a);
|
||||||
ap.ssid.as_ref() == &a.name() && ap.hw_address == hw_address
|
ap.ssid.as_ref() == &a.name() && ap.hw_address == hw_address
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue