GNOME Bugzilla – Bug 726401
NetworkMenu: make sure menu icons are updated at the end of connectivity checks
Last modified: 2014-06-26 17:38:32 UTC
Icons inside the menu are updated only for device state change, but for the main device they also depend on connectivity (which is a global property). Add a public method to force an update of the icon, and call it when connectivity changes.
Created attachment 271995 [details] [review] NetworkMenu: make sure menu icons are updated at the end of connectivity checks
Review of attachment 271995 [details] [review]: When do they depend on connectivity? I can't see any getIndicatorIcon implementation using connectivity state.
(In reply to comment #2) > Review of attachment 271995 [details] [review]: > > When do they depend on connectivity? I can't see any getIndicatorIcon > implementation using connectivity state. _canReachInternet()
Review of attachment 271995 [details] [review]: Ah. Can we put the signal handler in NMConnectionDevice then? this._client.connect('notify::connectivity', Lang.bind(this, this._sync));
(In reply to comment #4) > Review of attachment 271995 [details] [review]: > > Ah. Can we put the signal handler in NMConnectionDevice then? > > this._client.connect('notify::connectivity', Lang.bind(this, this._sync)); No, connectivity is a global property, and should be watched by global objects.
Really, I think that's a bad API on the part of NM -- connectivity really should be device-specific. And I really hate the iconChanged() method.
(In reply to comment #6) > Really, I think that's a bad API on the part of NM -- connectivity really > should be device-specific. And I really hate the iconChanged() method. How about making _sync() public then? And btw, connectivity is not device-specific, connectivity is a property of the default route: either you reach the internet in some way, or you don't. It's totally useless (for us) to know that some network that is explicitly configured to be limited, is, well, limited.
On mobile devices where you're often using a combination of Wi-Fi, Wired and 4G, I think it's useful to know which devices are limited so you can balance your bandwidth and power usage.
Updated with review comments. Attachment 271995 [details] pushed as 5f4591e - NetworkMenu: make sure menu icons are updated at the end of connectivity checks