From 5da967dc744f35d5270c7cb0b8b23b993ecda3e1 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 8 May 2009 07:58:49 +0000 Subject: merge skinning-7 -r 119501-119577 -> viewer-2.0.0-1 *NOTE: This overlaps a little with the skinning-7 -> skinning-8 merge of 119500-119692 -- James ignore-dead-branch --- indra/llui/llui.cpp | 6 +++--- indra/llui/llui.h | 6 +++--- indra/llui/lluiimage.h | 2 +- indra/llui/llview.cpp | 11 +++++++++-- indra/llui/llview.h | 52 +++++++++++++++++++++++++------------------------- 5 files changed, 42 insertions(+), 35 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index dfe435d2e3..1cb6972370 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1930,7 +1930,7 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled) namespace LLInitParam { - TypedParam::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLUIColor& value, ParamDescriptor::validation_func_t func) + TypedParam::TypedParam(BlockDescriptor& descriptor, const char* name, const LLUIColor& value, ParamDescriptor::validation_func_t func) : super_t(descriptor, name, value, func), red("red"), green("green"), @@ -1960,7 +1960,7 @@ namespace LLInitParam declare("blue", LLColor4::blue); } - TypedParam::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLFontGL*const value, ParamDescriptor::validation_func_t func) + TypedParam::TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL*const value, ParamDescriptor::validation_func_t func) : super_t(descriptor, name, value, func), name("", std::string("")), size("size", std::string("")), @@ -1991,7 +1991,7 @@ namespace LLInitParam return mData.mValue; } - TypedParam::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLRect& value, ParamDescriptor::validation_func_t func) + TypedParam::TypedParam(BlockDescriptor& descriptor, const char* name, const LLRect& value, ParamDescriptor::validation_func_t func) : super_t(descriptor, name, value, func), left("left"), top("top"), diff --git a/indra/llui/llui.h b/indra/llui/llui.h index b5a42bce13..18aa1aa143 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -706,7 +706,7 @@ namespace LLInitParam width, height; - TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLRect& value, ParamDescriptor::validation_func_t func); + TypedParam(BlockDescriptor& descriptor, const char* name, const LLRect& value, ParamDescriptor::validation_func_t func); LLRect getValueFromBlock() const; }; @@ -729,7 +729,7 @@ namespace LLInitParam Optional alpha; Optional control; - TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLUIColor& value, ParamDescriptor::validation_func_t func); + TypedParam(BlockDescriptor& descriptor, const char* name, const LLUIColor& value, ParamDescriptor::validation_func_t func); LLUIColor getValueFromBlock() const; }; @@ -743,7 +743,7 @@ namespace LLInitParam Optional size; Optional style; - TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLFontGL* const value, ParamDescriptor::validation_func_t func); + TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL* const value, ParamDescriptor::validation_func_t func); const LLFontGL* getValueFromBlock() const; }; diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h index cd660a0954..ae43b50172 100644 --- a/indra/llui/lluiimage.h +++ b/indra/llui/lluiimage.h @@ -94,7 +94,7 @@ namespace LLInitParam public: Optional name; - TypedParam(BlockDescriptor& descriptor, const std::string& name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func) + TypedParam(BlockDescriptor& descriptor, const char* name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func) : super_t(descriptor, name, value, func) { } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 462fd16b60..536d0c23f8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -2341,7 +2341,14 @@ void LLView::initFromParams(const LLView::Params& params) void LLView::parseFollowsFlags(const LLView::Params& params) { - if (params.follows.string.isProvided()) + // preserve follows flags set by code if user did not override + if (!params.follows.isProvided()) + { + return; + } + + // interpret either string or bitfield version of follows + if (params.follows.string.isChosen()) { setFollows(FOLLOWS_NONE); @@ -2378,7 +2385,7 @@ void LLView::parseFollowsFlags(const LLView::Params& params) ++token_iter; } } - else if (params.follows.flags.isProvided()) + else if (params.follows.flags.isChosen()) { setFollows(params.follows.flags); } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 69ae7dd993..85e190c7d2 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -154,41 +154,41 @@ public: struct Params : public LLInitParam::Block { - Mandatory name; - - Optional enabled, - visible; - Optional mouse_opaque; - Optional use_bounding_rect; - Optional tab_group, - default_tab_group; - Optional tool_tip; - - Optional sound_flags; - Optional serializable; - Optional follows; - Optional hover_cursor; + Mandatory name; + + Optional enabled, + visible; + Optional mouse_opaque; + Optional use_bounding_rect; + Optional tab_group, + default_tab_group; + Optional tool_tip; + + Optional sound_flags; + Optional serializable; + Optional follows; + Optional hover_cursor; // font params Optional font; Optional font_halign; Optional font_valign; - Optional layout; - Optional rect; - Optional top_delta, - bottom_delta, - right_delta, - left_delta; - - Optional center_horiz, - center_vert; + Optional layout; + Optional rect; + Optional top_delta, + bottom_delta, + right_delta, + left_delta; + + Optional center_horiz, + center_vert; // these are nested attributes for LLLayoutPanel //FIXME: get parent context involved in parsing traversal - Deprecated user_resize, - auto_resize, - needs_translate; + Deprecated user_resize, + auto_resize, + needs_translate; Params(); }; -- cgit v1.2.3