mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 08:25:53 -04:00
improved status display for distant chat
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6437 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8ab9c59a9f
commit
b21fae52d0
6 changed files with 20 additions and 4 deletions
|
@ -23,6 +23,8 @@
|
|||
#include <QCloseEvent>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <retroshare/rsstatus.h>
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include "PopupDistantChatDialog.h"
|
||||
|
||||
|
@ -79,6 +81,7 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
case RS_DISTANT_CHAT_STATUS_UNKNOWN: std::cerr << "Unknown hash. Error!" << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_GRY_LED)) ;
|
||||
_status_label->setToolTip(QObject::tr("Hash error")) ;
|
||||
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)) ;
|
||||
|
@ -86,18 +89,23 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
|
||||
QMessageBox::warning(NULL,tr("Distant chat terminated"),tr("The person you're talking to has deleted the secured chat tunnel. You may remove the chat window now.")) ;
|
||||
_update_timer->stop() ;
|
||||
setPeerStatus(RS_STATUS_OFFLINE) ;
|
||||
|
||||
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->setToolTip(QObject::tr("Tunnel is pending...")) ;
|
||||
setPeerStatus(RS_STATUS_OFFLINE) ;
|
||||
break ;
|
||||
case RS_DISTANT_CHAT_STATUS_TUNNEL_OK: std::cerr << "Tunnel is ok. " << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_YEL_LED)) ;
|
||||
_status_label->setToolTip(QObject::tr("Secured tunnel established!")) ;
|
||||
setPeerStatus(RS_STATUS_ONLINE) ;
|
||||
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->setToolTip(QObject::tr("Secured tunnel is working")) ;
|
||||
setPeerStatus(RS_STATUS_ONLINE) ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue