From 3d3a163a7564359511a3f6a835c802fcf65a7d65 Mon Sep 17 00:00:00 2001 From: electron128 Date: Sat, 16 May 2015 09:33:06 +0000 Subject: [PATCH] show info about node creation after import of pgp key (patch from Henry) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8264 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/GenCertDialog.cpp | 9 +++++++++ retroshare-gui/src/gui/GenCertDialog.ui | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/retroshare-gui/src/gui/GenCertDialog.cpp b/retroshare-gui/src/gui/GenCertDialog.cpp index ddc8c1ea1..122d8b557 100644 --- a/retroshare-gui/src/gui/GenCertDialog.cpp +++ b/retroshare-gui/src/gui/GenCertDialog.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "GenCertDialog.h" #include #include @@ -255,6 +256,7 @@ void GenCertDialog::mouseMoveEvent(QMouseEvent *e) void GenCertDialog::newGPGKeyGenUiSetup() { bool adv_state = ui.adv_checkbox->isChecked(); bool hidden_state = ui.hidden_checkbox->isChecked(); + ui.no_node_label->setVisible(false); if (ui.new_gpg_key_checkbox->isChecked()) { genNewGPGKey = true; @@ -286,6 +288,13 @@ void GenCertDialog::newGPGKeyGenUiSetup() { //ui.keylength_comboBox->show(); } else { bool havePGPkeys = (ui.genPGPuser->count() != 0)?true:false; + if (havePGPkeys) { + QVariant data = ui.genPGPuser->itemData(ui.genPGPuser->currentIndex()); + if (!rsAccounts->selectAccountByString(data.toString().toStdString())) { + ui.no_node_label->setText(tr("No node is associated with the profile named") + " " + ui.genPGPuser->currentText() + ". " +tr("Please create a node for it by providing a node name.")); + ui.no_node_label->setVisible(true); + } + } genNewGPGKey = false; ui.name_label->hide(); ui.name_input->hide(); diff --git a/retroshare-gui/src/gui/GenCertDialog.ui b/retroshare-gui/src/gui/GenCertDialog.ui index 204364606..3d2ff1cdb 100644 --- a/retroshare-gui/src/gui/GenCertDialog.ui +++ b/retroshare-gui/src/gui/GenCertDialog.ui @@ -79,6 +79,16 @@ + + + + No node exists for this profile. + + + true + + +