- Disambiguation
- Remove potentially illigitmate concatenations
This commit is contained in:
Daniel Molkentin 2016-01-06 16:50:59 +01:00
Родитель cede7ec971
Коммит 9c7066ac47
3 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -130,12 +130,13 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
accountRole.remove(0, atPos+1); accountRole.remove(0, atPos+1);
} }
QString timeStr = tr("%1 on %2").arg(timeText).arg(accountRole); QString timeStr;
if( !accountOnline ) { if ( accountOnline ) {
timeStr = tr("%1 on %2").arg(timeText).arg(accountRole);
} else {
timeStr = tr("%1 on %2 (disconnected)").arg(timeText).arg(accountRole);
QPalette p = option.palette; QPalette p = option.palette;
painter->setPen(p.color(QPalette::Disabled, QPalette::Text)); painter->setPen(p.color(QPalette::Disabled, QPalette::Text));
timeStr.append(" ");
timeStr.append(tr("(disconnected)"));
} }
const QString elidedTime = fm.elidedText(timeStr, Qt::ElideRight, timeBox.width()); const QString elidedTime = fm.elidedText(timeStr, Qt::ElideRight, timeBox.width());

Просмотреть файл

@ -442,24 +442,24 @@ void ActivitySettings::slotCopyToClipboard()
QTextStream ts(&text); QTextStream ts(&text);
int idx = _tab->currentIndex(); int idx = _tab->currentIndex();
QString theSubject; QString message;
if( idx == 0 ) { if( idx == 0 ) {
// the activity widget // the activity widget
_activityWidget->storeActivityList(ts); _activityWidget->storeActivityList(ts);
theSubject = tr("server activity list"); message = tr("The server activity list has been copied to the clipboard.");
} else if(idx == 1 ) { } else if(idx == 1 ) {
// the protocol widget // the protocol widget
_protocolWidget->storeSyncActivity(ts); _protocolWidget->storeSyncActivity(ts);
theSubject = tr("sync activity list"); message = tr("The sync activity list has been copied to the clipboard.");
} else if(idx == 2 ) { } else if(idx == 2 ) {
// issues Widget // issues Widget
theSubject = tr("not syned items list"); message = tr("The list of unsynched items has been copied to the clipboard.");
_protocolWidget->storeSyncIssues(ts); _protocolWidget->storeSyncIssues(ts);
} }
QApplication::clipboard()->setText(text); QApplication::clipboard()->setText(text);
emit guiLog(tr("Copied to clipboard"), tr("The %1 has been copied to the clipboard.").arg(theSubject)); emit guiLog(tr("Copied to clipboard"), message);
} }
void ActivitySettings::slotRemoveAccount( AccountState *ptr ) void ActivitySettings::slotRemoveAccount( AccountState *ptr )

Просмотреть файл

@ -650,7 +650,8 @@ void SyncEngine::startSync()
qDebug() << "There are" << freeBytes << "bytes available at" << _localPath qDebug() << "There are" << freeBytes << "bytes available at" << _localPath
<< "and at least" << minFree << "are required"; << "and at least" << minFree << "are required";
if (freeBytes < minFree) { if (freeBytes < minFree) {
emit csyncError(tr("Only %1 are available, need at least %2 to start").arg( emit csyncError(tr("Only %1 are available, need at least %2 to start",
"Placeholders are postfixed with file sizes using Utility::octetsToString()").arg(
Utility::octetsToString(freeBytes), Utility::octetsToString(freeBytes),
Utility::octetsToString(minFree))); Utility::octetsToString(minFree)));
finalize(false); finalize(false);