mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Make GCitation show selected keys even if they're not in
the list of bibkeys. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13247 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
440749ef47
commit
9aa58f9986
@ -1,3 +1,7 @@
|
||||
2006-02-16 John Spray <spray@lyx.org>
|
||||
* GCitation.C: Add selected keys to the list, even if they're
|
||||
in the list of bibkeys.
|
||||
|
||||
2006-02-14 John Spray <spray@lyx.org>
|
||||
* GPainter.[Ch], xftFontMetrics.C: Remove broken multibyte
|
||||
text rendering stuff, make single-byte work properly.
|
||||
|
@ -291,17 +291,29 @@ void GCitation::update_contents()
|
||||
for (std::vector<std::string>::const_iterator ccit = citekeys.begin();
|
||||
ccit != citekeys.end(); ++ccit) {
|
||||
|
||||
bool found = false;
|
||||
for (Gtk::TreeModel::const_iterator cbit =
|
||||
(allListStore_->children()).begin();
|
||||
cbit != (allListStore_->children()).end(); ++cbit) {
|
||||
|
||||
if ((*cbit)[bibColumns.name] == (*ccit)) {
|
||||
found = true;
|
||||
(*cbit)[bibColumns.cite] = true;
|
||||
allListStore_->move(cbit,
|
||||
(allListStore_->children()).end());
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (!found) {
|
||||
// It wasn't in the list of keys, but to support
|
||||
// working on a document away from the bibtex file
|
||||
// we should keep it anyway.
|
||||
Gtk::TreeModel::iterator iter = allListStore_->append();
|
||||
(*iter)[bibColumns.name] = Glib::locale_to_utf8(*ccit);
|
||||
(*iter)[bibColumns.cite] = true;
|
||||
(*iter)[bibColumns.bib_order] = ++bib_order;
|
||||
(*iter)[bibColumns.info] = Glib::locale_to_utf8(
|
||||
biblio::getInfo(theMap,*ccit));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user