Removed date from incoming and outgoing chat style.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3507 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-09-16 12:48:43 +00:00
parent 25adc99fed
commit a719cbce7b
13 changed files with 15 additions and 22 deletions

View file

@ -195,7 +195,7 @@ QString ChatStyle::formatMessage(enumFormatMessage type, QString &name, QDateTim
if (style.isEmpty()) {
// default style
style = "<table width='100%'><tr><td><b>%name%</b></td><td width='130' align='right'>%timestamp%</td></tr></table><table width='100%'><tr><td>%message%</td></tr></table>";
style = "<table width='100%'><tr><td><b>%name%</b></td><td width='130' align='right'>%time%</td></tr></table><table width='100%'><tr><td>%message%</td></tr></table>";
}
unsigned int formatFlag = 0;
@ -232,16 +232,9 @@ QString ChatStyle::formatMessage(enumFormatMessage type, QString &name, QDateTim
// }
// }
// if the message is on same date show only time
QString timeFormat;
// if (timestamp.daysTo(QDateTime::currentDateTime()) == 0) {
// timeFormat = "hh:mm:ss";
// } else {
timeFormat = "dd.MM.yyyy hh:mm:ss";
// }
QString formatMsg = style.replace("%name%", name)
.replace("%timestamp%", timestamp.toString(timeFormat))
.replace("%date%", timestamp.date().toString("dd.MM.yyyy"))
.replace("%time%", timestamp.time().toString("hh:mm:ss"))
.replace("%message%", msg);
return formatMsg;