[LyX/master] Improve info in changes dialog
Juergen Spitzmueller
spitz at lyx.org
Thu Dec 26 06:45:42 UTC 2019
commit d914142969f0877e701dcb320d1ed55ef3b907b2
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Thu Dec 26 08:01:37 2019 +0100
Improve info in changes dialog
---
src/frontends/qt/GuiChanges.cpp | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/frontends/qt/GuiChanges.cpp b/src/frontends/qt/GuiChanges.cpp
index b8d12ce..150d8a1 100644
--- a/src/frontends/qt/GuiChanges.cpp
+++ b/src/frontends/qt/GuiChanges.cpp
@@ -71,12 +71,18 @@ void GuiChanges::updateContents()
QString const author =
toqstr(buffer().params().authors().get(c.author).nameAndEmail());
if (!author.isEmpty())
- text += qt_("Changed by %1\n\n").arg(author);
+ text += (c.type == Change::INSERTED) ? qt_("Inserted by %1").arg(author)
+ : qt_("Deleted by %1").arg(author);
QString const date = QDateTime::fromTime_t(c.changetime)
.toString(Qt::DefaultLocaleLongDate);
- if (!date.isEmpty())
- text += qt_("Change made on %1\n").arg(date);
+ if (!date.isEmpty()) {
+ if (!author.isEmpty())
+ text += qt_(" on[[date]] %1\n").arg(date);
+ else
+ text += (c.type == Change::INSERTED) ? qt_("Inserted on %1\n").arg(date)
+ : qt_("Deleted on %1\n").arg(date);
+ }
}
changeTB->setPlainText(text);
}
More information about the lyx-cvs
mailing list