UI/Browser.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3357
2390df6f42ba
child 3515
1b8381afe38f
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
255 self.dirMenu.addAction( 255 self.dirMenu.addAction(
256 QApplication.translate('Browser', 'Configure...'), 256 QApplication.translate('Browser', 'Configure...'),
257 self.__configure) 257 self.__configure)
258 258
259 # create the attribute menu 259 # create the attribute menu
260 self.gotoMenu = QMenu(self.trUtf8("Goto"), self) 260 self.gotoMenu = QMenu(self.tr("Goto"), self)
261 self.gotoMenu.aboutToShow.connect(self._showGotoMenu) 261 self.gotoMenu.aboutToShow.connect(self._showGotoMenu)
262 self.gotoMenu.triggered.connect(self._gotoAttribute) 262 self.gotoMenu.triggered.connect(self._gotoAttribute)
263 263
264 self.attributeMenu = QMenu(self) 264 self.attributeMenu = QMenu(self)
265 self.attributeMenu.addAction( 265 self.attributeMenu.addAction(
360 linenos = itm.linenos() 360 linenos = itm.linenos()
361 fileName = itm.fileName() 361 fileName = itm.fileName()
362 362
363 for lineno in sorted(linenos): 363 for lineno in sorted(linenos):
364 act = self.gotoMenu.addAction( 364 act = self.gotoMenu.addAction(
365 self.trUtf8("Line {0}".format(lineno))) 365 self.tr("Line {0}".format(lineno)))
366 act.setData([fileName, lineno]) 366 act.setData([fileName, lineno])
367 367
368 def _gotoAttribute(self, act): 368 def _gotoAttribute(self, act):
369 """ 369 """
370 Protected slot to handle the selection of the goto menu. 370 Protected slot to handle the selection of the goto menu.
544 544
545 @param fn file name (string) 545 @param fn file name (string)
546 """ 546 """
547 self.__model.programChange(os.path.dirname(fn)) 547 self.__model.programChange(os.path.dirname(fn))
548 548
549 def handleInterpreterChanged(self, interpreter):
550 """
551 Public slot to handle a change of the debug client's interpreter.
552
553 @param interpreter interpreter of the debug client (string)
554 """
555 self.__model.interpreterChanged(interpreter)
556
549 def wantedItem(self, itm, filter=None): 557 def wantedItem(self, itm, filter=None):
550 """ 558 """
551 Public method to check type of an item. 559 Public method to check type of an item.
552 560
553 @param itm the item to check (BrowserItem) 561 @param itm the item to check (BrowserItem)

eric ide

mercurial