mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 02:25:34 -04:00
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:
parent
25adc99fed
commit
a719cbce7b
13 changed files with 15 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue