mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-25 23:06:10 -05: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
@ -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;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='hincomingTable' width='100%'>
|
||||
<tr>
|
||||
<td class='header hincomingHeader'>%name%</td>
|
||||
<td width='130' align='right' class='time hincomingTime'>[%timestamp%]</td>
|
||||
<td width='130' align='right' class='time hincomingTime'>[%date% %time%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='hincomingTable' width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='houtgoingTable' width='100%'>
|
||||
<tr>
|
||||
<td class='header houtgoingHeader'>%name%</td>
|
||||
<td width='130' align='right' class='time houtgoingTime'>[%timestamp%]</td>
|
||||
<td width='130' align='right' class='time houtgoingTime'>[%date% %time%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='houtgoingTable' width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='incomingTable' width='100%'>
|
||||
<tr>
|
||||
<td class='header incomingHeader'>%name%</td>
|
||||
<td width='130' align='right' class='time incomingTime'>[%timestamp%]</td>
|
||||
<td width='130' align='right' class='time incomingTime'>[%date% %time%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='incomingTable' width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='outgoingTable' width='100%'>
|
||||
<tr>
|
||||
<td class='header outgoingHeader'>%name%</td>
|
||||
<td width='130' align='right' class='time outgoingTime'>[%timestamp%]</td>
|
||||
<td width='130' align='right' class='time outgoingTime'>[%date% %time%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='outgoingTable' width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='header hincomingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>%timestamp%</td>
|
||||
<td width='130' align='right' class='time'>%date% %time%</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='header houtgoingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>%timestamp%</td>
|
||||
<td width='130' align='right' class='time'>%date% %time%</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='incomingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>%timestamp%</td>
|
||||
<td width='130' align='right' class='time'>%time%</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%'>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='outgoingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>%timestamp%</td>
|
||||
<td width='130' align='right' class='time'>%time%</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%'>
|
||||
|
@ -2,6 +2,6 @@
|
||||
%css-style%
|
||||
</style>
|
||||
|
||||
<span class='hincomingTime'>%timestamp%</span>
|
||||
<span class='hincomingTime'>%date% %time%</span>
|
||||
<span class='hincomingName'><strong>%name%</strong></span>
|
||||
%message%
|
||||
|
@ -2,6 +2,6 @@
|
||||
%css-style%
|
||||
</style>
|
||||
|
||||
<span class='houtgoingTime'>%timestamp%</span>
|
||||
<span class='houtgoingTime'>%date% %time%</span>
|
||||
<span class='houtgoingName'><strong>%name%</strong></span>
|
||||
%message%
|
||||
|
@ -2,6 +2,6 @@
|
||||
%css-style%
|
||||
</style>
|
||||
|
||||
<span class='incomingTime'>%timestamp%</span>
|
||||
<span class='incomingTime'>%time%</span>
|
||||
<span class='incomingName'><strong>%name%</strong></span>
|
||||
%message%
|
||||
|
@ -2,6 +2,6 @@
|
||||
%css-style%
|
||||
</style>
|
||||
|
||||
<span class='outgoingTime'>%timestamp%</span>
|
||||
<span class='outgoingTime'>%time%</span>
|
||||
<span class='outgoingName'><strong>%name%</strong></span>
|
||||
%message%
|
||||
|
Loading…
x
Reference in New Issue
Block a user