mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 00:55:13 -04:00
- added/fixed patch from defnax to allow setting up a topic for each chat lobby. The topic is displayed to friends.
- handled backward compatibility by keeping/sending old LobbyList item. Should be remove in the near future. - removed constraint to have at least one friends invited when creating a new lobby. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5024 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
42372c4223
commit
65cde95fba
11 changed files with 346 additions and 169 deletions
|
@ -48,6 +48,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, in
|
|||
connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( createLobby( ) ) );
|
||||
connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) );
|
||||
connect( ui->lobbyName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
|
||||
connect( ui->lobbyTopic_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
|
||||
connect( ui->nickName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
|
||||
|
||||
/* initialize key share list */
|
||||
|
@ -93,19 +94,20 @@ void CreateLobbyDialog::createLobby()
|
|||
std::list<std::string> shareList;
|
||||
ui->keyShareList->selectedSslIds(shareList, false);
|
||||
|
||||
if (shareList.empty()) {
|
||||
QMessageBox::warning(this, "RetroShare", tr("Please select at least one friend"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
// if (shareList.empty()) {
|
||||
// QMessageBox::warning(this, "RetroShare", tr("Please select at least one friend"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// create chat lobby !!
|
||||
std::string lobby_name = ui->lobbyName_LE->text().toUtf8().constData() ;
|
||||
std::string lobby_topic = ui->lobbyTopic_LE->text().toUtf8().constData() ;
|
||||
|
||||
// add to group
|
||||
|
||||
int lobby_privacy_type = (ui->security_CB->currentIndex() == 0)?RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC:RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE ;
|
||||
|
||||
ChatLobbyId id = rsMsgs->createChatLobby(lobby_name, shareList, lobby_privacy_type);
|
||||
ChatLobbyId id = rsMsgs->createChatLobby(lobby_name, lobby_topic, shareList, lobby_privacy_type);
|
||||
|
||||
std::cerr << "gui: Created chat lobby " << std::hex << id << std::endl ;
|
||||
|
||||
|
|
|
@ -123,6 +123,16 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Lobby topic:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
|
@ -150,6 +160,9 @@ p, li { white-space: pre-wrap; }
|
|||
<item>
|
||||
<widget class="QLineEdit" name="lobbyName_LE"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lobbyTopic_LE"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="nickName_LE"/>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue