]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibtex.cpp
When selecting special logos, set their color correctly
[lyx.git] / src / insets / InsetBibtex.cpp
index c925bfe3cc9bd3c30c1366c4327a7cbf4837bc2d..13c91b0739e6b5a25cb5b853bd6b6991fbf76cd4 100644 (file)
@@ -27,6 +27,7 @@
 #include "output_xhtml.h"
 #include "OutputParams.h"
 #include "PDFOptions.h"
+#include "texstream.h"
 #include "TextClass.h"
 
 #include "frontends/alert.h"
@@ -103,7 +104,7 @@ void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd)
                                Alert::warning(message.title_, message.details_);
                                cur.noScreenUpdate();
                        } else
-                               throw message;
+                               throw;
                        break;
                }
 
@@ -173,21 +174,16 @@ docstring InsetBibtex::screenLabel() const
 
 docstring InsetBibtex::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/) const
 {
-       docstring item = from_ascii("* ");
-       docstring tip = _("Databases:") + "\n";
+       docstring tip = _("Databases:");
        vector<docstring> bibfilelist = getVectorFromString(getParam("bibfiles"));
 
-       if (bibfilelist.empty()) {
-               tip += item;
-               tip += _("none");
-       } else {
-               vector<docstring>::const_iterator it = bibfilelist.begin();
-               vector<docstring>::const_iterator en = bibfilelist.end();
-               for (; it != en; ++it) {
-                       tip += item;
-                       tip += *it + "\n";
-               }
-       }
+       tip += "<ul>";
+       if (bibfilelist.empty())
+               tip += "<li>" + _("none") + "</li>";
+       else
+               for (docstring const & bibfile : bibfilelist)
+                       tip += "<li>" + bibfile + "</li>";
+       tip += "</ul>";
 
        // Style-Options
        bool toc = false;
@@ -199,14 +195,10 @@ docstring InsetBibtex::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/)
                        style = split(style, bibtotoc, char_type(','));
        }
 
-       tip += _("Style File:") +"\n";
-       tip += item;
-       if (!style.empty())
-               tip += style;
-       else
-               tip += _("none");
+       tip += _("Style File:");
+       tip += "<ul><li>" + (style.empty() ? _("none") : style) + "</li></ul>";
 
-       tip += "\n" + _("Lists:") + " ";
+       tip += _("Lists:") + " ";
        docstring btprint = getParam("btprint");
                if (btprint == "btPrintAll")
                        tip += _("all references");
@@ -1025,6 +1017,12 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const
 }
 
 
+void InsetBibtex::write(ostream & os) const
+{
+       params().Write(os, &buffer());
+}
+
+
 string InsetBibtex::contextMenuName() const
 {
        return "context-bibtex";