diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 573ff5c6b..d82e5ba45 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -253,7 +253,9 @@ bool RsGenExchange::messagePublicationTest(const RsGxsMsgMetaData& meta) { if(!mNetService) { +#ifdef GEN_EXCH_DEBUG std::cerr << "(EE) No network service in service " << std::hex << serviceType() << std::dec << ": cannot read message storage time." << std::endl; +#endif return false ; } @@ -1852,7 +1854,9 @@ uint32_t RsGenExchange::getStoragePeriod(const RsGxsGroupId& grpId) if(!mNetService) { +#ifdef GEN_EXCH_DEBUG std::cerr << "(EE) No network service in service " << std::hex << serviceType() << std::dec << ": cannot read message storage time. Returning infinity." << std::endl; +#endif return false ; } return mNetService->getKeepAge(grpId) ; diff --git a/libretroshare/src/gxs/rsgxsutil.cc b/libretroshare/src/gxs/rsgxsutil.cc index 41d3bec9b..58199ef44 100644 --- a/libretroshare/src/gxs/rsgxsutil.cc +++ b/libretroshare/src/gxs/rsgxsutil.cc @@ -35,7 +35,9 @@ static const uint32_t MAX_GXS_IDS_REQUESTS_NET = 10 ; // max number of reques //#define DEBUG_GXSUTIL 1 +#ifdef DEBUG_GXSUTIL #define GXSUTIL_DEBUG() std::cerr << "[" << time(NULL) << "] : GXS_UTIL : " << __FUNCTION__ << " : " +#endif RsGxsMessageCleanUp::RsGxsMessageCleanUp(RsGeneralDataService* const dataService, RsGenExchange *genex, uint32_t chunkSize) : mDs(dataService), mGenExchangeClient(genex), CHUNK_SIZE(chunkSize) @@ -110,15 +112,19 @@ bool RsGxsMessageCleanUp::clean() remove = remove || (grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED); remove = remove || !(grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED); +#ifdef DEBUG_GXSUTIL GXSUTIL_DEBUG() << " msg id " << meta->mMsgId << " in grp " << grpId << ": keep_flag=" << bool(meta->mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP) << " subscribed: " << bool(grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED) << " store_period: " << store_period << " kids: " << have_kids << " now - meta->mPublishTs: " << now - meta->mPublishTs ; +#endif if( remove ) { req[grpId].push_back(meta->mMsgId); +#ifdef DEBUG_GXSUTIL std::cerr << " Scheduling for removal." << std::endl; +#endif } else std::cerr << std::endl; diff --git a/retroshare-gui/src/gui/GenCertDialog.cpp b/retroshare-gui/src/gui/GenCertDialog.cpp index 52e526b17..bdd35efa0 100644 --- a/retroshare-gui/src/gui/GenCertDialog.cpp +++ b/retroshare-gui/src/gui/GenCertDialog.cpp @@ -162,6 +162,10 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent) ui.keylength_comboBox->addItem("High (3072 bits)", QVariant(3072)); ui.keylength_comboBox->addItem("Very high (4096 bits)", QVariant(4096)); + // Default value. + + ui.node_input->setText("My computer") ; + #if QT_VERSION >= 0x040700 ui.node_input->setPlaceholderText(tr("Node name")) ; ui.hiddenaddr_input->setPlaceholderText(tr("Tor/I2P address")) ; @@ -280,8 +284,9 @@ void GenCertDialog::setupState() ui.nickname_label->setVisible(adv_state && !mOnlyGenerateIdentity); ui.nickname_input->setVisible(adv_state && !mOnlyGenerateIdentity); - ui.node_label->setVisible(true); - ui.node_input->setVisible(true); + ui.node_name_check_LB->setVisible(adv_state); + ui.node_label->setVisible(adv_state); + ui.node_input->setVisible(adv_state); ui.password_input->setVisible(true); ui.password_label->setVisible(true); @@ -298,33 +303,38 @@ void GenCertDialog::setupState() ui.hiddenaddr_input->setVisible(hidden_state); ui.hiddenaddr_label->setVisible(hidden_state); + ui.hiddenport_label->setVisible(hidden_state); ui.hiddenport_spinBox->setVisible(hidden_state); + ui.cbUseBob->setVisible(hidden_state); if(!mAllFieldsOk) { ui.genButton->setToolTip(tr("

Node creation is disabled until all fields correctly set.

")) ; - ui.genButton->setText(tr("Generate (locked)")); - ui.genButton->setEnabled(false) ; - ui.generate_label->setPixmap(QPixmap(IMAGE_BAD)) ; + ui.genButton->setVisible(false) ; + ui.generate_label->setVisible(false) ; + ui.info_label->setText("Please fill your profile name and password...") ; + ui.info_label->setVisible(true) ; } else if(!mEntropyOk) { ui.genButton->setToolTip(tr("

Node creation is disabled until enough randomness is collected. Please mouve your mouse around until you reach at least 20%.

")) ; - ui.genButton->setText(tr("More randomness needed (move your mouse around)")); - ui.genButton->setEnabled(false) ; - ui.generate_label->setPixmap(QPixmap(IMAGE_BAD)) ; + ui.genButton->setVisible(false) ; + ui.generate_label->setVisible(false) ; + ui.info_label->setText("Need more randomness! Please move your mouse around to reach 20%") ; + ui.info_label->setVisible(true) ; } else { ui.genButton->setEnabled(true) ; //ui.genButton->setIcon(QIcon(IMAGE_GOOD)) ; ui.genButton->setToolTip(tr("Click to create your node and/or profile")) ; - ui.genButton->setText(tr("Generate")); - ui.generate_label->setPixmap(QPixmap(IMAGE_GOOD)) ; + ui.genButton->setVisible(true) ; + ui.generate_label->setVisible(false) ; + ui.info_label->setVisible(false) ; } } diff --git a/retroshare-gui/src/gui/GenCertDialog.ui b/retroshare-gui/src/gui/GenCertDialog.ui index fe68cbb4a..8e4f86260 100644 --- a/retroshare-gui/src/gui/GenCertDialog.ui +++ b/retroshare-gui/src/gui/GenCertDialog.ui @@ -128,7 +128,7 @@ 24 - + @@ -699,6 +699,16 @@ + + + + TextLabel + + + true + + +