Changed the icon of the PopupChatDialog when the friend is typing.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3455 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-09-07 17:35:08 +00:00
parent 948a583465
commit f254a7ae24

View File

@ -54,6 +54,9 @@
#define appDir QApplication::applicationDirPath()
#define IMAGE_WINDOW ":/images/rstray3.png"
#define IMAGE_WINDOW_TYPING ":/images/typing.png"
/* Define the format used for displaying the date and time */
#define DATETIME_FMT "MMM dd hh:mm:ss"
@ -145,7 +148,7 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
QString title = tr("RetroShare - ") + QString::fromStdString(name) ;
setWindowTitle(title);
setWindowIcon(QIcon(QString(":/images/rstray3.png")));
setWindowIcon(QIcon(IMAGE_WINDOW));
ui.textboldButton->setIcon(QIcon(QString(":/images/edit-bold.png")));
ui.textunderlineButton->setIcon(QIcon(QString(":/images/edit-underline.png")));
@ -415,6 +418,8 @@ void PopupChatDialog::resetStatusBar()
{
ui.statusLabel->clear();
ui.typingpixmapLabel->clear();
setWindowIcon(QIcon(IMAGE_WINDOW));
}
void PopupChatDialog::updateStatusTyping()
@ -438,6 +443,10 @@ void PopupChatDialog::updateStatusString(const QString& peer_id, const QString&
ui.statusLabel->setText(status) ; // displays info for 5 secs.
ui.typingpixmapLabel->setPixmap(QPixmap(":images/typing.png") );
if (status_string == "is typing...") {
setWindowIcon(QIcon(IMAGE_WINDOW_TYPING));
}
QTimer::singleShot(5000,this,SLOT(resetStatusBar())) ;
}