mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-10 11:58:36 -05:00
removed unused FriendRequest page from ConnectFriendWizard
This commit is contained in:
parent
c0436b781c
commit
a55e8241ed
@ -147,14 +147,14 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
|
|||||||
switch (rsFiles->filePermDirectDL())
|
switch (rsFiles->filePermDirectDL())
|
||||||
{
|
{
|
||||||
case RS_FILE_PERM_DIRECT_DL_YES:
|
case RS_FILE_PERM_DIRECT_DL_YES:
|
||||||
ui->_direct_transfer_CB->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
// ui->_direct_transfer_CB->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||||
ui->_direct_transfer_CB->setToolTip(ui->_direct_transfer_CB->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to Yes.")));
|
// ui->_direct_transfer_CB->setToolTip(ui->_direct_transfer_CB->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to Yes.")));
|
||||||
ui->_direct_transfer_CB_2->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
ui->_direct_transfer_CB_2->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||||
ui->_direct_transfer_CB_2->setToolTip(ui->_direct_transfer_CB_2->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to Yes.")));
|
ui->_direct_transfer_CB_2->setToolTip(ui->_direct_transfer_CB_2->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to Yes.")));
|
||||||
break ;
|
break ;
|
||||||
case RS_FILE_PERM_DIRECT_DL_NO:
|
case RS_FILE_PERM_DIRECT_DL_NO:
|
||||||
ui->_direct_transfer_CB->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
// ui->_direct_transfer_CB->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||||
ui->_direct_transfer_CB->setToolTip(ui->_direct_transfer_CB->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to No.")));
|
// ui->_direct_transfer_CB->setToolTip(ui->_direct_transfer_CB->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to No.")));
|
||||||
ui->_direct_transfer_CB_2->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
ui->_direct_transfer_CB_2->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||||
ui->_direct_transfer_CB_2->setToolTip(ui->_direct_transfer_CB_2->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to No.")));
|
ui->_direct_transfer_CB_2->setToolTip(ui->_direct_transfer_CB_2->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to No.")));
|
||||||
break ;
|
break ;
|
||||||
@ -571,63 +571,6 @@ void ConnectFriendWizard::initializePage(int id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Page_FriendRequest:
|
|
||||||
{
|
|
||||||
std::cerr << "Friend request page id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
|
||||||
|
|
||||||
ui->fr_avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
|
|
||||||
setPixmap(QWizard::LogoPixmap, QPixmap(":/images/user/user_request48.png"));
|
|
||||||
|
|
||||||
ui->fr_signGPGCheckBox->setChecked(false);
|
|
||||||
|
|
||||||
//set the radio button to sign the GPG key
|
|
||||||
if (peerDetails.accept_connection && !peerDetails.ownsign) {
|
|
||||||
//gpg key connection is already accepted, don't propose to accept it again
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->hide();
|
|
||||||
ui->fr_signGPGCheckBox->show();
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(false);
|
|
||||||
}
|
|
||||||
if (!peerDetails.accept_connection && peerDetails.ownsign) {
|
|
||||||
//gpg key is already signed, don't propose to sign it again
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(true);
|
|
||||||
ui->fr_signGPGCheckBox->hide();
|
|
||||||
}
|
|
||||||
if (!peerDetails.accept_connection && !peerDetails.ownsign) {
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(true);
|
|
||||||
ui->fr_signGPGCheckBox->show();
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->show();
|
|
||||||
}
|
|
||||||
if (peerDetails.accept_connection && peerDetails.ownsign) {
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(false);
|
|
||||||
ui->fr_acceptNoSignGPGCheckBox->hide();
|
|
||||||
ui->fr_signGPGCheckBox->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->fr_nameEdit->setText(QString::fromUtf8(peerDetails.name.c_str()));
|
|
||||||
ui->fr_emailEdit->setText(QString::fromUtf8(peerDetails.email.c_str()));
|
|
||||||
|
|
||||||
QString loc = QString::fromUtf8(peerDetails.location.c_str());
|
|
||||||
if (!loc.isEmpty())
|
|
||||||
{
|
|
||||||
loc += " (";
|
|
||||||
loc += QString::fromStdString(peerDetails.id.toStdString());
|
|
||||||
loc += ")";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!peerDetails.id.isNull())
|
|
||||||
{
|
|
||||||
loc += QString::fromStdString(peerDetails.id.toStdString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->fr_nodeEdit->setText(loc);
|
|
||||||
|
|
||||||
ui->fr_InfoTopLabel->setText(tr("You have a friend request from") + " " + QString::fromUtf8(peerDetails.name.c_str()));
|
|
||||||
|
|
||||||
fillGroups(this, ui->fr_groupComboBox, groupId);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case Page_FriendRecommendations:
|
case Page_FriendRecommendations:
|
||||||
ui->frec_recommendList->setHeaderText(tr("Recommend friends"));
|
ui->frec_recommendList->setHeaderText(tr("Recommend friends"));
|
||||||
ui->frec_recommendList->setModus(FriendSelectionWidget::MODUS_CHECK);
|
ui->frec_recommendList->setModus(FriendSelectionWidget::MODUS_CHECK);
|
||||||
@ -750,8 +693,6 @@ bool ConnectFriendWizard::validateCurrentPage()
|
|||||||
break;
|
break;
|
||||||
case Page_Conclusion:
|
case Page_Conclusion:
|
||||||
break;
|
break;
|
||||||
case Page_FriendRequest:
|
|
||||||
break;
|
|
||||||
case Page_FriendRecommendations:
|
case Page_FriendRecommendations:
|
||||||
{
|
{
|
||||||
std::set<RsPeerId> recommendIds;
|
std::set<RsPeerId> recommendIds;
|
||||||
@ -788,7 +729,6 @@ int ConnectFriendWizard::nextId() const
|
|||||||
case Page_WebMail:
|
case Page_WebMail:
|
||||||
case Page_ErrorMessage:
|
case Page_ErrorMessage:
|
||||||
case Page_Conclusion:
|
case Page_Conclusion:
|
||||||
case Page_FriendRequest:
|
|
||||||
case Page_FriendRecommendations:
|
case Page_FriendRecommendations:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -800,12 +740,7 @@ ServicePermissionFlags ConnectFriendWizard::serviceFlags() const
|
|||||||
{
|
{
|
||||||
ServicePermissionFlags flags(0) ;
|
ServicePermissionFlags flags(0) ;
|
||||||
|
|
||||||
if (hasVisitedPage(Page_FriendRequest))
|
if (hasVisitedPage(Page_Conclusion)) {
|
||||||
{
|
|
||||||
if( ui->_direct_transfer_CB->isChecked()) flags |= RS_NODE_PERM_DIRECT_DL ;
|
|
||||||
if( ui->_allow_push_CB->isChecked()) flags |= RS_NODE_PERM_ALLOW_PUSH ;
|
|
||||||
if( ui->_require_WL_CB->isChecked()) flags |= RS_NODE_PERM_REQUIRE_WL ;
|
|
||||||
} else if (hasVisitedPage(Page_Conclusion)) {
|
|
||||||
if( ui->_direct_transfer_CB_2->isChecked()) flags |= RS_NODE_PERM_DIRECT_DL ;
|
if( ui->_direct_transfer_CB_2->isChecked()) flags |= RS_NODE_PERM_DIRECT_DL ;
|
||||||
if( ui->_allow_push_CB_2->isChecked()) flags |= RS_NODE_PERM_ALLOW_PUSH ;
|
if( ui->_allow_push_CB_2->isChecked()) flags |= RS_NODE_PERM_ALLOW_PUSH ;
|
||||||
if( ui->_require_WL_CB_2->isChecked()) flags |= RS_NODE_PERM_REQUIRE_WL ;
|
if( ui->_require_WL_CB_2->isChecked()) flags |= RS_NODE_PERM_REQUIRE_WL ;
|
||||||
@ -824,12 +759,7 @@ void ConnectFriendWizard::accept()
|
|||||||
sign = ui->signGPGCheckBox->isChecked();
|
sign = ui->signGPGCheckBox->isChecked();
|
||||||
accept_connection = ui->acceptNoSignGPGCheckBox->isChecked();
|
accept_connection = ui->acceptNoSignGPGCheckBox->isChecked();
|
||||||
add_key_to_keyring = ui->addKeyToKeyring_CB->isChecked() ;
|
add_key_to_keyring = ui->addKeyToKeyring_CB->isChecked() ;
|
||||||
} else if (hasVisitedPage(Page_FriendRequest)) {
|
} else {
|
||||||
std::cerr << "ConnectFriendWizard::accept() called with page friend request visited" << std::endl;
|
|
||||||
|
|
||||||
sign = ui->fr_signGPGCheckBox->isChecked();
|
|
||||||
accept_connection = ui->fr_acceptNoSignGPGCheckBox->isChecked();
|
|
||||||
} else {
|
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ class ConnectFriendWizard : public QWizard
|
|||||||
Q_PROPERTY(QString titleColor READ titleColor WRITE setTitleColor)
|
Q_PROPERTY(QString titleColor READ titleColor WRITE setTitleColor)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Page { Page_Text, Page_Cert, Page_ErrorMessage, Page_Conclusion, Page_WebMail, Page_FriendRequest, Page_FriendRecommendations };
|
enum Page { Page_Text, Page_Cert, Page_ErrorMessage, Page_Conclusion, Page_WebMail, Page_FriendRecommendations };
|
||||||
|
|
||||||
ConnectFriendWizard(QWidget *parent = 0);
|
ConnectFriendWizard(QWidget *parent = 0);
|
||||||
~ConnectFriendWizard();
|
~ConnectFriendWizard();
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1161</width>
|
<width>1100</width>
|
||||||
<height>817</height>
|
<height>604</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -577,229 +577,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="ConnectFriendPage" name="FriendRequestPage">
|
|
||||||
<property name="title">
|
|
||||||
<string>Friend request</string>
|
|
||||||
</property>
|
|
||||||
<property name="subTitle">
|
|
||||||
<string>Details about the request</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="pageId">
|
|
||||||
<string notr="true">ConnectFriendWizard::Page_FriendRequest</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="FriendRequestPageVLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="fr_Frame">
|
|
||||||
<layout class="QVBoxLayout" name="fr_FrameVLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="StyledLabel" name="fr_InfoTopLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">You have a friend request from</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="fr_detailsLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="AvatarWidget" name="fr_avatar">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>96</width>
|
|
||||||
<height>96</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>96</width>
|
|
||||||
<height>96</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="fr_peerDetailsFrame">
|
|
||||||
<property name="title">
|
|
||||||
<string>Peer details</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="fr_peerDetailsFrameGLayout">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="fr_nameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="fr_nameEdit">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Name</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="fr_emailLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Email:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="fr_nodeLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Node:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="fr_nodeEdit">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Node</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="fr_emailEdit">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Email</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="fr_optionsHLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="fr_optionsFrame">
|
|
||||||
<property name="title">
|
|
||||||
<string>Options</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="fr_optionsFrameVLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="fr_groupHLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fr_groupLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Add friend to group:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="fr_groupComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="fr_signGPGCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Authenticate friend (Sign PGP Key)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="fr_acceptNoSignGPGCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add as friend to connect with</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="fr_RVBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Options</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="fr_RVBoxVLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="_direct_transfer_CB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use as direct source, when available</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="_allow_push_CB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto-download recommended files</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="_require_WL_CB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Require whitelist clearance to connect</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="fr_RVBoxVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="StyledLabel" name="fr_InfoBottomLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>To accept the Friend Request, click the Finish button.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="fr_VSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>488</width>
|
|
||||||
<height>118</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="ConnectFriendPage" name="ErrorMessagePage">
|
<widget class="ConnectFriendPage" name="ErrorMessagePage">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Sorry, some error appeared</string>
|
<string>Sorry, some error appeared</string>
|
||||||
@ -1302,12 +1079,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>AvatarWidget</class>
|
|
||||||
<extends>QLabel</extends>
|
|
||||||
<header>gui/common/AvatarWidget.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>StyledLabel</class>
|
<class>StyledLabel</class>
|
||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user