mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 23:56:17 +01:00
Implement #2790 (Keyboard shortcut for copy in reader)
This commit is contained in:
parent
a76c1a428f
commit
f1936e18da
2 changed files with 7 additions and 1 deletions
|
|
@ -337,6 +337,10 @@ def __init__(self, *args):
|
|||
self.connect(self.document, SIGNAL('animated_scroll_done()'),
|
||||
self.animated_scroll_done, Qt.QueuedConnection)
|
||||
|
||||
@property
|
||||
def copy_action(self):
|
||||
return self.document.action(QWebPage.Copy)
|
||||
|
||||
def animated_scroll_done(self):
|
||||
if self.manager is not None:
|
||||
self.manager.scrolled(self.document.scroll_fraction)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
QDesktopServices, QDoubleSpinBox, QLabel, QTextBrowser, \
|
||||
QPainter, QBrush, QColor, QStandardItemModel, QPalette, \
|
||||
QStandardItem, QUrl, QRegExpValidator, QRegExp, QLineEdit, \
|
||||
QToolButton, QMenu, QInputDialog, QAction
|
||||
QToolButton, QMenu, QInputDialog, QAction, QKeySequence
|
||||
|
||||
from calibre.gui2.viewer.main_ui import Ui_EbookViewer
|
||||
from calibre.gui2.viewer.printing import Printing
|
||||
|
|
@ -285,6 +285,8 @@ def __init__(self, pathtoebook=None, debug_javascript=False):
|
|||
self.connect(self.action_print, SIGNAL("triggered(bool)"), partial(self.print_book, preview=False))
|
||||
self.connect(self.print_menu.actions()[0], SIGNAL("triggered(bool)"), partial(self.print_book, preview=True))
|
||||
self.set_max_width()
|
||||
ca = self.view.copy_action
|
||||
ca.setShortcut(QKeySequence.Copy)
|
||||
|
||||
|
||||
def set_max_width(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue