]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Whitespace.
[lyx.git] / src / insets / InsetExternal.cpp
index 8126d459a9f9d5b637a6c2feae246db2a59a3240..c0f72256644db16e1a63a47f2bea24d31b0cf61a 100644 (file)
@@ -392,7 +392,7 @@ InsetExternal::~InsetExternal()
 }
 
 
-bool InsetExternal::setMouseHover(BufferView const * bv, bool mouse_hover)
+bool InsetExternal::setMouseHover(BufferView const * bv, bool mouse_hover) const
 {
        mouse_hover_[bv] = mouse_hover;
        return true;
@@ -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
@@ -746,6 +752,9 @@ void InsetExternal::validate(LaTeXFeatures & features) const
        case OutputParams::TEXT:
                format = "text";
                break;
+       case OutputParams::LYX:
+               format = "lyx";
+               break;
        }
        external::Template::Formats::const_iterator cit =
                et.formats.find(format);
@@ -761,7 +770,7 @@ void InsetExternal::validate(LaTeXFeatures & features) const
                        return;
        }
 
-       // FIXME: We don't need that always
+       // FIXME: We don't need that always, see InsetGraphics
        features.require("lyxdot");
 
        vector<string>::const_iterator it  = cit->second.requirements.begin();
@@ -796,9 +805,9 @@ void InsetExternal::addPreview(DocIterator const & /*inset_pos*/,
 }
 
 
-docstring InsetExternal::contextMenuName() const
+string InsetExternal::contextMenuName() const
 {
-       return from_ascii("context-external");
+       return "context-external";
 }