]> git.lyx.org Git - features.git/commitdiff
better (and localizable) display of vertical spaces
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 24 May 2005 10:23:30 +0000 (10:23 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 24 May 2005 10:23:30 +0000 (10:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9968 a592a061-630c-0410-9148-cb99ea01b6c8

po/POTFILES.in
src/ChangeLog
src/insets/ChangeLog
src/insets/insetvspace.C
src/vspace.C
src/vspace.h

index bb539c49f4b4b3b497b34aa7ea4fcedec694ff97..954ca64c42674f9f1e793975406f7018a359944c 100644 (file)
@@ -153,6 +153,7 @@ src/frontends/xforms/FormVSpace.C
 src/frontends/xforms/FormWrap.C
 src/frontends/xforms/XFormsMenubar.C
 src/frontends/xforms/XMiniBuffer.C
+src/frontends/xforms/checkedwidgets.C
 src/frontends/xforms/xformsBC.h
 src/frontends/xforms/xforms_helpers.C
 src/gettext.h
index bdf732835b55432d1e5e8a89277431a678088d3d..dc693f13f7237d598bbd15ccbd10c4cb2cbf50a9 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-23  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * vspace.C (asGUIName): new method. A version of the space
+       suitable for showing on screen.
+
 2005-05-20  Michael Schmitt  <michael.schmitt@teststep.org>
 
        * MenuBackend.C:
index 322c9173f36c42df89d4340662f22490ba325aa5..70c60b71d6f17fd4ece21a5e223227884c549d34 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-23  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * insetvspace.C (draw): use VSpace::asGUIName.
+
 2005-05-17  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * insetbase.C (getStatus): allow LFUN_INSET_MODIFY unconditionally
index 147bd0ae806259832f3cbee4a85450fd8c78a277..8299f1ed08e4a332e96fb1fd641942e710ce63ad 100644 (file)
@@ -144,7 +144,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
        // y-values for bottom arrow
        int by1, by2;
 
-       str = label + " (" + space_.asLyXCommand() + ")";
+       str = label + " (" + space_.asGUIName() + ")";
 
        if (space_.kind() == VSpace::VFILL) {
                ty1 = ty2 = start;
index 2ed5a50faa57c104beb37c385edf3f08e9febcad..3e80d370a256f165a9f6556357fa3abec23187da 100644 (file)
@@ -14,6 +14,7 @@
 #include "buffer.h"
 #include "bufferparams.h"
 #include "BufferView.h"
+#include "gettext.h"
 #include "lengthcommon.h"
 #include "lyxtext.h"
 
@@ -478,6 +479,34 @@ string const VSpace::asLatexCommand(BufferParams const & params) const
 }
 
 
+string const VSpace::asGUIName() const
+{
+       string result;
+       switch (kind_) {
+       case DEFSKIP:
+               result = _("Default skip");
+               break;
+       case SMALLSKIP:
+               result = _("Small skip");
+               break;
+       case MEDSKIP:
+               result = _("Medium skip");
+               break;
+       case BIGSKIP:
+               result = _("Big skip");
+               break;
+       case VFILL:
+               result = _("Vertical fill");
+               break;
+       case LENGTH:
+               result = len_.asString();
+               break;
+       }
+       if (keep_)
+               result += ", " + _("protected");
+       return result;
+}
+
 
 int VSpace::inPixels(BufferView const & bv) const
 {
index c37e77e66491db37cfbf7fd7faf1336777a4c20f..e95c5ec7b55a8b9c562fa6e3513e513bbde7e97b 100644 (file)
@@ -61,6 +61,8 @@ public:
        std::string const asLyXCommand() const;
        /// the latex representation
        std::string const asLatexCommand(BufferParams const & params) const;
+       /// how it is seen in the LyX window
+       std::string const VSpace::asGUIName() const;
        /// the size of the space on-screen
        int inPixels(BufferView const & bv) const;