mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
disbled new popupchat style stuff - until it works without style files.
removed release flag from mainwindow. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@507 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5a27165353
commit
aa393dcc72
2 changed files with 24 additions and 24 deletions
|
@ -91,8 +91,6 @@
|
||||||
* #define RS_RELEASE_VERSION 1
|
* #define RS_RELEASE_VERSION 1
|
||||||
****/
|
****/
|
||||||
|
|
||||||
#define RS_RELEASE_VERSION 1
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||||
: QMainWindow(parent, flags)
|
: QMainWindow(parent, flags)
|
||||||
|
|
|
@ -155,16 +155,13 @@ void PopupChatDialog::updateChat()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||||
{
|
{
|
||||||
//QTextBrowser *msgWidget = ui.textBrowser;
|
QTextBrowser *msgWidget = ui.textBrowser;
|
||||||
|
QString currenttxt = msgWidget->toHtml();
|
||||||
//QString message = msgWidget->toHtml();
|
|
||||||
|
|
||||||
|
|
||||||
/* add in lines at the bottom */
|
|
||||||
//QString extraTxt;
|
|
||||||
|
|
||||||
|
/* add in lines at the bottom */
|
||||||
|
QString extraTxt;
|
||||||
|
|
||||||
bool offline = true;
|
bool offline = true;
|
||||||
|
|
||||||
|
@ -184,26 +181,30 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||||
{
|
{
|
||||||
QString line = "<br>\n<span style=\"color:#1D84C9\"><strong> ----- PEER OFFLINE (Chat will be lost) -----</strong></span> \n<br>";
|
QString line = "<br>\n<span style=\"color:#1D84C9\"><strong> ----- PEER OFFLINE (Chat will be lost) -----</strong></span> \n<br>";
|
||||||
|
|
||||||
//extraTxt += line;
|
extraTxt += line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString timestamp = "[" + QDateTime::currentDateTime().toString("hh:mm:ss") + "]";
|
QString timestamp = "[" + QDateTime::currentDateTime().toString("hh:mm:ss") + "]";
|
||||||
QString name = QString::fromStdString(ci ->name);
|
QString name = QString::fromStdString(ci ->name);
|
||||||
//QString line = "<span style=\"color:#C00000\"><strong>" + timestamp + "</strong></span>" +
|
QString line = "<span style=\"color:#C00000\"><strong>" + timestamp + "</strong></span>" +
|
||||||
// "<span style=\"color:#2D84C9\"><strong>" + " " + name + "</strong></span>";
|
"<span style=\"color:#2D84C9\"><strong>" + " " + name + "</strong></span>";
|
||||||
//extraTxt += line;
|
extraTxt += line;
|
||||||
|
extraTxt += QString::fromStdWString(ci -> msg);
|
||||||
|
|
||||||
QString message = QString::fromStdWString(ci -> msg);
|
//QString message = QString::fromStdWString(ci -> msg);
|
||||||
|
|
||||||
//currenttxt += extraTxt;
|
QHashIterator<QString, QString> i(smileys);
|
||||||
|
|
||||||
QHashIterator<QString, QString> i(smileys);
|
|
||||||
while(i.hasNext())
|
while(i.hasNext())
|
||||||
{
|
{
|
||||||
i.next();
|
i.next();
|
||||||
message.replace(i.key(), "<img src=\"" + i.value() + "\">");
|
extraTxt.replace(i.key(), "<img src=\"" + i.value() + "\">");
|
||||||
}
|
//message.replace(i.key(), "<img src=\"" + i.value() + "\">");
|
||||||
|
}
|
||||||
|
|
||||||
|
currenttxt += extraTxt;
|
||||||
|
ui.textBrowser->setHtml(currenttxt);
|
||||||
|
|
||||||
|
#if 0
|
||||||
history /*<< nickColor << color << font << fontSize*/ << timestamp << name << message;
|
history /*<< nickColor << color << font << fontSize*/ << timestamp << name << message;
|
||||||
|
|
||||||
QString formatMsg = loadEmptyStyle()/*.replace(nickColor)
|
QString formatMsg = loadEmptyStyle()/*.replace(nickColor)
|
||||||
|
@ -215,7 +216,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||||
.replace("%message%", message);
|
.replace("%message%", message);
|
||||||
|
|
||||||
ui.textBrowser->setHtml(ui.textBrowser->toHtml() + formatMsg + "\n");
|
ui.textBrowser->setHtml(ui.textBrowser->toHtml() + formatMsg + "\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
QTextCursor cursor = ui.textBrowser->textCursor();
|
QTextCursor cursor = ui.textBrowser->textCursor();
|
||||||
cursor.movePosition(QTextCursor::End);
|
cursor.movePosition(QTextCursor::End);
|
||||||
ui.textBrowser->setTextCursor(cursor);
|
ui.textBrowser->setTextCursor(cursor);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue