return flag;
}
- switch (cmd.action) {
- case LFUN_UNKNOWN_ACTION:
+ if (cmd.action == LFUN_UNKNOWN_ACTION) {
flag.unknown(true);
flag.setEnabled(false);
- break;
-
- default:
- break;
- }
-
- if (flag.unknown()) {
flag.message(from_utf8(N_("Unknown action")));
return flag;
}
- if (!flag.enabled()) {
- if (flag.message().empty())
- flag.message(from_utf8(N_("Command disabled")));
- return flag;
- }
-
// I would really like to avoid having this switch and rather try to
// encode this in the function itself.
// -- And I'd rather let an inset decide which LFUNs it is willing