After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 649934 - find the active ap successfully
find the active ap successfully
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-11 04:55 UTC by Matthias Clasen
Modified: 2011-05-12 13:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (846 bytes, patch)
2011-05-11 04:56 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2011-05-11 04:55:41 UTC
While working on a setup wizard that reuses some code from various control-center panels, I noticed that my network list would loose the selection of the  active ap ever so often. After poking at this for a while I realized that you are doing the following:

1. get the current ap
2. get the list of all aps
3. reduce the list to strongest-per-ssid
4. fill the model with the list from 3.
5. select the row which matches the object path of the current ap gotten in 1.

The problem here is that after step 3, the active ap may no longer be in the list (its ssid will still be represented, but the actual object with the same object path may have been filtered out), therefore we don't find it in step 5.

Solution: match by ssid instead of by object path in step 5.
Comment 1 Matthias Clasen 2011-05-11 04:56:27 UTC
Created attachment 187606 [details] [review]
patch
Comment 2 Richard Hughes 2011-05-12 13:06:06 UTC
Thanks for doing this, good catch.