git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27105 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-10-25 13:41:02 +00:00
parent 70d5f953c9
commit 53252839ea
6 changed files with 25 additions and 25 deletions

View File

@ -85,7 +85,7 @@ void InsetBranch::setButtonLabel()
if (c == Color_none)
s = _("Undef: ") + s;
}
if (decoration() == InsetLayout::Classic)
if (decoration() == InsetLayout::CLASSIC)
setLabel(isOpen() ? s : getNewLabel(s) );
else
setLabel(params_.branch + ": " + getNewLabel(s));

View File

@ -46,7 +46,7 @@ namespace lyx {
InsetCollapsable::CollapseStatus InsetCollapsable::status() const
{
if (decoration() == InsetLayout::Conglomerate)
if (decoration() == InsetLayout::CONGLOMERATE)
return status_;
return autoOpen_ ? Open : status_;
}
@ -55,18 +55,18 @@ InsetCollapsable::CollapseStatus InsetCollapsable::status() const
InsetCollapsable::Geometry InsetCollapsable::geometry() const
{
switch (decoration()) {
case InsetLayout::Classic:
case InsetLayout::CLASSIC:
if (status() == Open)
return openinlined_ ? LeftButton : TopButton;
return ButtonOnly;
case InsetLayout::Minimalistic:
case InsetLayout::MINIMALISTIC:
return status() == Open ? NoButton : ButtonOnly ;
case InsetLayout::Conglomerate:
case InsetLayout::CONGLOMERATE:
return status() == Open ? SubLabel : Corners ;
case InsetLayout::Default:
case InsetLayout::DEFAULT:
break; // this shouldn't happen
}
@ -755,19 +755,19 @@ docstring InsetCollapsable::floatName(
InsetLayout::InsetDecoration InsetCollapsable::decoration() const
{
if (!layout_)
return InsetLayout::Classic;
return InsetLayout::CLASSIC;
InsetLayout::InsetDecoration const dec = layout_->decoration();
switch (dec) {
case InsetLayout::Classic:
case InsetLayout::Minimalistic:
case InsetLayout::Conglomerate:
case InsetLayout::CLASSIC:
case InsetLayout::MINIMALISTIC:
case InsetLayout::CONGLOMERATE:
return dec;
case InsetLayout::Default:
case InsetLayout::DEFAULT:
break;
}
if (lyxCode() == FLEX_CODE)
return InsetLayout::Conglomerate;
return InsetLayout::Classic;
return InsetLayout::CONGLOMERATE;
return InsetLayout::CLASSIC;
}
@ -837,7 +837,7 @@ bool InsetCollapsable::undefined() const
docstring InsetCollapsable::contextMenu(BufferView const & bv, int x,
int y) const
{
if (decoration() == InsetLayout::Conglomerate)
if (decoration() == InsetLayout::CONGLOMERATE)
return from_ascii("context-conglomerate");
if (geometry() == NoButton)

View File

@ -162,7 +162,7 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
void InsetERT::setButtonLabel()
{
if (decoration() == InsetLayout::Classic)
if (decoration() == InsetLayout::CLASSIC)
setLabel(isOpen() ? _("ERT") : getNewLabel(_("ERT")));
else
setLabel(getNewLabel(_("ERT")));

View File

@ -32,7 +32,7 @@ namespace lyx {
InsetLayout::InsetLayout() :
name_(from_ascii("undefined")), lyxtype_(STANDARD),
labelstring_(from_ascii("UNDEFINED")), decoration_(InsetLayout::Default),
labelstring_(from_ascii("UNDEFINED")), decoration_(InsetLayout::DEFAULT),
font_(sane_font), labelfont_(sane_font), bgcolor_(Color_error),
multipar_(false), custompars_(false), forceplain_(true),
passthru_(false), needprotect_(false), freespacing_(false),
@ -47,12 +47,12 @@ namespace {
InsetLayout::InsetDecoration translateDecoration(std::string const & str)
{
if (support::compare_ascii_no_case(str, "classic") == 0)
return InsetLayout::Classic;
return InsetLayout::CLASSIC;
if (support::compare_ascii_no_case(str, "minimalistic") == 0)
return InsetLayout::Minimalistic;
return InsetLayout::MINIMALISTIC;
if (support::compare_ascii_no_case(str, "conglomerate") == 0)
return InsetLayout::Conglomerate;
return InsetLayout::Default;
return InsetLayout::CONGLOMERATE;
return InsetLayout::DEFAULT;
}
}

View File

@ -33,10 +33,10 @@ public:
InsetLayout();
///
enum InsetDecoration {
Classic,
Minimalistic,
Conglomerate,
Default
CLASSIC,
MINIMALISTIC,
CONGLOMERATE,
DEFAULT
};
enum InsetLyXType {
NOLYXTYPE,

View File

@ -398,7 +398,7 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
void InsetListings::setButtonLabel()
{
// FIXME UNICODE
if (decoration() == InsetLayout::Classic)
if (decoration() == InsetLayout::CLASSIC)
setLabel(isOpen() ? _("Listing") : getNewLabel(_("Listing")));
else
setLabel(getNewLabel(_("Listing")));