change cloze del key; never unset currentField

This commit is contained in:
Damien Elmes 2011-04-06 00:59:27 +09:00
parent c69d68e141
commit 5702ec2da1

View file

@ -96,7 +96,8 @@ function onBlur() {
saveField("blur"); saveField("blur");
} }
clearChangeTimer(); clearChangeTimer();
currentField = null; // if we lose focus, assume the last field is still targeted
//currentField = null;
}; };
function saveField(type) { function saveField(type) {
@ -261,7 +262,8 @@ class Editor(object):
_("Subscript (Ctrl+r)")) _("Subscript (Ctrl+r)"))
but = b("foreground", self.onForeground, "F7", text=" ") but = b("foreground", self.onForeground, "F7", text=" ")
self.setupForegroundButton(but) self.setupForegroundButton(but)
but = b("cloze", self.onCloze, "F9", _("Cloze (F9)"), text="[...]") but = b("cloze", self.onCloze, "Ctrl+Shift+c",
_("Cloze (Ctrl+Shift+c)"), text="[...]")
but.setFixedWidth(24) but.setFixedWidth(24)
# fixme: better image names # fixme: better image names
b("text-speak", self.onAddMedia, "F3", _("Add audio/video (F4)")) b("text-speak", self.onAddMedia, "F3", _("Add audio/video (F4)"))