#include "insets/InsetERT.h"
#include "insets/InsetExternal.h"
#include "insets/InsetFloat.h"
-#include "insets/InsetListings.h"
#include "insets/InsetGraphics.h"
#include "insets/InsetInclude.h"
+#include "insets/InsetListings.h"
#include "insets/InsetNote.h"
#include "insets/InsetSpace.h"
#include "insets/InsetTabular.h"
case LFUN_PREFERENCES_SAVE:
case LFUN_MESSAGE:
case LFUN_INSET_EDIT:
- case LFUN_ALL_INSETS_TOGGLE:
- case LFUN_GRAPHICS_GROUPS_UNIFY:
case LFUN_BUFFER_LANGUAGE:
case LFUN_TEXTCLASS_APPLY:
case LFUN_TEXTCLASS_LOAD:
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_GRAPHICS_GROUPS_UNIFY: {
- LASSERT(lyx_view_, /**/);
- if (argument.empty() || !lyx_view_->buffer())
- break;
- //view()->cursor().recordUndoFullDocument(); let inset-apply do that job
- graphics::unifyGraphicsGroups(*lyx_view_->buffer(), argument);
- lyx_view_->buffer()->markDirty();
- updateFlags = Update::Force | Update::FitCursor;
- break;
- }
-
case LFUN_BUFFER_LANGUAGE: {
LASSERT(lyx_view_, /**/);
Buffer & buffer = *lyx_view_->buffer();
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
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: