Skip to content

Commit

Permalink
removed shortcut for sharing code action
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Nov 3, 2012
1 parent b1d7a15 commit ed4bc25
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions python/console/console_output.py
Expand Up @@ -106,19 +106,17 @@ def __init__(self, parent=None):
#self.setEdgeMode(QsciScintilla.EdgeLine)
#self.setEdgeColumn(80)
#self.setEdgeColor(QColor("#FF0000"))

self.setWrapMode(QsciScintilla.WrapCharacter)
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

self.runShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self)
self.runShortcut.activated.connect(self.enteredSelected)
# Reimplemeted copy action to prevent paste prompt (>>>,...) in command view
self.copyShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_C), self)
self.copyShortcut = QShortcut(QKeySequence.Copy, self)
self.copyShortcut.activated.connect(self.copy)
self.selectAllShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_A), self)
self.selectAllShortcut = QShortcut(QKeySequence.SelectAll, self)
self.selectAllShortcut.activated.connect(self.selectAll)
self.pastebinShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_V), self)
self.pastebinShortcut.activated.connect(self.pastebin)

def refreshLexerProperties(self):
self.setLexers()
Expand Down Expand Up @@ -158,13 +156,24 @@ def contextMenuEvent(self, e):
iconRun = QIcon(":/images/console/iconRunConsole.png")
iconPastebin = QIcon(":/images/console/iconCodepadConsole.png")
iconClear = QIcon(":/images/console/iconClearConsole.png")
runAction = menu.addAction(iconRun, "Enter Selected", self.enteredSelected, QKeySequence(Qt.CTRL + Qt.Key_E))
clearAction = menu.addAction(iconClear, "Clear console", self.clearConsole)
runAction = menu.addAction(iconRun,
"Enter Selected",
self.enteredSelected,
QKeySequence(Qt.CTRL + Qt.Key_E))
clearAction = menu.addAction(iconClear,
"Clear console",
self.clearConsole)
menu.addSeparator()
copyAction = menu.addAction("Copy", self.copy, QKeySequence.Copy)
pastebinAction = menu.addAction(iconPastebin, "Share on codepad", self.pastebin, QKeySequence.Paste)
copyAction = menu.addAction("Copy",
self.copy,
QKeySequence.Copy)
pastebinAction = menu.addAction(iconPastebin,
"Share on codepad",
self.pastebin)
menu.addSeparator()
selectAllAction = menu.addAction("Select All", self.selectAll, QKeySequence.SelectAll)
selectAllAction = menu.addAction("Select All",
self.selectAll,
QKeySequence.SelectAll)
runAction.setEnabled(False)
copyAction.setEnabled(False)
pastebinAction.setEnabled(False)
Expand Down

0 comments on commit ed4bc25

Please sign in to comment.