* InsetBibtex.{cpp,h}:

- add tooltip.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24533 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-04-28 12:48:04 +00:00
parent 7578832919
commit ebf295a245
2 changed files with 40 additions and 1 deletions

View File

@ -102,6 +102,43 @@ docstring InsetBibtex::screenLabel() const
}
docstring InsetBibtex::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/) const
{
docstring item = from_ascii("* ");
docstring tip = _("Databases:\n");
vector<docstring> bibfilelist = getVectorFromString(getParam("bibfiles"));
if (bibfilelist.empty()) {
tip += item;
tip += _("none");
} else {
vector<docstring>::const_iterator it = bibfilelist.begin();
vector<docstring>::const_iterator en = bibfilelist.end();
for (; it != en; ++it) {
tip += item;
tip += *it + "\n";
}
}
// Style-Options
docstring style = getParam("options"); // maybe empty! and with bibtotoc
docstring bibtotoc = from_ascii("bibtotoc");
if (prefixIs(style, bibtotoc)) {
if (contains(style, char_type(',')))
style = split(style, bibtotoc, char_type(','));
}
tip += _("Style File:\n");
tip += item;
if (!style.empty())
tip += style;
else
tip += _("none");
return tip;
}
static string normalizeName(Buffer const & buffer,
OutputParams const & runparams, string const & name, string const & ext)
{
@ -195,7 +232,6 @@ int InsetBibtex::latex(odocstream & os, OutputParams const & runparams) const
_("There are spaces in the paths to your BibTeX databases.\n"
"BibTeX will be unable to find them."));
}
// Style-Options
string style = to_utf8(getParam("options")); // maybe empty! and with bibtotoc
string bibtotoc;
@ -205,6 +241,7 @@ int InsetBibtex::latex(odocstream & os, OutputParams const & runparams) const
style = split(style, bibtotoc, ',');
}
// line count
int nlines = 0;

View File

@ -30,6 +30,8 @@ public:
///
docstring screenLabel() const;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
InsetCode lyxCode() const { return BIBTEX_CODE; }