From 96f45fc16382ee9f80193f1e78bf6c9b23709269 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 3 Feb 2009 10:03:47 +0000 Subject: [PATCH] * InsetPhantom.cpp (toolTip): - fix compiler warning, l7n, simplify. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28335 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetPhantom.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index d9b0f89f5a..9790e82e1d 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -304,7 +304,7 @@ bool InsetPhantom::getStatus(Cursor & cur, FuncRequest const & cmd, } -docstring InsetPhantom::toolTip(BufferView const & bv, int x, int y) const +docstring InsetPhantom::toolTip(BufferView const &, int, int) const { OutputParams rp(&buffer().params().encoding()); odocstringstream ods; @@ -313,12 +313,10 @@ docstring InsetPhantom::toolTip(BufferView const & bv, int x, int y) const // shorten it if necessary if (content_tip.size() > 200) content_tip = content_tip.substr(0, 200) + "..."; - if (params_.type == InsetPhantomParams::Phantom) - return from_ascii("Phantom: ") + content_tip; - if (params_.type == InsetPhantomParams::HPhantom) - return from_ascii("HPhantom: ") + content_tip; - if (params_.type == InsetPhantomParams::VPhantom) - return from_ascii("VPhantom: ") + content_tip; + docstring res = phantomtranslator_loc().find(params_.type); + if (!content_tip.empty()) + res += from_ascii(": ") + content_tip; + return res; } -- 2.39.2