small fixes, the new with template hang

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1163 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-10-26 17:31:11 +00:00
parent a235c8b10f
commit a73dbceadc
4 changed files with 9 additions and 11 deletions

View File

@ -1045,7 +1045,7 @@ bool Buffer::readFile(LyXLex & lex, LyXParagraph * par)
if (token == "\\lyxformat") { // the first token _must_ be...
lex.EatLine();
format = lex.GetFloat();
if (format > 1) {
if (format > 1.0) {
if (LYX_FORMAT - format > 0.05) {
lyxerr << fmt(_("Warning: need lyxformat %.2f but found %.2f"),
LYX_FORMAT, format) << endl;
@ -1068,7 +1068,7 @@ bool Buffer::readFile(LyXLex & lex, LyXParagraph * par)
// We simulate a safe reading anyways to allow
// users to take the chance... (Asger)
return true;
} // format < 1
} // format < 1.0
else {
WriteAlert(_("ERROR!"),
_("Old LyX file format found. "

View File

@ -704,7 +704,7 @@ string const LyXFileDlg::Select(string const & title, string const & path,
FL_FULLBORDER, title.c_str());
isOk = RunDialog();
fl_hide_form(pFileDlgForm->FileDlg);
fl_activate_all_forms();
pCurrentDlg = 0;

View File

@ -3086,7 +3086,6 @@ void LyXFunc::setupLocalKeymap()
void LyXFunc::MenuNew(bool fromTemplate)
{
string fname;
string initpath = lyxrc.document_path;
LyXFileDlg fileDlg;
@ -3104,7 +3103,7 @@ void LyXFunc::MenuNew(bool fromTemplate)
ProhibitInput(owner->view());
fileDlg.SetButton(0, _("Documents"), lyxrc.document_path);
fileDlg.SetButton(1, _("Templates"), lyxrc.template_path);
fname = fileDlg.Select(_("Enter Filename for new document"),
string fname = fileDlg.Select(_("Enter Filename for new document"),
initpath, "*.lyx", _("newfile"));
AllowInput(owner->view());
@ -3176,13 +3175,12 @@ void LyXFunc::MenuNew(bool fromTemplate)
string templname;
if (fromTemplate) {
ProhibitInput(owner->view());
fname = fileDlg.Select(_("Choose template"),
string fname = fileDlg.Select(_("Choose template"),
lyxrc.template_path,
"*.lyx");
if (fname.empty())
return;
templname = fname;
AllowInput(owner->view());
if (fname.empty()) return;
templname = fname;
}
// find a free buffer

View File

@ -127,10 +127,10 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, FL_Coord, FL_Coord,
mini->PrepareForCommand();
return 1;
case FL_DRAW:
lyxerr << "Minibuffer event: DRAW" << endl;
//lyxerr << "Minibuffer event: DRAW" << endl;
break;
default:
lyxerr << "Unhandled minibuffer event!" << endl;
//lyxerr << "Unhandled minibuffer event!" << endl;
break;
}