diff options
author | Jacek Antonelli | 2008-08-15 23:45:16 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:16 -0500 |
commit | 3f27ba891ac4d032753b219b4b96d1ffbc9fb488 (patch) | |
tree | 504932ee91a0356fba7ea48798887c96867e492f /linden/indra/newview/llpanelLCD.cpp | |
parent | Second Life viewer sources 1.18.4.3 (diff) | |
download | meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.zip meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.gz meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.bz2 meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.xz |
Second Life viewer sources 1.18.5.0-RC
Diffstat (limited to 'linden/indra/newview/llpanelLCD.cpp')
-rw-r--r-- | linden/indra/newview/llpanelLCD.cpp | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelLCD.cpp b/linden/indra/newview/llpanelLCD.cpp new file mode 100644 index 0000000..960a321 --- /dev/null +++ b/linden/indra/newview/llpanelLCD.cpp | |||
@@ -0,0 +1,131 @@ | |||
1 | /** | ||
2 | * @file llpanellcd.cpp | ||
3 | * @brief lcd options panel | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlife.com/developers/opensource/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #include "llviewerprecompiledheaders.h" | ||
33 | |||
34 | #include "llpanelLCD.h" | ||
35 | |||
36 | // linden library includes | ||
37 | #include "llerror.h" | ||
38 | #include "llrect.h" | ||
39 | #include "llfontgl.h" | ||
40 | #include "message.h" | ||
41 | #include "llvieweruictrlfactory.h" | ||
42 | |||
43 | // project includes | ||
44 | #include "llviewerwindow.h" | ||
45 | #include "llcheckboxctrl.h" | ||
46 | #include "llradiogroup.h" | ||
47 | #include "llresmgr.h" | ||
48 | #include "lltextbox.h" | ||
49 | #include "llui.h" | ||
50 | #include "viewer.h" | ||
51 | |||
52 | //Ventrella | ||
53 | #include "llagent.h" | ||
54 | //end Ventrella | ||
55 | |||
56 | // for Logitech LCD keyboards / speakers | ||
57 | #ifndef LL_LCD_H | ||
58 | #include "lllcd.h" | ||
59 | #endif | ||
60 | |||
61 | |||
62 | // | ||
63 | // Globals | ||
64 | // | ||
65 | |||
66 | // | ||
67 | // Static functions | ||
68 | // | ||
69 | |||
70 | |||
71 | LLPanelLCD::LLPanelLCD() | ||
72 | { | ||
73 | gUICtrlFactory->buildPanel(this, "panel_preferences_lcd.xml"); | ||
74 | } | ||
75 | |||
76 | BOOL LLPanelLCD::postBuild() | ||
77 | { | ||
78 | requires("LCDDestination", WIDGET_TYPE_RADIO_GROUP); | ||
79 | requires("DisplayLinden", WIDGET_TYPE_CHECKBOX); | ||
80 | requires("DisplayDebug", WIDGET_TYPE_CHECKBOX); | ||
81 | requires("DisplayDebugConsole", WIDGET_TYPE_CHECKBOX); | ||
82 | requires("DisplayRegion", WIDGET_TYPE_CHECKBOX); | ||
83 | requires("DisplayChat", WIDGET_TYPE_CHECKBOX); | ||
84 | requires("DisplayIM", WIDGET_TYPE_CHECKBOX); | ||
85 | |||
86 | if (!checkRequirements()) | ||
87 | { | ||
88 | return FALSE; | ||
89 | } | ||
90 | |||
91 | refresh(); | ||
92 | |||
93 | return TRUE; | ||
94 | } | ||
95 | |||
96 | |||
97 | LLPanelLCD::~LLPanelLCD() | ||
98 | { | ||
99 | // Children all cleaned up by default view destructor. | ||
100 | } | ||
101 | |||
102 | void LLPanelLCD::refresh() | ||
103 | { | ||
104 | mLCDDestination = gSavedSettings.getS32("LCDDestination"); | ||
105 | mDisplayChat = gSavedSettings.getBOOL("DisplayChat"); | ||
106 | mDisplayIM = gSavedSettings.getBOOL("DisplayIM"); | ||
107 | mDisplayRegion = gSavedSettings.getBOOL("DisplayRegion"); | ||
108 | mDisplayDebug = gSavedSettings.getBOOL("DisplayDebug"); | ||
109 | mDisplayDebugConsole = gSavedSettings.getBOOL("DisplayDebugConsole"); | ||
110 | mDisplayLinden = gSavedSettings.getBOOL("DisplayLinden"); | ||
111 | |||
112 | LLPanel::refresh(); | ||
113 | } | ||
114 | |||
115 | void LLPanelLCD::apply() | ||
116 | { | ||
117 | // nothing really to do here. | ||
118 | } | ||
119 | |||
120 | |||
121 | void LLPanelLCD::cancel() | ||
122 | { | ||
123 | // doing this to restore situation when we entered this function | ||
124 | gSavedSettings.setS32("LCDDestination", mLCDDestination); | ||
125 | gSavedSettings.setBOOL("DisplayChat", mDisplayChat); | ||
126 | gSavedSettings.setBOOL("DisplayIM", mDisplayIM); | ||
127 | gSavedSettings.setBOOL("DisplayRegion", mDisplayRegion); | ||
128 | gSavedSettings.setBOOL("DisplayDebug", mDisplayDebug); | ||
129 | gSavedSettings.setBOOL("DisplayDebugConsole", mDisplayDebugConsole); | ||
130 | gSavedSettings.setBOOL("DisplayLinden", mDisplayLinden); | ||
131 | } \ No newline at end of file | ||