mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 23:36:59 -05:00
/me style is defined in chat styles
This commit is contained in:
parent
77804bbf16
commit
33b3eb7284
@ -367,12 +367,17 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
|
||||
QString strShortName = RsHtml::plainText(name.left(bi)).prepend(QString("<a name=\"name\">")).append(QString("</a>"));
|
||||
|
||||
//handle /me
|
||||
//%nome% and %me% for including formatting conditionally
|
||||
//meName class for modifying the style of the name in the palce of /me
|
||||
if(me){
|
||||
messageBody = messageBody.replace(messageBody.indexOf("/me "), 3, strShortName); //replace only the first /me
|
||||
strName = "*";
|
||||
messageBody = messageBody.replace(messageBody.indexOf("/me "), 3, strShortName.prepend(QString("<span class=\"meName\">")).append(QString("</span>"))); //replace only the first /me
|
||||
style = style.remove(QRegExp("%nome%.*%/nome%")).remove("%me%").remove("%/me%");
|
||||
} else {
|
||||
style = style.remove(QRegExp("%me%.*%/me%")).remove("%nome%").remove("%/nome%");
|
||||
}
|
||||
|
||||
QString formatMsg = style.replace("%name%", strName)
|
||||
.replace("%shortname%", strShortName)
|
||||
.replace("%date%", strDate)
|
||||
.replace("%time%", strTime)
|
||||
#ifdef COLORED_NICKNAMES
|
||||
|
@ -27,8 +27,8 @@
|
||||
<table class='bubbleFooter' width='100%'>
|
||||
<tr>
|
||||
<td align='right'>
|
||||
<span width='130' align='right' class='time'>%time% - </span>
|
||||
<span class='name'>%name%</span>
|
||||
<span width='130' align='right' class='time'>%time%%nome% - %/nome%</span>
|
||||
<span class='name'>%nome%%name%%/nome%</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<table class='bubbleFooter' width='100%'>
|
||||
<tr>
|
||||
<td align='left'>
|
||||
<span class='name'> %name% - </span>
|
||||
<span class='name'> %nome%%name% - %/nome%</span>
|
||||
<span width='130' align='right' class='time'>%time%</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -28,8 +28,8 @@
|
||||
<table class='bubbleFooter' width='100%'>
|
||||
<tr>
|
||||
<td align='right'>
|
||||
<span width='130' align='right' class='time'>%time% - </span>
|
||||
<span class='name'>%name%</span>
|
||||
<span width='130' align='right' class='time'>%time%%nome% - %/nome%</span>
|
||||
<span class='name'>%nome%%name%%/nome%</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<table class='bubbleFooter' width='100%'>
|
||||
<tr>
|
||||
<td align='left'>
|
||||
<span class='name'> %name% - </span>
|
||||
<span class='name'> %nome%%name% - %/nome%</span>
|
||||
<span width='130' align='right' class='time'>%time%</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<table class='bubbleFooter' width='100%'>
|
||||
<tr>
|
||||
<td align='left'>
|
||||
<span class='name'> %name% - </span>
|
||||
<span class='name'> %nome%%name% - %/nome%</span>
|
||||
<span width='130' align='right' class='time'>%time%</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='hincomingTime'>%date% %time%</span>
|
||||
<span class='name hincomingName'>%name%:</span>
|
||||
<span class='name hincomingName'>%nome%%name%:%/nome%</span>
|
||||
%message%
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='houtgoingTime'>%date% %time%</span>
|
||||
<span class='name houtgoingName'>%name%:</span>
|
||||
<span class='name houtgoingName'>%nome%%name%:%/nome%</span>
|
||||
%message%
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='incomingTime'>%time%</span>
|
||||
<span class='name incomingName'>%name%:</span>
|
||||
<span class='name incomingName'>%nome%%name%:%/nome%</span>
|
||||
%message%
|
@ -25,3 +25,7 @@
|
||||
.systemTime {
|
||||
color:#808080;
|
||||
}
|
||||
|
||||
.meName {
|
||||
font-weight: bold;
|
||||
}
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='ooutgoingTime'>%time%</span>
|
||||
<span class='name ooutgoingName'>%name%:</span>
|
||||
<span class='name ooutgoingName'>%nome%%name%:%/nome%</span>
|
||||
%message%
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='outgoingTime'>%time%</span>
|
||||
<span class='name outgoingName'>%name%:</span>
|
||||
<span class='name outgoingName'>%nome%%name%:%/nome%</span>
|
||||
%message%
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='hincomingTime'>%date% %time%</span>
|
||||
<span class='name hincomingName'>%name%</span><br>
|
||||
<span class='name hincomingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
|
||||
%message%
|
||||
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='houtgoingTime'>%date% %time%</span>
|
||||
<span class='name houtgoingName'>%name%</span><br>
|
||||
<span class='name houtgoingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
|
||||
%message%
|
||||
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='incomingTime'>%time%</span>
|
||||
<span class='name incomingName'>%name%</span><br>
|
||||
<span class='name incomingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
|
||||
%message%
|
||||
|
@ -47,3 +47,7 @@
|
||||
|
||||
.systemName {
|
||||
}
|
||||
|
||||
.meName {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='ooutgoingTime'>%time%</span>
|
||||
<span class='name ooutgoingName'>%name%</span><br>
|
||||
<span class='name ooutgoingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
|
||||
%message%
|
||||
|
@ -3,5 +3,5 @@
|
||||
</style>
|
||||
|
||||
<span class='outgoingTime'>%time%</span>
|
||||
<span class='name outgoingName'>%name%</span><br>
|
||||
<span class='name outgoingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
|
||||
%message%
|
||||
|
Loading…
x
Reference in New Issue
Block a user