summaryrefslogtreecommitdiff
path: root/indra/newview/llsavedsettingsglue.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
committerJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
commit420b91db29485df39fd6e724e782c449158811cb (patch)
treeb471a94563af914d3ed3edd3e856d21cb1b69945 /indra/newview/llsavedsettingsglue.cpp
Print done when done.
Diffstat (limited to 'indra/newview/llsavedsettingsglue.cpp')
-rw-r--r--indra/newview/llsavedsettingsglue.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/indra/newview/llsavedsettingsglue.cpp b/indra/newview/llsavedsettingsglue.cpp
new file mode 100644
index 0000000000..e98940f170
--- /dev/null
+++ b/indra/newview/llsavedsettingsglue.cpp
@@ -0,0 +1,51 @@
+/**
+ * @file llsavedsettingsglue.cpp
+ * @author James Cook
+ * @brief LLSavedSettingsGlue class implementation
+ *
+ * Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llsavedsettingsglue.h"
+
+#include "lluictrl.h"
+
+#include "llviewercontrol.h"
+
+void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, void* data)
+{
+ const char* name = (const char*)data;
+ LLSD value = ctrl->getValue();
+ gSavedSettings.setBOOL(name, value.asBoolean());
+}
+
+void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, void* data)
+{
+ const char* name = (const char*)data;
+ LLSD value = ctrl->getValue();
+ gSavedSettings.setS32(name, value.asInteger());
+}
+
+void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, void* data)
+{
+ const char* name = (const char*)data;
+ LLSD value = ctrl->getValue();
+ gSavedSettings.setF32(name, (F32)value.asReal());
+}
+
+void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, void* data)
+{
+ const char* name = (const char*)data;
+ LLSD value = ctrl->getValue();
+ gSavedSettings.setU32(name, (U32)value.asInteger());
+}
+
+void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, void* data)
+{
+ const char* name = (const char*)data;
+ LLSD value = ctrl->getValue();
+ gSavedSettings.setString(name, value.asString());
+}