implemented togglePubButton in statusWindow