added comment about tab numbers

This commit is contained in:
csoler 2018-01-20 19:23:08 +01:00
parent 2c61f38887
commit c1fccef53b

View File

@ -61,14 +61,15 @@
///
///
// Tabs numbers *after* non relevant tabs are removed. So do not use them to add/remove tabs!!
#ifdef RETROTOR
const static uint32_t TAB_HIDDEN_SERVICE_OUTGOING = 0;
const static uint32_t TAB_HIDDEN_SERVICE_INCOMING = 1;
static const uint32_t TAB_HIDDEN_SERVICE_OUTGOING = 0;
static const uint32_t TAB_HIDDEN_SERVICE_INCOMING = 1;
const static uint32_t TAB_NETWORK = 0;
const static uint32_t TAB_HIDDEN_SERVICE = 1;
const static uint32_t TAB_IP_FILTERS = 99; // This is a trick: these tabs do not exist, so enabling/disabling them has no effect
const static uint32_t TAB_RELAYS = 99;
static const uint32_t TAB_NETWORK = 0;
static const uint32_t TAB_HIDDEN_SERVICE = 1;
static const uint32_t TAB_IP_FILTERS = 99; // This is a trick: these tabs do not exist, so enabling/disabling them has no effect
static const uint32_t TAB_RELAYS = 99;
#else
const static uint32_t TAB_HIDDEN_SERVICE_OUTGOING = 0;
const static uint32_t TAB_HIDDEN_SERVICE_INCOMING = 2;
@ -90,6 +91,8 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
manager = NULL ;
#ifdef RETROTOR
// 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(3) ; // remove relays. Not useful in Tor mode.
ui.tabWidget->removeTab(1) ; // remove IP filters. Not useful in Tor mode.