replace some message box with message bar in main app