def CreatePopupMenu(self): menu = wx.Menu() Loader() # TaskBarIcon.TBMENU_REFRESH = CreateMenuItem(menu, (SYMBOL_RELOAD + ' Reload').encode('utf-8'), self.OnMenu) # menu.AppendSeparator() for sandbox in Sandbox.ListOfSandboxes: if sandbox.status: menuLabel = TEXT_STOP + sandbox.name else: menuLabel = TEXT_START + sandbox.name index = Sandbox.ListOfSandboxes.index(sandbox) menuItem = CreateMenuItem(menu, menuLabel, self.OnMenu) Sandbox.setSandboxMenuItem(self, sandbox.name, index, menuItem) menu.AppendSeparator() TaskBarIcon.TBMENU_STOPALL = CreateMenuItem(menu, TEXT_STOP_ALL, self.OnMenu) menu.AppendSeparator() TaskBarIcon.TBMENU_CLOSE = CreateMenuItem(menu, TEXT_EXIT + APP_NAME, self.OnMenu) return menu