change the button at the end the the connect friend wizard dialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2445 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-26 23:44:12 +00:00
parent cc76a4d022
commit a9311ced0c
2 changed files with 28 additions and 29 deletions

View File

@ -57,8 +57,8 @@
#define GPG_ID_FIELD_CONNECT_FRIEND_WIZARD "GPGidField" #define GPG_ID_FIELD_CONNECT_FRIEND_WIZARD "GPGidField"
#define LOCATION_FIELD_CONNECT_FRIEND_WIZARD "peerLocation" #define LOCATION_FIELD_CONNECT_FRIEND_WIZARD "peerLocation"
#define CERT_STRING_FIELD_CONNECT_FRIEND_WIZARD "peerCertString" #define CERT_STRING_FIELD_CONNECT_FRIEND_WIZARD "peerCertString"
#define SIGN_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD "signRadioButton" #define SIGN_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD "signCheckBox"
#define ACCEPT_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD "acceptRadioButton" #define ACCEPT_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD "acceptCheckBox"
@ -781,14 +781,14 @@ ConclusionPage::ConclusionPage(QWidget *parent) : QWizardPage(parent) {
peerDetailsFrame->setLayout(peerDetailsLayout); peerDetailsFrame->setLayout(peerDetailsLayout);
signGPGRadioButton = new QRadioButton(); signGPGCheckBox = new QCheckBox();
signGPGRadioButton->setText(tr("Add as friend and Sign GPG Key")); signGPGCheckBox->setText(tr("Authenticate friend (Sign GPG Key)"));
registerField(SIGN_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD,signGPGRadioButton); registerField(SIGN_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD,signGPGCheckBox);
acceptNoSignGPGRadioButton = new QRadioButton(); acceptNoSignGPGCheckBox = new QCheckBox();
acceptNoSignGPGRadioButton->setText(tr("Add as friend but don't sign GPG Key")); acceptNoSignGPGCheckBox->setText(tr("Add as friend to connect with"));
registerField(ACCEPT_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD,acceptNoSignGPGRadioButton); registerField(ACCEPT_RADIO_BUTTON_FIELD_CONNECT_FRIEND_WIZARD,acceptNoSignGPGCheckBox);
peerDetailsLayout->addWidget(signGPGRadioButton, 5,0,1,-1); // QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 ) peerDetailsLayout->addWidget(acceptNoSignGPGCheckBox, 5,0,1,-1); // QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
peerDetailsLayout->addWidget(acceptNoSignGPGRadioButton, 6,0,1,-1); // QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 ) peerDetailsLayout->addWidget(signGPGCheckBox, 6,0,1,-1); // QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
conclusionPageLayout = new QVBoxLayout(); conclusionPageLayout = new QVBoxLayout();
conclusionPageLayout->addWidget(peerDetailsFrame); conclusionPageLayout->addWidget(peerDetailsFrame);
@ -858,30 +858,29 @@ void ConclusionPage::initializePage() {
//set the radio button to sign the GPG key //set the radio button to sign the GPG key
if (detail.accept_connection && !detail.ownsign) { if (detail.accept_connection && !detail.ownsign) {
//gpg key connection is already accepted, don't propose to accept it again //gpg key connection is already accepted, don't propose to accept it again
signGPGRadioButton->setText(tr("Peer is already a retroshare friend. Sign his GPG key.")); signGPGCheckBox->setChecked(true);
signGPGRadioButton->setChecked(true); acceptNoSignGPGCheckBox->hide();
acceptNoSignGPGRadioButton->hide(); acceptNoSignGPGCheckBox->setChecked(false);
acceptNoSignGPGRadioButton->setChecked(false);
} }
if (!detail.accept_connection && detail.ownsign) { if (!detail.accept_connection && detail.ownsign) {
//gpg key is already signed, don't propose to sign it again //gpg key is already signed, don't propose to sign it again
acceptNoSignGPGRadioButton->setText(tr("GPG key is already signed, make it a retroshare friend.")); acceptNoSignGPGCheckBox->setChecked(true);
acceptNoSignGPGRadioButton->setChecked(true); signGPGCheckBox->hide();
signGPGRadioButton->hide(); signGPGCheckBox->setChecked(false);
signGPGRadioButton->setChecked(false);
} }
if (!detail.accept_connection && !detail.ownsign) { if (!detail.accept_connection && !detail.ownsign) {
signGPGRadioButton->setText(tr("Add as friend and Sign GPG Key")); acceptNoSignGPGCheckBox->setChecked(true);
signGPGRadioButton->show(); signGPGCheckBox->show();
acceptNoSignGPGRadioButton->setText(tr("Add as friend but don't sign GPG Key")); signGPGCheckBox->setChecked(true);
acceptNoSignGPGRadioButton->show(); acceptNoSignGPGCheckBox->show();
} }
if (detail.accept_connection && detail.ownsign && !detail.isOnlyGPGdetail) { if (detail.accept_connection && detail.ownsign) {
acceptNoSignGPGRadioButton->setChecked(false); acceptNoSignGPGCheckBox->setChecked(false);
acceptNoSignGPGRadioButton->hide(); acceptNoSignGPGCheckBox->hide();
signGPGRadioButton->setChecked(false); signGPGCheckBox->setChecked(false);
signGPGRadioButton->hide(); signGPGCheckBox->hide();
radioButtonsLabel = new QLabel(tr("It seems your friend is already registered. Adding it might just set it's ip address.")); radioButtonsLabel = new QLabel(tr("It seems your friend is already registered. Adding it might just set it's ip address."));
radioButtonsLabel->setWordWrap(true);
peerDetailsLayout->addWidget(radioButtonsLabel, 7,0,1,-1); // QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 ) peerDetailsLayout->addWidget(radioButtonsLabel, 7,0,1,-1); // QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
} }

View File

@ -219,8 +219,8 @@ private:
QTextEdit* signersEdit; QTextEdit* signersEdit;
QLabel* radioButtonsLabel; QLabel* radioButtonsLabel;
QRadioButton *signGPGRadioButton; QCheckBox *signGPGCheckBox;
QRadioButton *acceptNoSignGPGRadioButton; QCheckBox *acceptNoSignGPGCheckBox;
QVBoxLayout* conclusionPageLayout; QVBoxLayout* conclusionPageLayout;