mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Add citations to Navigator.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23458 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d7ccaedfe0
commit
37b429e347
@ -780,6 +780,8 @@ void expandToc(Menu & tomenu, Buffer const * buf)
|
||||
label = _("List of Foot notes");
|
||||
else if (cit->first == "label")
|
||||
label = _("Labels and References");
|
||||
else if (cit->first == "citation")
|
||||
label = _("List of Citations");
|
||||
// this should not happen now, but if something else like
|
||||
// listings is added later, this can avoid an empty menu name.
|
||||
else
|
||||
|
@ -233,6 +233,8 @@ docstring GuiToc::guiName(string const & type) const
|
||||
return _("List of Marginal notes");
|
||||
if (type == "note")
|
||||
return _("List of Notes");
|
||||
if (type == "citation")
|
||||
return _("List of Citations");
|
||||
if (type == "label")
|
||||
return _("Labels and References");
|
||||
|
||||
|
@ -16,13 +16,15 @@
|
||||
#include "Buffer.h"
|
||||
#include "BufferParams.h"
|
||||
#include "DispatchResult.h"
|
||||
#include "support/gettext.h"
|
||||
#include "EmbeddedFiles.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "ParIterator.h"
|
||||
#include "TocBackend.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/docstream.h"
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <algorithm>
|
||||
@ -425,10 +427,16 @@ docstring InsetCitation::generateLabel() const
|
||||
|
||||
|
||||
docstring InsetCitation::screenLabel() const
|
||||
{
|
||||
return cache.screen_label;
|
||||
}
|
||||
|
||||
|
||||
void InsetCitation::updateLabels(ParIterator const &)
|
||||
{
|
||||
biblio::CiteEngine const engine = buffer().params().getEngine();
|
||||
if (cache.params == params() && cache.engine == engine)
|
||||
return cache.screen_label;
|
||||
return;
|
||||
|
||||
// The label has changed, so we have to re-create it.
|
||||
docstring const glabel = generateLabel();
|
||||
@ -445,8 +453,13 @@ docstring InsetCitation::screenLabel() const
|
||||
cache.params = params();
|
||||
cache.generated_label = glabel;
|
||||
cache.screen_label = label;
|
||||
}
|
||||
|
||||
return label;
|
||||
|
||||
void InsetCitation::addToToc(ParConstIterator const & cpit) const
|
||||
{
|
||||
Toc & toc = buffer().tocBackend().toc("citation");
|
||||
toc.push_back(TocItem(cpit, 0, cache.screen_label));
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,6 +45,11 @@ public:
|
||||
void textString(odocstream &) const;
|
||||
///
|
||||
void validate(LaTeXFeatures &) const;
|
||||
///
|
||||
void updateLabels(ParIterator const & it);
|
||||
///
|
||||
void addToToc(ParConstIterator const &) const;
|
||||
|
||||
///
|
||||
static ParamInfo const & findInfo(std::string const &);
|
||||
//FIXME This is the locus of the design problem we have.
|
||||
|
Loading…
Reference in New Issue
Block a user