mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-01 19:45:52 -04:00
udated GenCertDialog with new layout
This commit is contained in:
parent
74ec558c45
commit
22bc40e3cc
@ -136,7 +136,7 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||
//ui.headerFrame->setHeaderText(tr("Create a new profile"));
|
||||
|
||||
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.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
|
||||
@ -181,10 +181,10 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||
* mark last one as default.
|
||||
*/
|
||||
|
||||
QMenu *menu = new QMenu(tr("Advanced options"));
|
||||
menu->addAction(ui.adv_checkbox);
|
||||
menu->addAction(ui.reuse_existing_node_CB);
|
||||
ui.optionsButton->setMenu(menu);
|
||||
//QMenu *menu = new QMenu(tr("Advanced options"));
|
||||
//menu->addAction(ui.adv_checkbox);
|
||||
//menu->addAction(ui.reuse_existing_node_CB);
|
||||
// ui.optionsButton->setMenu(menu);
|
||||
|
||||
mAllFieldsOk = false ;
|
||||
mEntropyOk = false ;
|
||||
@ -263,7 +263,14 @@ void GenCertDialog::setupState()
|
||||
{
|
||||
ui.reuse_existing_node_CB->setChecked(false) ;
|
||||
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 generate_new = !ui.reuse_existing_node_CB->isChecked();
|
||||
bool tor_auto = ui.nodeType_CB->currentIndex()==1;
|
||||
@ -272,11 +279,11 @@ void GenCertDialog::setupState()
|
||||
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
@ -285,7 +292,6 @@ void GenCertDialog::setupState()
|
||||
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.nodeType_CB->setVisible(true);
|
||||
ui.reuse_existing_node_CB->setEnabled(adv_state) ;
|
||||
ui.importIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||
ui.exportIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||
|
@ -69,6 +69,19 @@
|
||||
</item>
|
||||
<item>
|
||||
<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>
|
||||
<widget class="QComboBox" name="nodeType_CB">
|
||||
<property name="sizePolicy">
|
||||
@ -108,13 +121,9 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="optionsButton">
|
||||
<widget class="QCheckBox" name="adv_checkbox">
|
||||
<property name="text">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons.qrc">
|
||||
<normaloff>:/icons/svg/options.svg</normaloff>:/icons/svg/options.svg</iconset>
|
||||
<string>advanced options</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@ -122,12 +131,6 @@
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -372,6 +375,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="reuse_existing_node_CB">
|
||||
<property name="text">
|
||||
<string>Use existing profile...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
@ -722,22 +732,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</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>
|
||||
<tabstops>
|
||||
<tabstop>name_input</tabstop>
|
||||
|
Loading…
x
Reference in New Issue
Block a user