blob: e98940f1706cfc645649a6ed04083d7c52146781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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());
}
|