aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelnetwork.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-07 23:14:43 -0700
committerMcCabe Maxsted2009-06-07 23:14:43 -0700
commite0a70bea805cf07b92efabca15ffe56a777f90ac (patch)
tree2c93d38e210832e737d09cff7561373d8d5453b2 /linden/indra/newview/llpanelnetwork.cpp
parent1.1 version final (diff)
parentMerge branch 'sl-base-1.22' into next (diff)
downloadmeta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.zip
meta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.tar.gz
meta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.tar.bz2
meta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.tar.xz
Moved base up to 1.22
Diffstat (limited to 'linden/indra/newview/llpanelnetwork.cpp')
-rw-r--r--linden/indra/newview/llpanelnetwork.cpp48
1 files changed, 12 insertions, 36 deletions
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp
index e324c3b..6ba8906 100644
--- a/linden/indra/newview/llpanelnetwork.cpp
+++ b/linden/indra/newview/llpanelnetwork.cpp
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2001-2008, Linden Research, Inc. 7 * Copyright (c) 2001-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -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