added load/save of default nickname, plus some debugging

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4737 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-12-26 22:43:54 +00:00
parent 9b79d70fa8
commit cc57ab2462
11 changed files with 211 additions and 51 deletions

View file

@ -53,6 +53,8 @@ ChatLobbyDialog::ChatLobbyDialog(const std::string& dialog_id,const ChatLobbyId&
ui.avatarWidget->hide() ;
PopupChatDialog::updateStatus(QString::fromStdString(getPeerId()),RS_STATUS_ONLINE) ;
QObject::connect(this,SIGNAL(close()),this,SLOT(closeAndAsk())) ;
}
/** Destructor. */
@ -63,6 +65,15 @@ ChatLobbyDialog::~ChatLobbyDialog()
rsMsgs->unsubscribeChatLobby(lobby_id) ;
}
void ChatLobbyDialog::closeEvent(QCloseEvent* e)
{
std::cerr << "In close event!" << std::endl;
if(QMessageBox::Yes == QMessageBox::question(NULL,tr("Unsubsribe to lobby?"),tr("Do you want to unsubscribe to this chat lobby?"),QMessageBox::Yes, QMessageBox::No))
rsMsgs->unsubscribeChatLobby(lobby_id) ;
PopupChatDialog::closeEvent(e) ;
}
void ChatLobbyDialog::setNickName(const QString& nick)
{
rsMsgs->setNickNameForChatLobby(lobby_id,nick.toStdString()) ;