add tooltip to foreground colour

This commit is contained in:
Damien Elmes 2012-04-06 17:00:53 +09:00
parent 2107c1a9c0
commit 21464720d5

View file

@ -326,11 +326,12 @@ class Editor(object):
b("text_sub", self.toggleSub, "Ctrl+Shift+=", b("text_sub", self.toggleSub, "Ctrl+Shift+=",
_("Subscript (Ctrl+Shift+=)"), check=True) _("Subscript (Ctrl+Shift+=)"), check=True)
b("text_remove", self.removeFormat, "Ctrl+r", b("text_remove", self.removeFormat, "Ctrl+r",
_("Remove Formatting (Ctrl+r)")) _("Remove formatting (Ctrl+r)"))
but = b("foreground", self.onForeground, "F7", text=" ") but = b("foreground", self.onForeground, "F7", text=" ")
but.setToolTip(_("Set foreground colour (F7)"))
self.setupForegroundButton(but) self.setupForegroundButton(but)
but = b("cloze", self.onCloze, "Ctrl+Shift+c", but = b("cloze", self.onCloze, "Ctrl+Shift+c",
_("Cloze (Ctrl+Shift+c)"), text="[...]") _("Cloze deletion (Ctrl+Shift+c)"), text="[...]")
but.setFixedWidth(24) but.setFixedWidth(24)
# fixme: better image names # fixme: better image names
b("mail-attachment", self.onAddMedia, "F3", b("mail-attachment", self.onAddMedia, "F3",
@ -794,10 +795,10 @@ class Editor(object):
a = m.addAction(_("LaTeX")) a = m.addAction(_("LaTeX"))
a.setShortcut(QKeySequence("Ctrl+t, t")) a.setShortcut(QKeySequence("Ctrl+t, t"))
a.connect(a, SIGNAL("triggered()"), self.insertLatex) a.connect(a, SIGNAL("triggered()"), self.insertLatex)
a = m.addAction(_("LaTeX Equation")) 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.connect(a, SIGNAL("triggered()"), self.insertLatexEqn)
a = m.addAction(_("LaTeX Math Env.")) 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.connect(a, SIGNAL("triggered()"), self.insertLatexMathEnv)
a = m.addAction(_("Edit HTML")) a = m.addAction(_("Edit HTML"))