Here's how scanning is scheduled:

When the nm-applet's devices menu is expanded, NetworkManager schedules a
scan to start in 20 seconds. If the menu is deactivated and activated again
within that 20 seconds, NM re-schedules the scan after another 20 seconds.
So if you keep clicking on applet with intervals less than 20 seconds, the
NM initiated scan never happens. When the scan is actually initiated, it
takes a bit time to get the results back and it depends on wireless driver
how fast/slow it is. If the menu is still expanded, the scan results are not
added to the menu, you have to deactivate the menu and activate it again to
see the results (and a new scan is scheduled again).

There are multiple problems when trying to "fix" this behavior:

* Scanning disables all other operations on card so network doesn't work at
that time. That's the reason there is a timeout, that's the reason there
can't be a "scan now" button (well, part of the reason anyway). We need to
protect NM from malicious users who can write a shell script to make NM scan
constantly (or if they're not smart enough, keep hitting that
button/activating the menu manually). [1]

* The devices menu is a GtkMenu widget which means the changes made to the
menu (adding/removing menu items) while it's expanded doesn't change it's
appearance until it's shown next time. Another difficulties are to keep the
menu sorted correctly, replace the labels of devices (there's a generic and
specific variants, depending on the number of same type devices). Nothing
impossible, just requires a lot of work and while the SVN trunk barely works
at the moment, it's doesn't make sense to work on that right now.

[1] I'm not sure how serious that is since any user can just deactivate all
networking anyway.

Tambet
_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to