Port Nix context menu implementation to the new one on trunk.

Reviewed by: Jesus Sanchez-Palencia