In the Document dialog, enable the "Author-Year/Numerical" citation choice

only when the "Use natbib" checkbox is active.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2720 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-09-11 08:46:30 +00:00
parent 7d09d97b56
commit e670bed4c5
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,8 @@
2001-09-10 Angus Leeming <a.leeming@ic.ac.uk> 2001-09-11 Angus Leeming <a.leeming@ic.ac.uk>
* FormMathsBitmap (build): fix memory leak. * FormDocument.C (input, options_update): add code to enable the
Author-Year/Numerical citation choice only if the natbib checkbox is
active.
2001-09-08 Jürgen Spitzmüller <j.spitzmueller@gmx.de> 2001-09-08 Jürgen Spitzmüller <j.spitzmueller@gmx.de>

View File

@ -346,6 +346,11 @@ bool FormDocument::input( FL_OBJECT * ob, long data )
break; break;
} }
if (ob == options_->check_use_natbib) {
setEnabled(options_->choice_citation_format,
fl_get_button(options_->check_use_natbib));
}
switch (data) { switch (data) {
case INPUT: case INPUT:
case CHECKCHOICECLASS: case CHECKCHOICECLASS:
@ -721,6 +726,7 @@ void FormDocument::options_update(BufferParams const & params)
fl_set_button(options_->check_use_natbib, params.use_natbib); fl_set_button(options_->check_use_natbib, params.use_natbib);
fl_set_choice(options_->choice_citation_format, fl_set_choice(options_->choice_citation_format,
int(params.use_numerical_citations)+1); int(params.use_numerical_citations)+1);
setEnabled(options_->choice_citation_format, params.use_natbib);
fl_set_counter_value(options_->slider_secnumdepth, params.secnumdepth); fl_set_counter_value(options_->slider_secnumdepth, params.secnumdepth);
fl_set_counter_value(options_->slider_tocdepth, params.tocdepth); fl_set_counter_value(options_->slider_tocdepth, params.tocdepth);
if (!params.float_placement.empty()) if (!params.float_placement.empty())