At some point, my Ubuntu 12.04 refused to connect to new networks using any kind of security. I could connect to the WiFi networks already known, but I could not connect to new networks with e.g. WPA2 security.
If I opened the Settings, Network, select Wireless. In the network name drop down, I select "Other..." In the "Connect to Hidden Wireless Network" dialogue, the Wireless security drop-down was empty, and the network dialogues generally behaved funny.
I chose to install Synapse, search for WiFi and re-installed all the already installed libraries and utilities (about ten or so).
After re-installing and re-booting, everything appeared to be working again.
Hardware: Lenovo ThinkPad T510