merged with latest master before creating PR

This commit is contained in:
csoler 2015-12-04 21:24:51 -05:00
commit 9193d3579b
294 changed files with 13080 additions and 8470 deletions

View file

@ -48,8 +48,11 @@ PopupDistantChatDialog::PopupDistantChatDialog(const DistantChatPeerId& tunnel_i
{
_tunnel_id = tunnel_id ;
_status_label = new QLabel ;
_status_label = new QToolButton ;
_update_timer = new QTimer ;
_status_label->setAutoRaise(true);
_status_label->setIconSize(QSize(24,24));
_update_timer->setInterval(1000) ;
QObject::connect(_update_timer,SIGNAL(timeout()),this,SLOT(updateDisplay())) ;
@ -100,10 +103,11 @@ void PopupDistantChatDialog::updateDisplay()
ui.avatarWidget->setId(ChatId(_tunnel_id));
QString msg;
switch(tinfo.status)
{
case RS_DISTANT_CHAT_STATUS_UNKNOWN: //std::cerr << "Unknown hash. Error!" << std::endl;
_status_label->setPixmap(QPixmap(IMAGE_GRY_LED)) ;
_status_label->setIcon(QIcon(IMAGE_GRY_LED)) ;
msg = tr("Chat remotely closed. Please close this window.");
_status_label->setToolTip(msg) ;
getChatWidget()->updateStatusString("%1", msg, true);
@ -111,7 +115,7 @@ void PopupDistantChatDialog::updateDisplay()
setPeerStatus(RS_STATUS_OFFLINE) ;
break ;
case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED: std::cerr << "Chat remotely closed. " << std::endl;
_status_label->setPixmap(QPixmap(IMAGE_RED_LED)) ;
_status_label->setIcon(QIcon(IMAGE_RED_LED)) ;
_status_label->setToolTip(QObject::tr("Distant peer has closed the chat")) ;
getChatWidget()->updateStatusString("%1", tr("The person you're talking to has deleted the secured chat tunnel. You may remove the chat window now."), true);
@ -120,7 +124,7 @@ void PopupDistantChatDialog::updateDisplay()
break ;
case RS_DISTANT_CHAT_STATUS_TUNNEL_DN: //std::cerr << "Tunnel asked. Waiting for reponse. " << std::endl;
_status_label->setPixmap(QPixmap(IMAGE_RED_LED)) ;
_status_label->setIcon(QIcon(IMAGE_RED_LED)) ;
msg = QObject::tr("Tunnel is pending...");
_status_label->setToolTip(msg) ;
getChatWidget()->updateStatusString("%1", msg, true);
@ -128,7 +132,7 @@ void PopupDistantChatDialog::updateDisplay()
setPeerStatus(RS_STATUS_OFFLINE) ;
break ;
case RS_DISTANT_CHAT_STATUS_CAN_TALK: //std::cerr << "Tunnel is ok and data is transmitted." << std::endl;
_status_label->setPixmap(QPixmap(IMAGE_GRN_LED)) ;
_status_label->setIcon(QIcon(IMAGE_GRN_LED)) ;
msg = QObject::tr("Secured tunnel is working. You can talk!");
_status_label->setToolTip(msg) ;
getChatWidget()->unblockSending();