summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-09-01 16:14:11 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-09-01 16:14:11 +0000
commitcceb1694414178a65adce52b76a137e7a31ee69a (patch)
tree7becd76b9cfbae782cad893af8346f1ac9240ee7
parentc022ccd4e67a6b90b9874f548a254af539656d0d (diff)
downloadpica-pica-cceb1694414178a65adce52b76a137e7a31ee69a.tar.gz
pica-pica-cceb1694414178a65adce52b76a137e7a31ee69a.zip
title of chatwindow
git-svn-id: svn://localhost/project_picapica/trunk@270 fb96df88-216d-11de-830c-f3023f12d8ac
-rw-r--r--pica-client/chatwindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/pica-client/chatwindow.cpp b/pica-client/chatwindow.cpp
index 4247bdb..ef34823 100644
--- a/pica-client/chatwindow.cpp
+++ b/pica-client/chatwindow.cpp
@@ -14,6 +14,7 @@ ChatWindow::ChatWindow(QByteArray peer_id) :
QWidget(0), peer_id_(peer_id), hist(config_dbname, Accounts::GetCurrentAccount().id)
{
QVBoxLayout *layout;
+ QString title;
layout = new QVBoxLayout;
@@ -33,7 +34,6 @@ ChatWindow::ChatWindow(QByteArray peer_id) :
setLayout(layout);
- setWindowTitle(peer_id.toBase64());
setWindowIcon(picapica_ico_sit);
QWidget::setAttribute(Qt::WA_DeleteOnClose);
@@ -63,6 +63,8 @@ ChatWindow::ChatWindow(QByteArray peer_id) :
Contacts ct(config_dbname, Accounts::GetCurrentAccount().id);
peer_name_ = ct.GetContactName(peer_id_);
+ title = peer_name_;
+
if (peer_name_.isEmpty())
peer_name_ = peer_id_.toBase64();
@@ -74,7 +76,8 @@ ChatWindow::ChatWindow(QByteArray peer_id) :
if (my_name_.isEmpty())
my_name_ = Accounts::GetCurrentAccount().id.toBase64();
}
-
+ title = QObject::tr("Chat with ") + title + " - " + peer_id_.toBase64();
+ setWindowTitle(title);
}
void ChatWindow::put_message(QString msg, QByteArray id, bool is_me)