Refactoring gnome contextmenu widget