From fb12b282f1300123c7f4c7f10525c29cb598e1fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 23 Aug 2008 15:02:44 +0000 Subject: [PATCH] * src/inset/InsetNomencl.cpp: - implemet inset tooltip. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26227 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetNewline.cpp | 3 +++ src/insets/InsetNomencl.cpp | 16 +++++++++++++++- src/insets/InsetNomencl.h | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp index 62be1d3ca8..7133f554b0 100644 --- a/src/insets/InsetNewline.cpp +++ b/src/insets/InsetNewline.cpp @@ -13,6 +13,7 @@ #include "InsetNewline.h" +#include "Buffer.h" #include "Dimension.h" #include "FuncRequest.h" #include "FuncStatus.h" @@ -142,6 +143,8 @@ ColorCode InsetNewline::ColorName() const int InsetNewline::latex(odocstream & os, OutputParams const &) const { + LYXERR0("Code: " << buffer().inset().lyxCode()); + switch (params_.kind) { case InsetNewlineParams::NEWLINE: os << "\\\\\n"; diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index dc5e2489e3..b3a3cb30ec 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -23,15 +23,17 @@ #include "support/docstream.h" #include "support/gettext.h" +#include "support/lstrings.h" using namespace std; +using namespace lyx::support; namespace lyx { ///////////////////////////////////////////////////////////////////// // -// InsetPrintNomencl +// InsetNomencl // ///////////////////////////////////////////////////////////////////// @@ -66,6 +68,18 @@ docstring InsetNomencl::screenLabel() const } +docstring InsetNomencl::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/) const +{ + docstring tip = _("Nomenclature Symbol: ") + getParam("symbol") + "\n"; + tip += _("Description: ") + "\t" + + subst(getParam("description"), from_ascii("\\\\"), from_ascii("\n\t")); + if (!getParam("prefix").empty()) + tip += "\n" + _("Sorting: ") + getParam("prefix"); + return tip; +} + + + int InsetNomencl::docbook(odocstream & os, OutputParams const &) const { os << "" diff --git a/src/insets/InsetNomencl.h b/src/insets/InsetNomencl.h index 9fc64bcf11..677daa84ee 100644 --- a/src/insets/InsetNomencl.h +++ b/src/insets/InsetNomencl.h @@ -30,6 +30,8 @@ public: /// docstring screenLabel() const; /// + docstring toolTip(BufferView const & bv, int x, int y) const; + /// EDITABLE editable() const { return IS_EDITABLE; } /// Updates needed features for this inset. void validate(LaTeXFeatures & features) const; -- 2.39.2