From 667ecbdd1d1da1488802480eae06c96aed946854 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Mon, 12 Dec 2011 14:45:30 +0000 Subject: [PATCH] User frontend for the new document-wide bibliography style feature. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40485 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 8 ++++++ src/frontends/qt4/ui/BiblioUi.ui | 43 +++++++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 378149f617..061b5f6c88 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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, ' '); diff --git a/src/frontends/qt4/ui/BiblioUi.ui b/src/frontends/qt4/ui/BiblioUi.ui index 6c6d5b8cb0..896f99d126 100644 --- a/src/frontends/qt4/ui/BiblioUi.ui +++ b/src/frontends/qt4/ui/BiblioUi.ui @@ -105,13 +105,46 @@ - - - Select this if you want to split your bibliography into sections + + + Bibliography Style - - S&ectioned bibliography + + true + + + + + + + Default st&yle: + + + bibtexStyleLE + + + + + + + Define the default BibTeX style + + + + + + + + + Select this if you want to split your bibliography into sections + + + S&ectioned bibliography + + + + -- 2.39.2