From 40bffc30423903b704a65ed3fdd7b79fae2852de Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 27 Aug 2015 23:09:31 -0400 Subject: [PATCH] fixed last GUI bugs for authed lobbies --- libretroshare/src/retroshare/rsmsgs.h | 3 ++- retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/retroshare/rsmsgs.h b/libretroshare/src/retroshare/rsmsgs.h index d66c2e4b4..d71544d15 100644 --- a/libretroshare/src/retroshare/rsmsgs.h +++ b/libretroshare/src/retroshare/rsmsgs.h @@ -90,9 +90,10 @@ #define RS_CHAT_TYPE_DISTANT 4 const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_AUTO_SUBSCRIBE( 0x00000001 ) ; -const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_PGP_SIGNED ( 0x00000002 ) ; // requires the signing ID to be PGP-linked. Avoids anonymous crap. +const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_deprecated ( 0x00000002 ) ; const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_PUBLIC ( 0x00000004 ) ; const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_CHALLENGE ( 0x00000008 ) ; +const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_PGP_SIGNED ( 0x00000010 ) ; // requires the signing ID to be PGP-linked. Avoids anonymous crap. typedef uint64_t ChatLobbyId ; typedef uint64_t ChatLobbyMsgId ; diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp index 0f96f5f57..05a7684f2 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp @@ -57,7 +57,8 @@ CreateLobbyDialog::CreateLobbyDialog(const std::set& peer_list, int pr connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect( ui->lobbyName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) ); connect( ui->lobbyTopic_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) ); - connect( ui->idChooser_CB, SIGNAL( currentChanged ( int ) ), this, SLOT( checkTextFields( ) ) ); + connect( ui->idChooser_CB, SIGNAL( currentIndexChanged ( int ) ), this, SLOT( checkTextFields( ) ) ); + connect( ui->pgp_signed_CB, SIGNAL( toggled ( bool ) ), this, SLOT( checkTextFields( ) ) ); /* initialize key share list */ ui->keyShareList->setHeaderText(tr("Contacts:")); @@ -105,6 +106,13 @@ void CreateLobbyDialog::checkTextFields() ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true) ; break ; } + + RsIdentityDetails(idd) ; + + rsIdentity->getIdDetails(id,idd) ; + + if( (!idd.mPgpKnown) && ui->pgp_signed_CB->isChecked()) + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false) ; } void CreateLobbyDialog::createLobby()