From: Jean-Marc Lasgouttes Date: Tue, 24 May 2005 10:23:30 +0000 (+0000) Subject: better (and localizable) display of vertical spaces X-Git-Tag: 1.6.10~14271 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0f51d7cabf6b80c8fe0a065991867eeded8e5d89;p=features.git better (and localizable) display of vertical spaces git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9968 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/po/POTFILES.in b/po/POTFILES.in index bb539c49f4..954ca64c42 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index bdf732835b..dc693f13f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-23 Jean-Marc Lasgouttes + + * vspace.C (asGUIName): new method. A version of the space + suitable for showing on screen. + 2005-05-20 Michael Schmitt * MenuBackend.C: diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 322c9173f3..70c60b71d6 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2005-05-23 Jean-Marc Lasgouttes + + * insetvspace.C (draw): use VSpace::asGUIName. + 2005-05-17 Georg Baum * insetbase.C (getStatus): allow LFUN_INSET_MODIFY unconditionally diff --git a/src/insets/insetvspace.C b/src/insets/insetvspace.C index 147bd0ae80..8299f1ed08 100644 --- a/src/insets/insetvspace.C +++ b/src/insets/insetvspace.C @@ -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; diff --git a/src/vspace.C b/src/vspace.C index 2ed5a50faa..3e80d370a2 100644 --- a/src/vspace.C +++ b/src/vspace.C @@ -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 { diff --git a/src/vspace.h b/src/vspace.h index c37e77e664..e95c5ec7b5 100644 --- a/src/vspace.h +++ b/src/vspace.h @@ -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;