QScintilla/Shell.py

changeset 3039
8dd0165d805d
parent 3034
7ce719013078
child 3060
5883ce99ee12
child 3067
8fd7ae10de2b
equal deleted inserted replaced
3038:7fe9a53280bd 3039:8dd0165d805d
1267 else: 1267 else:
1268 # language not supported or typo 1268 # language not supported or typo
1269 self.__write( 1269 self.__write(
1270 self.trUtf8( 1270 self.trUtf8(
1271 'Shell language "{0}" not supported.\n') 1271 'Shell language "{0}" not supported.\n')
1272 .format(cmdList[1])) 1272 .format(cmdList[1]))
1273 self.__clientStatement(False) 1273 self.__clientStatement(False)
1274 return 1274 return
1275 cmd = '' 1275 cmd = ''
1276 elif cmd == 'languages': 1276 elif cmd == 'languages':
1277 s = '{0}\n'.format(', '.join(self.clientLanguages)) 1277 s = '{0}\n'.format(', '.join(self.clientLanguages))
1342 if startIdx == -1: 1342 if startIdx == -1:
1343 idx = 0 1343 idx = 0
1344 else: 1344 else:
1345 idx = startIdx + 1 1345 idx = startIdx + 1
1346 while idx < len(self.history) and \ 1346 while idx < len(self.history) and \
1347 not self.history[idx].startswith(txt): 1347 not self.history[idx].startswith(txt):
1348 idx += 1 1348 idx += 1
1349 return idx 1349 return idx
1350 1350
1351 def __rsearchHistory(self, txt, startIdx=-1): 1351 def __rsearchHistory(self, txt, startIdx=-1):
1352 """ 1352 """
1359 if startIdx == -1: 1359 if startIdx == -1:
1360 idx = len(self.history) - 1 1360 idx = len(self.history) - 1
1361 else: 1361 else:
1362 idx = startIdx - 1 1362 idx = startIdx - 1
1363 while idx >= 0 and \ 1363 while idx >= 0 and \
1364 not self.history[idx].startswith(txt): 1364 not self.history[idx].startswith(txt):
1365 idx -= 1 1365 idx -= 1
1366 return idx 1366 return idx
1367 1367
1368 def focusNextPrevChild(self, next): 1368 def focusNextPrevChild(self, next):
1369 """ 1369 """
1541 else: 1541 else:
1542 E5MessageBox.information( 1542 E5MessageBox.information(
1543 self, 1543 self,
1544 self.trUtf8("Drop Error"), 1544 self.trUtf8("Drop Error"),
1545 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") 1545 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""")
1546 .format(fname)) 1546 .format(fname))
1547 event.acceptProposedAction() 1547 event.acceptProposedAction()
1548 elif event.mimeData().hasText(): 1548 elif event.mimeData().hasText():
1549 s = event.mimeData().text() 1549 s = event.mimeData().text()
1550 if s: 1550 if s:
1551 event.acceptProposedAction() 1551 event.acceptProposedAction()

eric ide

mercurial