From: Pavel Sanda Date: Wed, 29 Feb 2012 18:54:26 +0000 (+0000) Subject: Backport graphics tooltip X-Git-Tag: 2.0.4~216 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=435dce17c096a313cab8663c3ebeec77e7b4d129;p=features.git Backport graphics tooltip git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40812 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index dc79a017e0..8a752e4ce8 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -1079,6 +1079,12 @@ string InsetGraphics::params2string(InsetGraphicsParams const & params, return data.str(); } + +docstring InsetGraphics::toolTip(BufferView const &, int, int) const +{ + return from_utf8(params().filename.onlyFileName()); +} + namespace graphics { void getGraphicsGroups(Buffer const & b, set & ids) diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h index 2a04f0c33c..cbd1c587b4 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_; }; diff --git a/status.20x b/status.20x index a2651710b3..080fbc1860 100644 --- a/status.20x +++ b/status.20x @@ -34,7 +34,8 @@ What's new * USER INTERFACE -- +- Graphics insets show filename as a tooltip now. + * DOCUMENTATION AND LOCALIZATION