]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Get rid of all-insets-toggle and explain how to replace it with inset-forall.
[lyx.git] / src / Buffer.cpp
index f5f11e69919a7398fe9ac511fe9bf93f0eeed71b..a28a458f9695018fa2234a81ea90c87fe6578197 100644 (file)
@@ -126,7 +126,7 @@ namespace {
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 384; // uwestoehr: support for document-wide font color
+int const LYX_FORMAT = 385; // uwestoehr: support to change the shaded box color
 
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
@@ -668,9 +668,15 @@ int Buffer::readHeader(Lexer & lex)
        params().pdfoptions().clear();
        params().indiceslist().clear();
        params().backgroundcolor = lyx::rgbFromHexName("#ffffff");
+       params().isbackgroundcolor = false;
        params().fontcolor = lyx::rgbFromHexName("#000000");
        params().isfontcolor = false;
        params().notefontcolor = lyx::rgbFromHexName("#cccccc");
+       lyx::dispatch(FuncRequest(LFUN_SET_COLOR,
+               from_utf8("greyedouttext #cccccc")));
+       params().boxbgcolor = lyx::rgbFromHexName("#ff0000");
+       lyx::dispatch(FuncRequest(LFUN_SET_COLOR,
+               from_utf8("shaded #ff0000")));
 
        for (int i = 0; i < 4; ++i) {
                params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i];
@@ -1562,19 +1568,24 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
        updateMacroInstances();
 
        if (!only_body) {
-               os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
-               os << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\" \"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd\">\n";
-               // FIXME Language should be set properly.
-               os << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
-               os << "<head>\n";
-               // FIXME Presumably need to set this right
-               os << "<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />\n";
-               os << "<title>" << features.htmlTitle() << "</title>\n";
+               os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+                  << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\" \"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd\">\n"
+                  // FIXME Language should be set properly.
+                  << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
+                  << "<head>\n"
+                  << "<meta name=\"GENERATOR\" content=\"" << PACKAGE_STRING << "\" />\n"
+                  // FIXME Presumably need to set this right
+                  << "<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />\n";
+
+               docstring const & doctitle = features.htmlTitle();
+               os << "<title>"
+                  << (doctitle.empty() ? from_ascii("LyX Document") : doctitle)
+                  << "</title>\n";
 
                os << "\n<!-- Text Class Preamble -->\n"
-                       << features.getTClassHTMLPreamble()
-                       << "\n<!-- Premable Snippets -->\n"
-                       << from_utf8(features.getPreambleSnippets());
+                  << features.getTClassHTMLPreamble()
+                  << "\n<!-- Premable Snippets -->\n"
+                  << from_utf8(features.getPreambleSnippets());
 
                os << "\n<!-- Layout-provided Styles -->\n";
                docstring const styleinfo = features.getTClassHTMLStyles();
@@ -3496,7 +3507,7 @@ bool Buffer::readFileHelper(FileName const & s)
                        else
                                str = _("Document was NOT successfully recovered.");
                        str += "\n\n" + bformat(_("Remove emergency file now?\n(%1$s)"),
-                                               from_utf8(e.absFilename()));
+                                               makeDisplayPath(e.absFilename()));
 
                        if (!Alert::prompt(_("Delete emergency file?"), str, 1, 1,
                                        _("&Remove"), _("&Keep it"))) {