implement context menu for Ark (backport)

this commits is basicly upstream ed3ea7db and 5805c830 commits