mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
Citation labels now update immediately if the citation engine is changed
from the document dialog. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8756 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
33243f7003
commit
3ea4eeb8a5
@ -1,3 +1,12 @@
|
|||||||
|
2004-05-17 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
|
* lfuns.h:
|
||||||
|
* LyXAction.C (init): new LFUN_INSET_REFRESH.
|
||||||
|
|
||||||
|
* lyxfunc.C (dispatch): in the LFUN_BUFFERPARAMS_APPLY block loop
|
||||||
|
over all insets and dispatch LFUN_INSET_REFRESH to any citation insets
|
||||||
|
if the citation engine has changed.
|
||||||
|
|
||||||
2004-05-14 José Matos <jamatos@lyx.org>
|
2004-05-14 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
* buffer.C (makeDocBookFile): add a default Formal Public Identifier
|
* buffer.C (makeDocBookFile): add a default Formal Public Identifier
|
||||||
|
@ -336,6 +336,7 @@ void LyXAction::init()
|
|||||||
{ LFUN_SAVE_AS_DEFAULT, "buffer-save-as-default", Noop },
|
{ LFUN_SAVE_AS_DEFAULT, "buffer-save-as-default", Noop },
|
||||||
{ LFUN_BUFFERPARAMS_APPLY, "buffer-params-apply", Noop },
|
{ LFUN_BUFFERPARAMS_APPLY, "buffer-params-apply", Noop },
|
||||||
{ LFUN_LYXRC_APPLY, "lyxrc-apply", NoBuffer },
|
{ LFUN_LYXRC_APPLY, "lyxrc-apply", NoBuffer },
|
||||||
|
{ LFUN_INSET_REFRESH, "", Noop },
|
||||||
{ LFUN_NOACTION, "", Noop }
|
{ LFUN_NOACTION, "", Noop }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-05-17 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
|
* insetcommand.C (priv_dispatch): act on receipt of LFUN_INSET_REFRESH
|
||||||
|
to force the button label to be re-generated.
|
||||||
|
|
||||||
2004-05-14 José Matos <jamatos@lyx.org>
|
2004-05-14 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
* insetlabel (docbook): do not ouput label, for the moment.
|
* insetlabel (docbook): do not ouput label, for the moment.
|
||||||
|
@ -101,6 +101,10 @@ int InsetCommand::docbook(Buffer const &, ostream &,
|
|||||||
void InsetCommand::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
void InsetCommand::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||||
{
|
{
|
||||||
switch (cmd.action) {
|
switch (cmd.action) {
|
||||||
|
case LFUN_INSET_REFRESH:
|
||||||
|
set_label_ = false;
|
||||||
|
break;
|
||||||
|
|
||||||
case LFUN_INSET_MODIFY: {
|
case LFUN_INSET_MODIFY: {
|
||||||
InsetCommandParams p;
|
InsetCommandParams p;
|
||||||
InsetCommandMailer::string2params(mailer_name_, cmd.argument, p);
|
InsetCommandMailer::string2params(mailer_name_, cmd.argument, p);
|
||||||
|
@ -349,6 +349,7 @@ enum kb_action {
|
|||||||
// 265
|
// 265
|
||||||
LFUN_LYXRC_APPLY,
|
LFUN_LYXRC_APPLY,
|
||||||
LFUN_GRAPHICS_EDIT,
|
LFUN_GRAPHICS_EDIT,
|
||||||
|
LFUN_INSET_REFRESH,
|
||||||
|
|
||||||
LFUN_LASTACTION // end of the table
|
LFUN_LASTACTION // end of the table
|
||||||
};
|
};
|
||||||
|
@ -1313,6 +1313,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_BUFFERPARAMS_APPLY: {
|
case LFUN_BUFFERPARAMS_APPLY: {
|
||||||
|
biblio::CiteEngine const engine =
|
||||||
|
owner->buffer()->params().cite_engine;
|
||||||
|
|
||||||
istringstream ss(argument);
|
istringstream ss(argument);
|
||||||
LyXLex lex(0,0);
|
LyXLex lex(0,0);
|
||||||
lex.setStream(ss);
|
lex.setStream(ss);
|
||||||
@ -1325,6 +1328,18 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
|
|||||||
<< (unknown_tokens == 1 ? "" : "s")
|
<< (unknown_tokens == 1 ? "" : "s")
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
if (engine == owner->buffer()->params().cite_engine)
|
||||||
|
break;
|
||||||
|
|
||||||
|
LCursor & cur = view()->cursor();
|
||||||
|
FuncRequest fr(LFUN_INSET_REFRESH);
|
||||||
|
|
||||||
|
InsetBase & inset = owner->buffer()->inset();
|
||||||
|
InsetIterator it = inset_iterator_begin(inset);
|
||||||
|
InsetIterator const end = inset_iterator_end(inset);
|
||||||
|
for (; it != end; ++it)
|
||||||
|
if (it->lyxCode() == InsetBase::CITE_CODE)
|
||||||
|
it->dispatch(cur, fr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user