mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 23:40:26 -04:00
made 2 different pages in ConfCertDialog for PGP key and RS certificate. Removed the old format checkbox.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8055 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1f4d827140
commit
62dba4aee4
2 changed files with 72 additions and 35 deletions
|
@ -84,13 +84,13 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
|
||||||
/* Invoke Qt Designer generated QObject setup routine */
|
/* Invoke Qt Designer generated QObject setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
if(id.isNull())
|
// if(id.isNull())
|
||||||
ui._useOldFormat_CB->setChecked(true) ;
|
// ui._useOldFormat_CB->setChecked(true) ;
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
ui._useOldFormat_CB->setChecked(false) ;
|
// ui._useOldFormat_CB->setChecked(false) ;
|
||||||
ui._useOldFormat_CB->setEnabled(false) ;
|
// ui._useOldFormat_CB->setEnabled(false) ;
|
||||||
}
|
// }
|
||||||
|
|
||||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
|
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
|
||||||
ui.headerFrame->setHeaderText(tr("Friend Details"));
|
ui.headerFrame->setHeaderText(tr("Friend Details"));
|
||||||
|
@ -106,10 +106,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
|
||||||
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
|
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
|
||||||
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
|
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
|
||||||
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||||
connect(ui._useOldFormat_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
connect(ui._shouldAddSignatures_CB_2, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||||
// connect(ui._anonymous_routing_CB, SIGNAL(toggled(bool)), this, SLOT(setServiceFlags()));
|
|
||||||
// connect(ui._discovery_CB, SIGNAL(toggled(bool)), this, SLOT(setServiceFlags()));
|
|
||||||
// connect(ui._forums_channels_CB, SIGNAL(toggled(bool)), this, SLOT(setServiceFlags()));
|
|
||||||
|
|
||||||
ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
|
ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
|
||||||
|
|
||||||
|
@ -168,14 +165,15 @@ void ConfCertDialog::load()
|
||||||
if(detail.isOnlyGPGdetail && !rsPeers->isKeySupported(pgpId))
|
if(detail.isOnlyGPGdetail && !rsPeers->isKeySupported(pgpId))
|
||||||
{
|
{
|
||||||
ui.make_friend_button->setEnabled(false) ;
|
ui.make_friend_button->setEnabled(false) ;
|
||||||
ui.make_friend_button->setToolTip(tr("The supplied key algorithm is not supported by RetroShare\n(Only RSA keys are supported at the moment)")) ;
|
ui.make_friend_button->setToolTip(tr("The supplied key algorithm is not supported by RetroShare\n(Only RSA keys are supported at the moment)")) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui.make_friend_button->setEnabled(true) ;
|
ui.make_friend_button->setEnabled(true) ;
|
||||||
ui.make_friend_button->setToolTip("") ;
|
ui.make_friend_button->setToolTip("") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
||||||
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||||
|
|
||||||
|
@ -261,7 +259,8 @@ void ConfCertDialog::load()
|
||||||
ui.pgpfingerprint_label->show();
|
ui.pgpfingerprint_label->show();
|
||||||
|
|
||||||
ui.stabWidget->setTabEnabled(2,true) ;
|
ui.stabWidget->setTabEnabled(2,true) ;
|
||||||
ui.stabWidget->setTabEnabled(3,true) ;
|
ui.stabWidget->setTabEnabled(3,true) ;
|
||||||
|
ui.stabWidget->setTabEnabled(4,true) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -289,8 +288,9 @@ void ConfCertDialog::load()
|
||||||
ui.tabWidget->hide();
|
ui.tabWidget->hide();
|
||||||
|
|
||||||
ui.stabWidget->setTabEnabled(2,true) ;
|
ui.stabWidget->setTabEnabled(2,true) ;
|
||||||
ui.stabWidget->setTabEnabled(3,false) ;
|
ui.stabWidget->setTabEnabled(3,false) ;
|
||||||
ui._useOldFormat_CB->setEnabled(false) ;
|
ui.stabWidget->setTabEnabled(4,false) ;
|
||||||
|
//ui._useOldFormat_CB->setEnabled(false) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (detail.gpg_id == rsPeers->getGPGOwnId()) {
|
if (detail.gpg_id == rsPeers->getGPGOwnId()) {
|
||||||
|
@ -419,21 +419,31 @@ void ConfCertDialog::loadInvitePage()
|
||||||
close();
|
close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::string invite ;
|
std::string pgp_key = rsPeers->getPGPKey(detail.gpg_id,ui._shouldAddSignatures_CB_2->isChecked()) ; // this needs to be a SSL id
|
||||||
|
|
||||||
if(detail.isOnlyGPGdetail)
|
ui.userCertificateText_2->setReadOnly(true);
|
||||||
invite = rsPeers->getPGPKey(detail.gpg_id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
|
ui.userCertificateText_2->setMinimumHeight(200);
|
||||||
else
|
ui.userCertificateText_2->setMinimumWidth(530);
|
||||||
invite = rsPeers->GetRetroshareInvite(detail.id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
|
|
||||||
|
|
||||||
ui.userCertificateText->setReadOnly(true);
|
|
||||||
ui.userCertificateText->setMinimumHeight(200);
|
|
||||||
ui.userCertificateText->setMinimumWidth(530);
|
|
||||||
QFont font("Courier New",10,50,false);
|
QFont font("Courier New",10,50,false);
|
||||||
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
||||||
font.setStyle(QFont::StyleNormal);
|
font.setStyle(QFont::StyleNormal);
|
||||||
ui.userCertificateText->setFont(font);
|
ui.userCertificateText_2->setFont(font);
|
||||||
ui.userCertificateText->setText(QString::fromUtf8(invite.c_str()));
|
ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
|
||||||
|
|
||||||
|
if(!detail.isOnlyGPGdetail)
|
||||||
|
{
|
||||||
|
std::string invite = rsPeers->GetRetroshareInvite(detail.id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
|
||||||
|
|
||||||
|
ui.userCertificateText->setReadOnly(true);
|
||||||
|
ui.userCertificateText->setMinimumHeight(200);
|
||||||
|
ui.userCertificateText->setMinimumWidth(530);
|
||||||
|
QFont font("Courier New",10,50,false);
|
||||||
|
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
||||||
|
font.setStyle(QFont::StyleNormal);
|
||||||
|
ui.userCertificateText->setFont(font);
|
||||||
|
ui.userCertificateText->setText(QString::fromUtf8(invite.c_str()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="stabWidget">
|
<widget class="QTabWidget" name="stabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -759,6 +759,40 @@ p, li { white-space: pre-wrap; }
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_7">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>PGP Key</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="userCertificateText_2"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="_shouldAddSignatures_CB_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Include signatures</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
|
@ -780,13 +814,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="_useOldFormat_CB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use old key format</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue