Merge pull request #916 from PhenomRetroShare/Add_WarningToDirectDonwloadCheckBox

Add a warning to Direct download checkbox depends general setting.
This commit is contained in:
csoler 2017-07-04 10:23:30 +02:00 committed by GitHub
commit d7f0141b3b
3 changed files with 95 additions and 91 deletions

View File

@ -19,13 +19,15 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#include <QUrl> #include <QCheckBox>
#include <QDesktopServices>
#include <QMessageBox>
#include <QClipboard> #include <QClipboard>
#include <QDesktopServices>
#include <QFileDialog> #include <QFileDialog>
#include <QTextStream> #include <QLayout>
#include <QMessageBox>
#include <QTextCodec> #include <QTextCodec>
#include <QTextStream>
#include <QUrl>
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
#include <QUrlQuery> #include <QUrlQuery>
@ -107,7 +109,7 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
ui->foffRadioButton->hide(); ui->foffRadioButton->hide();
ui->rsidRadioButton->hide(); ui->rsidRadioButton->hide();
ui->fr_label->hide(); ui->cp_Label->hide();
ui->requestinfolabel->hide(); ui->requestinfolabel->hide();
connect(ui->acceptNoSignGPGCheckBox,SIGNAL(toggled(bool)), ui->_options_GB,SLOT(setEnabled(bool))) ; connect(ui->acceptNoSignGPGCheckBox,SIGNAL(toggled(bool)), ui->_options_GB,SLOT(setEnabled(bool))) ;
@ -135,7 +137,7 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
else else
{ {
ui->userFrame->hide(); // certificates page - top half with own cert and it's functions ui->userFrame->hide(); // certificates page - top half with own cert and it's functions
ui->horizontalLayout_13->hide(); // Advanced options - key sign, whitelist, direct source ... ui->cp_Frame->hide(); // Advanced options - key sign, whitelist, direct source ...
AdvancedVisible=false; AdvancedVisible=false;
ui->trustLabel->hide(); ui->trustLabel->hide();
ui->trustEdit->hide(); ui->trustEdit->hide();
@ -145,7 +147,25 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
rsPeers->getPeerCount (&friendCount, &onlineCount, false); rsPeers->getPeerCount (&friendCount, &onlineCount, false);
if(friendCount<30) if(friendCount<30)
ui->makefriend_infolabel->hide(); ui->makefriend_infolabel->hide();
//Add warning to direct source checkbox depends general setting.
switch (rsFiles->filePermDirectDL())
{
case RS_FILE_PERM_DIRECT_DL_YES:
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_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.")));
break ;
case RS_FILE_PERM_DIRECT_DL_NO:
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_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.")));
break ;
default: break ;
}
updateStylesheet(); updateStylesheet();
} }
@ -279,7 +299,7 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend
//setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion); //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
setStartId(Page_Conclusion); setStartId(Page_Conclusion);
if (friendRequest){ if (friendRequest){
ui->fr_label->show(); ui->cp_Label->show();
ui->requestinfolabel->show(); ui->requestinfolabel->show();
setTitleText(ui->ConclusionPage, tr("Friend request")); setTitleText(ui->ConclusionPage, tr("Friend request"));
ui->ConclusionPage->setSubTitle(tr("Details about the request")); ui->ConclusionPage->setSubTitle(tr("Details about the request"));
@ -305,7 +325,7 @@ void ConnectFriendWizard::setGpgId(const RsPgpId &gpgId, const RsPeerId &sslId,
//setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion); //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
setStartId(Page_Conclusion); setStartId(Page_Conclusion);
if (friendRequest){ if (friendRequest){
ui->fr_label->show(); ui->cp_Label->show();
ui->requestinfolabel->show(); ui->requestinfolabel->show();
setTitleText(ui->ConclusionPage,tr("Friend request")); setTitleText(ui->ConclusionPage,tr("Friend request"));
ui->ConclusionPage->setSubTitle(tr("Details about the request")); ui->ConclusionPage->setSubTitle(tr("Details about the request"));
@ -520,7 +540,7 @@ void ConnectFriendWizard::initializePage(int id)
} }
} }
ui->fr_label->setText(tr("You have a friend request from") + " " + QString::fromUtf8(peerDetails.name.c_str())); ui->cp_Label->setText(tr("You have a friend request from") + " " + QString::fromUtf8(peerDetails.name.c_str()));
ui->nameEdit->setText(QString::fromUtf8(peerDetails.name.c_str())); ui->nameEdit->setText(QString::fromUtf8(peerDetails.name.c_str()));
ui->trustEdit->setText(trustString); ui->trustEdit->setText(trustString);
ui->emailEdit->setText(QString::fromUtf8(peerDetails.email.c_str())); ui->emailEdit->setText(QString::fromUtf8(peerDetails.email.c_str()));
@ -619,7 +639,7 @@ void ConnectFriendWizard::initializePage(int id)
ui->fr_nodeEdit->setText(loc); ui->fr_nodeEdit->setText(loc);
ui->fr_label_3->setText(tr("You have a friend request from") + " " + QString::fromUtf8(peerDetails.name.c_str())); ui->fr_InfoTopLabel->setText(tr("You have a friend request from") + " " + QString::fromUtf8(peerDetails.name.c_str()));
fillGroups(this, ui->fr_groupComboBox, groupId); fillGroups(this, ui->fr_groupComboBox, groupId);
} }
@ -1345,13 +1365,13 @@ void ConnectFriendWizard::toggleAdvanced()
{ {
if(AdvancedVisible) if(AdvancedVisible)
{ {
ui->horizontalLayout_13->hide(); ui->cp_Frame->hide();
ui->toggleadvancedButton->setText("Show advanced options"); ui->toggleadvancedButton->setText("Show advanced options");
AdvancedVisible=false; AdvancedVisible=false;
} }
else else
{ {
ui->horizontalLayout_13->show(); ui->cp_Frame->show();
ui->toggleadvancedButton->setText("Hide advanced options"); ui->toggleadvancedButton->setText("Hide advanced options");
AdvancedVisible=true; AdvancedVisible=true;
} }

View File

@ -27,7 +27,7 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Intro</string> <string notr="true">ConnectFriendWizard::Page_Intro</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="IntroPageVLayout">
<item> <item>
<widget class="QRadioButton" name="textRadioButton"> <widget class="QRadioButton" name="textRadioButton">
<property name="text"> <property name="text">
@ -90,12 +90,12 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Text</string> <string notr="true">ConnectFriendWizard::Page_Text</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="TextPageVLayout">
<item> <item>
<widget class="QFrame" name="userFrame"> <widget class="QFrame" name="userFrame">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="userFrameGLayout">
<item row="1" column="1"> <item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="userCertButtonVLayout">
<item> <item>
<widget class="QToolButton" name="userCertHelpButton"> <widget class="QToolButton" name="userCertHelpButton">
<property name="sizePolicy"> <property name="sizePolicy">
@ -235,7 +235,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="userCertButtonVSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -396,7 +396,7 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Cert</string> <string notr="true">ConnectFriendWizard::Page_Cert</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="CertificatePageVLayout">
<item> <item>
<widget class="QGroupBox" name="userFileFrame"> <widget class="QGroupBox" name="userFileFrame">
<property name="title"> <property name="title">
@ -405,7 +405,7 @@
<property name="flat"> <property name="flat">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="userFileFrameHLayout">
<item> <item>
<widget class="QLabel" name="userFileLabel"> <widget class="QLabel" name="userFileLabel">
<property name="text"> <property name="text">
@ -434,7 +434,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="friendFileNameHLayout">
<item> <item>
<widget class="DropLineEdit" name="friendFileNameEdit"/> <widget class="DropLineEdit" name="friendFileNameEdit"/>
</item> </item>
@ -459,9 +459,9 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Foff</string> <string notr="true">ConnectFriendWizard::Page_Foff</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_11"> <layout class="QVBoxLayout" name="FofPageVLayout">
<item> <item>
<widget class="QLabel" name="userFileLabel_2"> <widget class="QLabel" name="userSelectionLabel">
<property name="text"> <property name="text">
<string>Show me:</string> <string>Show me:</string>
</property> </property>
@ -506,7 +506,7 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Rsid</string> <string notr="true">ConnectFriendWizard::Page_Rsid</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="RsidPageVLayout">
<item> <item>
<widget class="QGroupBox" name="userRsidFrame"> <widget class="QGroupBox" name="userRsidFrame">
<property name="title"> <property name="title">
@ -515,7 +515,7 @@
<property name="flat"> <property name="flat">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"/> <layout class="QVBoxLayout" name="userRsidFrameVLayout"/>
</widget> </widget>
</item> </item>
<item> <item>
@ -534,7 +534,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWizardPage" name="WebmalPage"> <widget class="QWizardPage" name="WebmailPage">
<property name="title"> <property name="title">
<string>RetroShare is better with Friends </string> <string>RetroShare is better with Friends </string>
</property> </property>
@ -544,9 +544,9 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_WebMail</string> <string notr="true">ConnectFriendWizard::Page_WebMail</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="WebmalPageGLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="webMailButtonHLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>9</number> <number>9</number>
</property> </property>
@ -560,7 +560,7 @@
<number>9</number> <number>9</number>
</property> </property>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="webMailButtonLHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -693,7 +693,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="webMailButtonRHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -711,37 +711,7 @@
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_12"> <spacer name="WebmailPageVSpacer">
<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>
<item>
<spacer name="horizontalSpacer_4">
<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>
<item row="2" column="0">
<spacer name="verticalSpacer_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -765,9 +735,9 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Email</string> <string notr="true">ConnectFriendWizard::Page_Email</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="EmailPageVLayout">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="addressHLayout">
<item> <item>
<widget class="QLabel" name="addressLabel"> <widget class="QLabel" name="addressLabel">
<property name="text"> <property name="text">
@ -785,7 +755,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="subjectHLayout">
<item> <item>
<widget class="QLabel" name="subjectLabel"> <widget class="QLabel" name="subjectLabel">
<property name="text"> <property name="text">
@ -817,7 +787,7 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_FriendRequest</string> <string notr="true">ConnectFriendWizard::Page_FriendRequest</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_15"> <layout class="QVBoxLayout" name="FriendRequestPageVLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>6</number> <number>6</number>
</property> </property>
@ -825,10 +795,10 @@
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="fr_Frame">
<layout class="QVBoxLayout" name="verticalLayout_13"> <layout class="QVBoxLayout" name="fr_FrameVLayout">
<item> <item>
<widget class="StyledLabel" name="fr_label_3"> <widget class="StyledLabel" name="fr_InfoTopLabel">
<property name="text"> <property name="text">
<string notr="true">You have a friend request from</string> <string notr="true">You have a friend request from</string>
</property> </property>
@ -857,7 +827,7 @@
<property name="title"> <property name="title">
<string>Peer details</string> <string>Peer details</string>
</property> </property>
<layout class="QFormLayout" name="formLayout_3"> <layout class="QFormLayout" name="fr_peerDetailsFrameGLayout">
<property name="fieldGrowthPolicy"> <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum> <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property> </property>
@ -909,15 +879,15 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="fr_optionslLayout"> <layout class="QHBoxLayout" name="fr_optionsHLayout">
<item> <item>
<widget class="QGroupBox" name="fr_optionsFrame"> <widget class="QGroupBox" name="fr_optionsFrame">
<property name="title"> <property name="title">
<string>Options</string> <string>Options</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_14"> <layout class="QVBoxLayout" name="fr_optionsFrameVLayout">
<item> <item>
<layout class="QHBoxLayout" name="fr_groupLayout"> <layout class="QHBoxLayout" name="fr_groupHLayout">
<item> <item>
<widget class="QLabel" name="fr_groupLabel"> <widget class="QLabel" name="fr_groupLabel">
<property name="sizePolicy"> <property name="sizePolicy">
@ -961,11 +931,11 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="fr_RVBox">
<property name="title"> <property name="title">
<string>Options</string> <string>Options</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_12"> <layout class="QVBoxLayout" name="fr_RVBoxVLayout">
<item> <item>
<widget class="QCheckBox" name="_direct_transfer_CB"> <widget class="QCheckBox" name="_direct_transfer_CB">
<property name="text"> <property name="text">
@ -988,7 +958,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_5"> <spacer name="fr_RVBoxVSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -1009,14 +979,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="requestinfolabel_3"> <widget class="StyledLabel" name="fr_InfoBottomLabel">
<property name="text"> <property name="text">
<string>To accept the Friend Request, click the Finish button.</string> <string>To accept the Friend Request, click the Finish button.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="fr_verticalSpacer"> <spacer name="fr_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -1040,7 +1010,7 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_ErrorMessage</string> <string notr="true">ConnectFriendWizard::Page_ErrorMessage</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="ErrorMessagePageVLayout">
<item> <item>
<widget class="QLabel" name="messageLabel"> <widget class="QLabel" name="messageLabel">
<property name="text"> <property name="text">
@ -1060,7 +1030,7 @@
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Conclusion</string> <string notr="true">ConnectFriendWizard::Page_Conclusion</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_17"> <layout class="QVBoxLayout" name="ConclusionPageVLayout">
<item> <item>
<widget class="StyledLabel" name="makefriend_infolabel"> <widget class="StyledLabel" name="makefriend_infolabel">
<property name="palette"> <property name="palette">
@ -1143,7 +1113,7 @@ resources.</string>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="fr_label"> <widget class="StyledLabel" name="cp_Label">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
@ -1230,7 +1200,7 @@ resources.</string>
<property name="title"> <property name="title">
<string>Peer details</string> <string>Peer details</string>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="peerDetailsFrameGLayout">
<property name="fieldGrowthPolicy"> <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum> <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property> </property>
@ -1342,13 +1312,13 @@ resources.</string>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QFrame" name="horizontalLayout_13"> <widget class="QFrame" name="cp_Frame">
<layout class="QHBoxLayout" name="horizontalLayout_7"> <layout class="QHBoxLayout" name="cp_FrameHLayout">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_18"> <layout class="QVBoxLayout" name="cp_KeyVLayout">
<item> <item>
<widget class="QCheckBox" name="addKeyToKeyring_CB"> <widget class="QCheckBox" name="addKeyToKeyring_CB">
<property name="text"> <property name="text">
@ -1374,7 +1344,7 @@ resources.</string>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_11"> <layout class="QHBoxLayout" name="cp_AddIPHLayout">
<item> <item>
<widget class="QCheckBox" name="_addIPToWhiteList_CB_2"> <widget class="QCheckBox" name="_addIPToWhiteList_CB_2">
<property name="text"> <property name="text">
@ -1388,7 +1358,7 @@ resources.</string>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_9"> <layout class="QHBoxLayout" name="cp_GroupHLayout">
<item> <item>
<widget class="QLabel" name="groupLabel"> <widget class="QLabel" name="groupLabel">
<property name="text"> <property name="text">
@ -1404,7 +1374,7 @@ resources.</string>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_19"> <layout class="QVBoxLayout" name="cp_OptionVLayout">
<item> <item>
<widget class="QGroupBox" name="_options_GB"> <widget class="QGroupBox" name="_options_GB">
<property name="title"> <property name="title">
@ -1445,7 +1415,7 @@ resources.</string>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_4"> <spacer name="cp_OptionVSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -1543,7 +1513,7 @@ resources.</string>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="ConclusionPageVSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -1567,9 +1537,9 @@ resources.</string>
<attribute name="pageId"> <attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_FriendRecommendations</string> <string notr="true">ConnectFriendWizard::Page_FriendRecommendations</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_16"> <layout class="QVBoxLayout" name="FriendRecommendationsPageVLayout">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QHBoxLayout" name="frec_HLayout">
<item> <item>
<widget class="FriendSelectionWidget" name="frec_recommendList" native="true"> <widget class="FriendSelectionWidget" name="frec_recommendList" native="true">
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -152,6 +152,20 @@ void PGPKeyDialog::load()
ui.pgpfingerprint_label->show(); ui.pgpfingerprint_label->show();
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 ) ;
//Add warning to direct source checkbox depends general setting.
switch (rsFiles->filePermDirectDL())
{
case RS_FILE_PERM_DIRECT_DL_YES:
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.")));
break ;
case RS_FILE_PERM_DIRECT_DL_NO:
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.")));
break ;
default: break ;
}
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) ;
ui._require_WL_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ; ui._require_WL_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;