]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
Typo.
[lyx.git] / src / LyXFunc.cpp
index 8c352c2661d34d213b36a82be11b3e8cd558aa5f..6a3db5bb8559c086dcc1db2b4096cd755988c9f9 100644 (file)
@@ -581,7 +581,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_PREFERENCES_SAVE:
        case LFUN_MESSAGE:
        case LFUN_INSET_EDIT:
-       case LFUN_ALL_INSETS_TOGGLE:
        case LFUN_BUFFER_LANGUAGE:
        case LFUN_TEXTCLASS_APPLY:
        case LFUN_TEXTCLASS_LOAD:
@@ -1378,32 +1377,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        lyx_view_->message(from_utf8(argument));
                        break;
 
-
-               case LFUN_ALL_INSETS_TOGGLE: {
-                       LASSERT(lyx_view_, /**/);
-                       string action;
-                       string const name = split(argument, action, ' ');
-                       InsetCode const inset_code = insetCode(name);
-
-                       Cursor & cur = view()->cursor();
-                       FuncRequest fr(LFUN_INSET_TOGGLE, action);
-
-                       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->asInsetMath()
-                                   && (inset_code == NO_CODE
-                                   || inset_code == it->lyxCode())) {
-                                       Cursor tmpcur = cur;
-                                       tmpcur.pushBackward(*it);
-                                       it->dispatch(tmpcur, fr);
-                               }
-                       }
-                       updateFlags = Update::Force | Update::FitCursor;
-                       break;
-               }
-
                case LFUN_BUFFER_LANGUAGE: {
                        LASSERT(lyx_view_, /**/);
                        Buffer & buffer = *lyx_view_->buffer();
@@ -1556,6 +1529,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                        actOnUpdatedPrefs(lyxrc_orig, lyxrc);
 
+                       // Set the language defined by the user.
+                       LyX::ref().setRcGuiLanguage();
+
                        theApp()->resetGui();
 
                        /// We force the redraw in any case because there might be
@@ -1835,6 +1811,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_CUSTOM_EXPORT_FORMAT:
        case LyXRC::RC_DATE_INSERT_FORMAT:
        case LyXRC::RC_DEFAULT_LANGUAGE:
+       case LyXRC::RC_GUI_LANGUAGE:
        case LyXRC::RC_DEFAULT_PAPERSIZE:
        case LyXRC::RC_DEFFILE:
        case LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN: