Updated code to fix "Enable ..." checkbox handling and simplify the code.

Review Request #100835 - Created March 10, 2011 and submitted

Jirka Klimes
This patch fixes "Enable ..." checkbox handling and simplify the code.

There was a bug that when Wifi was rfkilled by a hardware switch,
knm unchecked the "Enable wireless" checkbox, but it also (erroneously)
issued 'disable wireless' command, which caused NM to store 'wireless
disabled' state as user preference. Then after enabling hardware switch
WiFi stayed disabled.
This is now fixed and the code is also simplified a bit.

Would you review please?

For Lamarque:
I think that b1c517b2b42a62990b6f9dd5b96eb79659e9953b (saving config) is not necessary and may be contra-productive.
NM itself stores user preference and there's no need applets do that. If there are more applets they will step on their toes.
And in NM 0.9 will be perfectly possible to have more applets running.
Nonetheless, thanks for your work on knm!

Rex Dieter
Lamarque Souza
Rex Dieter
Jirka Klimes
Review request changed

Status: Closed (submitted)

Change Summary:

Marked as submitted as commented by Lamarque