diff --git a/retroshare-gui/src/gui/common/RsCollectionDialog.ui b/retroshare-gui/src/gui/common/RsCollectionDialog.ui index a930d2e7d..7595413ca 100644 --- a/retroshare-gui/src/gui/common/RsCollectionDialog.ui +++ b/retroshare-gui/src/gui/common/RsCollectionDialog.ui @@ -6,7 +6,7 @@ 0 0 - 969 + 978 778 @@ -279,7 +279,11 @@ <html><head/><body><p>Add selected item to collection one by one.</p><p>Select parent dir to add this too.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;Enter&gt;</span></p></body></html> - > + + + + + :/images/feedback_arrow.png:/images/feedback_arrow.png @@ -301,7 +305,11 @@ <html><head/><body><p>Add selected item to collection.</p><p>If a directory is selected, all of his children will be added.</p><p><span style=" text-decoration: underline; vertical-align:sub;">&lt;Shift + Enter&gt;</span></p></body></html> - >> + + + + + :/images/Update.png:/images/Update.png @@ -323,7 +331,11 @@ <html><head/><body><p>Remove selected item from collection.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;Del&gt;</span></p></body></html> - < + + + + + :/images/deletemail24.png:/images/deletemail24.png @@ -345,7 +357,11 @@ <html><head/><body><p>Make a new directory in the collection.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;+&gt;</span></p></body></html> - + + + + + + :/images/directoryadd_24x24_shadow.png:/images/directoryadd_24x24_shadow.png @@ -501,6 +517,7 @@ + diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index 8c50c719d..4ba20fc75 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -293,17 +293,27 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend #ifdef FRIEND_WIZARD_DEBUG std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl; #endif - mCertificate = certificate.toUtf8().constData(); - // Cyril: I disabled this because it seems to be not used anymore. - //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion); - setStartId(Page_Conclusion); - if (friendRequest){ - ui->cp_Label->show(); - ui->requestinfolabel->show(); - setTitleText(ui->ConclusionPage, tr("Friend request")); - ui->ConclusionPage->setSubTitle(tr("Details about the request")); - } + if(peerDetails.id == rsPeers->getOwnId()) + { + setField("errorMessage", tr("This is your own certificate! You would not want to make friend with yourself. Wouldn't you?") ) ; + error = false; + setStartId(Page_ErrorMessage); + } + else + { + mCertificate = certificate.toUtf8().constData(); + + // Cyril: I disabled this because it seems to be not used anymore. + //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion); + setStartId(Page_Conclusion); + if (friendRequest){ + ui->cp_Label->show(); + ui->requestinfolabel->show(); + setTitleText(ui->ConclusionPage, tr("Friend request")); + ui->ConclusionPage->setSubTitle(tr("Details about the request")); + } + } } else { // error message setField("errorMessage", tr("Certificate Load Failed") + ": \n\n" + getErrorString(cert_load_error_code)) ; @@ -435,6 +445,10 @@ void ConnectFriendWizard::initializePage(int id) break; case Page_Conclusion: { + if(peerDetails.id == rsPeers->getOwnId()) + { + } + bool peerIsHiddenNode = peerDetails.isHiddenNode ; bool amIHiddenNode = rsPeers->isHiddenNode(rsPeers->getOwnId()) ; @@ -702,6 +716,13 @@ bool ConnectFriendWizard::validateCurrentPage() #ifdef FRIEND_WIZARD_DEBUG std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl; #endif + + if(peerDetails.id == rsPeers->getOwnId()) + { + setField("errorMessage", tr("This is your own certificate! You would not want to make friend with yourself. Wouldn't you?") ) ; + error = false; + } + break; } // error message @@ -735,6 +756,12 @@ bool ConnectFriendWizard::validateCurrentPage() #ifdef FRIEND_WIZARD_DEBUG std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl; #endif + + if(peerDetails.id == rsPeers->getOwnId()) + { + setField("errorMessage", tr("This is your own certificate! You would not want to make friend with yourself. Wouldn't you?") ) ; + error = false; + } } else { setField("errorMessage", QString(tr("Certificate Load Failed:something is wrong with %1")).arg(fn) + " : " + getErrorString(cert_error_code)); error = false; diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui b/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui index a11bb18e7..181b164c0 100644 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui @@ -1618,8 +1618,8 @@ resources. - +