Move UI related actions code to ui.rc