]> git.lyx.org Git - lyx.git/commitdiff
John's miscellaneous collection of small bits and pieces patch.
authorAngus Leeming <leeming@lyx.org>
Thu, 16 Aug 2001 10:19:59 +0000 (10:19 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 16 Aug 2001 10:19:59 +0000 (10:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2522 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/LyXAction.C
src/LyXView.C
src/bufferlist.C
src/lyxfind.C
src/lyxfunc.C

index 3910ed4cbb23388199c4657fb0a87f07293c2f5a..b5852607534f7bb651d8513e4b5f83bda5d389c3 100644 (file)
@@ -9,6 +9,18 @@
        * lyxtext.h:
        * text2.C: setParagraph takes linespacing now
  
+2001-08-15  John Levon  <moz@compsoc.man.ac.uk>
+
+       * 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  <dekelts@tau.ac.il>
 
        * buffer.C (parseSingleLyXformat2Token): Do not generate errors
index faf8473734432f5849956c838ed8699ac4f59306..1b2fffb1b15f5ea1974be627dafa635564de7166 100644 (file)
@@ -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 },
index 3b8dac80cd08403517eeb723801ce37c96dcf3f7..c5e3c53030edc39fa7802a352eb7885e994c0f01 100644 (file)
@@ -235,6 +235,7 @@ void LyXView::updateWindowTitle()
                setWindowTitle(title);
                last_title = title;
        }
+       last_title = title;
 }
 
 
index d602fc6e598cdaf58aa1c5b76ce89d944fa4eb71..c5af8316686d4dea579960ac7a608988cf70db86 100644 (file)
@@ -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);
index 03de70a4695de83e917cf170289c7cedf6558da2..7174e5ca646042ac9a6ee16823d4513aac2efafd 100644 (file)
@@ -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())
index 534d64e73741eb2413992bc5d8acbe4505d406c6..dc14ba0c65e1cc5f31840ad2f5ff93cbcc8a675e 100644 (file)
@@ -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());
        }
 }