hide the feed option button until we figure out how to do it properly. Also fixed the crash when showing network settings on hidden nodes

This commit is contained in:
csoler 2017-02-28 21:41:45 +01:00
parent 9d3df7c01f
commit 4abf2c6bf1
3 changed files with 30 additions and 31 deletions

View File

@ -119,9 +119,11 @@ NewsFeed::NewsFeed(QWidget *parent) :
connect(ui->sortComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortChanged(int)));
connect(ui->removeAllButton, SIGNAL(clicked()), ui->feedWidget, SLOT(clear()));
connect(ui->feedOptionsButton, SIGNAL(clicked()), this, SLOT(feedoptions()));
connect(ui->feedWidget, SIGNAL(feedCountChanged()), this, SLOT(sendNewsFeedChanged()));
connect(ui->feedOptionsButton, SIGNAL(clicked()), this, SLOT(feedoptions()));
ui->feedOptionsButton->hide(); // (csoler) Hidden until we repare the system to display a specific settings page.
QString hlp_str = tr(
" <h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;News Feed</h1> \
<p>The Log Feed displays the last events on your network, sorted by the time you received them. \

View File

@ -896,26 +896,26 @@ void ServerPage::loadHiddenNode()
ui.iconlabel_hiddenMode->setPixmap(QPixmap(":/images/ledon1.png"));
// CHANGE OPTIONS ON
ui.discComboBox->removeItem(3);
ui.discComboBox->removeItem(2);
ui.discComboBox->removeItem(1);
ui.discComboBox->removeItem(0);
ui.discComboBox->insertItem (0, tr("Discovery On (recommended)"));
ui.discComboBox->insertItem (1, tr("Discovery Off"));
whileBlocking(ui.discComboBox)->removeItem(3);
whileBlocking(ui.discComboBox)->removeItem(2);
whileBlocking(ui.discComboBox)->removeItem(1);
whileBlocking(ui.discComboBox)->removeItem(0);
whileBlocking(ui.discComboBox)->insertItem (0, tr("Discovery On (recommended)"));
whileBlocking(ui.discComboBox)->insertItem (1, tr("Discovery Off"));
int netIndex = 1; // OFF.
if (detail.vs_disc != RS_VS_DISC_OFF)
{
netIndex = 0; // DISC ON;
}
ui.discComboBox->setCurrentIndex(netIndex);
whileBlocking(ui.discComboBox)->setCurrentIndex(netIndex);
// Download Rates - Stay the same as before.
int dlrate = 0;
int ulrate = 0;
rsConfig->GetMaxDataRates(dlrate, ulrate);
ui.totalDownloadRate->setValue(dlrate);
ui.totalUploadRate->setValue(ulrate);
whileBlocking(ui.totalDownloadRate)->setValue(dlrate);
whileBlocking(ui.totalUploadRate)->setValue(ulrate);
// Addresses.
ui.localAddress->setEnabled(false);
@ -929,13 +929,13 @@ void ServerPage::loadHiddenNode()
/* Addresses must be set here - otherwise can't edit it */
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
ui.localPort -> setValue(detail.localPort);
whileBlocking(ui.localAddress)->setText(QString::fromStdString(detail.localAddr));
whileBlocking(ui.localPort )-> setValue(detail.localPort);
/* set the server address */
ui.extAddress->setText(tr("Hidden - See Config"));
whileBlocking(ui.extAddress)->setText(tr("Hidden - See Config"));
ui.showDiscStatusBar->setChecked(Settings->getStatusBarFlags() & STATUSBAR_DISC);
whileBlocking(ui.showDiscStatusBar)->setChecked(Settings->getStatusBarFlags() & STATUSBAR_DISC);
ui.showDiscStatusBar->hide() ; // hidden because not functional at the moment.
//ui._turtle_enabled_CB->setChecked(rsTurtle->enabled()) ;
@ -943,28 +943,28 @@ void ServerPage::loadHiddenNode()
// show what we have in ipAddresses. (should be nothing!)
ui.ipAddressList->clear();
for(std::list<std::string>::const_iterator it(detail.ipAddressList.begin());it!=detail.ipAddressList.end();++it)
ui.ipAddressList->addItem(QString::fromStdString(*it));
whileBlocking(ui.ipAddressList)->addItem(QString::fromStdString(*it));
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledoff1.png"));
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledoff1.png"));
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
ui.allowIpDeterminationCB->setChecked(false);
ui.allowIpDeterminationCB->setEnabled(false);
ui.IPServersLV->setEnabled(false);
whileBlocking(ui.allowIpDeterminationCB)->setChecked(false);
whileBlocking(ui.allowIpDeterminationCB)->setEnabled(false);
whileBlocking(ui.IPServersLV)->setEnabled(false);
/* TOR PAGE SETTINGS */
/* set local address */
ui.hiddenpage_localAddress->setEnabled(false);
ui.hiddenpage_localAddress->setText(QString::fromStdString(detail.localAddr));
ui.hiddenpage_localPort -> setValue(detail.localPort);
whileBlocking(ui.hiddenpage_localAddress)->setText(QString::fromStdString(detail.localAddr));
whileBlocking(ui.hiddenpage_localPort) -> setValue(detail.localPort);
/* set the server address */
ui.hiddenpage_serviceAddress->setText(QString::fromStdString(detail.hiddenNodeAddress));
ui.hiddenpage_servicePort -> setValue(detail.hiddenNodePort);
whileBlocking(ui.hiddenpage_serviceAddress)->setText(QString::fromStdString(detail.hiddenNodeAddress));
whileBlocking(ui.hiddenpage_servicePort) -> setValue(detail.hiddenNodePort);
/* in I2P there is no port - there is only the address */
ui.hiddenpage_servicePort->setEnabled(detail.hiddenType != RS_HIDDEN_TYPE_I2P);
whileBlocking(ui.hiddenpage_servicePort)->setEnabled(detail.hiddenType != RS_HIDDEN_TYPE_I2P);
/* out proxy settings */
std::string proxyaddr;
@ -972,12 +972,12 @@ void ServerPage::loadHiddenNode()
uint32_t status ;
// Tor
rsPeers->getProxyServer(RS_HIDDEN_TYPE_TOR, proxyaddr, proxyport, status);
ui.hiddenpage_proxyAddress_tor -> setText(QString::fromStdString(proxyaddr));
ui.hiddenpage_proxyPort_tor -> setValue(proxyport);
whileBlocking(ui.hiddenpage_proxyAddress_tor) -> setText(QString::fromStdString(proxyaddr));
whileBlocking(ui.hiddenpage_proxyPort_tor) -> setValue(proxyport);
// I2P
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, proxyaddr, proxyport, status);
ui.hiddenpage_proxyAddress_i2p -> setText(QString::fromStdString(proxyaddr));
ui.hiddenpage_proxyPort_i2p -> setValue(proxyport);
whileBlocking(ui.hiddenpage_proxyAddress_i2p) -> setText(QString::fromStdString(proxyaddr));
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
updateOutProxyIndicator();
@ -1013,7 +1013,7 @@ void ServerPage::loadHiddenNode()
break;
}
ui.hiddenpage_configuration->setPlainText(expected);
whileBlocking(ui.hiddenpage_configuration)->setPlainText(expected);
}
/** Loads the settings for this page */

View File

@ -60,7 +60,6 @@ SettingsPage::SettingsPage(QWidget *parent)
{
ui.setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true);
// setModal(false);
/* Initialize help browser */
mHelpBrowser = new FloatingHelpBrowser(this, ui.helpButton);
@ -74,8 +73,6 @@ SettingsPage::SettingsPage(QWidget *parent)
}
connect(ui.listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int)));
// connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges()));
// connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int)));
}