From f27d015fa401965cba6e3413c9c71f6c162fa7cb Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Sat, 25 Feb 2012 23:05:28 +0000 Subject: [PATCH] Add tooltip for graphics insets git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40796 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetGraphics.cpp | 6 ++++++ src/insets/InsetGraphics.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 8e95db2e22..733d4c6cc7 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -1088,6 +1088,12 @@ string InsetGraphics::params2string(InsetGraphicsParams const & params, return data.str(); } + +docstring InsetGraphics::toolTip(BufferView const &, int, int) const +{ + return from_utf8(FileName(params().filename.relFileName()).onlyFileName()); +} + namespace graphics { void getGraphicsGroups(Buffer const & b, set & ids) diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h index 408a3c1f33..bee9fe0884 100644 --- a/src/insets/InsetGraphics.h +++ b/src/insets/InsetGraphics.h @@ -126,6 +126,8 @@ private: InsetGraphicsParams params_; /// holds the entity name that defines the graphics location (SGML). docstring const graphic_label; + /// + docstring toolTip(BufferView const & bv, int x, int y) const; /// The thing that actually draws the image on LyX's screen. RenderGraphic * graphic_; }; -- 2.39.2