Add support to the new messagingmenu api introduced since Ubuntu 12.10

Reformatted part of the code.
Updated TODO.