mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
removed auto-subscribe when no identity is available. Added warnign for the need to create an identity
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7993 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b29d5e2d6b
commit
fb3d5ca9ac
@ -257,7 +257,10 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
|||||||
if (item->data(COLUMN_DATA, ROLE_AUTOSUBSCRIBE).toBool())
|
if (item->data(COLUMN_DATA, ROLE_AUTOSUBSCRIBE).toBool())
|
||||||
contextMnu.addAction(QIcon(IMAGE_AUTOSUBSCRIBE), tr("Remove Auto Subscribe"), this, SLOT(autoSubscribeItem()));
|
contextMnu.addAction(QIcon(IMAGE_AUTOSUBSCRIBE), tr("Remove Auto Subscribe"), this, SLOT(autoSubscribeItem()));
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(!own_identities.empty())
|
||||||
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Add Auto Subscribe"), this, SLOT(autoSubscribeItem()));
|
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Add Auto Subscribe"), this, SLOT(autoSubscribeItem()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -669,6 +672,9 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id)
|
|||||||
std::vector<VisibleChatLobbyRecord> lobbies;
|
std::vector<VisibleChatLobbyRecord> lobbies;
|
||||||
rsMsgs->getListOfNearbyChatLobbies(lobbies);
|
rsMsgs->getListOfNearbyChatLobbies(lobbies);
|
||||||
|
|
||||||
|
std::list<RsGxsId> my_ids ;
|
||||||
|
rsIdentity->getOwnIds(my_ids) ;
|
||||||
|
|
||||||
for(std::vector<VisibleChatLobbyRecord>::const_iterator it(lobbies.begin());it!=lobbies.end();++it)
|
for(std::vector<VisibleChatLobbyRecord>::const_iterator it(lobbies.begin());it!=lobbies.end();++it)
|
||||||
if( (*it).lobby_id == id)
|
if( (*it).lobby_id == id)
|
||||||
{
|
{
|
||||||
@ -678,7 +684,11 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id)
|
|||||||
ui.lobbytype_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC)?tr("Public"):tr("Private")) );
|
ui.lobbytype_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC)?tr("Public"):tr("Private")) );
|
||||||
ui.lobbypeers_lineEdit->setText( QString::number((*it).total_number_of_peers) );
|
ui.lobbypeers_lineEdit->setText( QString::number((*it).total_number_of_peers) );
|
||||||
|
|
||||||
ui.lobbyInfoLabel->setText(tr("You're not subscribed to this lobby; Double click-it to enter and chat.") );
|
QString text = tr("You're not subscribed to this lobby; Double click-it to enter and chat.") ;
|
||||||
|
if(my_ids.empty())
|
||||||
|
text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ;
|
||||||
|
|
||||||
|
ui.lobbyInfoLabel->setText(text);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user