ui.backend.gtk: clean up and rearrange the code
ui.backend.gtk: clean up and rearrange the code

erg/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor,erg/factor,erg/factor