Item "Spellchecker...|S" "dialog-show spellchecker"
OptItem "Thesaurus...|T" "thesaurus-entry"
Item "Statistics...|a" "statistics"
- OptItem "Check TeX|h" "buffer-chktex"
+ Item "Check TeX|h" "buffer-chktex"
Item "TeX Information|I" "dialog-show texinfo"
Item "Compare...|C" "dialog-show compare"
Separator
break;
}
- case LFUN_BUFFER_CHKTEX:
- enable = params().isLatex() && !lyxrc.chktex_command.empty();
- break;
-
case LFUN_BUILD_PROGRAM:
enable = params().isExportable("program", false);
break;
break;
}
- case LFUN_BUFFER_CHKTEX:
- runChktex();
- break;
-
case LFUN_BUFFER_EXPORT_CUSTOM: {
string format_name;
string command = split(argument, format_name, ' ');
enable = theBufferList().last() != theBufferList().first();
break;
+ case LFUN_BUFFER_CHKTEX: {
+ if (!doc_buffer || !doc_buffer->params().isLatex()
+ || d.processing_thread_watcher_.isRunning()) {
+ // grey out, don't hide
+ enable = false;
+ break;
+ }
+ // hide if we have no checktex command
+ enable = !lyxrc.chktex_command.empty();
+ flag.setUnknown(!enable);
+ break;
+ }
+
case LFUN_VIEW_SPLIT:
if (cmd.getArg(0) == "vertical")
enable = doc_buffer && (d.splitter_->count() == 1 ||
gotoNextOrPreviousBuffer(PREVBUFFER, true);
break;
+ case LFUN_BUFFER_CHKTEX:
+ LASSERT(doc_buffer, break);
+ doc_buffer->runChktex();
+ break;
+
case LFUN_COMMAND_EXECUTE: {
command_execute_ = true;
minibuffer_focus_ = true;