mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix IdChooser in Signed Lobby.
So you cannot choose an unsigned Id.
This commit is contained in:
parent
2921d9eac2
commit
bef7db4b4d
@ -135,8 +135,15 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||||||
RsGxsId current_id;
|
RsGxsId current_id;
|
||||||
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
||||||
|
|
||||||
|
uint32_t idChooserFlag = IDCHOOSER_ID_REQUIRED;
|
||||||
|
ChatLobbyInfo lobbyInfo ;
|
||||||
|
if(rsMsgs->getChatLobbyInfo(lobbyId,lobbyInfo)) {
|
||||||
|
if (lobbyInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED) {
|
||||||
|
idChooserFlag |= IDCHOOSER_NON_ANONYMOUS;
|
||||||
|
}
|
||||||
|
}
|
||||||
ownIdChooser = new GxsIdChooser() ;
|
ownIdChooser = new GxsIdChooser() ;
|
||||||
ownIdChooser->loadIds(IDCHOOSER_ID_REQUIRED,current_id) ;
|
ownIdChooser->loadIds(idChooserFlag, current_id) ;
|
||||||
|
|
||||||
QWidgetAction *checkableAction = new QWidgetAction(this);
|
QWidgetAction *checkableAction = new QWidgetAction(this);
|
||||||
checkableAction->setDefaultWidget(ownIdChooser);
|
checkableAction->setDefaultWidget(ownIdChooser);
|
||||||
@ -281,8 +288,6 @@ void ChatLobbyDialog::init()
|
|||||||
|
|
||||||
QString title;
|
QString title;
|
||||||
|
|
||||||
std::list<ChatLobbyInfo>::const_iterator lobbyIt;
|
|
||||||
|
|
||||||
if(rsMsgs->getChatLobbyInfo(lobbyId,linfo))
|
if(rsMsgs->getChatLobbyInfo(lobbyId,linfo))
|
||||||
{
|
{
|
||||||
title = QString::fromUtf8(linfo.lobby_name.c_str());
|
title = QString::fromUtf8(linfo.lobby_name.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user