mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
Show date in chat messages and small style changes.
Save and restore window position of the Historiy Browser. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3446 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e635e5a026
commit
c63905fefc
@ -325,8 +325,16 @@ 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("hh:mm:ss"))
|
||||
.replace("%timestamp%", timestamp.toString(timeFormat))
|
||||
.replace("%message%", msg);
|
||||
|
||||
return formatMsg;
|
||||
|
@ -68,6 +68,16 @@ ImHistoryBrowser::ImHistoryBrowser(bool isPrivateChatIn, IMHistoryKeeper &histKe
|
||||
foreach(IMHistoryItem item, historyItems) {
|
||||
addItem(item);
|
||||
}
|
||||
|
||||
QByteArray geometry = Settings->valueFromGroup("HistorieBrowser", "Geometry", QByteArray()).toByteArray();
|
||||
if (geometry.isEmpty() == false) {
|
||||
restoreGeometry(geometry);
|
||||
}
|
||||
}
|
||||
|
||||
ImHistoryBrowser::~ImHistoryBrowser()
|
||||
{
|
||||
Settings->setValueToGroup("HistorieBrowser", "Geometry", saveGeometry());
|
||||
}
|
||||
|
||||
void ImHistoryBrowser::historyAdd(IMHistoryItem item)
|
||||
|
@ -38,7 +38,8 @@ public:
|
||||
/** Default constructor */
|
||||
ImHistoryBrowser(bool isPrivateChat, IMHistoryKeeper &histKeeper, QWidget *parent = 0, Qt::WFlags flags = 0);
|
||||
/** Default destructor */
|
||||
|
||||
virtual ~ImHistoryBrowser();
|
||||
|
||||
private slots:
|
||||
void historyAdd(IMHistoryItem item);
|
||||
void historyClear();
|
||||
|
@ -17,6 +17,9 @@
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||
</property>
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="mainLayout">
|
||||
@ -103,7 +106,6 @@ border-image: url(:/images/closepressed.png)
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='incomingTable' width='100%'>
|
||||
<tr>
|
||||
<td class='header incomingHeader'>%name%</td>
|
||||
<td width='10%' align='left' class='time incomingTime'>[%timestamp%] </td>
|
||||
<td width='130' align='right' class='time incomingTime'>[%timestamp%]</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class='outgoingTable' width='100%'>
|
||||
<tr>
|
||||
<td class='header outgoingHeader'>%name%</td>
|
||||
<td width='10%' align='left' class='time outgoingTime'>[%timestamp%] </td>
|
||||
<td width='130' align='right' class='time outgoingTime'>[%timestamp%]</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -1,16 +1,14 @@
|
||||
<style type="text/css">
|
||||
%css-style%
|
||||
</style>
|
||||
<table width='100%'>
|
||||
<table class='header hincomingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='header hincomingHeader'>%name%</td>
|
||||
<td width='10%' align='left' class='time hincomingTime'>[%timestamp%] </td>
|
||||
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>[%timestamp%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>%message%</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
@ -1,16 +1,14 @@
|
||||
<style type="text/css">
|
||||
%css-style%
|
||||
</style>
|
||||
<table width='100%'>
|
||||
<table class='header houtgoingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='header houtgoingHeader'>%name%</td>
|
||||
<td width='10%' align='left' class='time houtgoingTime'>[%timestamp%] </td>
|
||||
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>[%timestamp%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>%message%</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
@ -1,16 +1,14 @@
|
||||
<style type="text/css">
|
||||
%css-style%
|
||||
</style>
|
||||
<table width='100%'>
|
||||
<table class='incomingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='header incomingHeader'>%name%</td>
|
||||
<td width='10%' align='left' class='time incomingTime'>[%timestamp%] </td>
|
||||
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>[%timestamp%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>%message%</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
@ -1,4 +1,4 @@
|
||||
.header {
|
||||
.name{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@ -11,41 +11,20 @@
|
||||
color: #295b07;
|
||||
}
|
||||
|
||||
.incomingTime {
|
||||
background-color:#dfedff;
|
||||
color: #295b07;
|
||||
}
|
||||
|
||||
.outgoingHeader {
|
||||
background-color:#f5f5f5;
|
||||
border-color:#fafafa #e3e3e3 #e3e3e3 #fafafa;
|
||||
color: #244578;
|
||||
}
|
||||
|
||||
.outgoingTime {
|
||||
background-color:#f5f5f5;
|
||||
color: #244578;
|
||||
}
|
||||
|
||||
.hincomingHeader {
|
||||
background-color:#dfedff;
|
||||
border-color:#fafafa #d1dfef #d1dfef #fafafa;
|
||||
color: #295b07;
|
||||
}
|
||||
|
||||
.hincomingTime {
|
||||
background-color:#dfedff;
|
||||
color: #295b07;
|
||||
}
|
||||
|
||||
.houtgoingHeader {
|
||||
background-color:#f5f5f5;
|
||||
border-color:#fafafa #e3e3e3 #e3e3e3 #fafafa;
|
||||
color: #244578;
|
||||
}
|
||||
|
||||
.houtgoingTime {
|
||||
background-color:#f5f5f5;
|
||||
color: #244578;
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,14 @@
|
||||
<style type="text/css">
|
||||
%css-style%
|
||||
</style>
|
||||
<table width='100%'>
|
||||
<table class='outgoingHeader' width='100%'>
|
||||
<tr>
|
||||
<td class='header outgoingHeader'>%name%</td>
|
||||
<td width='10%' align='left' class='time outgoingTime'>[%timestamp%] </td>
|
||||
|
||||
<td class='name'>%name%</td>
|
||||
<td width='130' align='right' class='time'>[%timestamp%]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>%message%</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
Binary file not shown.
@ -7463,7 +7463,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<source>Browse Message History</source>
|
||||
<translation>Nachrichtenverlauf Anzeigen</translation>
|
||||
<translation>Nachrichtenverlauf anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Browse History</source>
|
||||
|
Loading…
Reference in New Issue
Block a user