X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetNomencl.cpp;h=2595b14a6992b35f04797aae1888718bbc58b53d;hb=860accd01fb8115ec7c6ad80b054f1046e19c62f;hp=227976623bbb637fcc38fb4b3096519acc7b9de0;hpb=d5a5fbb8ee87d4a8ae1c55f9ba72819251bb6fb7;p=lyx.git diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index 227976623b..2595b14a69 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -31,6 +31,7 @@ #include "OutputParams.h" #include "output_xhtml.h" #include "sgml.h" +#include "texstream.h" #include "TocBackend.h" #include "frontends/FontMetrics.h" @@ -75,12 +76,8 @@ ParamInfo const & InsetNomencl::findInfo(string const & /* cmdName */) docstring InsetNomencl::screenLabel() const { size_t const maxLabelChars = 25; - docstring label = _("Nom: ") + getParam("symbol"); - if (label.size() > maxLabelChars) { - label.erase(maxLabelChars - 3); - label += "..."; - } + support::truncateWithEllipsis(label, maxLabelChars); return label; } @@ -175,7 +172,7 @@ docstring InsetPrintNomencl::screenLabel() const struct NomenclEntry { - NomenclEntry() {} + NomenclEntry() : par(0) {} NomenclEntry(docstring s, docstring d, Paragraph const * p) : symbol(s), desc(d), par(p) {}