aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llnameeditor.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llnameeditor.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llnameeditor.cpp33
1 files changed, 4 insertions, 29 deletions
diff --git a/linden/indra/newview/llnameeditor.cpp b/linden/indra/newview/llnameeditor.cpp
index dcb8911..99f9ee7 100644
--- a/linden/indra/newview/llnameeditor.cpp
+++ b/linden/indra/newview/llnameeditor.cpp
@@ -42,6 +42,7 @@
42#include "llstring.h" 42#include "llstring.h"
43#include "llui.h" 43#include "llui.h"
44 44
45static LLRegisterWidget<LLNameEditor> r("name_editor");
45 46
46// statics 47// statics
47std::set<LLNameEditor*> LLNameEditor::sInstances; 48std::set<LLNameEditor*> LLNameEditor::sInstances;
@@ -55,10 +56,7 @@ LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect,
55 void (*keystroke_callback)(LLLineEditor* caller, void* user_data), 56 void (*keystroke_callback)(LLLineEditor* caller, void* user_data),
56 void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data), 57 void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data),
57 void* userdata, 58 void* userdata,
58 LLLinePrevalidateFunc prevalidate_func, 59 LLLinePrevalidateFunc prevalidate_func)
59 LLViewBorder::EBevel border_bevel,
60 LLViewBorder::EStyle border_style,
61 S32 border_thickness)
62: LLLineEditor(name, rect, 60: LLLineEditor(name, rect,
63 "(retrieving)", 61 "(retrieving)",
64 glfont, 62 glfont,
@@ -67,10 +65,7 @@ LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect,
67 keystroke_callback, 65 keystroke_callback,
68 focus_lost_callback, 66 focus_lost_callback,
69 userdata, 67 userdata,
70 prevalidate_func, 68 prevalidate_func),
71 border_bevel,
72 border_style,
73 border_thickness),
74 mNameID(name_id) 69 mNameID(name_id)
75{ 70{
76 LLNameEditor::sInstances.insert(this); 71 LLNameEditor::sInstances.insert(this);
@@ -157,19 +152,6 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
157 node->getAttributeS32("max_length", max_text_length); 152 node->getAttributeS32("max_length", max_text_length);
158 153
159 LLFontGL* font = LLView::selectFont(node); 154 LLFontGL* font = LLView::selectFont(node);
160
161 LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE;
162 LLString border_string;
163 node->getAttributeString("border_style", border_string);
164 LLString::toLower(border_string);
165
166 if (border_string == "texture")
167 {
168 border_style = LLViewBorder::STYLE_TEXTURE;
169 }
170
171 S32 border_thickness = 1;
172 node->getAttributeS32("border_thickness", border_thickness);
173 155
174 LLUICtrlCallback commit_callback = NULL; 156 LLUICtrlCallback commit_callback = NULL;
175 157
@@ -178,14 +160,7 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
178 LLUUID::null, FALSE, 160 LLUUID::null, FALSE,
179 font, 161 font,
180 max_text_length, 162 max_text_length,
181 commit_callback, 163 commit_callback);
182 NULL,
183 NULL,
184 NULL,
185 NULL,
186 LLViewBorder::BEVEL_IN,
187 border_style,
188 border_thickness);
189 164
190 LLString label; 165 LLString label;
191 if(node->getAttributeString("label", label)) 166 if(node->getAttributeString("label", label))