Hide http disablers on SL, UDP doesn't work anymore so they do nothing

This commit is contained in:
Liru Færs
2019-10-22 21:26:03 -04:00
parent 54c4b1de83
commit 20eb6a3eca
2 changed files with 34 additions and 13 deletions

View File

@@ -74,17 +74,32 @@ BOOL LLPanelNetwork::postBuild()
}
childSetValue("max_bandwidth", gSavedSettings.getF32("ThrottleBandwidthKBPS"));
childSetValue("tex_bandwidth", gSavedSettings.getF32("HTTPThrottleBandwidth"));
childSetValue("http_textures", gSavedSettings.getBOOL("ImagePipelineUseHTTP"));
childSetValue("http_inventory", gSavedSettings.getBOOL("UseHTTPInventory"));
childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled"));
childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort"));
// If in Avination, hide the texture bandwidth slider, Avination throttles server-side
if (gHippoGridManager->getConnectedGrid()->isAvination())
const auto& grid = gHippoGridManager->getConnectedGrid();
if (!grid->isSecondLife())
{
childSetVisible("text_box4", FALSE);
childSetVisible("tex_bandwidth", FALSE);
childSetVisible("text_box3", FALSE);
if (auto view = getChildView("use_http_for"))
view->setVisible(true);
if (auto view = getChildView("http_textures"))
{
view->setVisible(true);
view->setValue(gSavedSettings.getBOOL("ImagePipelineUseHTTP"));
}
if (auto view = getChildView("http_inventory"))
{
view->setVisible(true);
view->setValue(gSavedSettings.getBOOL("UseHTTPInventory"));
}
// If in Avination, hide the texture bandwidth slider, Avination throttles server-side
if (grid->isAvination())
{
childSetVisible("text_box4", FALSE);
childSetVisible("tex_bandwidth", FALSE);
childSetVisible("text_box3", FALSE);
}
}
// Socks 5 proxy settings, commit callbacks
@@ -124,9 +139,15 @@ void LLPanelNetwork::apply()
{
gSavedSettings.setU32("CacheSize", childGetValue("cache_size").asInteger());
gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal());
gSavedSettings.setF32("HTTPThrottleBandwidth", childGetValue("tex_bandwidth").asReal());
gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_textures"));
gSavedSettings.setBOOL("UseHTTPInventory", childGetValue("http_inventory"));
if (const auto& view = getChildView("tex_bandwidth"))
if (view->getVisible())
gSavedSettings.setF32("HTTPThrottleBandwidth", view->getValue().asReal());
if (const auto& view = getChildView("http_textures"))
if (view->getVisible())
gSavedSettings.setBOOL("ImagePipelineUseHTTP", view->getValue());
if (const auto& view = getChildView("http_inventory"))
if (view->getVisible())
gSavedSettings.setBOOL("UseHTTPInventory", view->getValue());
gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled"));
gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger());

View File

@@ -6,9 +6,9 @@
<text bottom_delta="-20" follows="top" height="10" left="12" name="text_box3">Texture Bandwidth:</text>
<slider bottom_delta="-4" left_delta="110" can_edit_text="true" decimal_digits="0" follows="top" height="15" increment="10" initial_val="50" max_val="10000" min_val="50" name="tex_bandwidth" show_text="true" value="500" width="180"/>
<text bottom_delta="4" follows="top" height="10" left_delta="186" name="text_box4">kbps (kilobits per second)</text>
<text bottom_delta="-25" follows="top" height="10" left="12" name="use_http_for">Use HTTP for:</text>
<check_box bottom_delta="-5" follows="top" left_delta="90" label="Textures" name="http_textures"/>
<check_box bottom_delta="0" follows="top" left_delta="90" label="Inventory" name="http_inventory"/>
<text bottom_delta="-25" follows="top" height="10" left="12" name="use_http_for" visible="false">Use HTTP for:</text>
<check_box bottom_delta="-5" follows="top" left_delta="90" label="Textures" name="http_textures" visible="false"/>
<check_box bottom_delta="0" follows="top" left_delta="90" label="Inventory" name="http_inventory" visible="false"/>
<text bottom_delta="-20" follows="top" height="10" left="12" name="cache_size_label_l">Disk Cache Size:</text>
<slider bottom_delta="-4" left_delta="110" can_edit_text="true" decimal_digits="0" follows="top" height="15" increment="64" initial_val="1024" max_val="9984" min_val="64" name="cache_size" show_text="true" width="180"/>
<text bottom_delta="4" follows="top" height="10" left_delta="186" name="text_box5">MB</text>