From 03671821d33753ec7e79f8cfcf56240ce40df88e Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 5 Apr 2009 19:14:37 +0000 Subject: [PATCH] Fix bug #2213 (part 1): GuiChanges lacks "Previous Change" button. Add LFUN_CHANGE_PREVIOUS. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29109 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 7 +++++++ src/FuncCode.h | 4 +++- src/LyXAction.cpp | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index c75b115fad..7e658a726b 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -983,6 +983,7 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd) case LFUN_CHANGES_MERGE: case LFUN_CHANGE_NEXT: + case LFUN_CHANGE_PREVIOUS: case LFUN_ALL_CHANGES_ACCEPT: case LFUN_ALL_CHANGES_REJECT: // TODO: context-sensitive enabling of LFUNs @@ -1227,6 +1228,12 @@ bool BufferView::dispatch(FuncRequest const & cmd) // FIXME: Move this LFUN to Buffer so that we don't have to do this: processUpdateFlags(Update::Force | Update::FitCursor); break; + + case LFUN_CHANGE_PREVIOUS: + findPreviousChange(this); + // FIXME: Move this LFUN to Buffer so that we don't have to do this: + processUpdateFlags(Update::Force | Update::FitCursor); + break; case LFUN_CHANGES_MERGE: if (findNextChange(this)) { diff --git a/src/FuncCode.h b/src/FuncCode.h index e83c8bbc25..f46f0e1e60 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -348,10 +348,10 @@ enum FuncCode LFUN_PARAGRAPH_MOVE_UP, LFUN_BUFFER_TOGGLE_COMPRESSION, // bpeng 20060427 // 265 - LFUN_MATH_BIGDELIM, LFUN_CLIPBOARD_PASTE, LFUN_INSET_DISSOLVE, // jspitzm 20060807 LFUN_CHANGE_NEXT, + LFUN_CHANGE_PREVIOUS, // vfr 20090404 LFUN_WINDOW_NEW, // Abdel 20061021 // 270 LFUN_WINDOW_CLOSE, // Abdel 20061023 @@ -425,6 +425,8 @@ enum FuncCode LFUN_SCREEN_SHOW_CURSOR, // vfr, 20090325 LFUN_BUFFER_ZOOM_IN, // vfr, 20090330 LFUN_BUFFER_ZOOM_OUT, // vfr, 20090330 + // 330 + LFUN_MATH_BIGDELIM, LFUN_LASTACTION // end of the table diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index a2e3379fb7..be5a544881 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -2108,6 +2108,15 @@ void LyXAction::init() * \endvar */ { LFUN_CHANGE_NEXT, "change-next", ReadOnly, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_CHANGE_PREVIOUS + * \li Action: Moves the cursor to the position of the previous change + of the change tracking records. + * \li Syntax: change-previous + * \li Origin: vfr, 4 Apr 2009 + * \endvar + */ + { LFUN_CHANGE_PREVIOUS, "change-previous", ReadOnly, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_CHANGES_MERGE * \li Action: Open change tracking dialog for merging and moves the cursor