diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-04-30 20:31:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-04-30 12:44:58 -0700 |
commit | fff253e8cfe500482a3fc2b6b59a2b20677f19ff (patch) | |
tree | ef7e515c82ce856727738d1535325b7d5e0ef6cb /desktop-widgets/simplewidgets.cpp | |
parent | 9084bbae578b3996d8e8c7adb74ef9bb25da6720 (diff) | |
download | subsurface-fff253e8cfe500482a3fc2b6b59a2b20677f19ff.tar.gz |
Picture feature: Improve UI and translation of shift image times dialog
For the list of pictures with inappropriate date/time not fitting with
the dive time use a QTextEdit in read only mode with scroll bars
enabled instead of a QLabel.
Also update and translate some strings used there.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index 331426318..8caa1b9dd 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -380,9 +380,10 @@ void ShiftImageTimesDialog::updateInvalid() timestamp_t timestamp; bool allValid = true; ui.warningLabel->hide(); - ui.invalidLabel->hide(); + ui.invalidFilesText->hide(); QDateTime time = QDateTime::fromTime_t(displayed_dive.when, Qt::UTC); - ui.invalidLabel->setText("Dive:" + time.toString() + "\n"); + ui.invalidFilesText->setPlainText(tr("Dive date/time") + ": " + time.toString() + "\n"); + ui.invalidFilesText->append(tr("Files with inappropriate date/time") + ":"); Q_FOREACH (const QString &fileName, fileNames) { if (picture_check_valid(fileName.toUtf8().data(), m_amount)) @@ -391,13 +392,13 @@ void ShiftImageTimesDialog::updateInvalid() // We've found invalid image timestamp = picture_get_timestamp(fileName.toUtf8().data()); time.setTime_t(timestamp + m_amount); - ui.invalidLabel->setText(ui.invalidLabel->text() + fileName + " " + time.toString() + "\n"); + ui.invalidFilesText->append(fileName + " " + time.toString()); allValid = false; } if (!allValid){ ui.warningLabel->show(); - ui.invalidLabel->show(); + ui.invalidFilesText->show(); } } |