friend add wizard - hide options checkboxes in collapsible panel, default on in advanced mode

This commit is contained in:
RetroPooh 2017-01-23 15:09:40 +03:00
parent e82b4fe3c3
commit bcb1f19990
2 changed files with 160 additions and 112 deletions

View File

@ -114,7 +114,7 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
connect(ui->aolButton, SIGNAL(clicked()), this, SLOT(inviteAol()));
connect(ui->yandexButton, SIGNAL(clicked()), this, SLOT(inviteYandex()));
connect(ui->emailButton, SIGNAL(clicked()), this, SLOT(runEmailClient2()));
connect(ui->toggleadvancedButton, SIGNAL(clicked()), this, SLOT(toggleAdvanced()));
subject = tr("RetroShare Invitation");
body = GetStartedDialog::GetInviteText();
@ -124,9 +124,16 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
std::string advsetting;
if(rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
{ }
{
ui->toggleadvancedButton->setVisible(false);
}
else
ui->userFrame->hide();
{
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 ...
AdvancedVisible=false;
}
unsigned int onlineCount = 0, friendCount = 0;
rsPeers->getPeerCount (&friendCount, &onlineCount, false);
@ -1285,3 +1292,19 @@ void ConnectFriendWizard::runEmailClient2()
{
sendMail("", subject, body );
}
void ConnectFriendWizard::toggleAdvanced()
{
if(AdvancedVisible)
{
ui->horizontalLayout_13->hide();
ui->toggleadvancedButton->setText("Show advanced options");
AdvancedVisible=false;
}
else
{
ui->horizontalLayout_13->show();
ui->toggleadvancedButton->setText("Hide advanced options");
AdvancedVisible=true;
}
}

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>691</width>
<height>533</height>
<width>620</width>
<height>530</height>
</rect>
</property>
<property name="windowTitle">
@ -1264,12 +1264,12 @@ resources.</string>
</item>
<item row="6" column="1">
<widget class="QPlainTextEdit" name="signersEdit">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Signing a friend's key is a way to express your trust into this friend, to your other friends. The signatures below cryptographically attest that owners of the listed keys recognise the current PGP key as authentic.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Signing a friend's key is a way to express your trust into this friend, to your other friends. The signatures below cryptographically attest that owners of the listed keys recognise the current PGP key as authentic.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
@ -1300,120 +1300,132 @@ resources.</string>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<layout class="QVBoxLayout" name="verticalLayout_18">
<item>
<widget class="QCheckBox" name="addKeyToKeyring_CB">
<property name="text">
<string>Add key to keyring</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="signGPGCheckBox">
<property name="toolTip">
<widget class="QPushButton" name="toggleadvancedButton">
<property name="text">
<string>Show Advanced options</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="horizontalLayout_13">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_18">
<item>
<widget class="QCheckBox" name="addKeyToKeyring_CB">
<property name="text">
<string>Add key to keyring</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="signGPGCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Signing a friend's key is a way to express your trust into this friend, to your other friends. It helps them to decide whether to allow connections from that key based on your own trust. Signing a key is absolutely optional and cannot be undone, so do it wisely.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Authenticate friend (Sign PGP Key)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="acceptNoSignGPGCheckBox">
<property name="text">
<string>Add as friend to connect with</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QCheckBox" name="_addIPToWhiteList_CB_2">
<property name="text">
<string>Add IP to whitelist</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="_addIPToWhiteList_ComboBox_2"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="groupLabel">
<property name="text">
<string>Add friend to group:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="groupComboBox"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_19">
<item>
<widget class="QGroupBox" name="_options_GB">
<property name="title">
<string>Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="text">
<string>Authenticate friend (Sign PGP Key)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="acceptNoSignGPGCheckBox">
<property name="text">
<string>Add as friend to connect with</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QCheckBox" name="_direct_transfer_CB_2">
<widget class="QCheckBox" name="_addIPToWhiteList_CB_2">
<property name="text">
<string>Can be used as direct source</string>
<string>Add IP to whitelist</string>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;Retroshare periodically checks your friend lists for browsable files matching your transfers, to establish a direct transfer. In this case, your friend knows you're downloading the file.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;To prevent this behavior for this friend only, uncheck this box. You can still perform a direct transfer if you explicitly ask for it, by e.g. downloading from your friend's file list. This setting is applied to all locations of the same node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_allow_push_CB_2">
<property name="text">
<string>Auto-download recommended files</string>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This option allows you to automatically download a file that is recommended in an message coming from this node. This can be used for instance to send files between your own nodes. Applied to all locations of the same node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_require_WL_CB_2">
<property name="text">
<string>Require whitelist clearance to connect</string>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Peers that have this option cannot connect if their connection address is not in the whitelist. This protects you from traffic forwarding attacks. When used, rejected peers will be reported by &amp;quot;security feed items&amp;quot; in the News Feed section. From there, you can whitelist/blacklist their IP. Applies to all locations of the same node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QComboBox" name="_addIPToWhiteList_ComboBox_2"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>38</width>
<height>38</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="groupLabel">
<property name="text">
<string>Add friend to group:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="groupComboBox"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_19">
<item>
<widget class="QGroupBox" name="_options_GB">
<property name="title">
<string>Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QCheckBox" name="_direct_transfer_CB_2">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;Retroshare periodically checks your friend lists for browsable files matching your transfers, to establish a direct transfer. In this case, your friend knows you're downloading the file.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;To prevent this behavior for this friend only, uncheck this box. You can still perform a direct transfer if you explicitly ask for it, by e.g. downloading from your friend's file list. This setting is applied to all locations of the same node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Can be used as direct source</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_allow_push_CB_2">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This option allows you to automatically download a file that is recommended in an message coming from this node. This can be used for instance to send files between your own nodes. Applied to all locations of the same node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Auto-download recommended files</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_require_WL_CB_2">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Peers that have this option cannot connect if their connection address is not in the whitelist. This protects you from traffic forwarding attacks. When used, rejected peers will be reported by &amp;quot;security feed items&amp;quot; in the News Feed section. From there, you can whitelist/blacklist their IP. Applies to all locations of the same node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Require whitelist clearance to connect</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>38</width>
<height>38</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="StyledLabel" name="requestinfolabel">
@ -1495,6 +1507,19 @@ resources.</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<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>
<widget class="QWizardPage" name="FriendRecommendationsPage">