// static void LLPanelNetwork::onSocksAuthChanged(LLUICtrl* ctrl, void* data) { LLRadioGroup* radio = static_cast<LLRadioGroup*>(ctrl); LLPanelNetwork* self = static_cast<LLPanelNetwork*>(data); sSocksSettingsChanged = true; std::string selection = radio->getValue().asString(); updateProxyEnabled(self, true, selection); }
// static void LLPanelNetwork::onCommitSocks5ProxyEnabled(LLUICtrl* ctrl, void* data) { LLPanelNetwork* self = (LLPanelNetwork*)data; LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; if (!self || !check) return; sSocksSettingsChanged = true; updateProxyEnabled(self, check->get(), self->childGetValue("socks5_auth")); }
BOOL LLPanelNetwork::postBuild() { std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); childSetText("cache_location", cache_location); std::string sound_cache_location = gDirUtilp->getExpandedFilename(MM_SNDLOC, ""); childSetText("sound_cache_location", sound_cache_location); childSetAction("clear_cache", onClickClearCache, this); childSetAction("clear_inv_cache", onClickClearInvCache, this); if(LLStartUp::getStartupState() >= STATE_INVENTORY_SEND)childSetEnabled("clear_inv_cache",true); childSetAction("set_cache", onClickSetCache, this); childSetAction("reset_cache", onClickResetCache, this); childSetAction("set_sound_cache", onClickSetSoundCache, this); childSetAction("reset_sound_cache", onClickResetSoundCache, this); childSetEnabled("connection_port", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetCommitCallback("connection_port_enabled", onCommitPort, this); childSetValue("cache_size", (F32)gSavedSettings.getU32("CacheSize")); childSetValue("max_bandwidth", *LLViewerThrottle::sThrottleBandwidthKBPS); childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); // Socks 5 proxy settings, commit callbacks childSetCommitCallback("socks5_proxy_enabled", onCommitSocks5ProxyEnabled, this); childSetCommitCallback("socks5_auth", onSocksAuthChanged, this); //Socks 5 proxy settings, saved data childSetValue("socks5_proxy_enabled", gSavedSettings.getBOOL("Socks5ProxyEnabled")); childSetValue("socks5_http_proxy_type", gSavedSettings.getString("Socks5HttpProxyType")); childSetValue("socks5_proxy_host", gSavedSettings.getString("Socks5ProxyHost")); childSetValue("socks5_proxy_port", (F32)gSavedSettings.getU32("Socks5ProxyPort")); childSetValue("socks5_proxy_username", gSavedSettings.getString("Socks5Username")); childSetValue("socks5_proxy_password", gSavedSettings.getString("Socks5Password")); childSetValue("socks5_auth", gSavedSettings.getString("Socks5AuthType")); // Socks 5 proxy settings, check if settings modified callbacks childSetCommitCallback("socks5_proxy_host", onSocksSettingsModified,this); childSetCommitCallback("socks5_proxy_port", onSocksSettingsModified,this); childSetCommitCallback("socks5_proxy_username", onSocksSettingsModified,this); childSetCommitCallback("socks5_proxy_password", onSocksSettingsModified,this); // Socks 5 settings, Set all controls and labels enabled state updateProxyEnabled(this, gSavedSettings.getBOOL("Socks5ProxyEnabled"), gSavedSettings.getString("Socks5AuthType")); sSocksSettingsChanged = false; return TRUE; }
BOOL LLPanelNetwork::postBuild() { std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); childSetText("disk_cache_location", cache_location); childSetAction("clear_disk_cache", onClickClearDiskCache, this); childSetAction("set_disk_cache", onClickSetDiskCache, this); childSetAction("reset_disk_cache", onClickResetDiskCache, this); childSetEnabled("connection_port", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetCommitCallback("connection_port_enabled", onCommitPort, this); childSetValue("disk_cache_size", (F32)gSavedSettings.getU32("CacheSize")); childSetValue("max_bandwidth", gSavedSettings.getF32("ThrottleBandwidthKBPS")); childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); childSetCommitCallback("xmlrpc_proxy_enabled", onCommitXMLRPCProxyEnabled, this); childSetValue("xmlrpc_proxy_enabled", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); childSetValue("xmlrpc_proxy_editor", gSavedSettings.getString("XMLRPCProxyAddress")); childSetValue("xmlrpc_proxy_port", gSavedSettings.getS32("XMLRPCProxyPort")); childSetEnabled("xmlrpc_proxy_text_label", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); // Socks 5 proxy settings, commit callbacks childSetCommitCallback("socks5_proxy_enabled", onCommitSocks5ProxyEnabled, this); childSetCommitCallback("socks5_auth", onSocksAuthChanged, this); //Socks 5 proxy settings, saved data childSetValue("socks5_proxy_enabled", gSavedSettings.getBOOL("Socks5ProxyEnabled")); childSetValue("socks5_http_proxy_type", gSavedSettings.getString("Socks5HttpProxyType")); childSetValue("socks5_proxy_host", gSavedSettings.getString("Socks5ProxyHost")); childSetValue("socks5_proxy_port", (F32)gSavedSettings.getU32("Socks5ProxyPort")); childSetValue("socks5_proxy_username", gSavedSettings.getString("Socks5Username")); childSetValue("socks5_proxy_password", gSavedSettings.getString("Socks5Password")); childSetValue("socks5_auth", gSavedSettings.getString("Socks5AuthType")); // Socks 5 proxy settings, check if settings modified callbacks childSetCommitCallback("socks5_proxy_host", onSocksSettingsModified,this); childSetCommitCallback("socks5_proxy_port", onSocksSettingsModified,this); childSetCommitCallback("socks5_proxy_username", onSocksSettingsModified,this); childSetCommitCallback("socks5_proxy_password", onSocksSettingsModified,this); // Socks 5 settings, Set all controls and labels enabled state updateProxyEnabled(this, gSavedSettings.getBOOL("Socks5ProxyEnabled"), gSavedSettings.getString("Socks5AuthType")); childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); childSetEnabled("xmlrpc_proxy_text_label", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); childSetCommitCallback("speed_rez_check", onCommitSpeedRezCheckBox, this); sSocksSettingsChanged = false; // formerly the Web panel -- MC childSetAction("clear_web_cache", onClickClearWebCache, this); childSetCommitCallback("web_proxy_enabled", onCommitWebProxyEnabled, this); std::string value = gSavedSettings.getBOOL("UseExternalBrowser") ? "external" : "internal"; childSetValue("use_external_browser", value); childSetValue("cookies_enabled", gSavedSettings.getBOOL("BrowserCookiesEnabled")); childSetAction("clear_cookies", onClickClearCookies,this); childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort")); if (gHippoGridManager->getConnectedGrid()->isSecondLife()) { childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQuery")) ; } else { childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQueryOpenSim")) ; } childSetAction("world_search_reset_default", onClickSearchDefault, this); childSetAction("world_search_clear", onClickSearchClear, this); childSetEnabled("proxy_text_label", gSavedSettings.getBOOL("BrowserProxyEnabled")); childSetEnabled("web_proxy_editor", gSavedSettings.getBOOL("BrowserProxyEnabled")); childSetEnabled("web_proxy_port", gSavedSettings.getBOOL("BrowserProxyEnabled")); refresh(); return TRUE; }