Enable minimizing to tray

Window can now be minimized to tray. In this state, pop-ups are
displayed to mark beginning and end of every conversation. Some code
auto-formatting got mixed in as well :)