1269 else: |
1269 else: |
1270 # language not supported or typo |
1270 # language not supported or typo |
1271 self.__write( |
1271 self.__write( |
1272 self.trUtf8( |
1272 self.trUtf8( |
1273 'Shell language "{0}" not supported.\n') |
1273 'Shell language "{0}" not supported.\n') |
1274 .format(cmdList[1])) |
1274 .format(cmdList[1])) |
1275 self.__clientStatement(False) |
1275 self.__clientStatement(False) |
1276 return |
1276 return |
1277 cmd = '' |
1277 cmd = '' |
1278 elif cmd == 'languages': |
1278 elif cmd == 'languages': |
1279 s = '{0}\n'.format(', '.join(self.clientLanguages)) |
1279 s = '{0}\n'.format(', '.join(self.clientLanguages)) |
1326 Private method to insert a command selected from the history. |
1326 Private method to insert a command selected from the history. |
1327 |
1327 |
1328 @param cmd history entry to be inserted (string) |
1328 @param cmd history entry to be inserted (string) |
1329 """ |
1329 """ |
1330 self.setCursorPosition(self.prline, self.prcol) |
1330 self.setCursorPosition(self.prline, self.prcol) |
1331 self.setSelection(self.prline, self.prcol,\ |
1331 self.setSelection(self.prline, self.prcol, |
1332 self.prline, self.lineLength(self.prline)) |
1332 self.prline, self.lineLength(self.prline)) |
1333 self.removeSelectedText() |
1333 self.removeSelectedText() |
1334 self.__insertText(cmd) |
1334 self.__insertText(cmd) |
1335 |
1335 |
1336 def __searchHistory(self, txt, startIdx=-1): |
1336 def __searchHistory(self, txt, startIdx=-1): |
1543 else: |
1543 else: |
1544 E5MessageBox.information( |
1544 E5MessageBox.information( |
1545 self, |
1545 self, |
1546 self.trUtf8("Drop Error"), |
1546 self.trUtf8("Drop Error"), |
1547 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") |
1547 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") |
1548 .format(fname)) |
1548 .format(fname)) |
1549 event.acceptProposedAction() |
1549 event.acceptProposedAction() |
1550 elif event.mimeData().hasText(): |
1550 elif event.mimeData().hasText(): |
1551 s = event.mimeData().text() |
1551 s = event.mimeData().text() |
1552 if s: |
1552 if s: |
1553 event.acceptProposedAction() |
1553 event.acceptProposedAction() |
1616 |
1616 |
1617 The cursor is advanced to the end of the inserted text. |
1617 The cursor is advanced to the end of the inserted text. |
1618 |
1618 |
1619 @param txt text to be inserted (string) |
1619 @param txt text to be inserted (string) |
1620 """ |
1620 """ |
1621 l = len(txt) |
1621 length = len(txt) |
1622 line, col = self.getCursorPosition() |
1622 line, col = self.getCursorPosition() |
1623 self.insertAt(txt, line, col) |
1623 self.insertAt(txt, line, col) |
1624 if re.search(self.linesepRegExp, txt) is not None: |
1624 if re.search(self.linesepRegExp, txt) is not None: |
1625 line += 1 |
1625 line += 1 |
1626 self.setCursorPosition(line, col + l) |
1626 self.setCursorPosition(line, col + length) |
1627 |
1627 |
1628 def __configure(self): |
1628 def __configure(self): |
1629 """ |
1629 """ |
1630 Private method to open the configuration dialog. |
1630 Private method to open the configuration dialog. |
1631 """ |
1631 """ |