remove some useless workarounds in getStatus

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24942 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-05-26 10:23:07 +00:00
parent 703eca7670
commit 050ec93722
7 changed files with 10 additions and 15 deletions

View File

@ -1907,7 +1907,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_APPENDIX:
flag.setOnOff(cur.paragraph().params().startOfAppendix());
return true;
break;
case LFUN_BIBITEM_INSERT:
enable = (cur.paragraph().layout().labeltype == LABEL_BIBLIO

View File

@ -223,8 +223,7 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_INSET_MODIFY:
if (cmd.getArg(0) == "changetype")
flag.setOnOff(cmd.getArg(1) == params_.type);
else
flag.enabled(true);
flag.enabled(true);
return true;
case LFUN_INSET_DIALOG_UPDATE:

View File

@ -164,8 +164,8 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
string const newtype = cmd.getArg(1);
status.enabled(p_.isCompatibleCommand(p_.code(), newtype));
status.setOnOff(newtype == p_.getCmdName());
} else
status.enabled(true);
}
status.enabled(true);
return true;
case LFUN_INSET_DIALOG_UPDATE:
status.enabled(true);

View File

@ -115,9 +115,8 @@ bool InsetNewline::getStatus(Cursor & cur, FuncRequest const & cmd,
InsetNewlineParams params;
string2params(to_utf8(cmd.argument()), params);
status.setOnOff(params_.kind == params.kind);
} else {
status.enabled(true);
}
status.enabled(true);
return true;
default:
return Inset::getStatus(cur, cmd, status);

View File

@ -163,9 +163,8 @@ bool InsetNewpage::getStatus(Cursor & cur, FuncRequest const & cmd,
InsetNewpageParams params;
string2params(to_utf8(cmd.argument()), params);
status.setOnOff(params_.kind == params.kind);
} else {
status.enabled(true);
}
}
status.enabled(true);
return true;
default:
return Inset::getStatus(cur, cmd, status);

View File

@ -158,9 +158,8 @@ bool InsetSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
InsetSpaceParams params;
string2params(to_utf8(cmd.argument()), params);
status.setOnOff(params_.kind == params.kind);
} else {
status.enabled(true);
}
status.enabled(true);
return true;
default:
return Inset::getStatus(cur, cmd, status);

View File

@ -89,9 +89,8 @@ bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
VSpace vspace;
InsetVSpace::string2params(to_utf8(cmd.argument()), vspace);
status.setOnOff(vspace == space_);
} else {
status.enabled(true);
}
}
status.enabled(true);
return true;
default:
return Inset::getStatus(cur, cmd, status);