implement popup menu event: refresh and quit