[GUI] Adding some code to support context menus