Bug 1042319 - [Gallery] Update gallery edit UI r=djf

You do this for all edit modes, so I'd move it out of the switch statement.  As I noted above, I think it may be worth having a different function for the null case anyway.