From bef7db4b4df8fe5fa7afdb586acd53befa710318 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 30 Jul 2016 19:14:59 +0200 Subject: [PATCH] Fix IdChooser in Signed Lobby. So you cannot choose an unsigned Id. --- retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp index afdfeb8a9..aeb748db8 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp @@ -135,8 +135,15 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi RsGxsId 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->loadIds(IDCHOOSER_ID_REQUIRED,current_id) ; + ownIdChooser->loadIds(idChooserFlag, current_id) ; QWidgetAction *checkableAction = new QWidgetAction(this); checkableAction->setDefaultWidget(ownIdChooser); @@ -281,8 +288,6 @@ void ChatLobbyDialog::init() QString title; - std::list::const_iterator lobbyIt; - if(rsMsgs->getChatLobbyInfo(lobbyId,linfo)) { title = QString::fromUtf8(linfo.lobby_name.c_str());