From ab09cf6fc91a8b4fd8b1c06f17501deb768f1697 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 16 Aug 2001 10:19:59 +0000 Subject: [PATCH] John's miscellaneous collection of small bits and pieces patch. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2522 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 12 ++++++++++++ src/LyXAction.C | 1 + src/LyXView.C | 1 + src/bufferlist.C | 6 ++++++ src/lyxfind.C | 2 +- src/lyxfunc.C | 4 +--- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3910ed4cbb..b585260753 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,18 @@ * lyxtext.h: * text2.C: setParagraph takes linespacing now +2001-08-15 John Levon + + * LyxAction.C: add internal LFUN_CITATION_INSERT + + * LyXView.C: actually apply fix + + * bufferlist.C: fix open non-existent file + + * lyxfind.C: fix indentation + + * lyxfunc.C: remove unneeded assert, fix typo + 2001-08-14 Dekel Tsur * buffer.C (parseSingleLyXformat2Token): Do not generate errors diff --git a/src/LyXAction.C b/src/LyXAction.C index faf8473734..1b2fffb1b1 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -153,6 +153,7 @@ void LyXAction::init() ReadOnly }, { LFUN_CITATION_CREATE, "citation-insert", N_("Insert citation"), Noop }, + { LFUN_CITATION_INSERT, "", "internal only", Noop }, { LFUN_EXEC_COMMAND, "command-execute", "", NoBuffer }, { LFUN_PREFIX, "command-prefix", N_("Execute command"), NoBuffer }, diff --git a/src/LyXView.C b/src/LyXView.C index 3b8dac80cd..c5e3c53030 100644 --- a/src/LyXView.C +++ b/src/LyXView.C @@ -235,6 +235,7 @@ void LyXView::updateWindowTitle() setWindowTitle(title); last_title = title; } + last_title = title; } diff --git a/src/bufferlist.C b/src/bufferlist.C index d602fc6e59..c5af831668 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -350,6 +350,12 @@ Buffer * BufferList::readFile(string const & s, bool ronly) // File information about normal file FileInfo fileInfo2(s); + if (!fileInfo2.exist()) { + WriteAlert(_("Error!"), _("Cannot open file"), + MakeDisplayPath(s)); + return 0; + } + // Check if emergency save file exists and is newer. e += OnlyFilename(s) + ".emergency"; FileInfo fileInfoE(e); diff --git a/src/lyxfind.C b/src/lyxfind.C index 03de70a469..7174e5ca64 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -104,7 +104,7 @@ int LyXReplace(BufferView * bv, bv->update(bv->getLyXText(), BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); ++replace_count; if (!once) - found = LyXFind(bv, searchstr, fw, false, casesens, matchwrd); + found = LyXFind(bv, searchstr, fw, false, casesens, matchwrd); } while (!once && replaceall && found); if (bv->focus()) diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 534d64e737..dc14ba0c65 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -938,8 +938,6 @@ string const LyXFunc::dispatch(int ac, } } - lyx::Assert(action != LFUN_SELECT_FILE_SYNC); - switch (action) { case LFUN_ESCAPE: @@ -1892,7 +1890,7 @@ void LyXFunc::open(string const & fname) owner->message(str.str().c_str()); } else { ostringstream str; - str << _("Could not open docuent") << ' ' << disp_fn; + str << _("Could not open document") << ' ' << disp_fn; owner->message(str.str().c_str()); } } -- 2.39.5