GNOME Bugzilla – Bug 672272
Refactor show()/hide() sequences
Last modified: 2012-05-02 20:47:42 UTC
See patch. Not trying to land this before hard code freeze -- this is 3.6 territory.
Created attachment 209976 [details] [review] Refactor show()/hide() sequences We seem to have a lot of code that does something along the lines of: if (condition) actor.show(); else actor.hide(); ClutterActor already has such a thing for exactly this purpose: the 'visible' property. Use it instead of the mess above.
Created attachment 209997 [details] [review] Refactor show()/hide() sequences We seem to have a lot of code that does something along the lines of: if (condition) actor.show(); else actor.hide(); ClutterActor already has such a thing for exactly this purpose: the 'visible' property. Use it instead of the mess above.
Review of attachment 209997 [details] [review]: Makes a lot of sense.
Attachment 209997 [details] pushed as 723a1c8 - Refactor show()/hide() sequences
Review of attachment 209997 [details] [review]: ::: js/ui/status/network.js @@ +708,3 @@ // we can do it here because addConnection and removeConnection // both call _createSection at some point + this.section.actor.visible = this._connections.length <= 1; Isn't this backwards? Old code used to hide the actor if connections.length was <= 1.
Created attachment 213334 [details] [review] network: Fix an accidental copy-paste error Logic swap accidentally introduced in commit 723a1c843. Nice catch.
Review of attachment 213334 [details] [review]: Yep, looks good!
Comment on attachment 213334 [details] [review] network: Fix an accidental copy-paste error Attachment 213334 [details] pushed as a5ac183 - network: Fix an accidental copy-paste error