" % did)
# children
buf += self._renderDeckTree(children, depth+1)
@@ -347,7 +347,7 @@ where id > ?""", (self.mw.col.sched.dayCutoff-86400)*1000)
if b[0]:
b[0] = _("Shortcut key: %s") % shortcut(b[0])
buf += """
-""" % tuple(b)
+""" % tuple(b)
self.bottom.draw(buf)
if isMac:
size = 28
@@ -355,7 +355,7 @@ where id > ?""", (self.mw.col.sched.dayCutoff-86400)*1000)
size = 36 + self.mw.fontHeightDelta*3
self.bottom.web.setFixedHeight(size)
self.bottom.web.resetHandlers()
- self.bottom.web.onAnkiLink = self._linkHandler
+ self.bottom.web.onBridgeCmd = self._linkHandler
def _onShared(self):
openLink(aqt.appShared+"decks/")
diff --git a/aqt/main.py b/aqt/main.py
index 2c96d1047..603b1b6fe 100644
--- a/aqt/main.py
+++ b/aqt/main.py
@@ -456,7 +456,7 @@ the manual for information on how to restore from an automatic backup."))
# we don't have to change the webview, as we have a covering window
return
self.web.resetHandlers()
- self.web.onAnkiLink = lambda url: self.delayedMaybeReset()
+ self.web.onBridgeCmd = lambda url: self.delayedMaybeReset()
i = _("Waiting for editing to finish.")
b = self.button("refresh", _("Resume Now"), id="resume")
self.web.stdHtml("""
@@ -487,7 +487,7 @@ h1 { margin-bottom: 0.2em; }
else:
key = ""
return '''
-''' % (
id, class_, link, key, extra, name)
diff --git a/aqt/overview.py b/aqt/overview.py
index 88f18951e..1f839ee62 100644
--- a/aqt/overview.py
+++ b/aqt/overview.py
@@ -18,7 +18,7 @@ class Overview(object):
def show(self):
clearAudioQueue()
self.web.resetHandlers()
- self.web.onAnkiLink = self._linkHandler
+ self.web.onBridgeCmd = self._linkHandler
self.mw.keyHandler = self._keyHandler
self.refresh()
@@ -199,14 +199,14 @@ text-align: center;
if b[0]:
b[0] = _("Shortcut key: %s") % shortcut(b[0])
buf += """
-""" % tuple(b)
+""" % tuple(b)
self.bottom.draw(buf)
if isMac:
size = 28
else:
size = 36 + self.mw.fontHeightDelta*3
self.bottom.web.setFixedHeight(size)
- self.bottom.web.onAnkiLink = self._linkHandler
+ self.bottom.web.onBridgeCmd = self._linkHandler
# Studying more
######################################################################
diff --git a/aqt/qt.py b/aqt/qt.py
index 8965bb26e..b8f7d2696 100644
--- a/aqt/qt.py
+++ b/aqt/qt.py
@@ -11,12 +11,7 @@ os.environ["LIBOVERLAY_SCROLLBAR"] = "0"
from anki.utils import isWin, isMac
-from PyQt5.QtCore import *
-from PyQt5.QtGui import *
-from PyQt5.QtWidgets import *
-from PyQt5.QtWebEngineWidgets import *
-
-from PyQt5.QtNetwork import QLocalServer, QLocalSocket
+from PyQt5.Qt import *
def debug():
from PyQt5.QtCore import pyqtRemoveInputHook
diff --git a/aqt/reviewer.py b/aqt/reviewer.py
index 6c0feaf1b..1acba1eb6 100644
--- a/aqt/reviewer.py
+++ b/aqt/reviewer.py
@@ -43,14 +43,14 @@ class Reviewer(object):
self.mw.col.reset()
self.web.resetHandlers()
self.mw.keyHandler = self._keyHandler
- self.web.onAnkiLink = self._linkHandler
+ self.web.onBridgeCmd = self._linkHandler
self.web.setKeyHandler(self._catchEsc)
if isMac:
self.bottom.web.setFixedHeight(46)
else:
self.bottom.web.setFixedHeight(52+self.mw.fontHeightDelta*4)
self.bottom.web.resetHandlers()
- self.bottom.web.onAnkiLink = self._linkHandler
+ self.bottom.web.onBridgeCmd = self._linkHandler
self._reps = None
self.nextCard()
@@ -163,12 +163,12 @@ function _toggleStar (show) {
function _getTypedText () {
if (typeans) {
- openAnkiLink("typeans:"+typeans.value);
+ pycmd("typeans:"+typeans.value);
}
};
function _typeAnsPress() {
if (window.event.keyCode === 13) {
- openAnkiLink("ans");
+ pycmd("ans");
}
}
@@ -533,12 +533,12 @@ min-width: 60px; white-space: nowrap;
-
+
-
+
@@ -596,7 +596,7 @@ function showAnswer(txt) {
self.bottom.web.setFocus()
middle = '''
%s
-''' % (
+''' % (
self._remaining(), _("Shortcut key: %s") % _("Space"), _("Show Answer"))
# wrap it in a table so it has the same top margin as the ease buttons
middle = "
%s
" % middle
@@ -654,7 +654,7 @@ function showAnswer(txt) {
extra = ""
due = self._buttonTime(i)
return '''
-