]> git.lyx.org Git - features.git/commitdiff
Improve info in changes dialog
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 26 Dec 2019 07:01:37 +0000 (08:01 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 26 Dec 2019 07:01:37 +0000 (08:01 +0100)
src/frontends/qt/GuiChanges.cpp

index b8d12ceda17e81c9a1c90ae0591519ef766b6e9c..150d8a1c3b1a4b5f9ffe67e60704eab2078bdae8 100644 (file)
@@ -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);
 }