]> git.lyx.org Git - features.git/commitdiff
Fix bug #2213 (part 1): GuiChanges lacks "Previous Change" button.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 5 Apr 2009 19:14:37 +0000 (19:14 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 5 Apr 2009 19:14:37 +0000 (19:14 +0000)
Add LFUN_CHANGE_PREVIOUS.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29109 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp
src/FuncCode.h
src/LyXAction.cpp

index c75b115fadc9891fb17f33d9d021fdec965c737c..7e658a726b2fc80f1242366fecf1c505b687e5c8 100644 (file)
@@ -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)) {
index e83c8bbc25c2b612c32d010b1dff0b11179ecbf4..f46f0e1e60b2e827a694f8919cf86beb5e78f2fb 100644 (file)
@@ -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
index a2e3379fb795061354a94b7c9f4a8025a120fc9c..be5a544881f3b964ba1b63b01649e9f3cd4c213e 100644 (file)
@@ -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