]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Fix a couple unused variable warnings.
[lyx.git] / src / insets / InsetExternal.cpp
index f3ea34c011eb735ea1cdfd329cdb190e23c6496e..77d1b2f7bfd4073a94310707fca82312fafd2a40 100644 (file)
 
 #include "graphics/PreviewLoader.h"
 
+#include "support/bind.h"
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/ExceptionMessage.h"
 #include "support/filetools.h"
 #include "support/gettext.h"
+#include "support/lassert.h"
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
-#include "support/Translator.h"
-
-#include "support/bind.h"
 
 #include <sstream>
+#include <vector>
 
 using namespace std;
 using namespace lyx::support;
@@ -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: