]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Fix the guiName of external insets.
[lyx.git] / src / insets / InsetExternal.cpp
index b2cbe813cafbc27da67d6a6fa10e08e67aceb83e..77d1b2f7bfd4073a94310707fca82312fafd2a40 100644 (file)
@@ -503,8 +503,14 @@ docstring screenLabel(InsetExternalParams const & params,
                                        from_utf8(params.templatename()));
        // FIXME UNICODE
        docstring gui = _(ptr->guiName);
-       return from_utf8(external::doSubstitution(params, buffer,
-                               to_utf8(gui), false));
+       gui += ": ";
+
+       if (params.filename.empty())
+               gui += "???";
+       else
+               gui += from_utf8(params.filename.relFileName(buffer.filePath()));
+
+       return gui;
 }
 
 } // namespace anon
@@ -729,6 +735,7 @@ void InsetExternal::validate(LaTeXFeatures & features) const
        string format;
        switch (features.runparams().flavor) {
        case OutputParams::LATEX:
+       case OutputParams::DVILUATEX:
                format = "LaTeX";
                break;
        case OutputParams::LUATEX: