From: Jean-Marc Lasgouttes Date: Wed, 5 Nov 2008 15:35:02 +0000 (+0000) Subject: Fix bug 5407 X-Git-Tag: 1.6.10~2717 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0e2ded8161399bf46ed4737e091bc62a38e1d564;p=features.git Fix bug 5407 http://bugzilla.lyx.org/show_bug.cgi?id=5407 This patch makes insetfloat search its styles using "Float:" (or "Float" if this fails). This allows to define a default behaviour for new floats that makes sense. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27266 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module index f7a37faf9c..b2a7f8c6fb 100644 --- a/lib/layouts/linguistics.module +++ b/lib/layouts/linguistics.module @@ -169,11 +169,3 @@ Float LaTeXBuiltin false End -InsetLayout tableau - LabelString Tableau - LabelFont - Color collapsable - Size Small - EndFont - MultiPar true -End diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 06eccf5570..070042d14b 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -228,26 +228,7 @@ InsetLayout Box:Shaded MultiPar true End -InsetLayout figure - LabelString Figure - LabelFont - Color collapsable - Size Small - EndFont - MultiPar true -End - -InsetLayout table - LabelString Table - LabelFont - Color collapsable - Size Small - EndFont - MultiPar true -End - -InsetLayout algorithm - LabelString Algorithm +InsetLayout Float LabelFont Color collapsable Size Small diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index 0a53759869..3b6547c9ec 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -127,6 +127,12 @@ InsetFloat::~InsetFloat() } +docstring InsetFloat::name() const +{ + return "Float:" + name_; +} + + docstring InsetFloat::toolTip(BufferView const & bv, int x, int y) const { if (InsetCollapsable::toolTip(bv, x, y).empty() || isOpen()) diff --git a/src/insets/InsetFloat.h b/src/insets/InsetFloat.h index b1500f9a0e..e5e9b63b17 100644 --- a/src/insets/InsetFloat.h +++ b/src/insets/InsetFloat.h @@ -71,7 +71,7 @@ public: InsetFloatParams const & params() const { return params_; } private: /// - docstring name() const { return name_; } + docstring name() const; /// docstring toolTip(BufferView const & bv, int x, int y) const; ///