Show More
@@ -498,9 +498,13 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
498 | text = unicode(QtGui.QApplication.clipboard().text(mode)).rstrip() |
|
498 | text = unicode(QtGui.QApplication.clipboard().text(mode)).rstrip() | |
499 | self._insert_plain_text_into_buffer(cursor, dedent(text)) |
|
499 | self._insert_plain_text_into_buffer(cursor, dedent(text)) | |
500 |
|
500 | |||
501 | def print_(self, printer): |
|
501 | def print_(self, printer = None): | |
502 | """ Print the contents of the ConsoleWidget to the specified QPrinter. |
|
502 | """ Print the contents of the ConsoleWidget to the specified QPrinter. | |
503 | """ |
|
503 | """ | |
|
504 | if(printer is None): | |||
|
505 | printer = QtGui.QPrinter() | |||
|
506 | if(QtGui.QPrintDialog(printer).exec_() != QtGui.QDialog.Accepted): | |||
|
507 | return | |||
504 | self._control.print_(printer) |
|
508 | self._control.print_(printer) | |
505 |
|
509 | |||
506 | def prompt_to_top(self): |
|
510 | def prompt_to_top(self): | |
@@ -737,6 +741,10 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
737 | menu.addSeparator() |
|
741 | menu.addSeparator() | |
738 | menu.addAction('Select All', self.select_all) |
|
742 | menu.addAction('Select All', self.select_all) | |
739 |
|
743 | |||
|
744 | menu.addSeparator() | |||
|
745 | print_action = menu.addAction('Print', self.print_) | |||
|
746 | print_action.setEnabled(True) | |||
|
747 | ||||
740 | return menu |
|
748 | return menu | |
741 |
|
749 | |||
742 | def _control_key_down(self, modifiers, include_command=True): |
|
750 | def _control_key_down(self, modifiers, include_command=True): |
General Comments 0
You need to be logged in to leave comments.
Login now