summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-08-28 16:51:34 +0000
committerJames Cook <james@lindenlab.com>2009-08-28 16:51:34 +0000
commiteda3831041a176ae11116bd0c33077d121dc62e2 (patch)
treede4f3e33490cd7f18853296bc06be8c211bb0a47 /indra/llui
parent9e2cb2f4a00a6acc48738f9df788ad5adfc7d62a (diff)
skinning-22 -> viewer-2 trunk to pick up bug fixes, including crash on script compile when cursor is at the end of the script editor window. Replaced panel_pick_info.xml and panel_profile_view.xml with our versions, which stomped some PE changes. Panels still work, however, and Kurt is still working on layout.
CHANGES: minor layout change: "start location" and "remember password" weren't on the same horizontal line. DEV-35120 image_unselected art was "transparent.j2c" - switched it out for PushButton_Off I18N: more things are missing a.. you guessed it, a name= parameter. Breaks localization. forgot to check this in earlier...fixes off-by-one crash when editing a script DEV-36740 change the displayed string per Erica's request re 'You can only set your Home Location...' VIEWER-SIDE text change. This does not change the actual message coming from the server EXT-689 Odd spinner behaviour - For Sale Price -- reviewed by james DEV-26973 Internationalize the server msg Youcan'tset this place as home -- reviewed by james EXT-618 Low/Mid/High response is broken in Preferences > Graphics -- reviewed by james EXT-618 Low/Mid/High response is broken in Preferences > Graphics -- to be reviewed EXT-655 Cannot choose Both logging options in Preferences -- to be reviewed Changes to notifications.xml text to fit Style Guide and some renamed menu items EXT-147 Ongoing revisions to new gestures layout. DEV-35097 catch more instances of 'SLURL' and make them 'SLurl' Removed Info Displays and Buy Currency Test from top menus. Clean up code to use proper childGetFoo and childSetFoo calls, as well as setCommitCallback using slots. De-inlined LLAvatarIconCtrl paramblock constructor because I was doing a full rebuild anyhow. Commented about use of childSetCommitCallback(). De-inlined LocalizedString paramblock constructor. eliminated memory leak I18N: more things are missing a name= parameter, breaks localization. EXT-714 Updated panels in sidetray that were not using the scroll_container element to adjust for viewer heights. fix for llmessage_test crash in Windows Release builds DEV-11254 I18N: replace all string instances of "Second Life" - do this in the foreign languages too DEV-11254 I18N: replace all string instances of "Second Life" - found new instances from merged code potential fix for unit test crash on parabuild, moved statics into singleton member variables to get around potential dual instantation of statics on different modules DEV-36809 Click target for slider handles is too small -- reviewed by steve EXT-403 change getChild<LLSpiner> to LLUICtrl to make it generic -- reviewed by richard DEV-35938 Horizontal scroll thumb too high -- to be reviewed EXT-386 clean up warnings - initCommitCallback... Rename Product Engine's LLFloaterMiniInspector to LLInspectAvatar, clean up XUI XML, clean up construction code, move refresh method to postBuild() so widgets are constructed before refresh, fixed a member variable in llavatarlistitem.cpp. Reviewed with Leyla. Login menu > Debug > Avatar Inspector shows test avatar inspector. Also added to main menu > Debug > XUI > Avatar Inspector. Changed text/layout of dummy inspector. Not reviewed. Merging revisions 131558-131975 of svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-22 into D:\viewer-2.0.0-3, respecting ancestry
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llkeywords.cpp2
-rw-r--r--indra/llui/llpanel.cpp8
-rw-r--r--indra/llui/llpanel.h9
-rw-r--r--indra/llui/llspinctrl.cpp73
4 files changed, 61 insertions, 31 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index db1611abb5..ede32084d0 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -245,7 +245,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
return;
}
- S32 text_len = wtext.size();
+ S32 text_len = wtext.size() + 1;
seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) );
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 0b987bfcb5..c81be6086a 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -58,6 +58,11 @@
static LLDefaultChildRegistry::Register<LLPanel> r1("panel", &LLPanel::fromXML);
+LLPanel::LocalizedString::LocalizedString()
+: name("name"),
+ value("value")
+{}
+
const LLPanel::Params& LLPanel::getDefaultParams()
{
return LLUICtrlFactory::getDefaultParams<LLPanel>();
@@ -675,6 +680,9 @@ BOOL LLPanel::childHasFocus(const std::string& id)
}
// *TODO: Deprecate; for backwards compatability only:
+// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
+// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
+// a named callback and reference it in XML.
void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 28cd4d2799..3f1d1fdc5d 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -63,10 +63,7 @@ public:
Mandatory<std::string> name;
Mandatory<std::string> value;
- LocalizedString()
- : name("name"),
- value("value")
- {}
+ LocalizedString();
};
struct Params
@@ -185,7 +182,11 @@ public:
BOOL childHasFocus(const std::string& id);
// *TODO: Deprecate; for backwards compatability only:
+ // Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
+ // which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
+ // a named callback and reference it in XML.
void childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data);
+
void childSetValidate(const std::string& id, boost::function<bool (const LLSD& data)> cb );
void childSetColor(const std::string& id, const LLColor4& color);
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 7b96446fa1..3a96bc8f93 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -174,23 +174,33 @@ void LLSpinCtrl::onUpBtn( const LLSD& data )
{
if( getEnabled() )
{
- // use getValue()/setValue() to force reload from/to control
- F32 val = (F32)getValue().asReal() + mIncrement;
- val = clamp_precision(val, mPrecision);
- val = llmin( val, mMaxValue );
-
- F32 saved_val = (F32)getValue().asReal();
- setValue(val);
- if( !mValidateSignal( this, val ) )
+ std::string text = mEditor->getText();
+ if( LLLineEditor::postvalidateFloat( text ) )
{
- setValue( saved_val );
- reportInvalidData();
- updateEditor();
- return;
- }
+
+ LLLocale locale(LLLocale::USER_LOCALE);
+ F32 cur_val = (F32) atof(text.c_str());
+
+ // use getValue()/setValue() to force reload from/to control
+ F32 val = cur_val + mIncrement;
+ val = clamp_precision(val, mPrecision);
+ val = llmin( val, mMaxValue );
+ if (val < mMinValue) val = mMinValue;
+ if (val > mMaxValue) val = mMaxValue;
+
+ F32 saved_val = (F32)getValue().asReal();
+ setValue(val);
+ if( !mValidateSignal( this, val ) )
+ {
+ setValue( saved_val );
+ reportInvalidData();
+ updateEditor();
+ return;
+ }
updateEditor();
onCommit();
+ }
}
}
@@ -198,22 +208,33 @@ void LLSpinCtrl::onDownBtn( const LLSD& data )
{
if( getEnabled() )
{
- F32 val = (F32)getValue().asReal() - mIncrement;
- val = clamp_precision(val, mPrecision);
- val = llmax( val, mMinValue );
-
- F32 saved_val = (F32)getValue().asReal();
- setValue(val);
- if( !mValidateSignal( this, val ) )
+ std::string text = mEditor->getText();
+ if( LLLineEditor::postvalidateFloat( text ) )
{
- setValue( saved_val );
- reportInvalidData();
+
+ LLLocale locale(LLLocale::USER_LOCALE);
+ F32 cur_val = (F32) atof(text.c_str());
+
+ F32 val = cur_val - mIncrement;
+ val = clamp_precision(val, mPrecision);
+ val = llmax( val, mMinValue );
+
+ if (val < mMinValue) val = mMinValue;
+ if (val > mMaxValue) val = mMaxValue;
+
+ F32 saved_val = (F32)getValue().asReal();
+ setValue(val);
+ if( !mValidateSignal( this, val ) )
+ {
+ setValue( saved_val );
+ reportInvalidData();
+ updateEditor();
+ return;
+ }
+
updateEditor();
- return;
+ onCommit();
}
-
- updateEditor();
- onCommit();
}
}