]> git.lyx.org Git - features.git/commitdiff
Add tooltip for graphics insets
authorPavel Sanda <sanda@lyx.org>
Sat, 25 Feb 2012 23:05:28 +0000 (23:05 +0000)
committerPavel Sanda <sanda@lyx.org>
Sat, 25 Feb 2012 23:05:28 +0000 (23:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40796 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetGraphics.cpp
src/insets/InsetGraphics.h

index 8e95db2e229a8b5c9d5dc25eced2f5cb0d67b480..733d4c6cc75b4329e8fd9ff94136036b2c6c9b4b 100644 (file)
@@ -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<string> & ids)
index 408a3c1f33717890a0e47e611f45a25d46dbb40a..bee9fe08845962be7d8e375c7b3ef050c893fc32 100644 (file)
@@ -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_;
 };