def changeVariables(self, source, variables):
        items = deque()
        found = False

        if 'clickedId' in variables:
            clickedId = variables.get('clickedId')
            for itm in self.getItems():
                items.append(itm)

            tmpItem = None

            # Go through all the items in the menu
            while not found and len(items) > 0:
                tmpItem = items.pop()
                found = clickedId == tmpItem.getId()

                if tmpItem.hasChildren():
                    for c in tmpItem.getChildren():
                        items.append(c)

            # If we got the clicked item, launch the command.
            if found and tmpItem.isEnabled():
                if tmpItem.isCheckable():
                    tmpItem.setChecked(not tmpItem.isChecked())

                if None is not tmpItem.getCommand():
                    tmpItem.getCommand().menuSelected(tmpItem)
If the request passed to L{HTTP11ClientProtocol} finished generation
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/menu_bar.py/MenuBar.changeVariables--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/HTTP11ClientProtocolTests.test_connectionLostBeforeGenerationFailed