GenCertDialog fix min 3 letters length, fields rearrange for sequential display on advanced switch

This commit is contained in:
RetroPooh 2017-02-28 12:07:45 +03:00 committed by csoler
parent d427182e1f
commit b52c4b80dd
2 changed files with 132 additions and 147 deletions

View File

@ -335,7 +335,7 @@ void GenCertDialog::updateCheckLabels()
bool generate_new = !ui.reuse_existing_node_CB->isChecked();
mAllFieldsOk = true ;
if(ui.node_input->text().length() > 3)
if(ui.node_input->text().length() >= 3)
ui.node_name_check_LB ->setPixmap(good) ;
else
{
@ -343,7 +343,7 @@ void GenCertDialog::updateCheckLabels()
ui.node_name_check_LB ->setPixmap(bad) ;
}
if(!generate_new || ui.name_input->text().length() > 3)
if(!generate_new || ui.name_input->text().length() >= 3)
ui.profile_name_check_LB ->setPixmap(good) ;
else
{
@ -351,14 +351,14 @@ void GenCertDialog::updateCheckLabels()
ui.profile_name_check_LB ->setPixmap(bad) ;
}
if(ui.password_input->text().length() > 3)
if(ui.password_input->text().length() >= 3)
ui.password_check_LB ->setPixmap(good) ;
else
{
mAllFieldsOk = false ;
ui.password_check_LB ->setPixmap(bad) ;
}
if(ui.password_input->text().length() > 3 && ui.password_input->text() == ui.password_input_2->text())
if(ui.password_input->text().length() >= 3 && ui.password_input->text() == ui.password_input_2->text())
ui.password2_check_LB ->setPixmap(good) ;
else
{

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1278</width>
<height>1296</height>
<width>724</width>
<height>667</height>
</rect>
</property>
<property name="windowTitle">
@ -290,13 +290,31 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</item>
<item>
<layout class="QGridLayout" name="profilGLayout">
<item row="10" column="0">
<widget class="QLabel" name="hiddenaddr_label">
<property name="text">
<string>hidden address</string>
<item row="9" column="2">
<widget class="QLineEdit" name="password_input_2">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string/>
</property>
<property name="maxLength">
<number>1024</number>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
@ -313,7 +331,7 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</property>
</widget>
</item>
<item row="13" column="2">
<item row="15" column="2">
<widget class="QComboBox" name="keylength_comboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@ -323,7 +341,7 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</property>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="password_label_2">
<property name="toolTip">
<string>This password is for PGP</string>
@ -343,20 +361,7 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLineEdit" name="nickname_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Identities are used when you write in chat rooms, forums and channel comments. &lt;/p&gt;&lt;p&gt;They also receive/send email over the Retroshare network. You can create&lt;/p&gt;&lt;p&gt;a signed identity now, or do it later on when you get to need it.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="14" column="2">
<item row="18" column="2">
<widget class="QProgressBar" name="entropy_bar">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@ -372,7 +377,7 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</property>
</widget>
</item>
<item row="14" column="3">
<item row="18" column="3">
<widget class="QLabel" name="randomness_check_LB">
<property name="text">
<string/>
@ -386,20 +391,27 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="nickname_label">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Chat identity</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<item row="16" column="2">
<widget class="QComboBox" name="nodeType_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Standard node</string>
</property>
</item>
<item>
<property name="text">
<string>TOR/I2P Hidden node</string>
</property>
</item>
</widget>
</item>
<item row="13" column="0">
<item row="15" column="0">
<widget class="QLabel" name="keylength_label">
<property name="text">
<string>PGP key length</string>
@ -448,26 +460,6 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="nodeType_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Standard node</string>
</property>
</item>
<item>
<property name="text">
<string>TOR/I2P Hidden node</string>
</property>
</item>
</widget>
</item>
<item row="4" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
@ -555,7 +547,76 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</item>
</layout>
</item>
<item row="10" column="2">
<item row="9" column="3">
<widget class="QLabel" name="password2_check_LB">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QLineEdit" name="password_input">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string/>
</property>
<property name="maxLength">
<number>1024</number>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="name_label">
<property name="text">
<string>Profile name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Randomness</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_nodeType">
<property name="text">
<string>Node type</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="hiddenaddr_label">
<property name="text">
<string>hidden address</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="17" column="2">
<layout class="QHBoxLayout" name="hiddenInfoHLayout">
<property name="spacing">
<number>6</number>
@ -619,108 +680,34 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
</item>
</layout>
</item>
<item row="8" column="2">
<widget class="QLineEdit" name="password_input_2">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<item row="10" column="0">
<widget class="QLabel" name="nickname_label">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string/>
</property>
<property name="maxLength">
<number>1024</number>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="8" column="3">
<widget class="QLabel" name="password2_check_LB">
<property name="text">
<string/>
<string>Chat identity</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QLineEdit" name="password_input">
<item row="10" column="2">
<widget class="QLineEdit" name="nickname_input">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string/>
</property>
<property name="maxLength">
<number>1024</number>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="name_label">
<property name="text">
<string>Profile name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_nodeType">
<property name="text">
<string>Node type</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Randomness</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Identities are used when you write in chat rooms, forums and channel comments. &lt;/p&gt;&lt;p&gt;They also receive/send email over the Retroshare network. You can create&lt;/p&gt;&lt;p&gt;a signed identity now, or do it later on when you get to need it.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</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>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -806,10 +793,8 @@ Alternatively you can use an existing profile. Just uncheck &quot;Create a new p
<tabstop>password_input_2</tabstop>
<tabstop>adv_checkbox</tabstop>
<tabstop>keylength_comboBox</tabstop>
<tabstop>nodeType_CB</tabstop>
<tabstop>exportIdentity_PB</tabstop>
<tabstop>reuse_existing_node_CB</tabstop>
<tabstop>nickname_input</tabstop>
<tabstop>genPGPuser</tabstop>
<tabstop>hiddenaddr_input</tabstop>
<tabstop>hiddenport_spinBox</tabstop>