@@ -106,19 +106,17 @@ def __init__(self, parent=None):
106106 #self.setEdgeMode(QsciScintilla.EdgeLine)
107107 #self.setEdgeColumn(80)
108108 #self.setEdgeColor(QColor("#FF0000"))
109-
109+
110110 self .setWrapMode (QsciScintilla .WrapCharacter )
111111 self .SendScintilla (QsciScintilla .SCI_SETHSCROLLBAR , 0 )
112-
112+
113113 self .runShortcut = QShortcut (QKeySequence (Qt .CTRL + Qt .Key_E ), self )
114114 self .runShortcut .activated .connect (self .enteredSelected )
115115 # Reimplemeted copy action to prevent paste prompt (>>>,...) in command view
116- self .copyShortcut = QShortcut (QKeySequence ( Qt . CTRL + Qt . Key_C ) , self )
116+ self .copyShortcut = QShortcut (QKeySequence . Copy , self )
117117 self .copyShortcut .activated .connect (self .copy )
118- self .selectAllShortcut = QShortcut (QKeySequence ( Qt . CTRL + Qt . Key_A ) , self )
118+ self .selectAllShortcut = QShortcut (QKeySequence . SelectAll , self )
119119 self .selectAllShortcut .activated .connect (self .selectAll )
120- self .pastebinShortcut = QShortcut (QKeySequence (Qt .CTRL + Qt .Key_V ), self )
121- self .pastebinShortcut .activated .connect (self .pastebin )
122120
123121 def refreshLexerProperties (self ):
124122 self .setLexers ()
@@ -158,13 +156,24 @@ def contextMenuEvent(self, e):
158156 iconRun = QIcon (":/images/console/iconRunConsole.png" )
159157 iconPastebin = QIcon (":/images/console/iconCodepadConsole.png" )
160158 iconClear = QIcon (":/images/console/iconClearConsole.png" )
161- runAction = menu .addAction (iconRun , "Enter Selected" , self .enteredSelected , QKeySequence (Qt .CTRL + Qt .Key_E ))
162- clearAction = menu .addAction (iconClear , "Clear console" , self .clearConsole )
159+ runAction = menu .addAction (iconRun ,
160+ "Enter Selected" ,
161+ self .enteredSelected ,
162+ QKeySequence (Qt .CTRL + Qt .Key_E ))
163+ clearAction = menu .addAction (iconClear ,
164+ "Clear console" ,
165+ self .clearConsole )
163166 menu .addSeparator ()
164- copyAction = menu .addAction ("Copy" , self .copy , QKeySequence .Copy )
165- pastebinAction = menu .addAction (iconPastebin , "Share on codepad" , self .pastebin , QKeySequence .Paste )
167+ copyAction = menu .addAction ("Copy" ,
168+ self .copy ,
169+ QKeySequence .Copy )
170+ pastebinAction = menu .addAction (iconPastebin ,
171+ "Share on codepad" ,
172+ self .pastebin )
166173 menu .addSeparator ()
167- selectAllAction = menu .addAction ("Select All" , self .selectAll , QKeySequence .SelectAll )
174+ selectAllAction = menu .addAction ("Select All" ,
175+ self .selectAll ,
176+ QKeySequence .SelectAll )
168177 runAction .setEnabled (False )
169178 copyAction .setEnabled (False )
170179 pastebinAction .setEnabled (False )
0 commit comments