]> git.lyx.org Git - features.git/commitdiff
Fix bug 5407
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Nov 2008 15:35:02 +0000 (15:35 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Nov 2008 15:35:02 +0000 (15:35 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=5407

This patch makes insetfloat search its styles using "Float:<floatname>" (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

lib/layouts/linguistics.module
lib/layouts/stdinsets.inc
src/insets/InsetFloat.cpp
src/insets/InsetFloat.h

index f7a37faf9c9fb0a5c2b91b18dfc3af6aa363dd87..b2a7f8c6fb058630278948fd7a8225f91ff1499c 100644 (file)
@@ -169,11 +169,3 @@ Float
        LaTeXBuiltin          false
 End
 
-InsetLayout tableau
-       LabelString           Tableau
-       LabelFont
-         Color               collapsable
-         Size                Small
-       EndFont
-       MultiPar              true
-End
index 06eccf5570712e38a44b129947176dd84c599ab8..070042d14b540133109725578f895424b218451b 100644 (file)
@@ -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
index 0a537598697556e6d393cdc038aed8aaafefb1e0..3b6547c9ec4ebea7d2c524639dd052b6291f6e67 100644 (file)
@@ -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())
index b1500f9a0ed99d9d17ea3e0ecdf57bdd59ce2a4d..e5e9b63b1722702e6ea0a55bd9453f5abe3912a8 100644 (file)
@@ -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;
        ///