#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include <algorithm>
-#include "gettext.h"
+#include "qt_helpers.h"
#include "controllers/ControlCitation.h"
#include "LyXView.h"
#include "buffer.h"
connect(searchED, SIGNAL(returnPressed()),
this, SLOT(slotNextClicked()));
- textBeforeED->setText(_("Not yet supported"));
+ textBeforeED->setText(qt_("Not yet supported"));
textBeforeED->setReadOnly(true);
textBeforeED->setFocusPolicy(QWidget::NoFocus);
citationStyleCO->setEnabled(false);
// the selected browser_bib key
infoML->clear();
- infoML->setText(biblio::getInfo(theMap, form_->bibkeys[sel]).c_str());
+ infoML->setText(toqstr(biblio::getInfo(theMap, form_->bibkeys[sel])));
// Highlight the selected browser_bib key in browser_cite if
// present
// Put into browser_info the additional info associated
// with the selected browser_cite key
infoML->clear();
- infoML->setText(biblio::getInfo(theMap, form_->citekeys[sel]).c_str());
+ infoML->setText(toqstr(biblio::getInfo(theMap, form_->citekeys[sel])));
}
}
}
// Add the selected browser_bib key to browser_cite
- citeLB->insertItem(form_->bibkeys[sel].c_str());
+ citeLB->insertItem(toqstr(form_->bibkeys[sel]));
form_->citekeys.push_back(form_->bibkeys[sel]);
int const n = int(form_->citekeys.size());
form_->setBibButtons(QCitation::OFF);
form_->setCiteButtons(QCitation::ON);
form_->changed();
+ form_->fillStyles();
}
form_->setBibButtons(QCitation::ON);
form_->setCiteButtons(QCitation::OFF);
form_->changed();
+ form_->fillStyles();
+ form_->updateStyle();
}
citeLB->removeItem(sel);
form_->citekeys.erase(it);
- citeLB->insertItem(tmp.c_str(), sel - 1);
+ citeLB->insertItem(toqstr(tmp), sel - 1);
citeLB->setSelected(sel - 1, true);
form_->citekeys.insert(it - 1, tmp);
form_->setCiteButtons(QCitation::ON);
form_->changed();
+ form_->fillStyles();
}
citeLB->removeItem(sel);
form_->citekeys.erase(it);
- citeLB->insertItem(tmp.c_str(), sel + 1);
+ citeLB->insertItem(toqstr(tmp), sel + 1);
citeLB->setSelected(sel + 1, true);
form_->citekeys.insert(it + 1, tmp);
form_->setCiteButtons(QCitation::ON);
form_->changed();
+ form_->fillStyles();
}
void QCitationDialog::doFind(biblio::Direction dir)
{
biblio::InfoMap const & theMap = form_->controller().bibkeysInfo();
- string const str = searchED->text().latin1();
+ string const str = fromqstr(searchED->text());
biblio::Search const type =
searchTypeCB->isChecked() ?
int const top = max(found - 5, 1);
bibLB->setTopItem(top);
bibLB->setSelected(found, true);
- slotBibHighlighted(0);
+ slotBibHighlighted(found);
}