QScintilla/Shell.py

changeset 564
b3d966393ba9
parent 536
6d8d39753c82
child 791
9ec2ac20e54e
equal deleted inserted replaced
563:e35d2cda9a74 564:b3d966393ba9
296 self.setUnmatchedBraceForegroundColor( 296 self.setUnmatchedBraceForegroundColor(
297 Preferences.getEditorColour("NonmatchingBrace")) 297 Preferences.getEditorColour("NonmatchingBrace"))
298 self.setUnmatchedBraceBackgroundColor( 298 self.setUnmatchedBraceBackgroundColor(
299 Preferences.getEditorColour("NonmatchingBraceBack")) 299 Preferences.getEditorColour("NonmatchingBraceBack"))
300 if Preferences.getEditor("CustomSelectionColours"): 300 if Preferences.getEditor("CustomSelectionColours"):
301 self.setSelectionBackgroundColor(\ 301 self.setSelectionBackgroundColor(
302 Preferences.getEditorColour("SelectionBackground")) 302 Preferences.getEditorColour("SelectionBackground"))
303 else: 303 else:
304 self.setSelectionBackgroundColor(\ 304 self.setSelectionBackgroundColor(
305 QApplication.palette().color(QPalette.Highlight)) 305 QApplication.palette().color(QPalette.Highlight))
306 if Preferences.getEditor("ColourizeSelText"): 306 if Preferences.getEditor("ColourizeSelText"):
307 self.resetSelectionForegroundColor() 307 self.resetSelectionForegroundColor()
308 elif Preferences.getEditor("CustomSelectionColours"): 308 elif Preferences.getEditor("CustomSelectionColours"):
309 self.setSelectionForegroundColor(\ 309 self.setSelectionForegroundColor(
310 Preferences.getEditorColour("SelectionForeground")) 310 Preferences.getEditorColour("SelectionForeground"))
311 else: 311 else:
312 self.setSelectionForegroundColor(\ 312 self.setSelectionForegroundColor(
313 QApplication.palette().color(QPalette.HighlightedText)) 313 QApplication.palette().color(QPalette.HighlightedText))
314 self.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol")) 314 self.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol"))
315 self.setCaretForegroundColor( 315 self.setCaretForegroundColor(
316 Preferences.getEditorColour("CaretForeground")) 316 Preferences.getEditorColour("CaretForeground"))
317 self.setCaretLineBackgroundColor( 317 self.setCaretLineBackgroundColor(
443 Public method to save the history for the given client type. 443 Public method to save the history for the given client type.
444 444
445 @param clientType type of the debug client (string) 445 @param clientType type of the debug client (string)
446 """ 446 """
447 if clientType in self.historyLists: 447 if clientType in self.historyLists:
448 Preferences.Prefs.settings.setValue(\ 448 Preferences.Prefs.settings.setValue(
449 "Shell/Histories/" + clientType, self.historyLists[clientType]) 449 "Shell/Histories/" + clientType, self.historyLists[clientType])
450 450
451 def getHistory(self, clientType): 451 def getHistory(self, clientType):
452 """ 452 """
453 Public method to get the history for the given client type. 453 Public method to get the history for the given client type.
471 471
472 def __selectHistory(self): 472 def __selectHistory(self):
473 """ 473 """
474 Private slot to select a history entry to execute. 474 Private slot to select a history entry to execute.
475 """ 475 """
476 cmd, ok = QInputDialog.getItem(\ 476 cmd, ok = QInputDialog.getItem(
477 self, 477 self,
478 self.trUtf8("Select History"), 478 self.trUtf8("Select History"),
479 self.trUtf8("Select the history entry to execute (most recent shown last)."), 479 self.trUtf8("Select the history entry to execute (most recent shown last)."),
480 self.history, 480 self.history,
481 0, False) 481 0, False)
1086 language = "" 1086 language = ""
1087 if language: 1087 if language:
1088 self.dbs.startClient(False, language) 1088 self.dbs.startClient(False, language)
1089 else: 1089 else:
1090 # language not supported or typo 1090 # language not supported or typo
1091 self.__write(\ 1091 self.__write(
1092 self.trUtf8('Shell language "{0}" not supported.\n')\ 1092 self.trUtf8('Shell language "{0}" not supported.\n')\
1093 .format(cmdList[1])) 1093 .format(cmdList[1]))
1094 self.__clientStatement(False) 1094 self.__clientStatement(False)
1095 return 1095 return
1096 cmd = '' 1096 cmd = ''

eric ide

mercurial