]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
remove unused code
[lyx.git] / src / LyXFunc.cpp
index 27a4f7d83aab176c5bca3c4156860643ed20540c..8cd2d66906122667452902f9d5ad33cc3d584ddd 100644 (file)
  */
 
 #include <config.h>
-#include <vector>
 
 #include "LyXFunc.h"
 
+#include "LayoutFile.h"
 #include "BranchList.h"
 #include "buffer_funcs.h"
 #include "Buffer.h"
 #include "Converter.h"
 #include "Cursor.h"
 #include "CutAndPaste.h"
-#include "support/debug.h"
 #include "DispatchResult.h"
 #include "Encoding.h"
 #include "ErrorList.h"
 #include "Format.h"
 #include "FuncRequest.h"
 #include "FuncStatus.h"
-#include "support/gettext.h"
 #include "InsetIterator.h"
 #include "Intl.h"
 #include "KeyMap.h"
@@ -57,8 +55,6 @@
 #include "Row.h"
 #include "Server.h"
 #include "Session.h"
-#include "TextClassList.h"
-#include "ToolbarBackend.h"
 
 #include "insets/InsetBox.h"
 #include "insets/InsetBranch.h"
@@ -70,6 +66,7 @@
 #include "insets/InsetGraphics.h"
 #include "insets/InsetInclude.h"
 #include "insets/InsetNote.h"
+#include "insets/InsetSpace.h"
 #include "insets/InsetTabular.h"
 #include "insets/InsetVSpace.h"
 #include "insets/InsetWrap.h"
 #include "frontends/LyXView.h"
 #include "frontends/Selection.h"
 
+#include "support/debug.h"
 #include "support/environment.h"
-#include "support/FileFilterList.h"
 #include "support/FileName.h"
 #include "support/filetools.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 #include "support/Path.h"
 #include "support/Package.h"
@@ -92,6 +90,7 @@
 #include "support/os.h"
 
 #include <sstream>
+#include <vector>
 
 using namespace std;
 using namespace lyx::support;
@@ -102,18 +101,16 @@ using frontend::LyXView;
 
 namespace Alert = frontend::Alert;
 
-extern bool quitting;
-extern bool use_gui;
-
 namespace {
 
 
 // This function runs "configure" and then rereads lyx.defaults to
 // reconfigure the automatic settings.
-void reconfigure(LyXView & lv, string const & option)
+void reconfigure(LyXView * lv, string const & option)
 {
        // emit message signal.
-       lv.message(_("Running configure..."));
+       if (lv)
+               lv->message(_("Running configure..."));
 
        // Run configure in user lyx directory
        PathChanger p(package().user_support());
@@ -123,7 +120,8 @@ void reconfigure(LyXView & lv, string const & option)
        int ret = one.startscript(Systemcall::Wait, configure_command);
        p.pop();
        // emit message signal.
-       lv.message(_("Reloading configuration..."));
+       if (lv)
+               lv->message(_("Reloading configuration..."));
        lyxrc.read(libFileSearch(string(), "lyxrc.defaults"));
        // Re-read packages.lst
        LaTeXFeatures::getAvailable();
@@ -211,7 +209,7 @@ void LyXFunc::initKeySequences(KeyMap * kb)
 
 void LyXFunc::setLyXView(LyXView * lv)
 {
-       if (!quitting && lyx_view_ && lyx_view_->view() && lyx_view_ != lv)
+       if (lyx_view_ && lyx_view_->view() && lyx_view_ != lv)
                // save current selection to the selection buffer to allow
                // middle-button paste in another window
                cap::saveSelection(lyx_view_->view()->cursor());
@@ -219,7 +217,7 @@ void LyXFunc::setLyXView(LyXView * lv)
 }
 
 
-void LyXFunc::handleKeyFunc(kb_action action)
+void LyXFunc::handleKeyFunc(FuncCode action)
 {
        char_type c = encoded_last_key;
 
@@ -237,7 +235,8 @@ void LyXFunc::handleKeyFunc(kb_action action)
        view()->processUpdateFlags(Update::FitCursor);
 }
 
-
+//FIXME: bookmark handling is a frontend issue. This code should be transferred
+// to GuiView and be GuiView and be window dependent.
 void LyXFunc::gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer)
 {
        BOOST_ASSERT(lyx_view_);
@@ -297,7 +296,8 @@ void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
 
        if (keysym.isModifier()) {
                LYXERR(Debug::KEY, "isModifier true");
-               lyx_view_->restartCursor();
+               if (lyx_view_)
+                       lyx_view_->restartCursor();
                return;
        }
 
@@ -374,9 +374,12 @@ void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
                }
        } else {
                dispatch(func);
+               if (!lyx_view_)
+                       return;
        }
 
