mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 21:11:28 +01:00
02ad92185d
* Delete dropped out networks. * Add in newly discovered networks. * Add static (aka class) compare method to WirelessNetworkMenuItem that is used to sort items by signal strength descending. Add == operator to wireless_network struct to determine if existing items have a known network attached. Remove the non-network items from the menu, save them, sort network menu items, then add non-network items back into the menu. Update NetworkStatus preflet to use same compare method as Network preflet. signal_strength_compare function had a bool return value instead of int which worked to sort items the first time, but does not work on successive compares. By not deleting and recreating the menu items each Pulse(), the Network preflet no longer crashes on update. The menu flashes on update still but doesn't crash. Fixes #12024 Change-Id: Ie5b22cea4e66350b9c5df8e3b8de266ede50ad6d Reviewed-on: https://review.haiku-os.org/c/haiku/+/4243 Reviewed-by: John Scipione <jscipione@gmail.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com> Reviewed-by: Axel Dörfler <axeld@pinc-software.de>