Merge branch 'master' into gxs_mail_experiments

This commit is contained in:
Gioacchino Mazzurco 2017-03-13 22:57:33 +01:00
commit 2630ed4573
223 changed files with 123466 additions and 98194 deletions

View file

@ -578,7 +578,10 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle
{
variants.clear();
std::cerr << "Getting variants for style: \"" << stylePath.toStdString() << "\"" << std::endl;
if (stylePath.isEmpty()) {
std::cerr << "empty!" << std::endl;
return false;
}
@ -586,11 +589,13 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle
QDir dir(QApplication::applicationDirPath());
if (dir.cd(stylePath) == false) {
// style not found
std::cerr << "no path!" << std::endl;
return false;
}
if (dir.cd("variants") == false) {
// no variants available
std::cerr << "no variants!" << std::endl;
return true;
}

View file

@ -1609,7 +1609,7 @@ void ChatWidget::updateStatus(const QString &peer_id, int status)
switch (status) {
case RS_STATUS_OFFLINE:
ui->infoFrame->setVisible(true);
ui->infoLabel->setText(peerName + " " + tr("appears to be Offline.") +"\n" + tr("Messages you send will be delivered after Friend is again Online"));
ui->infoLabel->setText(peerName + " " + tr("appears to be Offline.") +"\n" + tr("Messages you send will be delivered after Friend is again Online."));
break;
case RS_STATUS_INACTIVE:
@ -1727,9 +1727,9 @@ void ChatWidget::quote()
if(text.length() > 0)
{
QStringList sl = text.split(QRegExp("[\r\n]"),QString::SkipEmptyParts);
text = sl.join("\n>");
text.replace(QChar(-4),"");//Char used when image on text.
emit ui->chatTextEdit->append(QString(">") + text);
text = sl.join("\n> ");
text.replace(QChar(-4)," ");//Char used when image on text.
emit ui->chatTextEdit->append(QString("> ") + text);
}
}