mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
shortcuts should be uppercase
This commit is contained in:
parent
bef0efd22a
commit
0a0190103f
4 changed files with 27 additions and 27 deletions
|
@ -237,8 +237,8 @@ Are you sure you wish to delete %s and all its cards?""")%deck['name']):
|
|||
links = [
|
||||
["", "shared", _("Get Shared")],
|
||||
["", "create", _("Create")],
|
||||
["Ctrl+i", "import", _("Import File")],
|
||||
["c", "cram", _("Cram")],
|
||||
["Ctrl+I", "import", _("Import File")],
|
||||
["C", "cram", _("Cram")],
|
||||
]
|
||||
buf = ""
|
||||
for b in links:
|
||||
|
|
|
@ -353,41 +353,41 @@ class Editor(object):
|
|||
b("fields", self.onFields, "",
|
||||
shortcut(_("Customize Fields")), size=False, text=_("Fields..."),
|
||||
native=True, canDisable=False)
|
||||
b("layout", self.onCardLayout, _("Ctrl+l"),
|
||||
shortcut(_("Customize Card Layout (Ctrl+l)")),
|
||||
b("layout", self.onCardLayout, _("Ctrl+L"),
|
||||
shortcut(_("Customize Cards (Ctrl+L)")),
|
||||
size=False, text=_("Cards..."), native=True, canDisable=False)
|
||||
# align to right
|
||||
self.iconsBox.addItem(QSpacerItem(20,1, QSizePolicy.Expanding))
|
||||
b("text_bold", self.toggleBold, _("Ctrl+b"), _("Bold text (Ctrl+b)"),
|
||||
b("text_bold", self.toggleBold, _("Ctrl+B"), _("Bold text (Ctrl+B)"),
|
||||
check=True)
|
||||
b("text_italic", self.toggleItalic, _("Ctrl+i"), _("Italic text (Ctrl+i)"),
|
||||
b("text_italic", self.toggleItalic, _("Ctrl+I"), _("Italic text (Ctrl+I)"),
|
||||
check=True)
|
||||
b("text_under", self.toggleUnderline, _("Ctrl+u"),
|
||||
_("Underline text (Ctrl+u)"), check=True)
|
||||
b("text_under", self.toggleUnderline, _("Ctrl+U"),
|
||||
_("Underline text (Ctrl+U)"), check=True)
|
||||
b("text_super", self.toggleSuper, _("Ctrl+="),
|
||||
_("Superscript (Ctrl+=)"), check=True)
|
||||
b("text_sub", self.toggleSub, _("Ctrl+Shift+="),
|
||||
_("Subscript (Ctrl+Shift+=)"), check=True)
|
||||
b("text_clear", self.removeFormat, _("Ctrl+r"),
|
||||
_("Remove formatting (Ctrl+r)"))
|
||||
b("text_clear", self.removeFormat, _("Ctrl+R"),
|
||||
_("Remove formatting (Ctrl+R)"))
|
||||
but = b("foreground", self.onForeground, _("F7"), text=" ")
|
||||
but.setToolTip(_("Set foreground colour (F7)"))
|
||||
self.setupForegroundButton(but)
|
||||
but = b("cloze", self.onCloze, _("Ctrl+Shift+c"),
|
||||
_("Cloze deletion (Ctrl+Shift+c)"), text="[...]")
|
||||
but = b("cloze", self.onCloze, _("Ctrl+Shift+C"),
|
||||
_("Cloze deletion (Ctrl+Shift+C)"), text="[...]")
|
||||
but.setFixedWidth(24)
|
||||
# fixme: better image names
|
||||
b("mail-attachment", self.onAddMedia, _("F3"),
|
||||
_("Attach pictures/audio/video (F3)"))
|
||||
b("media-record", self.onRecSound, _("F5"), _("Record audio (F5)"))
|
||||
b("adv", self.onAdvanced, text=u"▾")
|
||||
s = QShortcut(QKeySequence("Ctrl+t, t"), self.widget)
|
||||
s = QShortcut(QKeySequence("Ctrl+T, T"), self.widget)
|
||||
s.connect(s, SIGNAL("activated()"), self.insertLatex)
|
||||
s = QShortcut(QKeySequence("Ctrl+t, e"), self.widget)
|
||||
s = QShortcut(QKeySequence("Ctrl+T, E"), self.widget)
|
||||
s.connect(s, SIGNAL("activated()"), self.insertLatexEqn)
|
||||
s = QShortcut(QKeySequence("Ctrl+t, m"), self.widget)
|
||||
s = QShortcut(QKeySequence("Ctrl+T, M"), self.widget)
|
||||
s.connect(s, SIGNAL("activated()"), self.insertLatexMathEnv)
|
||||
s = QShortcut(QKeySequence("Ctrl+shift+x"), self.widget)
|
||||
s = QShortcut(QKeySequence("Ctrl+Shift+X"), self.widget)
|
||||
s.connect(s, SIGNAL("activated()"), self.onHtmlEdit)
|
||||
|
||||
def enableButtons(self, val=True):
|
||||
|
@ -856,16 +856,16 @@ class Editor(object):
|
|||
def onAdvanced(self):
|
||||
m = QMenu(self.mw)
|
||||
a = m.addAction(_("LaTeX"))
|
||||
a.setShortcut(QKeySequence("Ctrl+t, t"))
|
||||
a.setShortcut(QKeySequence("Ctrl+T, T"))
|
||||
a.connect(a, SIGNAL("triggered()"), self.insertLatex)
|
||||
a = m.addAction(_("LaTeX equation"))
|
||||
a.setShortcut(QKeySequence("Ctrl+t, e"))
|
||||
a.setShortcut(QKeySequence("Ctrl+T, E"))
|
||||
a.connect(a, SIGNAL("triggered()"), self.insertLatexEqn)
|
||||
a = m.addAction(_("LaTeX math env."))
|
||||
a.setShortcut(QKeySequence("Ctrl+t, m"))
|
||||
a.setShortcut(QKeySequence("Ctrl+T, M"))
|
||||
a.connect(a, SIGNAL("triggered()"), self.insertLatexMathEnv)
|
||||
a = m.addAction(_("Edit HTML"))
|
||||
a.setShortcut(QKeySequence("Ctrl+shift+x"))
|
||||
a.setShortcut(QKeySequence("Ctrl+Shift+X"))
|
||||
a.connect(a, SIGNAL("triggered()"), self.onHtmlEdit)
|
||||
m.exec_(QCursor.pos())
|
||||
|
||||
|
|
|
@ -913,7 +913,7 @@ Your edits have left %d cards empty. Do you want to delete them?""" % cnt)):
|
|||
qt_mac_set_menubar_icons(False)
|
||||
#self.setUnifiedTitleAndToolBarOnMac(self.pm.profile['showToolbar'])
|
||||
# mac users expect a minimize option
|
||||
self.minimizeShortcut = QShortcut("Ctrl+m", self)
|
||||
self.minimizeShortcut = QShortcut("Ctrl+M", self)
|
||||
self.connect(self.minimizeShortcut, SIGNAL("activated()"),
|
||||
self.onMacMinimize)
|
||||
self.hideAccelerators()
|
||||
|
|
|
@ -28,17 +28,17 @@ class Toolbar(object):
|
|||
def _rightIconsList(self):
|
||||
return [
|
||||
["stats", "qrc:/icons/view-statistics.png",
|
||||
_("Show statistics. Shortcut key: %s") % "S"],
|
||||
_("Show statistics. Shortcut key: %s") % "Shift+S"],
|
||||
["sync", "qrc:/icons/view-refresh.png",
|
||||
_("Synchronize with AnkiWeb. Shortcut key: %s") % "y"],
|
||||
_("Synchronize with AnkiWeb. Shortcut key: %s") % "Y"],
|
||||
]
|
||||
|
||||
def _centerLinks(self):
|
||||
links = [
|
||||
["decks", _("Decks"), _("Shortcut key: %s") % "d"],
|
||||
["study", _("Study"), _("Shortcut key: %s") % "s"],
|
||||
["add", _("Add"), _("Shortcut key: %s") % "a"],
|
||||
["browse", _("Browse"), _("Shortcut key: %s") % "b"],
|
||||
["decks", _("Decks"), _("Shortcut key: %s") % "D"],
|
||||
["study", _("Study"), _("Shortcut key: %s") % "S"],
|
||||
["add", _("Add"), _("Shortcut key: %s") % "A"],
|
||||
["browse", _("Browse"), _("Shortcut key: %s") % "B"],
|
||||
]
|
||||
return self._linkHTML(links)
|
||||
|
||||
|
|
Loading…
Reference in a new issue