Hi,

I found convenient to have filename as a tooltip on the graphics inset.
Objections to this change?

Pavel
diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp
index 8e95db2..733d4c6 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<string> & ids)
diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h
index 408a3c1..bee9fe0 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_;
 };

Reply via email to