]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
EmbeddedObjects.lyx, Math.lyx, UserGuide.lyx: Spanish translation updates by Ignacio
[lyx.git] / src / LyXFunc.cpp
index 9207ef56dfb7e13bd2aa9f4d0a59bf9a45ca14aa..3a29fecedc14d46997b14a0ebbf9faa1a9e7a945 100644 (file)
@@ -395,7 +395,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
 
        switch (cmd.action) {
        case LFUN_UNKNOWN_ACTION:
-#ifndef HAVE_LIBAIKSAURUS
+#if !defined(HAVE_LIBMYTHES) && !defined(HAVE_LIBAIKSAURUS)
        case LFUN_THESAURUS_ENTRY:
 #endif
                flag.unknown(true);
@@ -1031,7 +1031,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                theApp()->dispatch(FuncRequest(LFUN_WINDOW_NEW));
                        string const arg = argument;
                        if (arg.empty()) {
-                               setErrorMessage(from_ascii(N_("Missing argument")));
+                               setErrorMessage(from_utf8(N_("Missing argument")));
                                break;
                        }
                        FileName const fname = i18nLibFileSearch("doc", arg, "lyx");
@@ -1349,6 +1349,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                case LFUN_COMMAND_SEQUENCE: {
                        // argument contains ';'-terminated commands
                        string arg = argument;
+                       if (theBufferList().isLoaded(buffer))
+                               buffer->undo().beginUndoGroup();
                        while (!arg.empty()) {
                                string first;
                                arg = split(arg, first, ';');
@@ -1356,6 +1358,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                func.origin = cmd.origin;
                                dispatch(func);
                        }
+                       if (theBufferList().isLoaded(buffer))
+                               buffer->undo().endUndoGroup();
                        break;
                }
 
@@ -1731,6 +1735,9 @@ void LyXFunc::reloadBuffer()
        // The user has already confirmed that the changes, if any, should
        // be discarded. So we just release the Buffer and don't call closeBuffer();
        theBufferList().release(lyx_view_->buffer());
+       // if the lyx_view_ has been destroyed, create a new one
+       if (!lyx_view_)
+               theApp()->dispatch(FuncRequest(LFUN_WINDOW_NEW));
        Buffer * buf = lyx_view_->loadDocument(filename);
        docstring const disp_fn = makeDisplayPath(filename.absFilename());
        docstring str;
@@ -1806,7 +1813,7 @@ void LyXFunc::updateLayout(DocumentClass const * const oldlayout, Buffer * buf)
                        oldlayout, buf->params().documentClassPtr(),
                        static_cast<InsetText &>(buf->inset()), el);
 
-       view()->setCursor(backcur.asDocIterator(&(buf->inset())));
+       view()->setCursor(backcur.asDocIterator(buf));
 
        buf->errors("Class Switch");
        buf->updateLabels();
@@ -1943,6 +1950,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
                if (lyxrc_orig.windows_style_tex_paths != lyxrc_new.windows_style_tex_paths) {
                        os::windows_style_tex_paths(lyxrc_new.windows_style_tex_paths);
                }
+       case LyXRC::RC_THESAURUSDIRPATH:
        case LyXRC::RC_UIFILE:
        case LyXRC::RC_USER_EMAIL:
        case LyXRC::RC_USER_NAME: