mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
added unsubscribe protocol, updated GUI
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4738 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cc57ab2462
commit
3addb36e4c
12 changed files with 213 additions and 19 deletions
|
@ -62,16 +62,8 @@ ChatLobbyDialog::~ChatLobbyDialog()
|
|||
{
|
||||
// announce leaving of lobby
|
||||
|
||||
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))
|
||||
if(QMessageBox::Yes == QMessageBox::question(NULL,tr("Unsubscribe 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)
|
||||
|
|
|
@ -55,7 +55,6 @@ class ChatLobbyDialog: public PopupChatDialog
|
|||
// The following methods are differentfrom those of the parent:
|
||||
//
|
||||
virtual void updateStatus(const QString &peer_id, int status) ; // needs grouped status. Not yet implemented.
|
||||
virtual void closeEvent(QCloseEvent*) ;
|
||||
|
||||
protected slots:
|
||||
void setNickName(const QString&) ;
|
||||
|
|
|
@ -40,7 +40,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list,QWi
|
|||
rsMsgs->getDefaultNickNameForChatLobby(default_nick) ;
|
||||
|
||||
ui->lobbyName_LE->setPlaceholderText(tr("Put a sensible lobby name here")) ;
|
||||
ui->nickName_LE->setPlaceholderText(tr("Your nickname for this lobby")) ;
|
||||
ui->nickName_LE->setPlaceholderText(tr("Your nickname for this lobby (Change default name in options->chat)")) ;
|
||||
ui->nickName_LE->setText(QString::fromStdString(default_nick)) ;
|
||||
|
||||
connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( createLobby( ) ) );
|
||||
|
|
|
@ -88,6 +88,17 @@ p, li { white-space: pre-wrap; }
|
|||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A chat lobby is a decentralized and anonymous chat group. All participants receive all messages. Once the lobby is created you can invite other friends from the Friends tab.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
|
|
@ -359,6 +359,14 @@ void PopupChatDialog::processSettings(bool bLoad)
|
|||
}
|
||||
}
|
||||
|
||||
void PopupChatDialog::closeChat(const std::string& id)
|
||||
{
|
||||
PopupChatDialog *popupchatdialog = getExistingInstance(id);
|
||||
|
||||
if(popupchatdialog != NULL)
|
||||
popupchatdialog->hide() ;
|
||||
}
|
||||
|
||||
void PopupChatDialog::chatFriend(const std::string &id)
|
||||
{
|
||||
if (id.empty()){
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
static PopupChatDialog *getPrivateChat(const std::string &id, uint chatflags);
|
||||
static void cleanupChat();
|
||||
static void chatFriend(const std::string &id);
|
||||
static void closeChat(const std::string &id);
|
||||
static void privateChatChanged(int list, int type);
|
||||
|
||||
void updateStatusString(const QString& peer_id, const QString& statusString);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue