]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
fix http://bugzilla.lyx.org/show_bug.cgi?id=4998
[lyx.git] / src / insets / InsetInclude.cpp
index 87741831e631c62d4bf35a04e645d8fb4e356a6c..d976556a02cd4af8ce05017554b770a1e82e187d 100644 (file)
@@ -13,7 +13,6 @@
 
 #include "InsetInclude.h"
 
-#include "LayoutFile.h"
 #include "Buffer.h"
 #include "buffer_funcs.h"
 #include "BufferList.h"
@@ -27,6 +26,7 @@
 #include "FuncRequest.h"
 #include "FuncStatus.h"
 #include "LaTeXFeatures.h"
+#include "LayoutFile.h"
 #include "LyX.h"
 #include "LyXFunc.h"
 #include "LyXRC.h"
 #include "insets/InsetListingsParams.h"
 #include "insets/RenderPreview.h"
 
-#include "support/lassert.h"
+#include "support/convert.h"
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/FileNameList.h"
 #include "support/filetools.h"
 #include "support/gettext.h"
+#include "support/lassert.h"
 #include "support/lstrings.h" // contains
 #include "support/lyxalgo.h"
-#include "support/convert.h"
 
 #include <boost/bind.hpp>
 
@@ -304,7 +304,7 @@ bool InsetInclude::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_INSET_EDIT:
        case LFUN_INSET_MODIFY:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
@@ -934,7 +934,7 @@ void InsetInclude::updateLabels(ParIterator const & it)
 
        InsetListingsParams const par(to_utf8(params()["lstparams"]));
        if (par.getParamValue("caption").empty()) {
-               listings_label_.clear();
+               listings_label_ = buffer().B_("Program Listing");
                return;
        }
        Buffer const & master = *buffer().masterBuffer();