diff --git a/retroshare-gui/src/gui/HomePage.cpp b/retroshare-gui/src/gui/HomePage.cpp index b55829fbd..dcd98f11e 100644 --- a/retroshare-gui/src/gui/HomePage.cpp +++ b/retroshare-gui/src/gui/HomePage.cpp @@ -78,6 +78,13 @@ HomePage::HomePage(QWidget *parent) : menu->addAction(RecAction); menu->addSeparator(); + mUseOldFormatact = new QAction(QIcon(), tr("Use old certificate format"),this); + mUseOldFormatact->setToolTip(tr("Displays the certificate format used up to version 0.6.5\nOld Retroshare nodes will not understand the\nnew short format")); + connect(mUseOldFormatact, SIGNAL(triggered()), this, SLOT(switchCertificateFormat())); + mUseOldFormatact->setCheckable(true); + mUseOldFormatact->setChecked(false); + menu->addAction(mUseOldFormatact); + if(!RsAccounts::isHiddenNode()) { mIncludeLocIPact = new QAction(QIcon(), tr("Include current local IP"),this); @@ -105,13 +112,6 @@ HomePage::HomePage(QWidget *parent) : menu->addAction(mIncludeIPHistoryact); } - mUseOldFormatact = new QAction(QIcon(), tr("Use old certificate format"),this); - mUseOldFormatact->setToolTip(tr("Displays the certificate format used up to version 0.6.5\nOld Retroshare nodes will not understand the\nnew short format")); - connect(mUseOldFormatact, SIGNAL(triggered()), this, SLOT(updateOwnCert())); - mUseOldFormatact->setCheckable(true); - mUseOldFormatact->setChecked(false); - menu->addAction(mUseOldFormatact); - ui->shareButton->setMenu(menu); connect(ui->openwebhelp,SIGNAL(clicked()), this,SLOT(openWebHelp())) ; @@ -164,6 +164,15 @@ void HomePage::handleEvent(std::shared_ptr e) } } +void HomePage::switchCertificateFormat() +{ + whileBlocking(mIncludeDNSact)->setVisible(!mUseOldFormatact->isChecked()); + whileBlocking(mIncludeLocIPact)->setVisible(!mUseOldFormatact->isChecked()); + whileBlocking(mIncludeExtIPact)->setVisible(!mUseOldFormatact->isChecked()); + + updateOwnCert(); +} + #ifdef DEAD_CODE void HomePage::certContextMenu(QPoint /*point*/) { @@ -247,7 +256,7 @@ void HomePage::updateOwnCert() getOwnCert(certificate,description); - if(!mUseOldFormatact->isChecked()) // in this case we have to split the cert for a bettr display + if(!mUseOldFormatact->isChecked()) // in this case we have to split the cert for a better display { QString S; QString txt; diff --git a/retroshare-gui/src/gui/HomePage.h b/retroshare-gui/src/gui/HomePage.h index a20f07863..d881c6327 100644 --- a/retroshare-gui/src/gui/HomePage.h +++ b/retroshare-gui/src/gui/HomePage.h @@ -63,6 +63,7 @@ private slots: void webMail(); void openWebHelp() ; void recommendFriends(); + void switchCertificateFormat(); private: Ui::HomePage *ui;