[LyX/master] Mark empty bib(la)tex insets (i.e., with no databases defined) (#12668)

Juergen Spitzmueller spitz at lyx.org
Sun Feb 19 10:14:56 UTC 2023


commit 8deb05f7a7106e43138945dfc8b1f53c436c2a2e
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Feb 19 12:15:45 2023 +0100

    Mark empty bib(la)tex insets (i.e., with no databases defined) (#12668)
---
 src/insets/InsetBibtex.cpp |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp
index a9c0ff9..55ba0aa 100644
--- a/src/insets/InsetBibtex.cpp
+++ b/src/insets/InsetBibtex.cpp
@@ -176,8 +176,12 @@ bool InsetBibtex::usingBiblatex() const
 
 docstring InsetBibtex::screenLabel() const
 {
-	return usingBiblatex() ? _("Biblatex Generated Bibliography")
+	docstring res;
+	if (getParam("bibfiles").empty())
+		res = _("EMPTY: ");
+	res += usingBiblatex() ? _("Biblatex Generated Bibliography")
 			       : _("BibTeX Generated Bibliography");
+	return res;
 }
 
 
@@ -188,7 +192,7 @@ docstring InsetBibtex::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/)
 
 	tip += "<ul>";
 	if (bibfilelist.empty())
-		tip += "<li>" + _("none") + "</li>";
+		tip += "<li>" + _("None[[bib databases]], please fill in!") + "</li>";
 	else
 		for (docstring const & bibfile : bibfilelist)
 			tip += "<li>" + bibfile + "</li>";
@@ -934,6 +938,8 @@ void InsetBibtex::updateBuffer(ParIterator const &, UpdateType, bool const /*del
 	}
 	if (invalidate)
 		buffer().invalidateBibinfoCache();
+
+	setBroken(getParam("bibfiles").empty());
 }
 
 


More information about the lyx-cvs mailing list