fix a small message bug

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6874 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-04-28 21:58:53 +00:00
parent d19f82e515
commit 36e376b011
3 changed files with 14 additions and 7 deletions

View File

@ -1,6 +1,12 @@
2003-04-28 Lars Gullik Bjønnes <larsbj@gullik.net>
* bufferlist.C (newFile): set language (messages_) for new
documents also.
* buffer.C (readFile): ws changes only.
2003-04-28 André Pönitz <poenitz@gmx.net>
* undo_funcs.C:
* lyxfunc.C:
* buffer.[Ch]:

View File

@ -501,7 +501,7 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
// language is set and used in the gui.
// If you know of a better place to put this, please tell me. (Lgb)
updateDocLang(params.language);
return ret;
}
@ -2215,7 +2215,7 @@ void Buffer::redraw()
void Buffer::changeLanguage(Language const * from, Language const * to)
{
lyxerr << "Changing Language!" << endl;
// Take care of l10n/i18n
updateDocLang(to);
@ -2224,7 +2224,7 @@ void Buffer::changeLanguage(Language const * from, Language const * to)
(*it)->changeLanguage(params, from, to);
}
void Buffer::updateDocLang(Language const * nlang)
{
messages_.reset(new Messages(nlang->code()));
@ -2340,7 +2340,7 @@ string const Buffer::B_(string const & l10n) const
if (messages_.get()) {
return messages_->get(l10n);
}
return _(l10n);
}

View File

@ -201,7 +201,7 @@ bool BufferList::close(Buffer * buf, bool ask)
} else if (ret == 2) {
return false;
}
if (buf->isUnnamed()) {
removeAutosaveFile(buf->fileName());
}
@ -499,7 +499,8 @@ Buffer * BufferList::newFile(string const & name, string tname, bool isNamed)
}
b->setReadonly(false);
b->updateDocLang(b->params.language);
return b;
}