mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
udated GenCertDialog with new layout
This commit is contained in:
parent
74ec558c45
commit
22bc40e3cc
2 changed files with 36 additions and 36 deletions
|
@ -136,7 +136,7 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||||
//ui.headerFrame->setHeaderText(tr("Create a new profile"));
|
//ui.headerFrame->setHeaderText(tr("Create a new profile"));
|
||||||
|
|
||||||
connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode()));
|
connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode()));
|
||||||
connect(ui.adv_checkbox, SIGNAL(triggered()), this, SLOT(setupState()));
|
connect(ui.adv_checkbox, SIGNAL(toggled(bool)), this, SLOT(setupState()));
|
||||||
connect(ui.nodeType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(setupState()));
|
connect(ui.nodeType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(setupState()));
|
||||||
|
|
||||||
connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
|
connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
|
||||||
|
@ -181,10 +181,10 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||||
* mark last one as default.
|
* mark last one as default.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QMenu *menu = new QMenu(tr("Advanced options"));
|
//QMenu *menu = new QMenu(tr("Advanced options"));
|
||||||
menu->addAction(ui.adv_checkbox);
|
//menu->addAction(ui.adv_checkbox);
|
||||||
menu->addAction(ui.reuse_existing_node_CB);
|
//menu->addAction(ui.reuse_existing_node_CB);
|
||||||
ui.optionsButton->setMenu(menu);
|
// ui.optionsButton->setMenu(menu);
|
||||||
|
|
||||||
mAllFieldsOk = false ;
|
mAllFieldsOk = false ;
|
||||||
mEntropyOk = false ;
|
mEntropyOk = false ;
|
||||||
|
@ -263,7 +263,14 @@ void GenCertDialog::setupState()
|
||||||
{
|
{
|
||||||
ui.reuse_existing_node_CB->setChecked(false) ;
|
ui.reuse_existing_node_CB->setChecked(false) ;
|
||||||
ui.keylength_comboBox->setCurrentIndex(0) ;
|
ui.keylength_comboBox->setCurrentIndex(0) ;
|
||||||
|
// ui.nodeType_CB->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
ui.reuse_existing_node_CB->setVisible(adv_state) ;
|
||||||
|
|
||||||
|
// ui.nodeType_CB->setVisible(adv_state) ;
|
||||||
|
// ui.nodeType_LB->setVisible(adv_state) ;
|
||||||
|
// ui.nodeTypeExplanation_TE->setVisible(adv_state) ;
|
||||||
|
|
||||||
bool hidden_state = ui.nodeType_CB->currentIndex()==1 || ui.nodeType_CB->currentIndex()==2;
|
bool hidden_state = ui.nodeType_CB->currentIndex()==1 || ui.nodeType_CB->currentIndex()==2;
|
||||||
bool generate_new = !ui.reuse_existing_node_CB->isChecked();
|
bool generate_new = !ui.reuse_existing_node_CB->isChecked();
|
||||||
bool tor_auto = ui.nodeType_CB->currentIndex()==1;
|
bool tor_auto = ui.nodeType_CB->currentIndex()==1;
|
||||||
|
@ -272,11 +279,11 @@ void GenCertDialog::setupState()
|
||||||
|
|
||||||
switch(ui.nodeType_CB->currentIndex())
|
switch(ui.nodeType_CB->currentIndex())
|
||||||
{
|
{
|
||||||
case 0: ui.nodeTypeExplanation_TE->setText(tr("<b>Your IP is visible to trusted nodes only. You can optionally connect to hidden nodes if running Tor on your machine.</b>"));
|
case 0: ui.nodeTypeExplanation_TE->setText(tr("<b>Your IP is visible to trusted nodes only. You can also connect to hidden nodes if running Tor on your machine. Best choice for sharing with trusted friends.</b>"));
|
||||||
break;
|
break;
|
||||||
case 1: ui.nodeTypeExplanation_TE->setText(tr("<b>Your IP is hidden. All traffic happens over the Tor network. Best choice if you cannot trust friend nodes with your own IP.</b>"));
|
case 1: ui.nodeTypeExplanation_TE->setText(tr("<b>Your IP is hidden. All traffic happens over the Tor network. Best choice if you cannot trust friend nodes with your own IP.</b>"));
|
||||||
break;
|
break;
|
||||||
case 2: ui.nodeTypeExplanation_TE->setText(tr("<b>Hidden node for advanced users only, that allows to use other proxy solutions such as I2P.</b>"));
|
case 2: ui.nodeTypeExplanation_TE->setText(tr("<b>Hidden node for advanced users only. Allows to use other proxy solutions such as I2P.</b>"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +292,6 @@ void GenCertDialog::setupState()
|
||||||
setWindowTitle(generate_new?tr("Create new profile and new Retroshare node"):tr("Create new Retroshare node"));
|
setWindowTitle(generate_new?tr("Create new profile and new Retroshare node"):tr("Create new Retroshare node"));
|
||||||
//ui.headerFrame->setHeaderText(generate_new?tr("Create a new profile and node"):tr("Create a new node"));
|
//ui.headerFrame->setHeaderText(generate_new?tr("Create a new profile and node"):tr("Create a new node"));
|
||||||
|
|
||||||
ui.nodeType_CB->setVisible(true);
|
|
||||||
ui.reuse_existing_node_CB->setEnabled(adv_state) ;
|
ui.reuse_existing_node_CB->setEnabled(adv_state) ;
|
||||||
ui.importIdentity_PB->setVisible(adv_state && !generate_new) ;
|
ui.importIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||||
ui.exportIdentity_PB->setVisible(adv_state && !generate_new) ;
|
ui.exportIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||||
|
|
|
@ -69,6 +69,19 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="nodeType_LB">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Node type:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="nodeType_CB">
|
<widget class="QComboBox" name="nodeType_CB">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -108,13 +121,9 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="optionsButton">
|
<widget class="QCheckBox" name="adv_checkbox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Options</string>
|
<string>advanced options</string>
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/svg/options.svg</normaloff>:/icons/svg/options.svg</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -122,12 +131,6 @@
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="default">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -372,6 +375,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="reuse_existing_node_CB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use existing profile...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="3">
|
<item row="8" column="3">
|
||||||
|
@ -722,22 +732,6 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<action name="adv_checkbox">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Advanced options</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="reuse_existing_node_CB">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Use existing profile</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>name_input</tabstop>
|
<tabstop>name_input</tabstop>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue