2006-03-05 17:24:44 +00:00
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
|
* \file GuiBibtex.cpp
|
2006-03-05 17:24:44 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author John Levon
|
|
|
|
|
* \author Herbert Vo<EFBFBD>
|
|
|
|
|
* \author J<EFBFBD>rgen Spitzm<EFBFBD>ller
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
#include "GuiBibtex.h"
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
2007-08-11 15:48:15 +00:00
|
|
|
|
#include "ui_BibtexAddUi.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
|
#include "qt_helpers.h"
|
2007-04-26 03:53:02 +00:00
|
|
|
|
#include "Validator.h"
|
2007-04-26 04:41:58 +00:00
|
|
|
|
#include "LyXRC.h"
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
#include "ControlBibtex.h"
|
|
|
|
|
#include "ButtonPolicy.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2006-04-09 08:42:58 +00:00
|
|
|
|
#include "support/filetools.h" // changeExtension
|
2006-03-05 17:24:44 +00:00
|
|
|
|
#include "support/lstrings.h"
|
|
|
|
|
|
2006-05-02 19:17:59 +00:00
|
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <QListWidget>
|
|
|
|
|
#include <QCheckBox>
|
2007-04-25 08:42:22 +00:00
|
|
|
|
#include <QCloseEvent>
|
|
|
|
|
#include <QLineEdit>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-04-25 08:42:22 +00:00
|
|
|
|
#include "debug.h"
|
|
|
|
|
#include "support/filetools.h"
|
|
|
|
|
#include "support/lstrings.h"
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
using std::vector;
|
|
|
|
|
using std::string;
|
|
|
|
|
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
namespace frontend {
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
using support::changeExtension;
|
|
|
|
|
using support::split;
|
|
|
|
|
using support::trim;
|
|
|
|
|
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
GuiBibtexDialog::GuiBibtexDialog(LyXView & lv)
|
|
|
|
|
: GuiDialog(lv, "bibtex")
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
|
|
|
|
setupUi(this);
|
2007-09-05 20:33:29 +00:00
|
|
|
|
|
|
|
|
|
setViewTitle( _("BibTeX Bibliography"));
|
|
|
|
|
setController(new ControlBibtex(*this));
|
|
|
|
|
|
2007-04-25 08:42:22 +00:00
|
|
|
|
QDialog::setModal(true);
|
|
|
|
|
|
|
|
|
|
connect(okPB, SIGNAL(clicked()),
|
2007-09-05 20:33:29 +00:00
|
|
|
|
this, SLOT(slotOK()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(closePB, SIGNAL(clicked()),
|
2007-09-05 20:33:29 +00:00
|
|
|
|
this, SLOT(slotClose()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(stylePB, SIGNAL(clicked()),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(browsePressed()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(deletePB, SIGNAL(clicked()),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(deletePressed()));
|
2007-09-05 20:33:29 +00:00
|
|
|
|
connect(styleCB, SIGNAL(editTextChanged(const QString &)),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(change_adaptor()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(databaseLW, SIGNAL(itemSelectionChanged()),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(databaseChanged()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(bibtocCB, SIGNAL(clicked()),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(change_adaptor()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(btPrintCO, SIGNAL(activated(int)),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(change_adaptor()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
connect(addBibPB, SIGNAL(clicked()),
|
2007-08-31 05:53:55 +00:00
|
|
|
|
this, SLOT(addPressed()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
add_ = new GuiBibtexAddDialog(this);
|
2007-09-02 07:53:07 +00:00
|
|
|
|
add_bc_.setPolicy(ButtonPolicy::OkCancelPolicy);
|
2007-09-03 05:59:32 +00:00
|
|
|
|
add_bc_.setOK(add_->addPB);
|
|
|
|
|
add_bc_.setCancel(add_->closePB);
|
|
|
|
|
add_bc_.addCheckedLineEdit(add_->bibED, 0);
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
|
|
|
|
connect(add_->bibED, SIGNAL(textChanged(const QString &)),
|
|
|
|
|
this, SLOT(bibEDChanged()));
|
|
|
|
|
connect(add_->addPB, SIGNAL(clicked()),
|
|
|
|
|
this, SLOT(addDatabase()));
|
|
|
|
|
connect(add_->addPB, SIGNAL(clicked()),
|
|
|
|
|
add_, SLOT(accept()));
|
|
|
|
|
connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)),
|
|
|
|
|
this, SLOT(addDatabase()));
|
|
|
|
|
connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)),
|
|
|
|
|
add_, SLOT(accept()));
|
|
|
|
|
connect(add_->bibLW, SIGNAL(itemSelectionChanged()),
|
|
|
|
|
this, SLOT(availableChanged()));
|
|
|
|
|
connect(add_->browsePB, SIGNAL(clicked()),
|
|
|
|
|
this, SLOT(browseBibPressed()));
|
|
|
|
|
connect(add_->closePB, SIGNAL(clicked()),
|
|
|
|
|
add_, SLOT(reject()));
|
2007-09-05 20:33:29 +00:00
|
|
|
|
|
|
|
|
|
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
|
bc().setOK(okPB);
|
|
|
|
|
bc().setCancel(closePB);
|
|
|
|
|
bc().addReadOnly(databaseLW);
|
|
|
|
|
bc().addReadOnly(stylePB);
|
|
|
|
|
bc().addReadOnly(styleCB);
|
|
|
|
|
bc().addReadOnly(bibtocCB);
|
|
|
|
|
bc().addReadOnly(addBibPB);
|
|
|
|
|
bc().addReadOnly(deletePB);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ControlBibtex & GuiBibtexDialog::controller() const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<ControlBibtex &>(Dialog::controller());
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::bibEDChanged()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
|
|
|
|
// Indicate to the button controller that the contents have
|
|
|
|
|
// changed. The actual test of validity is carried out by
|
|
|
|
|
// the checkedLineEdit.
|
2007-09-03 05:59:32 +00:00
|
|
|
|
add_bc_.setValid(true);
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::change_adaptor()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
changed();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::browsePressed()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
docstring const file = controller().browseBst(docstring());
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
|
|
|
|
if (!file.empty()) {
|
|
|
|
|
// FIXME UNICODE
|
|
|
|
|
docstring const filen = from_utf8(changeExtension(to_utf8(file), ""));
|
|
|
|
|
bool present = false;
|
|
|
|
|
unsigned int pres = 0;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i != styleCB->count(); ++i) {
|
|
|
|
|
if (qstring_to_ucs4(styleCB->itemText(i)) == filen) {
|
|
|
|
|
present = true;
|
|
|
|
|
pres = i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!present)
|
|
|
|
|
styleCB->insertItem(0, toqstr(filen));
|
|
|
|
|
|
|
|
|
|
styleCB->setCurrentIndex(pres);
|
2007-09-05 20:33:29 +00:00
|
|
|
|
changed();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::browseBibPressed()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
docstring const file = trim(controller().browseBib(docstring()));
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
|
|
|
|
if (!file.empty()) {
|
|
|
|
|
// FIXME UNICODE
|
|
|
|
|
QString const f = toqstr(changeExtension(to_utf8(file), ""));
|
|
|
|
|
bool present = false;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < add_->bibLW->count(); ++i) {
|
|
|
|
|
if (add_->bibLW->item(i)->text() == f)
|
|
|
|
|
present = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!present) {
|
|
|
|
|
add_->bibLW->addItem(f);
|
2007-09-05 20:33:29 +00:00
|
|
|
|
changed();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
add_->bibED->setText(f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::addPressed()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-03 05:59:32 +00:00
|
|
|
|
add_bc_.setValid(false);
|
2007-04-25 08:42:22 +00:00
|
|
|
|
add_->exec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::addDatabase()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
|
|
|
|
int const sel = add_->bibLW->currentRow();
|
|
|
|
|
docstring const file = trim(qstring_to_ucs4(add_->bibED->text()));
|
|
|
|
|
|
|
|
|
|
if (sel < 0 && file.empty())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// Add the selected browser_bib keys to browser_database
|
|
|
|
|
// multiple selections are possible
|
|
|
|
|
for (int i = 0; i != add_->bibLW->count(); ++i) {
|
|
|
|
|
QListWidgetItem * const item = add_->bibLW->item(i);
|
|
|
|
|
if (add_->bibLW->isItemSelected(item)) {
|
|
|
|
|
add_->bibLW->setItemSelected(item, false);
|
|
|
|
|
QList<QListWidgetItem *> matches =
|
|
|
|
|
databaseLW->findItems(item->text(), Qt::MatchExactly);
|
|
|
|
|
if (matches.empty())
|
|
|
|
|
databaseLW->addItem(item->text());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!file.empty()) {
|
|
|
|
|
add_->bibED->clear();
|
|
|
|
|
QString const f = toqstr(from_utf8(changeExtension(to_utf8(file), "")));
|
|
|
|
|
QList<QListWidgetItem *> matches =
|
|
|
|
|
databaseLW->findItems(f, Qt::MatchExactly);
|
|
|
|
|
if (matches.empty())
|
|
|
|
|
databaseLW->addItem(f);
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
changed();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::deletePressed()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
|
|
|
|
databaseLW->takeItem(databaseLW->currentRow());
|
2007-09-05 20:33:29 +00:00
|
|
|
|
changed();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::databaseChanged()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
deletePB->setEnabled(!readOnly() && databaseLW->currentRow() != -1);
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::availableChanged()
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-03 05:59:32 +00:00
|
|
|
|
add_bc_.setValid(true);
|
2007-04-25 08:42:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
void GuiBibtexDialog::closeEvent(QCloseEvent *e)
|
2007-04-25 08:42:22 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
slotWMHide();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
e->accept();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
void GuiBibtexDialog::update_contents()
|
2006-03-05 17:24:44 +00:00
|
|
|
|
{
|
|
|
|
|
bool bibtopic = controller().usingBibtopic();
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
databaseLW->clear();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2006-10-20 13:53:43 +00:00
|
|
|
|
docstring bibs(controller().params()["bibfiles"]);
|
|
|
|
|
docstring bib;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
while (!bibs.empty()) {
|
|
|
|
|
bibs = split(bibs, bib, ',');
|
|
|
|
|
bib = trim(bib);
|
|
|
|
|
if (!bib.empty())
|
2007-09-05 20:33:29 +00:00
|
|
|
|
databaseLW->addItem(toqstr(bib));
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
add_->bibLW->clear();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
vector<string> bib_str;
|
|
|
|
|
controller().getBibFiles(bib_str);
|
|
|
|
|
for (vector<string>::const_iterator it = bib_str.begin();
|
|
|
|
|
it != bib_str.end(); ++it) {
|
2006-04-09 08:42:58 +00:00
|
|
|
|
string bibItem(changeExtension(*it, ""));
|
2007-09-05 20:33:29 +00:00
|
|
|
|
add_->bibLW->addItem(toqstr(bibItem));
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-03-20 10:24:23 +00:00
|
|
|
|
string bibstyle(controller().getStylefile());
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
bibtocCB->setChecked(controller().bibtotoc() && !bibtopic);
|
|
|
|
|
bibtocCB->setEnabled(!bibtopic);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2006-10-20 13:53:43 +00:00
|
|
|
|
docstring btprint(controller().params()["btprint"]);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
int btp = 0;
|
|
|
|
|
if (btprint == "btPrintNotCited")
|
|
|
|
|
btp = 1;
|
|
|
|
|
else if (btprint == "btPrintAll")
|
|
|
|
|
btp = 2;
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
btPrintCO->setCurrentIndex(btp);
|
|
|
|
|
btPrintCO->setEnabled(bibtopic);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
styleCB->clear();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
int item_nr(-1);
|
|
|
|
|
|
|
|
|
|
vector<string> str;
|
|
|
|
|
controller().getBibStyles(str);
|
|
|
|
|
for (vector<string>::const_iterator it = str.begin();
|
|
|
|
|
it != str.end(); ++it) {
|
2006-04-09 08:42:58 +00:00
|
|
|
|
string item(changeExtension(*it, ""));
|
2006-03-05 17:24:44 +00:00
|
|
|
|
if (item == bibstyle)
|
|
|
|
|
item_nr = int(it - str.begin());
|
2007-09-05 20:33:29 +00:00
|
|
|
|
styleCB->addItem(toqstr(item));
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item_nr == -1 && !bibstyle.empty()) {
|
2007-09-05 20:33:29 +00:00
|
|
|
|
styleCB->addItem(toqstr(bibstyle));
|
|
|
|
|
item_nr = styleCB->count() - 1;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item_nr != -1)
|
2007-09-05 20:33:29 +00:00
|
|
|
|
styleCB->setCurrentIndex(item_nr);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
else
|
2007-09-05 20:33:29 +00:00
|
|
|
|
styleCB->clearEditText();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
void GuiBibtexDialog::applyView()
|
2006-03-05 17:24:44 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
docstring dbs = qstring_to_ucs4(databaseLW->item(0)->text());
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
unsigned int maxCount = databaseLW->count();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
for (unsigned int i = 1; i < maxCount; i++) {
|
|
|
|
|
dbs += ',';
|
2007-09-05 20:33:29 +00:00
|
|
|
|
dbs += qstring_to_ucs4(databaseLW->item(i)->text());
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-10-20 13:53:43 +00:00
|
|
|
|
controller().params()["bibfiles"] = dbs;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
docstring const bibstyle(qstring_to_ucs4(styleCB->currentText()));
|
|
|
|
|
bool const bibtotoc(bibtocCB->isChecked());
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
if (bibtotoc && (!bibstyle.empty())) {
|
|
|
|
|
// both bibtotoc and style
|
2006-10-20 13:53:43 +00:00
|
|
|
|
controller().params()["options"] = "bibtotoc," + bibstyle;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
} else if (bibtotoc) {
|
|
|
|
|
// bibtotoc and no style
|
2007-04-25 16:39:21 +00:00
|
|
|
|
controller().params()["options"] = from_ascii("bibtotoc");
|
2006-03-05 17:24:44 +00:00
|
|
|
|
} else {
|
|
|
|
|
// only style. An empty one is valid, because some
|
|
|
|
|
// documentclasses have an own \bibliographystyle{}
|
|
|
|
|
// command!
|
2006-10-20 13:53:43 +00:00
|
|
|
|
controller().params()["options"] = bibstyle;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// bibtopic allows three kinds of sections:
|
|
|
|
|
// 1. sections that include all cited references of the database(s)
|
|
|
|
|
// 2. sections that include all uncited references of the database(s)
|
|
|
|
|
// 3. sections that include all references of the database(s), cited or not
|
2007-09-05 20:33:29 +00:00
|
|
|
|
int btp = btPrintCO->currentIndex();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
switch (btp) {
|
|
|
|
|
case 0:
|
2007-04-25 16:39:21 +00:00
|
|
|
|
controller().params()["btprint"] = from_ascii("btPrintCited");
|
2006-03-05 17:24:44 +00:00
|
|
|
|
break;
|
|
|
|
|
case 1:
|
2007-04-25 16:39:21 +00:00
|
|
|
|
controller().params()["btprint"] = from_ascii("btPrintNotCited");
|
2006-03-05 17:24:44 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2:
|
2007-04-25 16:39:21 +00:00
|
|
|
|
controller().params()["btprint"] = from_ascii("btPrintAll");
|
2006-03-05 17:24:44 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!controller().usingBibtopic())
|
2006-10-20 13:53:43 +00:00
|
|
|
|
controller().params()["btprint"] = docstring();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
|
bool GuiBibtexDialog::isValid()
|
2006-03-05 17:24:44 +00:00
|
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
|
return databaseLW->count() != 0;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
|
} // namespace lyx
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
#include "GuiBibtex_moc.cpp"
|