]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetIndex.cpp
index d5724ad5ce72a0ba4701122caf5f46ee8e328cbc..e64685335b7af1bab160fd15216e641cc0da0f78 100644 (file)
@@ -171,6 +171,12 @@ int InsetIndex::docbook(odocstream & os, OutputParams const & runparams) const
 }
 
 
+docstring InsetIndex::xhtml(odocstream &, OutputParams const &) const
+{
+       return docstring();
+}
+
+
 bool InsetIndex::showInsetDialog(BufferView * bv) const
 {
        bv->showDialog("index", params2string(params_),
@@ -186,13 +192,13 @@ void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_INSET_MODIFY: {
                if (cmd.getArg(0) == "changetype") {
                        params_.index = from_utf8(cmd.getArg(1));
-                       setLayout(cur.buffer()->params());
+                       setLayout();
                        break;
                }
                InsetIndexParams params;
                InsetIndex::string2params(to_utf8(cmd.argument()), params);
                params_.index = params.index;
-               setLayout(cur.buffer()->params());
+               setLayout();
                break;
        }
 
@@ -248,6 +254,18 @@ docstring const InsetIndex::buttonLabel(BufferView const & bv) const
 }
 
 
+ColorCode InsetIndex::labelColor() const
+{
+       if (params_.index.empty() || params_.index == from_ascii("idx"))
+               return InsetCollapsable::labelColor();
+       // FIXME UNICODE
+       ColorCode c = lcolor.getFromLyXName(to_utf8(params_.index));
+       if (c == Color_none)
+               c = InsetCollapsable::labelColor();
+       return c;
+}
+
+
 docstring InsetIndex::toolTip(BufferView const &, int, int) const
 {
        docstring tip = _("Index Entry");
@@ -541,5 +559,9 @@ bool InsetPrintIndex::hasSettings() const
        return buffer().masterBuffer()->params().use_indices;
 }
 
+docstring InsetPrintIndex::xhtml(odocstream &, OutputParams const &) const
+{
+       return docstring();
+}
 
 } // namespace lyx