summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lluictrlfactory.cpp3
-rw-r--r--indra/llui/lluictrlfactory.h30
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml28
3 files changed, 41 insertions, 20 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 625d3c63e5..01715c2792 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -396,6 +396,7 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& na
//static
void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group)
{
+ if (tab_group == S32_MAX) tab_group = parent->getLastTabGroup();
parent->addChild(view, tab_group);
}
@@ -454,4 +455,4 @@ dummy_widget_creator_func_t* LLUICtrlFactory::getDefaultWidgetFunc(const std::ty
const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_type)
{
return LLWidgetNameRegistry::instance().getValue(widget_type);
-} \ No newline at end of file
+}
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 6dab9521bb..422a926e49 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -196,12 +196,12 @@ public:
}
{
LLFastTimer timer(FTM_INIT_FROM_PARAMS);
- widget->initFromParams(params);
+ widget->initFromParams(params);
}
if (parent)
{
- S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : parent->getLastTabGroup();
+ S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : S32_MAX;
setCtrlParent(widget, parent, tab_group);
}
return widget;
@@ -220,7 +220,7 @@ public:
return widget;
}
-
+
LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node );
template<typename T>
@@ -309,9 +309,29 @@ fail:
// Apply layout transformations, usually munging rect
T::setupParams(params, parent);
- T* widget = createWidget<T>(params, parent);
+ if (!params.validateBlock())
+ {
+ llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
+ }
+ T* widget;
+ {
+ LLFastTimer timer(FTM_WIDGET_CONSTRUCTION);
+ widget = new T(params);
+ }
+ {
+ LLFastTimer timer(FTM_INIT_FROM_PARAMS);
+ widget->initFromParams(params);
+ }
+
+ if (parent)
+ {
+ S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : -1;
+ setCtrlParent(widget, parent, tab_group);
+ }
+
+ typedef typename T::child_registry_t registry_t;
- createChildren(widget, node, typename T::child_registry_t::instance(), output_node);
+ createChildren(widget, node, registry_t::instance(), output_node);
if (widget && !widget->postBuild())
{
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 8c64bafccc..feed6cc10f 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -293,24 +293,24 @@
tool_tip="Click to open Color Picker"
top_pad="5"
width="32" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="15"
- layout="topleft"
- left="30"
- name="title_afk_text"
- text_color="white"
- top_pad="-5"
- width="190">
- Away timeout:
- </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="30"
+ name="title_afk_text"
+ text_color="white"
+ top_pad="-5"
+ width="190">
+ Away timeout:
+ </text>
<combo_box
top_pad="-20"
height="20"
layout="topleft"
- control_name="AFKTimeout"
+ control_name="AFKTimeout"
left="140"
label="Away Timeout:"
name="afk"