hide incoming hidden service configuration for non hidden nodes

This commit is contained in:
csoler 2019-08-24 20:01:36 +02:00
parent 236e24ed93
commit a6a8e69965
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 28 additions and 20 deletions

View File

@ -81,27 +81,35 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
manager = NULL ;
if(RsAccounts::isTorAuto())
if(RsAccounts::isHiddenNode())
{
// Here we use absolute numbers instead of consts defined above, because the consts correspond to the tab number *after* this tab removal.
if(RsAccounts::isTorAuto())
{
// Here we use absolute numbers instead of consts defined above, because the consts correspond to the tab number *after* this tab removal.
ui.tabWidget->removeTab(TAB_RELAYS) ; // remove relays. Not useful in Tor mode.
ui.tabWidget->removeTab(TAB_IP_FILTERS) ; // remove IP filters. Not useful in Tor mode.
ui.tabWidget->removeTab(TAB_RELAYS) ; // remove relays. Not useful in Tor mode.
ui.tabWidget->removeTab(TAB_IP_FILTERS) ; // remove IP filters. Not useful in Tor mode.
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_I2P_BOB) ; // remove the Automatic I2P/BOB tab
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_I2P_BOB) ; // remove the Automatic I2P/BOB tab
ui.hiddenpage_proxyAddress_i2p->hide() ;
ui.hiddenpage_proxyLabel_i2p->hide() ;
ui.hiddenpage_proxyPort_i2p->hide() ;
ui.label_i2p_outgoing->hide() ;
ui.iconlabel_i2p_outgoing->hide() ;
ui.plainTextEdit->hide() ;
ui.hiddenpage_configuration->hide() ;
ui.l_hiddenpage_configuration->hide() ;
ui.hiddenpageInHelpPlainTextEdit->hide() ;
ui.hiddenpage_proxyAddress_i2p->hide() ;
ui.hiddenpage_proxyLabel_i2p->hide() ;
ui.hiddenpage_proxyPort_i2p->hide() ;
ui.label_i2p_outgoing->hide() ;
ui.iconlabel_i2p_outgoing->hide() ;
ui.plainTextEdit->hide() ;
ui.hiddenpage_configuration->hide() ;
ui.l_hiddenpage_configuration->hide() ;
ui.hiddenpageInHelpPlainTextEdit->hide() ;
ui.hiddenpage_outHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
ui.hiddenpage_inHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
ui.hiddenpage_outHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
ui.hiddenpage_inHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
}
}
else
{
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_I2P_BOB); // warning: the order of operation here is very important.
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_INCOMING);
}
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_RANGE,new QTableWidgetItem(tr("IP Range"))) ;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1283</width>
<height>917</height>
<height>929</height>
</rect>
</property>
<layout class="QVBoxLayout" name="ServerPageVLayout">
@ -26,7 +26,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabNetConf">
<attribute name="title">
@ -539,7 +539,7 @@ behind a firewall or a VPN.</string>
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="hiddenServiceTabManual">
<attribute name="title">
@ -549,7 +549,7 @@ behind a firewall or a VPN.</string>
<item>
<widget class="QLabel" name="hiddenpage_outHeader">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Configure your Tor and I2P SOCKS proxy here. &lt;br/&gt;If you prefer to use BOB to automatically manage I2P check the other tab.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Configure your Tor and I2P SOCKS proxy here. It will allow you to also connect &lt;/p&gt;&lt;p&gt;to hidden nodes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>