-       lyx_view_->restartCursor();
+       if (lyx_view_)
+               lyx_view_->restartCursor();
 }
 
 
@@ -385,7 +388,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        //lyxerr << "LyXFunc::getStatus: cmd: " << cmd << endl;
        FuncStatus flag;
 
-       Buffer * buf = lyx_view_? lyx_view_->buffer() : 0;
+       Buffer * buf = lyx_view_ ? lyx_view_->buffer() : 0;
 
        if (cmd.action == LFUN_NOACTION) {
                flag.message(from_utf8(N_("Nothing to do")));
@@ -443,22 +446,25 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        // FIXME: these cases should be hidden in GuiView::getStatus().
        case LFUN_DIALOG_TOGGLE:
        case LFUN_DIALOG_SHOW:
+       case LFUN_UI_TOGGLE:
        case LFUN_DIALOG_UPDATE:
-               if (cmd.argument() == "prefs"
-                   || cmd.argument() == "aboutlyx")
-                       enable = true;
-               else if (lyx_view_)
+               // FIXME: add special handling for about and prefs dialogs here
+               // which do not depend on GuiView.
+               if (lyx_view_)
                        return lyx_view_->getStatus(cmd);
                else
                        enable = false;
                break;
 
        case LFUN_TOOLBAR_TOGGLE:
-       case LFUN_MENUBAR_TOGGLE:
-       case LFUN_STATUSBAR_TOGGLE:
        case LFUN_INSET_APPLY:
        case LFUN_BUFFER_WRITE:
        case LFUN_BUFFER_WRITE_AS:
+       case LFUN_SPLIT_VIEW:
+       case LFUN_CLOSE_TAB_GROUP:
+       case LFUN_COMPLETION_POPUP:
+       case LFUN_COMPLETION_INLINE:
+       case LFUN_COMPLETION_COMPLETE:
                if (lyx_view_)
                        return lyx_view_->getStatus(cmd);
                enable = false;
@@ -595,7 +601,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_BUFFER_AUTO_SAVE:
        case LFUN_RECONFIGURE:
        case LFUN_HELP_OPEN:
-       case LFUN_FILE_NEW:
        case LFUN_FILE_OPEN:
        case LFUN_DROP_LAYOUTS_CHOICE:
        case LFUN_MENU_OPEN:
@@ -605,7 +610,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_DIALOG_HIDE:
        case LFUN_DIALOG_DISCONNECT_INSET:
        case LFUN_BUFFER_CHILD_OPEN:
-       case LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR:
+       case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE:
        case LFUN_KEYMAP_OFF:
        case LFUN_KEYMAP_PRIMARY:
        case LFUN_KEYMAP_SECONDARY:
@@ -705,26 +710,23 @@ void showPrintError(string const & name)
 }
 
 
