]> git.lyx.org Git - features.git/commitdiff
Move LFUN_BUFFER_WRITE_ALL status to GuiView with a FIXME. I believe this LFUN should...
authorAbdelrazak Younes <younes@lyx.org>
Tue, 22 Sep 2009 21:46:16 +0000 (21:46 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 22 Sep 2009 21:46:16 +0000 (21:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31447 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp
src/frontends/qt4/GuiView.cpp

index 1a68452d2ef42a9ae08d18fd962a950ad63590df..48f3647db7908ac2f54d64d704c96699eccc5ea9 100644 (file)
@@ -474,24 +474,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        }
        */
 
-       case LFUN_BUFFER_WRITE_ALL: {
-               // We enable the command only if there are some modified buffers
-               Buffer * first = theBufferList().first();
-               enable = false;
-               if (!first)
-                       break;
-               Buffer * b = first;
-               // We cannot use a for loop as the buffer list is a cycle.
-               do {
-                       if (!b->isClean()) {
-                               enable = true;
-                               break;
-                       }
-                       b = theBufferList().next(b);
-               } while (b != first); 
-               break;
-       }
-
        case LFUN_BOOKMARK_GOTO: {
                const unsigned int num = convert<unsigned int>(to_utf8(cmd.argument()));
                enable = theSession().bookmarks().isValid(num);
index 12f270b24ad39638c51a2cb0687112e8b1c0bbee..71b7a2080baac42921e8e0a2baf3225505f3af1a 100644 (file)
@@ -1211,6 +1211,25 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                enable = doc_buffer && (doc_buffer->isUnnamed() || !doc_buffer->isClean());
                break;
 
+       //FIXME: This LFUN should be moved to GuiApplication.
+       case LFUN_BUFFER_WRITE_ALL: {
+               // We enable the command only if there are some modified buffers
+               Buffer * first = theBufferList().first();
+               enable = false;
+               if (!first)
+                       break;
+               Buffer * b = first;
+               // We cannot use a for loop as the buffer list is a cycle.
+               do {
+                       if (!b->isClean()) {
+                               enable = true;
+                               break;
+                       }
+                       b = theBufferList().next(b);
+               } while (b != first); 
+               break;
+       }
+
        case LFUN_BUFFER_WRITE_AS:
                enable = doc_buffer;
                break;