]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDocument.cpp
User frontend for the new document-wide bibliography style feature.
[lyx.git] / src / frontends / qt4 / GuiDocument.cpp
index 378149f6170e7af2b97629f638490e1081292819..061b5f6c88d84d28407453ee3930480350900f92 100644 (file)
@@ -1119,9 +1119,13 @@ GuiDocument::GuiDocument(GuiView & lv)
                this, SLOT(bibtexChanged(int)));
        connect(biblioModule->bibtexOptionsLE, SIGNAL(textChanged(QString)),
                this, SLOT(change_adaptor()));
+       connect(biblioModule->bibtexStyleLE, SIGNAL(textChanged(QString)),
+               this, SLOT(change_adaptor()));
 
        biblioModule->bibtexOptionsLE->setValidator(new NoNewLineValidator(
                biblioModule->bibtexOptionsLE));
+       biblioModule->bibtexStyleLE->setValidator(new NoNewLineValidator(
+               biblioModule->bibtexStyleLE));
 
        biblioModule->citeStyleCO->addItem(qt_("Author-year"));
        biblioModule->citeStyleCO->addItem(qt_("Numerical"));
@@ -2240,6 +2244,8 @@ void GuiDocument::applyView()
        bp_.use_bibtopic =
                biblioModule->bibtopicCB->isChecked();
 
+       bp_.biblio_style = fromqstr(biblioModule->bibtexStyleLE->text());
+
        string const bibtex_command =
                fromqstr(biblioModule->bibtexCO->itemData(
                        biblioModule->bibtexCO->currentIndex()).toString());
@@ -2671,6 +2677,8 @@ void GuiDocument::paramsToDialog()
        biblioModule->bibtopicCB->setChecked(
                bp_.use_bibtopic);
 
+       biblioModule->bibtexStyleLE->setText(toqstr(bp_.biblio_style));
+
        string command;
        string options =
                split(bp_.bibtex_command, command, ' ');