-void loadTextClass(string const & name)
+bool loadLayoutFile(string const & name, string const & buf_path)
 {
-       pair<bool, textclass_type> const tc_pair =
-               textclasslist.numberOfClass(name);
-
-       if (!tc_pair.first) {
+       if (!LayoutFileList::get().haveClass(name)) {
                lyxerr << "Document class \"" << name
                       << "\" does not exist."
                       << endl;
-               return;
+               return false;
        }
 
-       textclass_type const tc = tc_pair.second;
-
-       if (!textclasslist[tc].load()) {
-               docstring s = bformat(_("The document class %1$s."
-                                  "could not be loaded."),
-                                  from_utf8(textclasslist[tc].name()));
+       LayoutFile & tc = LayoutFileList::get()[name];
+       if (!tc.load(buf_path)) {
+               docstring s = bformat(_("The document class %1$s "
+                                  "could not be loaded."), from_utf8(name));
                Alert::error(_("Could not load class"), s);
+               return false;
        }
+       return true;
 }
 
 
@@ -736,7 +738,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new);
 void LyXFunc::dispatch(FuncRequest const & cmd)
 {
        string const argument = to_utf8(cmd.argument());
-       kb_action const action = cmd.action;
+       FuncCode const action = cmd.action;
 
        LYXERR(Debug::ACTION, "\nLyXFunc::dispatch: cmd: " << cmd);
        //lyxerr << "LyXFunc::dispatch: cmd: " << cmd << endl;
@@ -813,18 +815,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                }
 
                // --- Menus -----------------------------------------------
-               case LFUN_BUFFER_NEW:
-                       lyx_view_->newDocument(argument, false);
-                       updateFlags = Update::None;
-                       break;
-
-               case LFUN_BUFFER_NEW_TEMPLATE:
-                       lyx_view_->newDocument(argument, true);
-                       updateFlags = Update::None;
-                       break;
-
                case LFUN_BUFFER_CLOSE:
-                       closeBuffer();
+                       lyx_view_->closeBuffer();
                        updateFlags = Update::None;
                        break;
 
@@ -1040,9 +1032,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
 
                case LFUN_RECONFIGURE:
-                       BOOST_ASSERT(lyx_view_);
                        // argument is any additional parameter to the configure.py command
-                       reconfigure(*lyx_view_, argument);
+                       reconfigure(lyx_view_, argument);
                        break;
 
                case LFUN_HELP_OPEN: {
@@ -1116,19 +1107,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        reloadBuffer();
                        break;
 
-               // --- buffers ----------------------------------------
-
-               case LFUN_FILE_NEW: {
-                       BOOST_ASSERT(lyx_view_);
-                       string name;
-                       string tmpname = split(argument, name, ':'); // Split filename
-                       Buffer * const b = newFile(name, tmpname);
-                       if (b)
-                               lyx_view_->setBuffer(b);
-                       updateFlags = Update::None;
-                       break;
-               }
-
                // --- lyxserver commands ----------------------------
                case LFUN_SERVER_GET_NAME:
                        BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
@@ -1258,6 +1236,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                data = InsetNoteMailer::params2string(p);
                                break;
                        } 
+                       case SPACE_CODE: {
+                               InsetSpaceParams p;
+                               data = InsetSpaceMailer::params2string(p);
+                               break;
+                       } 
                        case VSPACE_CODE: {
                                VSpace space;
                                data = InsetVSpaceMailer::params2string(space);
@@ -1338,7 +1321,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
                }
 
-               case LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR:
+               case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE:
                        BOOST_ASSERT(lyx_view_);
                        lyxrc.cursor_follows_scrollbar = !lyxrc.cursor_follows_scrollbar;
                        break;
@@ -1537,13 +1520,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_BUFFER_PARAMS_APPLY: {
                        BOOST_ASSERT(lyx_view_);
-                       biblio::CiteEngine const oldEngine =
-                                       lyx_view_->buffer()->params().getEngine();
                        
                        Buffer * buffer = lyx_view_->buffer();
-
-                       TextClassPtr oldClass = buffer->params().getTextClassPtr();
-
+                       DocumentClass * oldClass = buffer->params().documentClassPtr();
                        Cursor & cur = view()->cursor();
                        cur.recordUndoFullDocument();
                        
@@ -1561,24 +1540,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        
                        updateLayout(oldClass, buffer);
                        
-                       biblio::CiteEngine const newEngine =
-                                       lyx_view_->buffer()->params().getEngine();
-                       
-                       if (oldEngine != newEngine) {
-                               FuncRequest fr(LFUN_INSET_REFRESH);
-       
-                               Inset & inset = lyx_view_->buffer()->inset();
-                               InsetIterator it  = inset_iterator_begin(inset);
-                               InsetIterator const end = inset_iterator_end(inset);
-                               for (; it != end; ++it)
-                                       if (it->lyxCode() == CITE_CODE)
-                                               it->dispatch(cur, fr);
-                       }
-                       
                        updateFlags = Update::Force | Update::FitCursor;
-                       // We are here most certainaly because of a change in the document
-                       // It is then better to make sure that all dialogs are in sync
-                       // with current document settings. LyXView::restartCursor() achieve this.
+                       // We are most certainly here because of a change in the document
+                       // It is then better to make sure that all dialogs are in sync with
+                       // current document settings. LyXView::restartCursor() achieve this.
                        lyx_view_->restartCursor();
                        break;
                }
@@ -1586,10 +1551,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                case LFUN_LAYOUT_MODULES_CLEAR: {
                        BOOST_ASSERT(lyx_view_);
                        Buffer * buffer = lyx_view_->buffer();
-                       TextClassPtr oldClass = buffer->params().getTextClassPtr();
+                       DocumentClass * oldClass = buffer->params().documentClassPtr();
                        view()->cursor().recordUndoFullDocument();
                        buffer->params().clearLayoutModules();
-                       buffer->params().makeTextClass();
+                       buffer->params().makeDocumentClass();
                        updateLayout(oldClass, buffer);
                        updateFlags = Update::Force | Update::FitCursor;
                        break;
@@ -1598,10 +1563,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                case LFUN_LAYOUT_MODULE_ADD: {
                        BOOST_ASSERT(lyx_view_);
                        Buffer * buffer = lyx_view_->buffer();
-                       TextClassPtr oldClass = buffer->params().getTextClassPtr();
+                       DocumentClass * oldClass = buffer->params().documentClassPtr();
                        view()->cursor().recordUndoFullDocument();
                        buffer->params().addLayoutModule(argument);
-                       buffer->params().makeTextClass();
+                       buffer->params().makeDocumentClass();
                        updateLayout(oldClass, buffer);
                        updateFlags = Update::Force | Update::FitCursor;
                        break;
@@ -1611,27 +1576,23 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        BOOST_ASSERT(lyx_view_);
                        Buffer * buffer = lyx_view_->buffer();
 
-                       loadTextClass(argument);
-
-                       pair<bool, textclass_type> const tc_pair =
-                               textclasslist.numberOfClass(argument);
-
-                       if (!tc_pair.first)
+                       if (!loadLayoutFile(argument, buffer->temppath()) &&
+                               !loadLayoutFile(argument, buffer->filePath()))
                                break;
 
-                       textclass_type const old_class = buffer->params().getBaseClass();
-                       textclass_type const new_class = tc_pair.second;
+                       LayoutFile const * old_layout = buffer->params().baseClass();
+                       LayoutFile const * new_layout = &(LayoutFileList::get()[argument]);
 
-                       if (old_class == new_class)
+                       if (old_layout == new_layout)
                                // nothing to do
                                break;
 
                        //Save the old, possibly modular, layout for use in conversion.
-                       TextClassPtr oldClass = buffer->params().getTextClassPtr();
+                       DocumentClass * oldDocClass = buffer->params().documentClassPtr();
                        view()->cursor().recordUndoFullDocument();
-                       buffer->params().setBaseClass(new_class);
-                       buffer->params().makeTextClass();
-                       updateLayout(oldClass, buffer);
+                       buffer->params().setBaseClass(argument);
+                       buffer->params().makeDocumentClass();
+                       updateLayout(oldDocClass, buffer);
                        updateFlags = Update::Force | Update::FitCursor;
                        break;
                }
@@ -1639,18 +1600,19 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                case LFUN_LAYOUT_RELOAD: {
                        BOOST_ASSERT(lyx_view_);
                        Buffer * buffer = lyx_view_->buffer();
-                       TextClassPtr oldClass = buffer->params().getTextClassPtr();
-                       textclass_type const tc = buffer->params().getBaseClass();
-                       textclasslist.reset(tc);
-                       buffer->params().setBaseClass(tc);
-                       buffer->params().makeTextClass();
+                       DocumentClass * oldClass = buffer->params().documentClassPtr();
+                       LayoutFileIndex bc = buffer->params().baseClassID();
+                       LayoutFileList::get().reset(bc);
+                       buffer->params().setBaseClass(bc);
+                       buffer->params().makeDocumentClass();
                        updateLayout(oldClass, buffer);
                        updateFlags = Update::Force | Update::FitCursor;
                        break;
                }
 
                case LFUN_TEXTCLASS_LOAD:
-                       loadTextClass(argument);
+                       loadLayoutFile(argument, lyx_view_->buffer()->temppath()) ||
+                       loadLayoutFile(argument, lyx_view_->buffer()->filePath());
                        break;
 
                case LFUN_LYXRC_APPLY: {
@@ -1695,8 +1657,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                // Nothing more to do.
                                return;
 
+                       // Everything below is only for active lyx_view_
+                       if (lyx_view_ == 0)
+                               break;
+
                        // Let the current LyXView dispatch its own actions.
-                       BOOST_ASSERT(lyx_view_);
                        if (lyx_view_->dispatch(cmd)) {
                                if (lyx_view_->view())
                                        updateFlags = lyx_view_->view()->cursor().result().update();
@@ -1712,15 +1677,32 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        }
 
                        // Let the current Cursor dispatch its own actions.
+                       Cursor old = view()->cursor();
                        view()->cursor().getPos(cursorPosBeforeDispatchX_,
                                                cursorPosBeforeDispatchY_);
                        view()->cursor().dispatch(cmd);
-                       updateFlags = view()->cursor().result().update();
-                       if (!view()->cursor().result().dispatched()) {
-                               // No update needed in this case (e.g. when reaching
-                               // top of document.
-                               updateFlags = Update::None;
+
+                       // notify insets we just left
+                       if (view()->cursor() != old) {
+                               old.fixIfBroken();
+                               bool badcursor = notifyCursorLeaves(old, view()->cursor());
+                               if (badcursor)
+                                       view()->cursor().fixIfBroken();
                        }
+
+                       // update completion. We do it here and not in
+                       // processKeySym to avoid another redraw just for a
+                       // changed inline completion
+                       if (cmd.origin == FuncRequest::KEYBOARD) {
+                               if (cmd.action == LFUN_SELF_INSERT)
+                                       lyx_view_->updateCompletion(view()->cursor(), true, true);
+                               else if (cmd.action == LFUN_CHAR_DELETE_BACKWARD)
+                                       lyx_view_->updateCompletion(view()->cursor(), false, true);
+                               else
+                                       lyx_view_->updateCompletion(view()->cursor(), false, false);
+                       }
+
+                       updateFlags = view()->cursor().result().update();
                }
 
                if (lyx_view_ && lyx_view_->buffer()) {
@@ -1736,11 +1718,14 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                            && !lyxaction.funcHasFlag(action, LyXAction::ReadOnly))
                                lyx_view_->buffer()->markDirty();                       
 
-                       //Do we have a selection?
+                       // Do we have a selection?
                        theSelection().haveSelection(view()->cursor().selection());
+                       
+                       // update gui
+                       lyx_view_->restartCursor();
                }
        }
-       if (!quitting && lyx_view_) {
+       if (lyx_view_) {
                // Some messages may already be translated, so we cannot use _()
                sendDispatchMessage(translateIfPossible(getMessage()), cmd);
        }
@@ -1793,16 +1778,6 @@ void LyXFunc::sendDispatchMessage(docstring const & msg, FuncRequest const & cmd
 }
 
 
-void LyXFunc::closeBuffer()
-{
-       // goto bookmark to update bookmark pit.
-       for (size_t i = 0; i < LyX::ref().session().bookmarks().size(); ++i)
-               gotoBookmark(i+1, false, false);
-       
-       lyx_view_->closeBuffer();
-}
-
-
 void LyXFunc::reloadBuffer()
 {
        FileName filename = lyx_view_->buffer()->fileName();
@@ -1842,7 +1817,7 @@ void LyXFunc::setMessage(docstring const & m) const
 }
 
 
-docstring const LyXFunc::viewStatusMessage()
+docstring LyXFunc::viewStatusMessage()
 {
        // When meta-fake key is pressed, show the key sequence so far + "M-".
        if (wasMetaKey())
@@ -1874,15 +1849,14 @@ bool LyXFunc::wasMetaKey() const
 }
 
 
-void LyXFunc::updateLayout(TextClassPtr const & oldlayout,
-                           Buffer * buffer)
+void LyXFunc::updateLayout(DocumentClass * oldlayout,Buffer * buffer)
 {
        lyx_view_->message(_("Converting document to new document class..."));
        
        StableDocIterator backcur(view()->cursor());
        ErrorList & el = buffer->errorList("Class Switch");
        cap::switchBetweenClasses(
-                       oldlayout, buffer->params().getTextClassPtr(),
+                       oldlayout, buffer->params().documentClassPtr(),
                        static_cast<InsetText &>(buffer->inset()), el);
 
        view()->setCursor(backcur.asDocIterator(&(buffer->inset())));
@@ -1915,6 +1889,15 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_BIBTEX_COMMAND:
        case LyXRC::RC_BINDFILE:
        case LyXRC::RC_CHECKLASTFILES:
+       case LyXRC::RC_COMPLETION_CURSOR_TEXT:
+       case LyXRC::RC_COMPLETION_INLINE_DELAY:
+       case LyXRC::RC_COMPLETION_INLINE_DOTS:
+       case LyXRC::RC_COMPLETION_INLINE_MATH:
+       case LyXRC::RC_COMPLETION_INLINE_TEXT:
+       case LyXRC::RC_COMPLETION_POPUP_AFTER_COMPLETE:
+       case LyXRC::RC_COMPLETION_POPUP_DELAY:
+       case LyXRC::RC_COMPLETION_POPUP_MATH:
+       case LyXRC::RC_COMPLETION_POPUP_TEXT:
        case LyXRC::RC_USELASTFILEPOS:
        case LyXRC::RC_LOADSESSION:
        case LyXRC::RC_CHKTEX_COMMAND:
@@ -1940,6 +1923,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_EXAMPLEPATH:
        case LyXRC::RC_FONT_ENCODING:
        case LyXRC::RC_FORMAT:
+       case LyXRC::RC_GROUP_LAYOUTS:
        case LyXRC::RC_INDEX_COMMAND:
        case LyXRC::RC_INPUT:
        case LyXRC::RC_KBMAP:
@@ -2000,6 +1984,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_SERVERPIPE:
        case LyXRC::RC_SET_COLOR:
        case LyXRC::RC_SHOW_BANNER:
+       case LyXRC::RC_OPEN_BUFFERS_IN_TABS:
        case LyXRC::RC_SPELL_COMMAND:
        case LyXRC::RC_TEMPDIRPATH:
        case LyXRC::RC_TEMPLATEPATH:
@@ -2022,6 +2007,12 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_USE_SPELL_LIB:
        case LyXRC::RC_VIEWDVI_PAPEROPTION:
        case LyXRC::RC_SORT_LAYOUTS:
+       case LyXRC::RC_FULL_SCREEN_LIMIT:
+       case LyXRC::RC_FULL_SCREEN_SCROLLBAR:
+       case LyXRC::RC_FULL_SCREEN_TABBAR:
+       case LyXRC::RC_FULL_SCREEN_TOOLBARS:
+       case LyXRC::RC_FULL_SCREEN_WIDTH:
+       case LyXRC::RC_VISUAL_CURSOR:
        case LyXRC::RC_VIEWER:
        case LyXRC::RC_LAST:
                break;