merged with latest upstream trunk

This commit is contained in:
csoler 2015-12-05 16:49:00 -05:00
commit 0c1e6301b3
295 changed files with 17456 additions and 12859 deletions

View file

@ -269,7 +269,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
{
QTreeWidgetItem *item = ui.lobbyTreeWidget->currentItem();
ChatLobbyId id = item->data(COLUMN_DATA, ROLE_ID).toULongLong();
//ChatLobbyId id = item->data(COLUMN_DATA, ROLE_ID).toULongLong();
ChatLobbyFlags flags(item->data(COLUMN_DATA, ROLE_FLAGS).toUInt());
bool removed = false ;
@ -376,7 +376,7 @@ static void updateItem(QTreeWidget *treeWidget, QTreeWidgetItem *item, ChatLobby
+QObject::tr("Id:")+" "+QString::number(id,16) ;
if(lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
tooltipstr += QObject::tr("\nSecurity: no anonymous ids") ;
tooltipstr += QObject::tr("\nSecurity: no anonymous IDs") ;
item->setToolTip(0,tooltipstr) ;
}
@ -725,7 +725,7 @@ void ChatLobbyWidget::subscribeChatLobbyAs()
return ;
RsGxsId gxs_id(action->data().toString().toStdString());
uint32_t error_code ;
//uint32_t error_code ;
if(rsMsgs->joinVisibleChatLobby(id,gxs_id))
ChatDialog::chatFriend(ChatId(id),true) ;
@ -795,7 +795,7 @@ void ChatLobbyWidget::subscribeChatLobbyAtItem(QTreeWidgetItem *item)
if(!rsIdentity->getIdDetails(gxs_id,idd))
return ;
if(flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
if( (flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED) && !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
{
QMessageBox::warning(NULL,tr("Default identity is anonymous"),tr("You cannot join this lobby with your default identity, since it is anonymous and the lobby forbids it.")) ;
return ;
@ -839,16 +839,18 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id)
ui.lobbyid_lineEdit->setText( QString::number((*it).lobby_id,16) );
ui.lobbytopic_lineEdit->setText( RsHtml::plainText(it->lobby_topic) );
ui.lobbytype_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC)?tr("Public"):tr("Private")) );
ui.lobbysec_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)?tr("No anonymous IDs"):tr("Anonymous ids accepted")) );
ui.lobbysec_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)?tr("No anonymous IDs"):tr("Anonymous IDs accepted")) );
ui.lobbypeers_lineEdit->setText( QString::number((*it).total_number_of_peers) );
QString text = tr("You're not subscribed to this lobby; Double click-it to enter and chat.") ;
if(my_ids.empty())
if( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
text += "\n\n"+tr("You will need to create a non anonymous identity in order to join this chat lobby.") ;
else
text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ;
if(my_ids.empty())
{
if( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
text += "\n\n"+tr("You will need to create a non anonymous identity in order to join this chat lobby.") ;
else
text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ;
}
ui.lobbyInfoLabel->setText(text);
return ;