Skip to content
Commit 591a85e2 authored by Lamarque Souza's avatar Lamarque Souza
Browse files

Sanitize the Networking, Wireless and Wwan checkbox handling

according to Dan Williams comments in
http://mail.gnome.org/archives/networkmanager-list/2011-March/msg00063.html
Quoting:

Possibly.  Here's what *might* be going on...  usually GUI tools will
hook a UI element like a checkbox up to a property so that the checkbox
automatically updates when that property changes.  In the case of the
WiFi Enabled property, that's clearly the right thing to do as other
tools besides the applet could toggle that property without the applet's
knowledge, but the applet must still reflect the current state as
provided by NetworkManager.

But the applet must also respond to *user* initiated changes to that
checkbox as well.  Usually that happens when the applet attaches to the
signal/slot that indicates the checkbox has been toggled, and upon
receipt of that signal it tells NM to enable/disable wifi.  But if the
code also toggles the checkbox as a result of NM sending a
property-changed signal, that could result in the NM change signal
toggling the checkbox, which the applet interprets as the user clicking
on the checkbox, which the applet then handles by telling NM to
explicitly enable/disable wireless.

Basically, the applet should never update NM's user wifi state based on
signals from NM, or from NM's wifi hardware enabled state.

Lamarque: although that is not the cause of the problem that started
that mailing thread I think it is a good idea to avoid sending unneeded NM calls
to change Networking, Wireless or Wwan state.

I also added two KDE_IS_VERSION(4.6.2) #if's to really fix the problem for
KDE SC < 4.6.2 users.

CCBUG: 267967
parent 599492e9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment