aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelnetwork.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-01 17:39:58 -0600
committerJacek Antonelli2008-12-01 17:40:06 -0600
commit7abecb48babe6a6f09bf6692ba55076546cfced9 (patch)
tree8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/llpanelnetwork.cpp
parentSecond Life viewer sources 1.21.6 (diff)
downloadmeta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz
Second Life viewer sources 1.22.0-RC
Diffstat (limited to 'linden/indra/newview/llpanelnetwork.cpp')
-rw-r--r--linden/indra/newview/llpanelnetwork.cpp46
1 files changed, 11 insertions, 35 deletions
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp
index e324c3b..f13f63a 100644
--- a/linden/indra/newview/llpanelnetwork.cpp
+++ b/linden/indra/newview/llpanelnetwork.cpp
@@ -31,29 +31,14 @@
31 31
32#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
33 33
34// file include 34//file include
35#include "llpanelnetwork.h" 35#include "llpanelnetwork.h"
36 36
37// linden library includes
38#include "llerror.h"
39#include "llrect.h"
40#include "llstring.h"
41
42// project includes 37// project includes
43#include "llbutton.h" 38#include "llcheckboxctrl.h"
44#include "lldirpicker.h" 39#include "lldirpicker.h"
45#include "llui.h"
46#include "lluictrlfactory.h" 40#include "lluictrlfactory.h"
47#include "llresmgr.h"
48#include "llsliderctrl.h"
49#include "llspinctrl.h"
50#include "llcheckboxctrl.h"
51#include "lltextbox.h"
52#include "llviewerregion.h"
53#include "llviewerthrottle.h"
54#include "llworld.h"
55#include "llviewercontrol.h" 41#include "llviewercontrol.h"
56#include "lluictrlfactory.h"
57#include "llviewerwindow.h" 42#include "llviewerwindow.h"
58 43
59LLPanelNetwork::LLPanelNetwork() 44LLPanelNetwork::LLPanelNetwork()
@@ -70,12 +55,13 @@ BOOL LLPanelNetwork::postBuild()
70 childSetAction("set_cache", onClickSetCache, this); 55 childSetAction("set_cache", onClickSetCache, this);
71 childSetAction("reset_cache", onClickResetCache, this); 56 childSetAction("reset_cache", onClickResetCache, this);
72 57
73 childSetEnabled("connection_port", 58 childSetEnabled("connection_port", gSavedSettings.getBOOL("ConnectionPortEnabled"));
74 gSavedSettings.getBOOL("ConnectionPortEnabled"));
75 childSetCommitCallback("connection_port_enabled", onCommitPort, this); 59 childSetCommitCallback("connection_port_enabled", onCommitPort, this);
76 60
77 61 childSetValue("cache_size", (F32)gSavedSettings.getU32("CacheSize"));
78 refresh(); 62 childSetValue("max_bandwidth", gSavedSettings.getF32("ThrottleBandwidthKBPS"));
63 childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled"));
64 childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort"));
79 65
80 return TRUE; 66 return TRUE;
81} 67}
@@ -88,24 +74,14 @@ LLPanelNetwork::~LLPanelNetwork()
88 74
89void LLPanelNetwork::apply() 75void LLPanelNetwork::apply()
90{ 76{
91} 77 gSavedSettings.setU32("CacheSize", childGetValue("cache_size").asInteger());
92 78 gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal());
93void LLPanelNetwork::refresh() 79 gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled"));
94{ 80 gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger());
95 LLPanel::refresh();
96
97 mCacheSetting = gSavedSettings.getU32("CacheSize");
98 mBandwidthBPS = gSavedSettings.getF32("ThrottleBandwidthKBPS")*1024;
99 mConnectionPortEnabled = gSavedSettings.getBOOL("ConnectionPortEnabled");
100 mConnectionPort = gSavedSettings.getU32("ConnectionPort");
101} 81}
102 82
103void LLPanelNetwork::cancel() 83void LLPanelNetwork::cancel()
104{ 84{
105 gSavedSettings.setU32("CacheSize", mCacheSetting);
106 gSavedSettings.setF32("ThrottleBandwidthKBPS", mBandwidthBPS/1024);
107 gSavedSettings.setBOOL("ConnectionPortEnabled", mConnectionPortEnabled);
108 gSavedSettings.setU32("ConnectionPort", mConnectionPort);
109} 85}
110 86
111// static 87// static