From f254a7ae242b11a9163839a4ccc52b2d93e08b8e Mon Sep 17 00:00:00 2001 From: thunder2 Date: Tue, 7 Sep 2010 17:35:08 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/chat/PopupChatDialog.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index a6cf04862..8778c1bc9 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -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())) ; }