mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Improved look n feel of Profile Generation Window.
This commit is contained in:
parent
190a638cc1
commit
6313d89718
@ -25,6 +25,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QGraphicsOpacityEffect>
|
||||
#include <QMessageBox>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <QTextBrowser>
|
||||
#include <QTimer>
|
||||
@ -45,7 +46,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#define IMAGE_GOOD ":/images/accepted16.png"
|
||||
#define IMAGE_BAD ":/images/deletemail24.png"
|
||||
#define IMAGE_BAD ":/images/cancel.png"
|
||||
|
||||
class EntropyCollectorWidget: public QTextBrowser
|
||||
{
|
||||
@ -133,8 +134,8 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||
//ui.headerFrame->setHeaderImage(QPixmap(":/icons/svg/profile.svg"));
|
||||
//ui.headerFrame->setHeaderText(tr("Create a new profile"));
|
||||
|
||||
connect(ui.reuse_existing_node_CB, SIGNAL(clicked()), this, SLOT(switchReuseExistingNode()));
|
||||
connect(ui.adv_checkbox, SIGNAL(clicked()), this, SLOT(setupState()));
|
||||
connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode()));
|
||||
connect(ui.adv_checkbox, SIGNAL(triggered()), this, SLOT(setupState()));
|
||||
connect(ui.nodeType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(setupState()));
|
||||
|
||||
connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
|
||||
@ -172,6 +173,11 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||
/* get all available pgp private certificates....
|
||||
* 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);
|
||||
|
||||
mAllFieldsOk = false ;
|
||||
mEntropyOk = false ;
|
||||
@ -246,22 +252,22 @@ void GenCertDialog::setupState()
|
||||
|
||||
genNewGPGKey = generate_new;
|
||||
|
||||
ui.no_node_label->setVisible(false);
|
||||
//ui.no_node_label->setVisible(false);
|
||||
|
||||
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.label_nodeType->setVisible(adv_state) ;
|
||||
ui.nodeType_CB->setVisible(adv_state) ;
|
||||
ui.reuse_existing_node_CB->setVisible(adv_state) ;
|
||||
ui.reuse_existing_node_CB->setEnabled(adv_state) ;
|
||||
ui.importIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||
ui.exportIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||
|
||||
ui.genPGPuser->setVisible(adv_state && haveGPGKeys && !generate_new) ;
|
||||
|
||||
ui.genprofileinfo_label->setVisible(false);
|
||||
ui.no_gpg_key_label->setText(tr("Welcome to Retroshare. Before you can proceed you need to create a profile and associate a node with it. To do so please fill out this form.\nAlternatively you can import a (previously exported) profile. Just uncheck \"Create a new profile\""));
|
||||
ui.no_gpg_key_label->setVisible(false);
|
||||
//ui.genprofileinfo_label->setVisible(false);
|
||||
//ui.no_gpg_key_label->setText(tr("Welcome to Retroshare. Before you can proceed you need to create a profile and associate a node with it. To do so please fill out this form.\nAlternatively you can import a (previously exported) profile. Just uncheck \"Create a new profile\""));
|
||||
//no_gpg_key_label->setVisible(false);
|
||||
|
||||
ui.nickname_label->setVisible(adv_state) ;
|
||||
ui.nickname_input->setVisible(adv_state) ;
|
||||
@ -269,7 +275,7 @@ void GenCertDialog::setupState()
|
||||
ui.name_label->setVisible(true);
|
||||
ui.name_input->setVisible(generate_new);
|
||||
|
||||
ui.header_label->setVisible(false) ;
|
||||
//ui.header_label->setVisible(false) ;
|
||||
|
||||
ui.nickname_label->setVisible(adv_state && !mOnlyGenerateIdentity);
|
||||
ui.nickname_input->setVisible(adv_state && !mOnlyGenerateIdentity);
|
||||
@ -300,14 +306,16 @@ void GenCertDialog::setupState()
|
||||
if(mEntropyOk && mAllFieldsOk)
|
||||
{
|
||||
ui.genButton->setEnabled(true) ;
|
||||
ui.genButton->setIcon(QIcon(IMAGE_GOOD)) ;
|
||||
//ui.genButton->setIcon(QIcon(IMAGE_GOOD)) ;
|
||||
ui.genButton->setToolTip(tr("Click to create your node and/or profile")) ;
|
||||
ui.generate_label->setPixmap(QPixmap(IMAGE_GOOD)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.genButton->setEnabled(false) ;
|
||||
ui.genButton->setIcon(QIcon(IMAGE_BAD)) ;
|
||||
//ui.genButton->setIcon(QIcon(IMAGE_BAD)) ;
|
||||
ui.genButton->setToolTip(tr("Disabled until all fields correctly set and enough randomness collected.")) ;
|
||||
ui.generate_label->setPixmap(QPixmap(IMAGE_BAD)) ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -495,9 +503,9 @@ void GenCertDialog::genPerson()
|
||||
}
|
||||
//generate a new gpg key
|
||||
std::string err_string;
|
||||
ui.no_gpg_key_label->setText(tr("Generating new node key, please be patient: this process needs generating large prime numbers, and can take some minutes on slow computers. \n\nFill in your password when asked, to sign your new key."));
|
||||
ui.no_gpg_key_label->show();
|
||||
ui.reuse_existing_node_CB->hide();
|
||||
//_key_label->setText(tr("Generating new node key, please be patient: this process needs generating large prime numbers, and can take some minutes on slow computers. \n\nFill in your password when asked, to sign your new key."));
|
||||
//ui.no_gpg_key_label->show();
|
||||
//ui.reuse_existing_node_CB->hide();
|
||||
ui.name_label->hide();
|
||||
ui.name_input->hide();
|
||||
ui.nickname_label->hide();
|
||||
@ -514,9 +522,9 @@ void GenCertDialog::genPerson()
|
||||
ui.node_input->hide();
|
||||
ui.genButton->hide();
|
||||
ui.importIdentity_PB->hide();
|
||||
ui.genprofileinfo_label->hide();
|
||||
//ui.genprofileinfo_label->hide();
|
||||
ui.nodeType_CB->hide();
|
||||
ui.adv_checkbox->hide();
|
||||
//ui.adv_checkbox->hide();
|
||||
ui.keylength_label->hide();
|
||||
ui.keylength_comboBox->hide();
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 640 B |
BIN
retroshare-gui/src/gui/images/logo/logo_spash2.png
Normal file
BIN
retroshare-gui/src/gui/images/logo/logo_spash2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
Loading…
Reference in New Issue
Block a user