From 53252839eade453923167650d80a40858c58cdf0 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 25 Oct 2008 13:41:02 +0000 Subject: [PATCH] Style. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27105 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetBranch.cpp | 2 +- src/insets/InsetCollapsable.cpp | 26 +++++++++++++------------- src/insets/InsetERT.cpp | 2 +- src/insets/InsetLayout.cpp | 10 +++++----- src/insets/InsetLayout.h | 8 ++++---- src/insets/InsetListings.cpp | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index d3fc212351..1533b30329 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -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)); diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index b72816c719..934da30745 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -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) diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index 023cb6abf4..888f6bccfd 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -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"))); diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index a46cdb4d1e..40873cb49e 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -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; } } diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index 7cab643560..84ede0adc8 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -33,10 +33,10 @@ public: InsetLayout(); /// enum InsetDecoration { - Classic, - Minimalistic, - Conglomerate, - Default + CLASSIC, + MINIMALISTIC, + CONGLOMERATE, + DEFAULT }; enum InsetLyXType { NOLYXTYPE, diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index 31dbe5bdf0..fdd04f0613 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -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"))); -- 2.39.2