small cleanups.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4910 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-08-08 21:08:02 +00:00
parent a07e20bf57
commit 7d23c29dee
4 changed files with 32 additions and 29 deletions

View File

@ -336,40 +336,35 @@ bool BufferView::gotoLabel(string const & label)
void BufferView::menuUndo()
{
if (available()) {
owner()->message(_("Undo"));
hideCursor();
beforeChange(text);
update(text, BufferView::SELECT|BufferView::FITCUR);
if (!textUndo(this))
owner()->message(_("No further undo information"));
else
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
switchKeyMap();
}
if (!available())
return;
owner()->message(_("Undo"));
hideCursor();
beforeChange(text);
update(text, BufferView::SELECT|BufferView::FITCUR);
if (!textUndo(this))
owner()->message(_("No further undo information"));
else
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
switchKeyMap();
}
void BufferView::menuRedo()
{
#if 0 // this should not be here (Jug 20011206)
if (theLockingInset()) {
owner()->message(_("Redo not yet supported in math mode"));
if (!available())
return;
}
#endif
if (available()) {
owner()->message(_("Redo"));
hideCursor();
beforeChange(text);
update(text, BufferView::SELECT|BufferView::FITCUR);
if (!textRedo(this))
owner()->message(_("No further redo information"));
else
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
switchKeyMap();
}
owner()->message(_("Redo"));
hideCursor();
beforeChange(text);
update(text, BufferView::SELECT|BufferView::FITCUR);
if (!textRedo(this))
owner()->message(_("No further redo information"));
else
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
switchKeyMap();
}

View File

@ -1,3 +1,10 @@
2002-08-08 John Levon <levon@movementarian.org>
* BufferView2.C: small cleanup
* lyxfind.h:
* lyxfind.C: move unnecessary header into the .C
2002-08-08 John Levon <levon@movementarian.org>
* funcrequest.h: just tedious nonsense

View File

@ -6,6 +6,7 @@
#include "lyxtext.h"
#include "lyxfind.h"
#include "paragraph.h"
#include "frontends/LyXView.h"
#include "frontends/Alert.h"
#include "support/textutils.h"

View File

@ -7,9 +7,9 @@
#endif
#include "LString.h"
#include "paragraph.h"
class BufferView;
class LyXText;
namespace lyxfind {