summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llbutton.cpp17
-rw-r--r--indra/llui/lllineeditor.cpp271
-rw-r--r--indra/llui/lllineeditor.h29
-rw-r--r--indra/llui/llmenugl.cpp1
-rw-r--r--indra/llui/llmultisliderctrl.cpp2
-rw-r--r--indra/llui/llpanel.cpp2
-rw-r--r--indra/llui/llpanel.h2
-rw-r--r--indra/llui/llsliderctrl.cpp2
-rw-r--r--indra/llui/llspinctrl.cpp2
-rw-r--r--indra/llui/lltabcontainer.cpp147
-rw-r--r--indra/llui/lltabcontainer.h18
-rw-r--r--indra/llui/lltexteditor.cpp54
-rw-r--r--indra/llui/lltexteditor.h10
-rw-r--r--indra/llui/lltextvalidate.cpp302
-rw-r--r--indra/llui/lltextvalidate.h63
-rw-r--r--indra/llui/lltooltip.h3
-rw-r--r--indra/newview/app_settings/settings.xml8
-rw-r--r--indra/newview/llappviewer.cpp8
-rw-r--r--indra/newview/llcallfloater.cpp28
-rw-r--r--indra/newview/llchathistory.cpp4
-rw-r--r--indra/newview/llchiclet.cpp6
-rw-r--r--indra/newview/llcurrencyuimanager.cpp2
-rw-r--r--indra/newview/llfavoritesbar.cpp25
-rw-r--r--indra/newview/llfloatercamera.cpp24
-rw-r--r--indra/newview/llfloatergodtools.cpp14
-rw-r--r--indra/newview/llfloaterland.cpp4
-rw-r--r--indra/newview/llfloaternamedesc.cpp4
-rw-r--r--indra/newview/llfloaterpay.cpp2
-rw-r--r--indra/newview/llfloaterproperties.cpp4
-rw-r--r--indra/newview/llfloatersellland.cpp4
-rw-r--r--indra/newview/llfolderview.cpp2
-rw-r--r--indra/newview/llimfloater.cpp5
-rw-r--r--indra/newview/llimfloatercontainer.cpp53
-rw-r--r--indra/newview/llimfloatercontainer.h2
-rw-r--r--indra/newview/llimview.cpp7
-rw-r--r--indra/newview/llinventorybridge.cpp12
-rw-r--r--indra/newview/lllocationinputctrl.cpp109
-rw-r--r--indra/newview/lllocationinputctrl.h15
-rw-r--r--indra/newview/llnearbychathandler.cpp6
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp6
-rw-r--r--indra/newview/llpanelavatar.cpp32
-rw-r--r--indra/newview/llpanelavatar.h5
-rw-r--r--indra/newview/llpanelclassified.cpp4
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp2
-rw-r--r--indra/newview/llpanellogin.cpp10
-rw-r--r--indra/newview/llpanelpermissions.cpp4
-rw-r--r--indra/newview/llplacesinventorypanel.cpp9
-rw-r--r--indra/newview/llplacesinventorypanel.h2
-rw-r--r--indra/newview/llpreviewanim.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp6
-rw-r--r--indra/newview/llpreviewnotecard.cpp2
-rw-r--r--indra/newview/llpreviewscript.cpp2
-rw-r--r--indra/newview/llpreviewsound.cpp2
-rw-r--r--indra/newview/llpreviewtexture.cpp2
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp4
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp4
-rw-r--r--indra/newview/llstartup.cpp12
-rw-r--r--indra/newview/llviewerobject.cpp9
-rw-r--r--indra/newview/llviewerwindow.cpp6
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/llvoavatarself.cpp8
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_help_browser.xml14
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_map.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_outgoing_call.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml18
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_text_editor.xml13
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml12
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_header.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_general.xml1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inspector.xml15
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml9
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tab_container.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/text_editor.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tool_tip.xml5
-rw-r--r--indra/newview/skins/default/xui/ja/floater_buy_currency.xml2
-rw-r--r--install.xml12
84 files changed, 1015 insertions, 532 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index ce068618e2..853f6f173d 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -90,6 +90,7 @@ set(llui_SOURCE_FILES
lltextbox.cpp
lltexteditor.cpp
lltextparser.cpp
+ lltextvalidate.cpp
lltransutil.cpp
lltoggleablemenu.cpp
lltooltip.cpp
@@ -182,6 +183,7 @@ set(llui_HEADER_FILES
lltextbox.h
lltexteditor.h
lltextparser.h
+ lltextvalidate.h
lltoggleablemenu.h
lltooltip.h
lltransutil.h
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 4944ed4fe7..14b77925f2 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -771,12 +771,7 @@ void LLButton::draw()
center_x++;
}
- S32 text_width_delta = overlay_width + 1;
- // if image paddings set, they should participate in scaling process
- S32 image_size_delta = mImageOverlayTopPad + mImageOverlayBottomPad;
- overlay_width = overlay_width - image_size_delta;
- overlay_height = overlay_height - image_size_delta;
-
+ center_y += (mImageOverlayBottomPad - mImageOverlayTopPad);
// fade out overlay images on disabled buttons
LLColor4 overlay_color = mImageOverlayColor.get();
if (!enabled)
@@ -788,10 +783,9 @@ void LLButton::draw()
switch(mImageOverlayAlignment)
{
case LLFontGL::LEFT:
- text_left += overlay_width + mImageOverlayRightPad + 1;
- text_width -= text_width_delta;
+ text_left += overlay_width + 1;
mImageOverlay->draw(
- mLeftHPad,
+ mImageOverlayLeftPad,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
@@ -806,10 +800,9 @@ void LLButton::draw()
overlay_color);
break;
case LLFontGL::RIGHT:
- text_right -= overlay_width + mImageOverlayLeftPad+ 1;
- text_width -= text_width_delta;
+ text_right -= overlay_width + 1;
mImageOverlay->draw(
- getRect().getWidth() - mRightHPad - overlay_width,
+ getRect().getWidth() - mImageOverlayRightPad - overlay_width,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 30b09352d8..483a394bbd 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -83,19 +83,6 @@ template class LLLineEditor* LLView::getChild<class LLLineEditor>(
// Member functions
//
-void LLLineEditor::PrevalidateNamedFuncs::declareValues()
-{
- declare("ascii", LLLineEditor::prevalidateASCII);
- declare("float", LLLineEditor::prevalidateFloat);
- declare("int", LLLineEditor::prevalidateInt);
- declare("positive_s32", LLLineEditor::prevalidatePositiveS32);
- declare("non_negative_s32", LLLineEditor::prevalidateNonNegativeS32);
- declare("alpha_num", LLLineEditor::prevalidateAlphaNum);
- declare("alpha_num_space", LLLineEditor::prevalidateAlphaNumSpace);
- declare("ascii_printable_no_pipe", LLLineEditor::prevalidateASCIIPrintableNoPipe);
- declare("ascii_printable_no_space", LLLineEditor::prevalidateASCIIPrintableNoSpace);
-}
-
LLLineEditor::Params::Params()
: max_length_bytes("max_length", 254),
keystroke_callback("keystroke_callback"),
@@ -1984,51 +1971,12 @@ void LLLineEditor::setRect(const LLRect& rect)
}
}
-void LLLineEditor::setPrevalidate(LLLinePrevalidateFunc func)
+void LLLineEditor::setPrevalidate(LLTextValidate::validate_func_t func)
{
mPrevalidateFunc = func;
updateAllowingLanguageInput();
}
-// Limits what characters can be used to [1234567890.-] with [-] only valid in the first position.
-// Does NOT ensure that the string is a well-formed number--that's the job of post-validation--for
-// the simple reasons that intermediate states may be invalid even if the final result is valid.
-//
-// static
-BOOL LLLineEditor::prevalidateFloat(const LLWString &str)
-{
- LLLocale locale(LLLocale::USER_LOCALE);
-
- BOOL success = TRUE;
- LLWString trimmed = str;
- LLWStringUtil::trim(trimmed);
- S32 len = trimmed.length();
- if( 0 < len )
- {
- // May be a comma or period, depending on the locale
- llwchar decimal_point = (llwchar)LLResMgr::getInstance()->getDecimalPoint();
-
- S32 i = 0;
-
- // First character can be a negative sign
- if( '-' == trimmed[0] )
- {
- i++;
- }
-
- for( ; i < len; i++ )
- {
- if( (decimal_point != trimmed[i] ) && !LLStringOps::isDigit( trimmed[i] ) )
- {
- success = FALSE;
- break;
- }
- }
- }
-
- return success;
-}
-
// static
BOOL LLLineEditor::postvalidateFloat(const std::string &str)
{
@@ -2088,223 +2036,6 @@ BOOL LLLineEditor::postvalidateFloat(const std::string &str)
return success;
}
-// Limits what characters can be used to [1234567890-] with [-] only valid in the first position.
-// Does NOT ensure that the string is a well-formed number--that's the job of post-validation--for
-// the simple reasons that intermediate states may be invalid even if the final result is valid.
-//
-// static
-BOOL LLLineEditor::prevalidateInt(const LLWString &str)
-{
- LLLocale locale(LLLocale::USER_LOCALE);
-
- BOOL success = TRUE;
- LLWString trimmed = str;
- LLWStringUtil::trim(trimmed);
- S32 len = trimmed.length();
- if( 0 < len )
- {
- S32 i = 0;
-
- // First character can be a negative sign
- if( '-' == trimmed[0] )
- {
- i++;
- }
-
- for( ; i < len; i++ )
- {
- if( !LLStringOps::isDigit( trimmed[i] ) )
- {
- success = FALSE;
- break;
- }
- }
- }
-
- return success;
-}
-
-// static
-BOOL LLLineEditor::prevalidatePositiveS32(const LLWString &str)
-{
- LLLocale locale(LLLocale::USER_LOCALE);
-
- LLWString trimmed = str;
- LLWStringUtil::trim(trimmed);
- S32 len = trimmed.length();
- BOOL success = TRUE;
- if(0 < len)
- {
- if(('-' == trimmed[0]) || ('0' == trimmed[0]))
- {
- success = FALSE;
- }
- S32 i = 0;
- while(success && (i < len))
- {
- if(!LLStringOps::isDigit(trimmed[i++]))
- {
- success = FALSE;
- }
- }
- }
- if (success)
- {
- S32 val = strtol(wstring_to_utf8str(trimmed).c_str(), NULL, 10);
- if (val <= 0)
- {
- success = FALSE;
- }
- }
- return success;
-}
-
-BOOL LLLineEditor::prevalidateNonNegativeS32(const LLWString &str)
-{
- LLLocale locale(LLLocale::USER_LOCALE);
-
- LLWString trimmed = str;
- LLWStringUtil::trim(trimmed);
- S32 len = trimmed.length();
- BOOL success = TRUE;
- if(0 < len)
- {
- if('-' == trimmed[0])
- {
- success = FALSE;
- }
- S32 i = 0;
- while(success && (i < len))
- {
- if(!LLStringOps::isDigit(trimmed[i++]))
- {
- success = FALSE;
- }
- }
- }
- if (success)
- {
- S32 val = strtol(wstring_to_utf8str(trimmed).c_str(), NULL, 10);
- if (val < 0)
- {
- success = FALSE;
- }
- }
- return success;
-}
-
-BOOL LLLineEditor::prevalidateAlphaNum(const LLWString &str)
-{
- LLLocale locale(LLLocale::USER_LOCALE);
-
- BOOL rv = TRUE;
- S32 len = str.length();
- if(len == 0) return rv;
- while(len--)
- {
- if( !LLStringOps::isAlnum((char)str[len]) )
- {
- rv = FALSE;
- break;
- }
- }
- return rv;
-}
-
-// static
-BOOL LLLineEditor::prevalidateAlphaNumSpace(const LLWString &str)
-{
- LLLocale locale(LLLocale::USER_LOCALE);
-
- BOOL rv = TRUE;
- S32 len = str.length();
- if(len == 0) return rv;
- while(len--)
- {
- if(!(LLStringOps::isAlnum((char)str[len]) || (' ' == str[len])))
- {
- rv = FALSE;
- break;
- }
- }
- return rv;
-}
-
-// Used for most names of things stored on the server, due to old file-formats
-// that used the pipe (|) for multiline text storage. Examples include
-// inventory item names, parcel names, object names, etc.
-// static
-BOOL LLLineEditor::prevalidateASCIIPrintableNoPipe(const LLWString &str)
-{
- BOOL rv = TRUE;
- S32 len = str.length();
- if(len == 0) return rv;
- while(len--)
- {
- llwchar wc = str[len];
- if (wc < 0x20
- || wc > 0x7f
- || wc == '|')
- {
- rv = FALSE;
- break;
- }
- if(!(wc == ' '
- || LLStringOps::isAlnum((char)wc)
- || LLStringOps::isPunct((char)wc) ) )
- {
- rv = FALSE;
- break;
- }
- }
- return rv;
-}
-
-
-// Used for avatar names
-// static
-BOOL LLLineEditor::prevalidateASCIIPrintableNoSpace(const LLWString &str)
-{
- BOOL rv = TRUE;
- S32 len = str.length();
- if(len == 0) return rv;
- while(len--)
- {
- llwchar wc = str[len];
- if (wc < 0x20
- || wc > 0x7f
- || LLStringOps::isSpace(wc))
- {
- rv = FALSE;
- break;
- }
- if( !(LLStringOps::isAlnum((char)str[len]) ||
- LLStringOps::isPunct((char)str[len]) ) )
- {
- rv = FALSE;
- break;
- }
- }
- return rv;
-}
-
-
-// static
-BOOL LLLineEditor::prevalidateASCII(const LLWString &str)
-{
- BOOL rv = TRUE;
- S32 len = str.length();
- while(len--)
- {
- if (str[len] < 0x20 || str[len] > 0x7f)
- {
- rv = FALSE;
- break;
- }
- }
- return rv;
-}
-
void LLLineEditor::onMouseCaptureLost()
{
endSelection();
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index a06a317f76..b62138426b 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -51,27 +51,18 @@
#include "llviewborder.h"
#include "llpreeditor.h"
-#include <boost/function.hpp>
+#include "lltextvalidate.h"
class LLFontGL;
class LLLineEditorRollback;
class LLButton;
class LLContextMenu;
-typedef boost::function<BOOL (const LLWString &wstr)> LLLinePrevalidateFunc;
-
class LLLineEditor
: public LLUICtrl, public LLEditMenuHandler, protected LLPreeditor
{
public:
- struct PrevalidateNamedFuncs
- : public LLInitParam::TypeValuesHelper<LLLinePrevalidateFunc, PrevalidateNamedFuncs>
-
- {
- static void declareValues();
- };
-
typedef boost::function<void (LLLineEditor* caller)> keystroke_callback_t;
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
@@ -81,7 +72,7 @@ public:
Optional<keystroke_callback_t> keystroke_callback;
- Optional<LLLinePrevalidateFunc, PrevalidateNamedFuncs> prevalidate_callback;
+ Optional<LLTextValidate::validate_func_t, LLTextValidate::ValidateTextNamedFuncs> prevalidate_callback;
Optional<LLViewBorder::Params> border;
@@ -207,6 +198,8 @@ public:
const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor.get(); }
const LLColor4& getTentativeFgColor() const { return mTentativeFgColor.get(); }
+ const LLFontGL* getFont() const { return mGLFont; }
+
void setIgnoreArrowKeys(BOOL b) { mIgnoreArrowKeys = b; }
void setIgnoreTab(BOOL b) { mIgnoreTab = b; }
void setPassDelete(BOOL b) { mPassDelete = b; }
@@ -234,17 +227,7 @@ public:
void setTextPadding(S32 left, S32 right);
// Prevalidation controls which keystrokes can affect the editor
- void setPrevalidate( LLLinePrevalidateFunc func );
- static BOOL prevalidateFloat(const LLWString &str );
- static BOOL prevalidateInt(const LLWString &str );
- static BOOL prevalidatePositiveS32(const LLWString &str);
- static BOOL prevalidateNonNegativeS32(const LLWString &str);
- static BOOL prevalidateAlphaNum(const LLWString &str );
- static BOOL prevalidateAlphaNumSpace(const LLWString &str );
- static BOOL prevalidateASCIIPrintableNoPipe(const LLWString &str);
- static BOOL prevalidateASCIIPrintableNoSpace(const LLWString &str);
- static BOOL prevalidateASCII(const LLWString &str);
-
+ void setPrevalidate( LLTextValidate::validate_func_t func );
static BOOL postvalidateFloat(const std::string &str);
// line history support:
@@ -324,7 +307,7 @@ protected:
S32 mLastSelectionStart;
S32 mLastSelectionEnd;
- LLLinePrevalidateFunc mPrevalidateFunc;
+ LLTextValidate::validate_func_t mPrevalidateFunc;
LLFrameTimer mKeystrokeTimer;
LLTimer mTripleClickTimer;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 7fa9a88059..d18abbfb2f 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3941,7 +3941,6 @@ BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu)
item = LLUICtrlFactory::create<LLContextMenuBranch>(p);
LLMenuGL::sMenuContainer->addChild(item->getBranch());
- item->setFont( LLFontGL::getFontSansSerif() );
return append( item );
}
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index f4434a0f78..cb81c39103 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -138,7 +138,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const LLMultiSliderCtrl::Params& p)
params.font(p.font);
params.max_length_bytes(MAX_STRING_LENGTH);
params.commit_callback.function(LLMultiSliderCtrl::onEditorCommit);
- params.prevalidate_callback(&LLLineEditor::prevalidateFloat);
+ params.prevalidate_callback(&LLTextValidate::validateFloat);
params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
mEditor->setFocusReceivedCallback( boost::bind(LLMultiSliderCtrl::onEditorGainFocus, _1, this) );
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 7f23fe2671..7b406e090a 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -936,7 +936,7 @@ LLPanel *LLPanel::childGetVisiblePanelWithHelp()
return ::childGetVisiblePanelWithHelp(this);
}
-void LLPanel::childSetPrevalidate(const std::string& id, BOOL (*func)(const LLWString &) )
+void LLPanel::childSetPrevalidate(const std::string& id, bool (*func)(const LLWString &) )
{
LLLineEditor* child = findChild<LLLineEditor>(id);
if (child)
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 6de83fe3a7..4e53fd7ea3 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -226,7 +226,7 @@ public:
std::string childGetText(const std::string& id) const { return childGetValue(id).asString(); }
// LLLineEditor
- void childSetPrevalidate(const std::string& id, BOOL (*func)(const LLWString &) );
+ void childSetPrevalidate(const std::string& id, bool (*func)(const LLWString &) );
// LLButton
void childSetAction(const std::string& id, boost::function<void(void*)> function, void* value = NULL);
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index 01c274bb4e..80ee5d0984 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -141,7 +141,7 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
line_p.rect.setIfNotProvided(text_rect);
line_p.font.setIfNotProvided(p.font);
line_p.commit_callback.function(&LLSliderCtrl::onEditorCommit);
- line_p.prevalidate_callback(&LLLineEditor::prevalidateFloat);
+ line_p.prevalidate_callback(&LLTextValidate::validateFloat);
mEditor = LLUICtrlFactory::create<LLLineEditor>(line_p);
mEditor->setFocusReceivedCallback( boost::bind(&LLSliderCtrl::onEditorGainFocus, _1, this ));
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 28f3788817..491cd7b6f3 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -127,7 +127,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
}
params.max_length_bytes(MAX_STRING_LENGTH);
params.commit_callback.function((boost::bind(&LLSpinCtrl::onEditorCommit, this, _2)));
- params.prevalidate_callback(&LLLineEditor::prevalidateFloat);
+ params.prevalidate_callback(&LLTextValidate::validateFloat);
params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this ));
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 6be76605fd..19408989a5 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -35,7 +35,6 @@
#include "lltabcontainer.h"
#include "llfocusmgr.h"
-#include "llbutton.h"
#include "lllocalcliprect.h"
#include "llrect.h"
#include "llresizehandle.h"
@@ -96,6 +95,90 @@ public:
//----------------------------------------------------------------------------
+//============================================================================
+/*
+ * @file lltabcontainer.cpp
+ * @brief class implements LLButton with LLIconCtrl on it
+ */
+class LLCustomButtonIconCtrl : public LLButton
+{
+public:
+ struct Params
+ : public LLInitParam::Block<Params, LLButton::Params>
+ {
+ // LEFT, RIGHT, TOP, BOTTOM paddings of LLIconCtrl in this class has same value
+ Optional<S32> icon_ctrl_pad;
+
+ Params():
+ icon_ctrl_pad("icon_ctrl_pad", 1)
+ {}
+ };
+
+protected:
+ friend class LLUICtrlFactory;
+ LLCustomButtonIconCtrl(const Params& p):
+ LLButton(p),
+ mIcon(NULL),
+ mIconCtrlPad(p.icon_ctrl_pad)
+ {}
+
+public:
+
+ void updateLayout()
+ {
+ LLRect button_rect = getRect();
+ LLRect icon_rect = mIcon->getRect();
+
+ S32 icon_size = button_rect.getHeight() - 2*mIconCtrlPad;
+
+ switch(mIconAlignment)
+ {
+ case LLFontGL::LEFT:
+ icon_rect.setLeftTopAndSize(button_rect.mLeft + mIconCtrlPad, button_rect.mTop - mIconCtrlPad,
+ icon_size, icon_size);
+ setLeftHPad(icon_size + mIconCtrlPad * 2);
+ break;
+ case LLFontGL::HCENTER:
+ icon_rect.setLeftTopAndSize(button_rect.mRight - (button_rect.getWidth() + mIconCtrlPad - icon_size)/2, button_rect.mTop - mIconCtrlPad,
+ icon_size, icon_size);
+ setRightHPad(icon_size + mIconCtrlPad * 2);
+ break;
+ case LLFontGL::RIGHT:
+ icon_rect.setLeftTopAndSize(button_rect.mRight - mIconCtrlPad - icon_size, button_rect.mTop - mIconCtrlPad,
+ icon_size, icon_size);
+ setRightHPad(icon_size + mIconCtrlPad * 2);
+ break;
+ default:
+ break;
+ }
+ mIcon->setRect(icon_rect);
+ }
+
+ void setIcon(LLIconCtrl* icon, LLFontGL::HAlign alignment = LLFontGL::LEFT)
+ {
+ if(icon)
+ {
+ if(mIcon)
+ {
+ removeChild(mIcon);
+ mIcon->die();
+ }
+ mIcon = icon;
+ mIconAlignment = alignment;
+
+ addChild(mIcon);
+ updateLayout();
+ }
+ }
+
+
+private:
+ LLIconCtrl* mIcon;
+ LLFontGL::HAlign mIconAlignment;
+ S32 mIconCtrlPad;
+};
+//============================================================================
+
struct LLPlaceHolderPanel : public LLPanel
{
// create dummy param block to register with "placeholder" nane
@@ -127,7 +210,9 @@ LLTabContainer::Params::Params()
tab_padding_right("tab_padding_right"),
first_tab("first_tab"),
middle_tab("middle_tab"),
- last_tab("last_tab")
+ last_tab("last_tab"),
+ use_custom_icon_ctrl("use_custom_icon_ctrl", false),
+ tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0)
{
name(std::string("tab_container"));
mouse_opaque = false;
@@ -162,7 +247,9 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
mFont(p.font),
mFirstTabParams(p.first_tab),
mMiddleTabParams(p.middle_tab),
- mLastTabParams(p.last_tab)
+ mLastTabParams(p.last_tab),
+ mCustomIconCtrlUsed(p.use_custom_icon_ctrl),
+ mTabIconCtrlPad(p.tab_icon_ctrl_pad)
{
static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0);
@@ -905,6 +992,11 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
LLTextBox* textbox = NULL;
LLButton* btn = NULL;
+ LLCustomButtonIconCtrl::Params custom_btn_params;
+ {
+ custom_btn_params.icon_ctrl_pad(mTabIconCtrlPad);
+ }
+ LLButton::Params normal_btn_params;
if (placeholder)
{
@@ -924,7 +1016,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
{
if (mIsVertical)
{
- LLButton::Params p;
+ LLButton::Params& p = (mCustomIconCtrlUsed)?
+ custom_btn_params:normal_btn_params;
+
p.name(std::string("vert tab button"));
p.rect(btn_rect);
p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
@@ -942,11 +1036,22 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
{
p.pad_left(indent);
}
- btn = LLUICtrlFactory::create<LLButton>(p);
+
+
+ if(mCustomIconCtrlUsed)
+ {
+ btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
+
+ }
+ else
+ {
+ btn = LLUICtrlFactory::create<LLButton>(p);
+ }
}
else
{
- LLButton::Params p;
+ LLButton::Params& p = (mCustomIconCtrlUsed)?
+ custom_btn_params:normal_btn_params;
p.name(std::string(child->getName()) + " tab");
p.rect(btn_rect);
p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
@@ -980,7 +1085,14 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
p.follows.flags = p.follows.flags() | FOLLOWS_BOTTOM;
}
-++ btn = LLUICtrlFactory::create<LLButton>(p);
+ if(mCustomIconCtrlUsed)
+ {
+ btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
+ }
+ else
+ {
+ btn = LLUICtrlFactory::create<LLButton>(p);
+ }
}
}
@@ -1484,7 +1596,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L
if( tuple )
{
tuple->mButton->setImageOverlay(image_name, LLFontGL::LEFT, color);
- reshape_tuple(tuple);
+ reshapeTuple(tuple);
}
}
@@ -1494,11 +1606,26 @@ void LLTabContainer::setTabImage(LLPanel* child, const LLUUID& image_id, const L
if( tuple )
{
tuple->mButton->setImageOverlay(image_id, LLFontGL::LEFT, color);
- reshape_tuple(tuple);
+ reshapeTuple(tuple);
+ }
+}
+
+void LLTabContainer::setTabImage(LLPanel* child, LLIconCtrl* icon)
+{
+ LLTabTuple* tuple = getTabByPanel(child);
+ LLCustomButtonIconCtrl* button;
+
+ if(tuple)
+ {
+ button = dynamic_cast<LLCustomButtonIconCtrl*>(tuple->mButton);
+ if(button)
+ {
+ button->setIcon(icon);
+ }
}
}
-void LLTabContainer::reshape_tuple(LLTabTuple* tuple)
+void LLTabContainer::reshapeTuple(LLTabTuple* tuple)
{
static LLUICachedControl<S32> tab_padding ("UITabPadding", 0);
static LLUICachedControl<S32> image_left_padding ("UIButtonImageLeftPadding", 4);
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 2a55877d3c..4b5d45fb73 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -36,6 +36,8 @@
#include "llpanel.h"
#include "lltextbox.h"
#include "llframetimer.h"
+#include "lliconctrl.h"
+#include "llbutton.h"
class LLTabTuple;
@@ -90,6 +92,16 @@ public:
middle_tab,
last_tab;
+ /**
+ * Use LLCustomButtonIconCtrl or LLButton in LLTabTuple
+ */
+ Optional<bool> use_custom_icon_ctrl;
+
+ /**
+ * Paddings for LLIconCtrl in case of LLCustomButtonIconCtrl usage(use_custom_icon_ctrl = true)
+ */
+ Optional<S32> tab_icon_ctrl_pad;
+
Params();
};
@@ -173,6 +185,7 @@ public:
void setTabPanelFlashing(LLPanel* child, BOOL state);
void setTabImage(LLPanel* child, std::string img_name, const LLColor4& color = LLColor4::white);
void setTabImage(LLPanel* child, const LLUUID& img_id, const LLColor4& color = LLColor4::white);
+ void setTabImage(LLPanel* child, LLIconCtrl* icon);
void setTitle( const std::string& title );
const std::string getPanelTitle(S32 index);
@@ -228,7 +241,7 @@ private:
// updates tab button images given the tuple, tab position and the corresponding params
void update_images(LLTabTuple* tuple, TabParams params, LLTabContainer::TabPosition pos);
- void reshape_tuple(LLTabTuple* tuple);
+ void reshapeTuple(LLTabTuple* tuple);
// Variables
@@ -278,6 +291,9 @@ private:
TabParams mFirstTabParams;
TabParams mMiddleTabParams;
TabParams mLastTabParams;
+
+ bool mCustomIconCtrlUsed;
+ S32 mTabIconCtrlPad;
};
#endif // LL_TABCONTAINER_H
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 3fdb48b3ca..ad9f066539 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -237,13 +237,17 @@ private:
///////////////////////////////////////////////////////////////////
LLTextEditor::Params::Params()
: default_text("default_text"),
+ prevalidate_callback("prevalidate_callback"),
embedded_items("embedded_items", false),
ignore_tab("ignore_tab", true),
handle_edit_keys_directly("handle_edit_keys_directly", false),
show_line_numbers("show_line_numbers", false),
default_color("default_color"),
- commit_on_focus_lost("commit_on_focus_lost", false)
-{}
+ commit_on_focus_lost("commit_on_focus_lost", false),
+ show_context_menu("show_context_menu")
+{
+ addSynonym(prevalidate_callback, "text_type");
+}
LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
LLTextBase(p),
@@ -258,7 +262,9 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
mMouseDownX(0),
mMouseDownY(0),
mTabsToNextField(p.ignore_tab),
- mContextMenu(NULL)
+ mPrevalidateFunc(p.prevalidate_callback()),
+ mContextMenu(NULL),
+ mShowContextMenu(p.show_context_menu)
{
mDefaultFont = p.font;
@@ -318,6 +324,17 @@ LLTextEditor::~LLTextEditor()
void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params)
{
+ // validate incoming text if necessary
+ if (mPrevalidateFunc)
+ {
+ LLWString test_text = utf8str_to_wstring(utf8str);
+ if (!mPrevalidateFunc(test_text))
+ {
+ // not valid text, nothing to do
+ return;
+ }
+ }
+
blockUndo();
deselect();
@@ -720,7 +737,7 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
}
if (!LLTextBase::handleRightMouseDown(x, y, mask))
{
- if(getMouseOpaque())
+ if(getChowContextMenu())
{
showContextMenu(x, y);
}
@@ -909,6 +926,21 @@ S32 LLTextEditor::execute( TextCmd* cmd )
// Push the new command is now on the top (front) of the undo stack.
mUndoStack.push_front(cmd);
mLastCmd = cmd;
+
+ bool need_to_rollback = mPrevalidateFunc
+ && !mPrevalidateFunc(getViewModel()->getDisplay());
+ if (need_to_rollback)
+ {
+ // get rid of this last command and clean up undo stack
+ undo();
+
+ // remove any evidence of this command from redo history
+ mUndoStack.pop_front();
+ delete cmd;
+
+ // failure, nothing changed
+ delta = 0;
+ }
}
else
{
@@ -1032,7 +1064,21 @@ S32 LLTextEditor::addChar(S32 pos, llwchar wc)
if (mLastCmd && mLastCmd->canExtend(pos))
{
S32 delta = 0;
+ if (mPrevalidateFunc)
+ {
+ // get a copy of current text contents
+ LLWString test_string(getViewModel()->getDisplay());
+
+ // modify text contents as if this addChar succeeded
+ llassert(pos <= (S32)test_string.size());
+ test_string.insert(pos, 1, wc);
+ if (!mPrevalidateFunc( test_string))
+ {
+ return 0;
+ }
+ }
mLastCmd->extendAndExecute(this, pos, wc, &delta);
+
return delta;
}
else
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index a136f9ccce..00c6a8b68a 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -44,6 +44,7 @@
#include "lldarray.h"
#include "llviewborder.h" // for params
#include "lltextbase.h"
+#include "lltextvalidate.h"
#include "llpreeditor.h"
#include "llcontrol.h"
@@ -63,12 +64,14 @@ public:
struct Params : public LLInitParam::Block<Params, LLTextBase::Params>
{
Optional<std::string> default_text;
+ Optional<LLTextValidate::validate_func_t, LLTextValidate::ValidateTextNamedFuncs> prevalidate_callback;
Optional<bool> embedded_items,
ignore_tab,
handle_edit_keys_directly,
show_line_numbers,
- commit_on_focus_lost;
+ commit_on_focus_lost,
+ show_context_menu;
//colors
Optional<LLUIColor> default_color;
@@ -200,6 +203,9 @@ public:
const LLTextSegmentPtr getPreviousSegment() const;
void getSelectedSegments(segment_vec_t& segments) const;
+ void setShowContextMenu(bool show) { mShowContextMenu = show; }
+ bool getChowContextMenu() const { return mShowContextMenu; }
+
protected:
void showContextMenu(S32 x, S32 y);
void drawPreeditMarker();
@@ -319,6 +325,7 @@ private:
BOOL mTakesFocus;
BOOL mAllowEmbeddedItems;
+ bool mShowContextMenu;
LLUUID mSourceID;
@@ -329,6 +336,7 @@ private:
LLCoordGL mLastIMEPosition; // Last position of the IME editor
keystroke_signal_t mKeystrokeSignal;
+ LLTextValidate::validate_func_t mPrevalidateFunc;
LLContextMenu* mContextMenu;
}; // end class LLTextEditor
diff --git a/indra/llui/lltextvalidate.cpp b/indra/llui/lltextvalidate.cpp
new file mode 100644
index 0000000000..8b6bc5bd7d
--- /dev/null
+++ b/indra/llui/lltextvalidate.cpp
@@ -0,0 +1,302 @@
+/**
+ * @file lltextvalidate.cpp
+ * @brief Text validation helper functions
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Text editor widget to let users enter a single line.
+
+#include "linden_common.h"
+
+#include "lltextvalidate.h"
+#include "llresmgr.h" // for LLLocale
+
+namespace LLTextValidate
+{
+ void ValidateTextNamedFuncs::declareValues()
+ {
+ declare("ascii", validateASCII);
+ declare("float", validateFloat);
+ declare("int", validateInt);
+ declare("positive_s32", validatePositiveS32);
+ declare("non_negative_s32", validateNonNegativeS32);
+ declare("alpha_num", validateAlphaNum);
+ declare("alpha_num_space", validateAlphaNumSpace);
+ declare("ascii_printable_no_pipe", validateASCIIPrintableNoPipe);
+ declare("ascii_printable_no_space", validateASCIIPrintableNoSpace);
+ }
+
+ // Limits what characters can be used to [1234567890.-] with [-] only valid in the first position.
+ // Does NOT ensure that the string is a well-formed number--that's the job of post-validation--for
+ // the simple reasons that intermediate states may be invalid even if the final result is valid.
+ //
+ bool validateFloat(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ bool success = TRUE;
+ LLWString trimmed = str;
+ LLWStringUtil::trim(trimmed);
+ S32 len = trimmed.length();
+ if( 0 < len )
+ {
+ // May be a comma or period, depending on the locale
+ llwchar decimal_point = (llwchar)LLResMgr::getInstance()->getDecimalPoint();
+
+ S32 i = 0;
+
+ // First character can be a negative sign
+ if( '-' == trimmed[0] )
+ {
+ i++;
+ }
+
+ for( ; i < len; i++ )
+ {
+ if( (decimal_point != trimmed[i] ) && !LLStringOps::isDigit( trimmed[i] ) )
+ {
+ success = FALSE;
+ break;
+ }
+ }
+ }
+
+ return success;
+ }
+
+ // Limits what characters can be used to [1234567890-] with [-] only valid in the first position.
+ // Does NOT ensure that the string is a well-formed number--that's the job of post-validation--for
+ // the simple reasons that intermediate states may be invalid even if the final result is valid.
+ //
+ bool validateInt(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ bool success = TRUE;
+ LLWString trimmed = str;
+ LLWStringUtil::trim(trimmed);
+ S32 len = trimmed.length();
+ if( 0 < len )
+ {
+ S32 i = 0;
+
+ // First character can be a negative sign
+ if( '-' == trimmed[0] )
+ {
+ i++;
+ }
+
+ for( ; i < len; i++ )
+ {
+ if( !LLStringOps::isDigit( trimmed[i] ) )
+ {
+ success = FALSE;
+ break;
+ }
+ }
+ }
+
+ return success;
+ }
+
+ bool validatePositiveS32(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ LLWString trimmed = str;
+ LLWStringUtil::trim(trimmed);
+ S32 len = trimmed.length();
+ bool success = TRUE;
+ if(0 < len)
+ {
+ if(('-' == trimmed[0]) || ('0' == trimmed[0]))
+ {
+ success = FALSE;
+ }
+ S32 i = 0;
+ while(success && (i < len))
+ {
+ if(!LLStringOps::isDigit(trimmed[i++]))
+ {
+ success = FALSE;
+ }
+ }
+ }
+ if (success)
+ {
+ S32 val = strtol(wstring_to_utf8str(trimmed).c_str(), NULL, 10);
+ if (val <= 0)
+ {
+ success = FALSE;
+ }
+ }
+ return success;
+ }
+
+ bool validateNonNegativeS32(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ LLWString trimmed = str;
+ LLWStringUtil::trim(trimmed);
+ S32 len = trimmed.length();
+ bool success = TRUE;
+ if(0 < len)
+ {
+ if('-' == trimmed[0])
+ {
+ success = FALSE;
+ }
+ S32 i = 0;
+ while(success && (i < len))
+ {
+ if(!LLStringOps::isDigit(trimmed[i++]))
+ {
+ success = FALSE;
+ }
+ }
+ }
+ if (success)
+ {
+ S32 val = strtol(wstring_to_utf8str(trimmed).c_str(), NULL, 10);
+ if (val < 0)
+ {
+ success = FALSE;
+ }
+ }
+ return success;
+ }
+
+ bool validateAlphaNum(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ bool rv = TRUE;
+ S32 len = str.length();
+ if(len == 0) return rv;
+ while(len--)
+ {
+ if( !LLStringOps::isAlnum((char)str[len]) )
+ {
+ rv = FALSE;
+ break;
+ }
+ }
+ return rv;
+ }
+
+ bool validateAlphaNumSpace(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ bool rv = TRUE;
+ S32 len = str.length();
+ if(len == 0) return rv;
+ while(len--)
+ {
+ if(!(LLStringOps::isAlnum((char)str[len]) || (' ' == str[len])))
+ {
+ rv = FALSE;
+ break;
+ }
+ }
+ return rv;
+ }
+
+ // Used for most names of things stored on the server, due to old file-formats
+ // that used the pipe (|) for multiline text storage. Examples include
+ // inventory item names, parcel names, object names, etc.
+ bool validateASCIIPrintableNoPipe(const LLWString &str)
+ {
+ bool rv = TRUE;
+ S32 len = str.length();
+ if(len == 0) return rv;
+ while(len--)
+ {
+ llwchar wc = str[len];
+ if (wc < 0x20
+ || wc > 0x7f
+ || wc == '|')
+ {
+ rv = FALSE;
+ break;
+ }
+ if(!(wc == ' '
+ || LLStringOps::isAlnum((char)wc)
+ || LLStringOps::isPunct((char)wc) ) )
+ {
+ rv = FALSE;
+ break;
+ }
+ }
+ return rv;
+ }
+
+
+ // Used for avatar names
+ bool validateASCIIPrintableNoSpace(const LLWString &str)
+ {
+ bool rv = TRUE;
+ S32 len = str.length();
+ if(len == 0) return rv;
+ while(len--)
+ {
+ llwchar wc = str[len];
+ if (wc < 0x20
+ || wc > 0x7f
+ || LLStringOps::isSpace(wc))
+ {
+ rv = FALSE;
+ break;
+ }
+ if( !(LLStringOps::isAlnum((char)str[len]) ||
+ LLStringOps::isPunct((char)str[len]) ) )
+ {
+ rv = FALSE;
+ break;
+ }
+ }
+ return rv;
+ }
+
+ bool validateASCII(const LLWString &str)
+ {
+ bool rv = TRUE;
+ S32 len = str.length();
+ while(len--)
+ {
+ if (str[len] < 0x20 || str[len] > 0x7f)
+ {
+ rv = FALSE;
+ break;
+ }
+ }
+ return rv;
+ }
+}
diff --git a/indra/llui/lltextvalidate.h b/indra/llui/lltextvalidate.h
new file mode 100644
index 0000000000..ffb4e85e7c
--- /dev/null
+++ b/indra/llui/lltextvalidate.h
@@ -0,0 +1,63 @@
+/**
+ * @file lltextbase.h
+ * @author Martin Reddy
+ * @brief The base class of text box/editor, providing Url handling support
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLTEXTVALIDATE_H
+#define LL_LLTEXTVALIDATE_H
+
+#include "llstring.h"
+#include "llinitparam.h"
+#include <boost/function.hpp>
+
+namespace LLTextValidate
+{
+ typedef boost::function<BOOL (const LLWString &wstr)> validate_func_t;
+
+ struct ValidateTextNamedFuncs
+ : public LLInitParam::TypeValuesHelper<validate_func_t, ValidateTextNamedFuncs>
+ {
+ static void declareValues();
+ };
+
+ bool validateFloat(const LLWString &str );
+ bool validateInt(const LLWString &str );
+ bool validatePositiveS32(const LLWString &str);
+ bool validateNonNegativeS32(const LLWString &str);
+ bool validateAlphaNum(const LLWString &str );
+ bool validateAlphaNumSpace(const LLWString &str );
+ bool validateASCIIPrintableNoPipe(const LLWString &str);
+ bool validateASCIIPrintableNoSpace(const LLWString &str);
+ bool validateASCII(const LLWString &str);
+}
+
+
+#endif
diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h
index 7978b6a583..c0811c56c3 100644
--- a/indra/llui/lltooltip.h
+++ b/indra/llui/lltooltip.h
@@ -129,7 +129,8 @@ private:
class LLInspector : public LLToolTip
{
public:
- struct Params : public LLInitParam::Block<Params, LLToolTip::Params> {};
+ struct Params : public LLInitParam::Block<Params, LLToolTip::Params>
+ {};
};
class LLToolTipMgr : public LLSingleton<LLToolTipMgr>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c7300fcee2..923ba44906 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2817,16 +2817,16 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>HadFirstSuccessfulLogin</key>
+ <key>FirstRunThisInstall</key>
<map>
<key>Comment</key>
- <string>Specifies whether you have successfully logged in at least once before</string>
+ <string>Specifies that you have not run the viewer since you installed the latest update</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>FirstSelectedDisabledPopups</key>
<map>
@@ -8399,7 +8399,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
<key>ShowTangentBasis</key>
<map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 2f90885df3..a3720769a1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1353,9 +1353,6 @@ bool LLAppViewer::cleanup()
llinfos << "Cache files removed" << llendflush;
-
- cleanup_menus();
-
// Wait for any pending VFS IO
while (1)
{
@@ -2365,9 +2362,6 @@ bool LLAppViewer::initWindow()
// store setting in a global for easy access and modification
gNoRender = gSavedSettings.getBOOL("DisableRendering");
- // Hide the splash screen
- LLSplashScreen::hide();
-
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
gViewerWindow = new LLViewerWindow(gWindowTitle,
@@ -2611,7 +2605,7 @@ void LLAppViewer::handleViewerCrash()
gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer) LLMemory::getCurrentRSS() >> 10;
gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin();
- gDebugInfo["HadFirstSuccessfulLogin"] = gSavedSettings.getBOOL("HadFirstSuccessfulLogin");
+ gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall");
if(gLogoutInProgress)
{
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index bd4fae6ab6..d405c1bbc1 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -721,7 +721,15 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel)
void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
- updateState(new_state);
+ // check is voice operational and if it doesn't work hide VCP (EXT-4397)
+ if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking())
+ {
+ updateState(new_state);
+ }
+ else
+ {
+ closeFloater();
+ }
}
void LLCallFloater::updateState(const LLVoiceChannel::EState& new_state)
@@ -750,18 +758,26 @@ void LLCallFloater::reset(const LLVoiceChannel::EState& new_state)
mParticipants = NULL;
mAvatarList->clear();
- // "loading" is shown in parcel with disabled voice only when state is "ringing"
- // to avoid showing it in nearby chat vcp all the time- "no_one_near" is now shown there (EXT-4648)
- bool show_loading = LLVoiceChannel::STATE_RINGING == new_state;
- if(!show_loading && !LLViewerParcelMgr::getInstance()->allowAgentVoice() && mVoiceType == VC_LOCAL_CHAT)
+ // These ifs were added instead of simply showing "loading" to make VCP work correctly in parcels
+ // with disabled voice (EXT-4648 and EXT-4649)
+ if (!LLViewerParcelMgr::getInstance()->allowAgentVoice() && LLVoiceChannel::STATE_HUNG_UP == new_state)
{
+ // hides "Leave Call" when call is ended in parcel with disabled voice- hiding usually happens in
+ // updateSession() which won't be called here because connect to nearby voice never happens
+ childSetVisible("leave_call_btn_panel", false);
+ // setting title to nearby chat an "no one near..." text- because in region with disabled
+ // voice we won't have chance to really connect to nearby, so VCP is changed here manually
+ setTitle(getString("title_nearby"));
mAvatarList->setNoItemsCommentText(getString("no_one_near"));
}
- else
+ // "loading" is shown only when state is "ringing" to avoid showing it in nearby chat vcp
+ // of parcels with disabled voice all the time- "no_one_near" is now shown there (EXT-4648)
+ else if (new_state == LLVoiceChannel::STATE_RINGING)
{
// update floater to show Loading while waiting for data.
mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));
}
+
mAvatarList->setVisible(TRUE);
mNonAvatarCaller->setVisible(FALSE);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index f046e08827..3aea70d1b4 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -262,7 +262,7 @@ public:
mSourceType = CHAT_SOURCE_SYSTEM;
}
- LLTextEditor* userName = getChild<LLTextEditor>("user_name");
+ LLTextBox* userName = getChild<LLTextBox>("user_name");
userName->setReadOnlyColor(style_params.readonly_color());
userName->setColor(style_params.color());
@@ -300,7 +300,7 @@ public:
/*virtual*/ void draw()
{
- LLTextEditor* user_name = getChild<LLTextEditor>("user_name");
+ LLTextBox* user_name = getChild<LLTextBox>("user_name");
LLTextBox* time_box = getChild<LLTextBox>("time_box");
LLRect user_name_rect = user_name->getRect();
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index f646bcccb5..18bd7b725f 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -545,6 +545,7 @@ void LLIMChiclet::toggleSpeakerControl()
}
setRequiredWidth();
+ mSpeakerCtrl->setSpeakerId(LLUUID::null);
mSpeakerCtrl->setVisible(getShowSpeaker());
}
@@ -954,7 +955,10 @@ LLIMGroupChiclet::~LLIMGroupChiclet()
void LLIMGroupChiclet::draw()
{
- switchToCurrentSpeaker();
+ if(getShowSpeaker())
+ {
+ switchToCurrentSpeaker();
+ }
LLIMChiclet::draw();
}
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 00c05445e1..be6c15eab4 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -426,7 +426,7 @@ void LLCurrencyUIManager::Impl::prepare()
LLLineEditor* lindenAmount = mPanel.getChild<LLLineEditor>("currency_amt");
if (lindenAmount)
{
- lindenAmount->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
+ lindenAmount->setPrevalidate(LLTextValidate::validateNonNegativeS32);
lindenAmount->setKeystrokeCallback(onCurrencyKey, this);
}
}
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 0f52b30567..1e8a739d78 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -298,6 +298,20 @@ public:
return TRUE;
}
+ void setVisible(BOOL b)
+ {
+ // Overflow menu shouldn't hide when it still has focus. See EXT-4217.
+ if (!b && hasFocus())
+ return;
+ LLToggleableMenu::setVisible(b);
+ setFocus(b);
+ }
+
+ void onFocusLost()
+ {
+ setVisible(FALSE);
+ }
+
protected:
LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p):
LLToggleableMenu(p)
@@ -777,6 +791,15 @@ void LLFavoritesBarCtrl::updateButtons()
mChevronButton->setRect(rect);
mChevronButton->setVisible(TRUE);
}
+ // Update overflow menu
+ LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mPopupMenuHandle.get());
+ if (overflow_menu && overflow_menu->getVisible())
+ {
+ overflow_menu->setFocus(FALSE);
+ overflow_menu->setVisible(FALSE);
+ if (mUpdateDropDownItems)
+ showDropDownMenu();
+ }
}
else
{
@@ -892,6 +915,8 @@ void LLFavoritesBarCtrl::showDropDownMenu()
if (menu)
{
+ // Release focus to allow changing of visibility.
+ menu->setFocus(FALSE);
if (!menu->toggleVisibility())
return;
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 9496e94780..ecb6254f8a 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -65,7 +65,7 @@ public:
LLPanelCameraZoom();
/* virtual */ BOOL postBuild();
- /* virtual */ void onOpen(const LLSD& key);
+ /* virtual */ void draw();
protected:
void onZoomPlusHeldDown();
@@ -73,7 +73,6 @@ protected:
void onSliderValueChanged();
private:
- F32 mSavedSliderVal;
LLButton* mPlusBtn;
LLButton* mMinusBtn;
LLSlider* mSlider;
@@ -88,8 +87,7 @@ static LLRegisterPanelClassWrapper<LLPanelCameraZoom> t_camera_zoom_panel("camer
LLPanelCameraZoom::LLPanelCameraZoom()
: mPlusBtn( NULL ),
mMinusBtn( NULL ),
- mSlider( NULL ),
- mSavedSliderVal(0.f)
+ mSlider( NULL )
{
mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this));
mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this));
@@ -101,16 +99,13 @@ BOOL LLPanelCameraZoom::postBuild()
mPlusBtn = getChild <LLButton> ("zoom_plus_btn");
mMinusBtn = getChild <LLButton> ("zoom_minus_btn");
mSlider = getChild <LLSlider> ("zoom_slider");
- mSlider->setMinValue(.0f);
- mSlider->setMaxValue(8.f);
return LLPanel::postBuild();
}
-void LLPanelCameraZoom::onOpen(const LLSD& key)
+void LLPanelCameraZoom::draw()
{
- LLVector3d to_focus = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()) - gAgent.calcFocusPositionTargetGlobal();
- mSavedSliderVal = 8.f - (F32)to_focus.magVec(); // maximum minus current
- mSlider->setValue( mSavedSliderVal );
+ mSlider->setValue(gAgent.getCameraZoomFraction());
+ LLPanel::draw();
}
void LLPanelCameraZoom::onZoomPlusHeldDown()
@@ -135,13 +130,8 @@ void LLPanelCameraZoom::onZoomMinusHeldDown()
void LLPanelCameraZoom::onSliderValueChanged()
{
- F32 val = mSlider->getValueF32();
- F32 rate = val - mSavedSliderVal;
-
- gAgent.unlockView();
- gAgent.cameraOrbitIn(rate);
-
- mSavedSliderVal = val;
+ F32 zoom_level = mSlider->getValueF32();
+ gAgent.setCameraZoomFraction(zoom_level);
}
void activate_camera_tool()
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index c2b0bd18fa..5294f09e64 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -414,17 +414,17 @@ LLPanelRegionTools::LLPanelRegionTools()
BOOL LLPanelRegionTools::postBuild()
{
getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this);
- childSetPrevalidate("region name", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
- childSetPrevalidate("estate", &LLLineEditor::prevalidatePositiveS32);
- childSetPrevalidate("parentestate", &LLLineEditor::prevalidatePositiveS32);
+ childSetPrevalidate("region name", &LLTextValidate::validateASCIIPrintableNoPipe);
+ childSetPrevalidate("estate", &LLTextValidate::validatePositiveS32);
+ childSetPrevalidate("parentestate", &LLTextValidate::validatePositiveS32);
childDisable("parentestate");
- childSetPrevalidate("gridposx", &LLLineEditor::prevalidatePositiveS32);
+ childSetPrevalidate("gridposx", &LLTextValidate::validatePositiveS32);
childDisable("gridposx");
- childSetPrevalidate("gridposy", &LLLineEditor::prevalidatePositiveS32);
+ childSetPrevalidate("gridposy", &LLTextValidate::validatePositiveS32);
childDisable("gridposy");
- childSetPrevalidate("redirectx", &LLLineEditor::prevalidatePositiveS32);
- childSetPrevalidate("redirecty", &LLLineEditor::prevalidatePositiveS32);
+ childSetPrevalidate("redirectx", &LLTextValidate::validatePositiveS32);
+ childSetPrevalidate("redirecty", &LLTextValidate::validatePositiveS32);
return TRUE;
}
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 8cd63deebe..26c6db9652 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -353,7 +353,7 @@ BOOL LLPanelLandGeneral::postBuild()
{
mEditName = getChild<LLLineEditor>("Name");
mEditName->setCommitCallback(onCommitAny, this);
- childSetPrevalidate("Name", LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("Name", LLTextValidate::validateASCIIPrintableNoPipe);
mEditDesc = getChild<LLTextEditor>("Description");
mEditDesc->setCommitOnFocusLost(TRUE);
@@ -1111,7 +1111,7 @@ BOOL LLPanelLandObjects::postBuild()
mCleanOtherObjectsTime->setFocusLostCallback(boost::bind(onLostFocus, _1, this));
mCleanOtherObjectsTime->setCommitCallback(onCommitClean, this);
- childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32);
+ childSetPrevalidate("clean other time", LLTextValidate::validateNonNegativeS32);
mBtnRefresh = getChild<LLButton>("Refresh List");
mBtnRefresh->setClickedCallback(onClickRefresh, this);
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index 810761e034..159ce41b79 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -111,7 +111,7 @@ BOOL LLFloaterNameDesc::postBuild()
if (NameEditor)
{
NameEditor->setMaxTextLength(DB_INV_ITEM_NAME_STR_LEN);
- NameEditor->setPrevalidate(&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ NameEditor->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
}
y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f);
@@ -123,7 +123,7 @@ BOOL LLFloaterNameDesc::postBuild()
if (DescEditor)
{
DescEditor->setMaxTextLength(DB_INV_ITEM_DESC_STR_LEN);
- DescEditor->setPrevalidate(&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ DescEditor->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
}
y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f);
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index 00959322e5..51364594e4 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -204,7 +204,7 @@ BOOL LLFloaterPay::postBuild()
getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this);
childSetText("amount", last_amount);
- childSetPrevalidate("amount", LLLineEditor::prevalidateNonNegativeS32);
+ childSetPrevalidate("amount", LLTextValidate::validateNonNegativeS32);
info = new LLGiveMoneyInfo(this, 0);
mCallbackData.push_back(info);
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index ff9002787c..bde86a4034 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -130,9 +130,9 @@ BOOL LLFloaterProperties::postBuild()
{
// build the UI
// item name & description
- childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("LabelItemName",&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitName,this));
- childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("LabelItemDesc",&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLFloaterProperties:: onCommitDescription, this));
// Creator information
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this));
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index e2b0c4b66f..9895665026 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -163,7 +163,7 @@ BOOL LLFloaterSellLandUI::postBuild()
{
childSetCommitCallback("sell_to", onChangeValue, this);
childSetCommitCallback("price", onChangeValue, this);
- childSetPrevalidate("price", LLLineEditor::prevalidateNonNegativeS32);
+ childSetPrevalidate("price", LLTextValidate::validateNonNegativeS32);
childSetCommitCallback("sell_objects", onChangeValue, this);
childSetAction("sell_to_select_agent", boost::bind( &LLFloaterSellLandUI::doSelectAgent, this));
childSetAction("cancel_btn", doCancel, this);
@@ -268,7 +268,7 @@ void LLFloaterSellLandUI::refreshUI()
std::string price_str = childGetValue("price").asString();
bool valid_price = false;
- valid_price = (price_str != "") && LLLineEditor::prevalidateNonNegativeS32(utf8str_to_wstring(price_str));
+ valid_price = (price_str != "") && LLTextValidate::validateNonNegativeS32(utf8str_to_wstring(price_str));
if (valid_price && mParcelActualArea > 0)
{
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 5c65b2c293..57c7ba8e27 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -225,7 +225,7 @@ LLFolderView::LLFolderView(const Params& p)
params.font(getLabelFontForStyle(LLFontGL::NORMAL));
params.max_length_bytes(DB_INV_ITEM_NAME_STR_LEN);
params.commit_callback.function(boost::bind(&LLFolderView::commitRename, this, _2));
- params.prevalidate_callback(&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ params.prevalidate_callback(&LLTextValidate::validateASCIIPrintableNoPipe);
params.commit_on_focus_lost(true);
params.visible(false);
mRenamer = LLUICtrlFactory::create<LLLineEditor> (params);
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 1eac90371d..34ab541a8e 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -515,8 +515,11 @@ BOOL LLIMFloater::getVisible()
if(isChatMultiTab())
{
LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance();
+
+ // Treat inactive floater as invisible.
+ bool is_active = im_container->getActiveFloater() == this;
// getVisible() returns TRUE when Tabbed IM window is minimized.
- return !im_container->isMinimized() && im_container->getVisible();
+ return is_active && !im_container->isMinimized() && im_container->getVisible();
}
else
{
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 22eb9a51d2..ba034609e9 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -37,6 +37,7 @@
#include "llfloaterreg.h"
#include "llimview.h"
#include "llavatariconctrl.h"
+#include "llgroupiconctrl.h"
#include "llagent.h"
//
@@ -90,43 +91,34 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
LLUUID session_id = floaterp->getKey();
+ LLIconCtrl* icon = 0;
+
if(gAgent.isInGroup(session_id))
{
+ LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>();
+ icon_params.group_id = session_id;
+ icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params);
+
mSessions[session_id] = floaterp;
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(session_id);
- LLGroupMgr* gm = LLGroupMgr::getInstance();
- gm->addObserver(session_id, this);
floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id));
-
- if (group_data && group_data->mInsigniaID.notNull())
- {
- mTabContainer->setTabImage(get_ptr_in_map(mSessions, session_id), group_data->mInsigniaID);
- }
- else
- {
- mTabContainer->setTabImage(floaterp, "Generic_Group");
- gm->sendGroupPropertiesRequest(session_id);
- }
}
else
{
LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id);
- LLAvatarPropertiesProcessor& app = LLAvatarPropertiesProcessor::instance();
- app.addObserver(avatar_id, this);
- floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id));
- mSessions[avatar_id] = floaterp;
- LLUUID* icon_id_ptr = LLAvatarIconIDCache::getInstance()->get(avatar_id);
- if(icon_id_ptr && icon_id_ptr->notNull())
- {
- mTabContainer->setTabImage(floaterp, *icon_id_ptr);
- }
- else
- {
- mTabContainer->setTabImage(floaterp, "Generic_Person");
- app.sendAvatarPropertiesRequest(avatar_id);
- }
+ LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>();
+ icon_params.avatar_id = avatar_id;
+ icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params);
+
+ mSessions[avatar_id] = floaterp;
+ floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id));
}
+ mTabContainer->setTabImage(floaterp, icon);
+}
+
+void LLIMFloaterContainer::onCloseFloater(LLUUID& id)
+{
+ mSessions.erase(id);
}
void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type)
@@ -159,13 +151,6 @@ void LLIMFloaterContainer::changed(const LLUUID& group_id, LLGroupChange gc)
}
}
-void LLIMFloaterContainer::onCloseFloater(LLUUID id)
-{
- LLAvatarPropertiesProcessor::instance().removeObserver(id, this);
- LLGroupMgr::instance().removeObserver(id, this);
-
-}
-
void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data)
{
LLUUID session_id = data["from_id"].asUUID();
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index bc06f0cbd3..b07ef2d71d 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -51,6 +51,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
+ void onCloseFloater(LLUUID& id);
/*virtual*/ void addFloater(LLFloater* floaterp,
BOOL select_added_floater,
@@ -69,7 +70,6 @@ private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions;
- void onCloseFloater(LLUUID avatar_id);
void onNewMessageReceived(const LLSD& data);
};
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 0c64c2b032..b6032f4dfa 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1610,6 +1610,13 @@ void LLOutgoingCallDialog::show(const LLSD& key)
}
childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name);
childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString());
+
+ // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice,
+ // so no reconnection to nearby chat happens (EXT-4397)
+ bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking();
+ std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string();
+ childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby);
+ childSetTextArg("nearby_P2P", "[RECONNECT_NEARBY]", reconnect_nearby);
}
std::string callee_name = mPayload["session_name"].asString();
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 19fbd7ade1..c024304f26 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -470,7 +470,9 @@ void hide_context_entries(LLMenuGL& menu,
{
const LLView::child_list_t *list = menu.getChildList();
- BOOL is_previous_entry_separator = FALSE;
+ // For removing double separators or leading separator. Start at true so that
+ // if the first element is a separator, it will not be shown.
+ BOOL is_previous_entry_separator = TRUE;
LLView::child_list_t::const_iterator itor;
for (itor = list->begin(); itor != list->end(); ++itor)
@@ -582,8 +584,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
}
}
- items.push_back(std::string("Paste"));
- if (!isClipboardPasteable() || (flags & FIRST_SELECTED_ITEM) == 0)
+ // Don't allow items to be pasted directly into the COF.
+ if (!isCOFFolder())
+ {
+ items.push_back(std::string("Paste"));
+ }
+ if (!isClipboardPasteable() || ((flags & FIRST_SELECTED_ITEM) == 0))
{
disabled_items.push_back(std::string("Paste"));
}
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 1b7ad6ab7e..ff713d74ad 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -176,7 +176,9 @@ private:
static LLDefaultChildRegistry::Register<LLLocationInputCtrl> r("location_input");
LLLocationInputCtrl::Params::Params()
-: add_landmark_image_enabled("add_landmark_image_enabled"),
+: icon_maturity_general("icon_maturity_general"),
+ icon_maturity_adult("icon_maturity_adult"),
+ add_landmark_image_enabled("add_landmark_image_enabled"),
add_landmark_image_disabled("add_landmark_image_disabled"),
add_landmark_image_hover("add_landmark_image_hover"),
add_landmark_image_selected("add_landmark_image_selected"),
@@ -185,6 +187,7 @@ LLLocationInputCtrl::Params::Params()
add_landmark_button("add_landmark_button"),
for_sale_button("for_sale_button"),
info_button("info_button"),
+ maturity_icon("maturity_icon"),
voice_icon("voice_icon"),
fly_icon("fly_icon"),
push_icon("push_icon"),
@@ -204,7 +207,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mForSaleBtn(NULL),
mInfoBtn(NULL),
mLandmarkImageOn(NULL),
- mLandmarkImageOff(NULL)
+ mLandmarkImageOff(NULL),
+ mIconMaturityGeneral(NULL),
+ mIconMaturityAdult(NULL)
{
// Lets replace default LLLineEditor with LLLocationLineEditor
// to make needed escaping while copying and cutting url
@@ -264,7 +269,20 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mAddLandmarkBtn = LLUICtrlFactory::create<LLButton>(al_params);
enableAddLandmarkButton(true);
addChild(mAddLandmarkBtn);
-
+
+ if (p.icon_maturity_general())
+ {
+ mIconMaturityGeneral = p.icon_maturity_general;
+ }
+ if (p.icon_maturity_adult())
+ {
+ mIconMaturityAdult = p.icon_maturity_adult;
+ }
+
+ LLIconCtrl::Params maturity_icon = p.maturity_icon;
+ mMaturityIcon = LLUICtrlFactory::create<LLIconCtrl>(maturity_icon);
+ addChild(mMaturityIcon);
+
LLButton::Params for_sale_button = p.for_sale_button;
for_sale_button.tool_tip = LLTrans::getString("LocationCtrlForSaleTooltip");
for_sale_button.click_callback.function(
@@ -522,6 +540,25 @@ void LLLocationInputCtrl::draw()
LLComboBox::draw();
}
+void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLComboBox::reshape(width, height, called_from_parent);
+
+ // Setting cursor to 0 to show the left edge of the text. See EXT-4967.
+ mTextEntry->setCursor(0);
+ if (mTextEntry->hasSelection())
+ {
+ // Deselecting because selection position is changed together with
+ // cursor position change.
+ mTextEntry->deselect();
+ }
+
+ if (isHumanReadableLocationVisible)
+ {
+ positionMaturityIcon();
+ }
+}
+
void LLLocationInputCtrl::onInfoButtonClicked()
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
@@ -672,6 +709,34 @@ void LLLocationInputCtrl::refreshLocation()
// store human-readable location to compare it in changeLocationPresentation()
mHumanReadableLocation = location_name;
setText(location_name);
+ isHumanReadableLocationVisible = true;
+
+ // Updating maturity rating icon.
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region)
+ return;
+
+ U8 sim_access = region->getSimAccess();
+ switch(sim_access)
+ {
+ case SIM_ACCESS_PG:
+ mMaturityIcon->setValue(mIconMaturityGeneral->getName());
+ mMaturityIcon->setVisible(TRUE);
+ break;
+
+ case SIM_ACCESS_ADULT:
+ mMaturityIcon->setValue(mIconMaturityAdult->getName());
+ mMaturityIcon->setVisible(TRUE);
+ break;
+
+ default:
+ mMaturityIcon->setVisible(FALSE);
+ }
+
+ if (mMaturityIcon->getVisible())
+ {
+ positionMaturityIcon();
+ }
}
// returns new right edge
@@ -692,7 +757,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
{
// Our "cursor" moving right to left
S32 x = mAddLandmarkBtn->getRect().mLeft;
-
+
static LLUICachedControl<bool> show_properties("NavBarShowParcelProperties", false);
if (show_properties)
{
@@ -762,7 +827,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
}
mDamageText->setVisible(false);
}
-
+
S32 left_pad, right_pad;
mTextEntry->getTextPadding(&left_pad, &right_pad);
right_pad = mTextEntry->getRect().mRight - x;
@@ -785,6 +850,25 @@ void LLLocationInputCtrl::refreshHealth()
}
}
+void LLLocationInputCtrl::positionMaturityIcon()
+{
+ const LLFontGL* font = mTextEntry->getFont();
+ if (!font)
+ return;
+
+ S32 left_pad, right_pad;
+ mTextEntry->getTextPadding(&left_pad, &right_pad);
+
+ // Calculate the right edge of rendered text + a whitespace.
+ left_pad = left_pad + font->getWidth(mTextEntry->getText()) + font->getWidth(" ");
+
+ LLRect rect = mMaturityIcon->getRect();
+ mMaturityIcon->setRect(rect.setOriginAndSize(left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));
+
+ // Hide icon if it text area is not width enough to display it, show otherwise.
+ mMaturityIcon->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad);
+}
+
void LLLocationInputCtrl::rebuildLocationHistory(std::string filter)
{
LLLocationHistory::location_list_t filtered_items;
@@ -885,16 +969,23 @@ void LLLocationInputCtrl::updateWidgetlayout()
void LLLocationInputCtrl::changeLocationPresentation()
{
- //change location presentation only if user does not select/past anything and
- //human-readable region name is being displayed
+ if (!mTextEntry)
+ return;
+
+ //change location presentation only if user does not select/paste anything and
+ //human-readable region name is being displayed
std::string text = mTextEntry->getText();
LLStringUtil::trim(text);
- if(mTextEntry && !mTextEntry->hasSelection() && text == mHumanReadableLocation )
+ if(!mTextEntry->hasSelection() && text == mHumanReadableLocation)
{
//needs unescaped one
mTextEntry->setText(LLAgentUI::buildSLURL(false));
mTextEntry->selectAll();
- }
+
+ mMaturityIcon->setVisible(FALSE);
+
+ isHumanReadableLocationVisible = false;
+ }
}
void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index a830b33f6f..caa62daa1b 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -63,7 +63,9 @@ public:
struct Params
: public LLInitParam::Block<Params, LLComboBox::Params>
{
- Optional<LLUIImage*> add_landmark_image_enabled,
+ Optional<LLUIImage*> icon_maturity_general,
+ icon_maturity_adult,
+ add_landmark_image_enabled,
add_landmark_image_disabled,
add_landmark_image_hover,
add_landmark_image_selected;
@@ -72,7 +74,8 @@ public:
Optional<LLButton::Params> add_landmark_button,
for_sale_button,
info_button;
- Optional<LLIconCtrl::Params> voice_icon,
+ Optional<LLIconCtrl::Params> maturity_icon,
+ voice_icon,
fly_icon,
push_icon,
build_icon,
@@ -89,6 +92,7 @@ public:
/*virtual*/ void onFocusReceived();
/*virtual*/ void onFocusLost();
/*virtual*/ void draw();
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
//========================================================================
// LLUICtrl interface
@@ -131,6 +135,7 @@ private:
void refreshParcelIcons();
// Refresh the value in the health percentage text field
void refreshHealth();
+ void positionMaturityIcon();
void rebuildLocationHistory(std::string filter = "");
bool findTeleportItemsByTitle(const LLTeleportHistoryItem& item, const std::string& filter);
@@ -160,7 +165,8 @@ private:
LLButton* mInfoBtn;
S32 mIconHPad; // pad between all icons
S32 mAddLandmarkHPad; // pad to left of landmark star
-
+
+ LLIconCtrl* mMaturityIcon;
LLIconCtrl* mParcelIcon[ICON_COUNT];
LLTextBox* mDamageText;
@@ -172,11 +178,14 @@ private:
boost::signals2::connection mLocationHistoryConnection;
LLUIImage* mLandmarkImageOn;
LLUIImage* mLandmarkImageOff;
+ LLUIImage* mIconMaturityGeneral;
+ LLUIImage* mIconMaturityAdult;
std::string mAddLandmarkTooltip;
std::string mEditLandmarkTooltip;
// this field holds a human-readable form of the location string, it is needed to be able to compare copy-pated value and real location
std::string mHumanReadableLocation;
+ bool isHumanReadableLocationVisible;
};
#endif
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index be48770567..29e3c66684 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -345,8 +345,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
// tmp_chat.mFromName = tmp_chat.mFromID.asString();
}
nearby_chat->addMessage(chat_msg, true, args);
- if(nearby_chat->getVisible())
- return;//no need in toast if chat is visible
+ if( nearby_chat->getVisible()
+ || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
+ && gSavedSettings.getBOOL("UseChatBubbles") ) )
+ return;//no need in toast if chat is visible or if bubble chat is enabled
// Handle irc styled messages for toast panel
if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 388fdeea7a..9857e37bc3 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -249,6 +249,11 @@ void LLOutputMonitorCtrl::draw()
void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)
{
+ if (speaker_id.isNull() && mSpeakerId.notNull())
+ {
+ LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
+ }
+
if (speaker_id.isNull() || speaker_id == mSpeakerId) return;
if (mSpeakerId.notNull())
@@ -256,6 +261,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)
// Unregister previous registration to avoid crash. EXT-4782.
LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
}
+
mSpeakerId = speaker_id;
LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this);
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 4a7cdfc856..d7c558d188 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -196,10 +196,9 @@ void LLPanelAvatarNotes::fillRightsData()
childSetValue("map_check",LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
childSetValue("objects_check",LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
- childSetEnabled("status_check",TRUE);
- childSetEnabled("map_check",TRUE);
- childSetEnabled("objects_check",TRUE);
}
+
+ enableCheckboxes(NULL != relation);
}
void LLPanelAvatarNotes::onCommitNotes()
@@ -250,6 +249,17 @@ void LLPanelAvatarNotes::confirmModifyRights(bool grant, S32 rights)
void LLPanelAvatarNotes::onCommitRights()
{
+ const LLRelationship* buddy_relationship =
+ LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
+
+ if (NULL == buddy_relationship)
+ {
+ // Lets have a warning log message instead of having a crash. EXT-4947.
+ llwarns << "Trying to modify rights for non-friend avatar. Skipped." << llendl;
+ return;
+ }
+
+
S32 rights = 0;
if(childGetValue("status_check").asBoolean())
@@ -259,8 +269,6 @@ void LLPanelAvatarNotes::onCommitRights()
if(childGetValue("objects_check").asBoolean())
rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
- const LLRelationship* buddy_relationship =
- LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
bool allow_modify_objects = childGetValue("objects_check").asBoolean();
// if modify objects checkbox clicked
@@ -304,9 +312,7 @@ void LLPanelAvatarNotes::resetControls()
//Disable "Add Friend" button for friends.
childSetEnabled("add_friend", TRUE);
- childSetEnabled("status_check",FALSE);
- childSetEnabled("map_check",FALSE);
- childSetEnabled("objects_check",FALSE);
+ enableCheckboxes(false);
}
void LLPanelAvatarNotes::onAddFriendButtonClick()
@@ -334,6 +340,13 @@ void LLPanelAvatarNotes::onShareButtonClick()
//*TODO not implemented.
}
+void LLPanelAvatarNotes::enableCheckboxes(bool enable)
+{
+ childSetEnabled("status_check", enable);
+ childSetEnabled("map_check", enable);
+ childSetEnabled("objects_check", enable);
+}
+
LLPanelAvatarNotes::~LLPanelAvatarNotes()
{
if(getAvatarId().notNull())
@@ -348,6 +361,9 @@ LLPanelAvatarNotes::~LLPanelAvatarNotes()
void LLPanelAvatarNotes::changed(U32 mask)
{
childSetEnabled("teleport", LLAvatarTracker::instance().isBuddyOnline(getAvatarId()));
+
+ // update rights to avoid have checkboxes enabled when friendship is terminated. EXT-4947.
+ fillRightsData();
}
// virtual
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index 632590aa27..52b4255e34 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -259,8 +259,8 @@ private:
};
/**
-* Panel for displaying Avatar's notes and modifying friend's rights.
-*/
+ * Panel for displaying Avatar's notes and modifying friend's rights.
+ */
class LLPanelAvatarNotes
: public LLPanelProfileTab
, public LLFriendObserver
@@ -311,6 +311,7 @@ protected:
void onCallButtonClick();
void onTeleportButtonClick();
void onShareButtonClick();
+ void enableCheckboxes(bool enable);
};
#endif // LL_LLPANELAVATAR_H
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 1e46827c1a..8ca044f72b 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -242,7 +242,7 @@ BOOL LLPanelClassified::postBuild()
mNameEditor->setCommitOnFocusLost(TRUE);
mNameEditor->setFocusReceivedCallback(boost::bind(focusReceived, _1, this));
mNameEditor->setCommitCallback(onCommitAny, this);
- mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
+ mNameEditor->setPrevalidate( LLTextValidate::validateASCII );
mDescEditor = getChild<LLTextEditor>("desc_editor");
mDescEditor->setCommitOnFocusLost(TRUE);
@@ -1072,7 +1072,7 @@ BOOL LLFloaterPriceForListing::postBuild()
LLLineEditor* edit = getChild<LLLineEditor>("price_edit");
if (edit)
{
- edit->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
+ edit->setPrevalidate(LLTextValidate::validateNonNegativeS32);
std::string min_price = llformat("%d", MINIMUM_PRICE_FOR_LISTING);
edit->setText(min_price);
edit->selectAll();
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 51fc670d87..3b303eed0f 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -214,7 +214,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
}
mFounderName = panel_group->getChild<LLNameBox>("founder_name");
mGroupNameEditor = panel_group->getChild<LLLineEditor>("group_name_editor");
- mGroupNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
+ mGroupNameEditor->setPrevalidate( LLTextValidate::validateASCII );
}
// static
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index df9002facc..43f4024bac 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -213,8 +213,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
#if !USE_VIEWER_AUTH
- childSetPrevalidate("first_name_edit", LLLineEditor::prevalidateASCIIPrintableNoSpace);
- childSetPrevalidate("last_name_edit", LLLineEditor::prevalidateASCIIPrintableNoSpace);
+ childSetPrevalidate("first_name_edit", LLTextValidate::validateASCIIPrintableNoSpace);
+ childSetPrevalidate("last_name_edit", LLTextValidate::validateASCIIPrintableNoSpace);
childSetCommitCallback("password_edit", mungePassword, this);
getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this);
@@ -675,8 +675,7 @@ void LLPanelLogin::refreshLocation( bool force_visible )
{
// Don't show on first run after install
// Otherwise ShowStartLocation defaults to true.
- show_start = gSavedSettings.getBOOL("ShowStartLocation")
- && gSavedSettings.getBOOL("HadFirstSuccessfulLogin");
+ show_start = gSavedSettings.getBOOL("ShowStartLocation");
}
sInstance->childSetVisible("start_location_combo", show_start);
@@ -846,8 +845,7 @@ void LLPanelLogin::loadLoginPage()
{
oStr << "&auto_login=TRUE";
}
- if (gSavedSettings.getBOOL("ShowStartLocation")
- && gSavedSettings.getBOOL("HadFirstSuccessfulLogin"))
+ if (gSavedSettings.getBOOL("ShowStartLocation"))
{
oStr << "&show_start_location=TRUE";
}
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 8b8b1bed37..01b6e8ffad 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -142,9 +142,9 @@ LLPanelPermissions::LLPanelPermissions() :
BOOL LLPanelPermissions::postBuild()
{
childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this);
- childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("Object Name",LLTextValidate::validateASCIIPrintableNoPipe);
childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this);
- childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("Object Description",LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickGroup,this));
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 8edeebaeeb..6c6eb7c719 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -174,6 +174,15 @@ S32 LLPlacesInventoryPanel::notify(const LLSD& info)
// PUBLIC METHODS
//////////////////////////////////////////////////////////////////////////
+LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p)
+: LLFolderView(p)
+{
+ // we do not need auto select functionality in places landmarks, so override default behavior.
+ // this disables applying of the LLSelectFirstFilteredItem in LLFolderView::doIdle.
+ // Fixed issues: EXT-1631, EXT-4994.
+ mAutoSelectOverride = TRUE;
+}
+
BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// let children to change selection first
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index 86937e7c7f..04c6758eae 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -67,7 +67,7 @@ private:
class LLPlacesFolderView : public LLFolderView
{
public:
- LLPlacesFolderView(const LLFolderView::Params& p) : LLFolderView(p) {};
+ LLPlacesFolderView(const LLFolderView::Params& p);
/**
* Handles right mouse down
*
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 92bd4dc62b..0cc747f789 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -79,7 +79,7 @@ BOOL LLPreviewAnim::postBuild()
childSetAction("Anim audition btn",auditionAnim, this);
childSetCommitCallback("desc", LLPreview::onText, this);
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
}
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 53e351e66e..57a8ca3d12 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -472,7 +472,7 @@ BOOL LLPreviewGesture::postBuild()
edit = getChild<LLLineEditor>("wait_time_editor");
edit->setEnabled(FALSE);
edit->setVisible(FALSE);
- edit->setPrevalidate(LLLineEditor::prevalidateFloat);
+ edit->setPrevalidate(LLTextValidate::validateFloat);
// edit->setKeystrokeCallback(onKeystrokeCommit, this);
edit->setCommitOnFocusLost(TRUE);
edit->setCommitCallback(onCommitWaitTime, this);
@@ -504,10 +504,10 @@ BOOL LLPreviewGesture::postBuild()
if (item)
{
childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
childSetText("name", item->getName());
- childSetPrevalidate("name", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("name", &LLTextValidate::validateASCIIPrintableNoPipe);
}
return LLPreview::postBuild();
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index cc70360528..ee8e3f1db6 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -95,7 +95,7 @@ BOOL LLPreviewNotecard::postBuild()
childSetCommitCallback("desc", LLPreview::onText, this);
if (item)
childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
}
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 7bcbe334ff..a8feaf690d 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -955,7 +955,7 @@ BOOL LLPreviewLSL::postBuild()
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
}
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index d7fd252fb6..44b828854b 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -75,7 +75,7 @@ BOOL LLPreviewSound::postBuild()
button->setSoundFlags(LLView::SILENT);
childSetCommitCallback("desc", LLPreview::onText, this);
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
}
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index dfc67d0126..0ed6bea74f 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -126,7 +126,7 @@ BOOL LLPreviewTexture::postBuild()
{
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
}
}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 94fe95d215..44348ba429 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -109,9 +109,9 @@ BOOL LLSidepanelItemInfo::postBuild()
{
LLSidepanelInventorySubpanel::postBuild();
- childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("LabelItemName",&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
- childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("LabelItemDesc",&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
// Creator information
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickCreator,this));
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 0b8f66c5f3..0630981d7e 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -104,9 +104,9 @@ BOOL LLSidepanelTaskInfo::postBuild()
mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this);
- childSetPrevalidate("Object Name", LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("Object Name", LLTextValidate::validateASCIIPrintableNoPipe);
childSetCommitCallback("Object Description", LLSidepanelTaskInfo::onCommitDesc,this);
- childSetPrevalidate("Object Description", LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("Object Description", LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this));
childSetCommitCallback("checkbox share with group", &LLSidepanelTaskInfo::onCommitGroupShare,this);
childSetAction("button deed", &LLSidepanelTaskInfo::onClickDeedToGroup,this);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a402dfc3d1..7f002db364 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -773,6 +773,8 @@ bool idle_startup()
LLPanelLogin::giveFocus();
+ gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
+
LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input
}
else
@@ -798,6 +800,9 @@ bool idle_startup()
gLoginMenuBarView->setVisible( TRUE );
gLoginMenuBarView->setEnabled( TRUE );
+ // Hide the splash screen
+ LLSplashScreen::hide();
+
// Push our window frontmost
gViewerWindow->getWindow()->show();
display_startup();
@@ -1698,6 +1703,10 @@ bool idle_startup()
<< " kbps" << LL_ENDL;
gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f);
}
+
+ // Set the show start location to true, now that the user has logged
+ // on with this install.
+ gSavedSettings.setBOOL("ShowStartLocation", TRUE);
}
// We're successfully logged in.
@@ -2006,9 +2015,6 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_STARTED );
- // Mark that we have successfully logged in at least once
- gSavedSettings.setBOOL("HadFirstSuccessfulLogin", TRUE);
-
// Unmute audio if desired and setup volumes.
// Unmute audio if desired and setup volumes.
// This is a not-uncommon crash site, so surround it with
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 886f1d9ef5..d0afa9d9de 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4019,9 +4019,14 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const
{
LLVector3 position_agent;
LLQuaternion rot;
+ LLViewerObject* avatar_parent = NULL;
LLViewerObject* root_edit = (LLViewerObject*)getRootEdit();
- LLViewerObject* avatar_parent = (LLViewerObject*)root_edit->getParent();
- if (avatar_parent && avatar_parent->isAvatar() && root_edit->mDrawable.notNull())
+ if (root_edit)
+ {
+ avatar_parent = (LLViewerObject*)root_edit->getParent();
+ }
+
+ if (avatar_parent && avatar_parent->isAvatar() && root_edit && root_edit->mDrawable.notNull())
{
LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent();
position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 315b7c52cf..4a86e1ca41 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1726,7 +1726,11 @@ void LLViewerWindow::shutdownViews()
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
delete LLNavigationBar::getInstance();
-
+
+ // destroy menus after instantiating navbar above, as it needs
+ // access to gMenuHolder
+ cleanup_menus();
+
// Delete all child views.
delete mRootView;
mRootView = NULL;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a5815df20a..b5f0ec7176 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -565,7 +565,7 @@ public:
void updateMeshData();
protected:
void releaseMeshData();
- /*virtual*/ void restoreMeshData();
+ virtual void restoreMeshData();
private:
BOOL mDirtyMesh;
BOOL mMeshTexturesDirty;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index b1ea8a1bbb..13e28b246a 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -510,8 +510,12 @@ BOOL LLVOAvatarSelf::buildMenus()
LLVOAvatarSelf::~LLVOAvatarSelf()
{
- gAgent.setAvatarObject(NULL);
- gAgentWearables.setAvatarObject(NULL);
+ // gAgents pointer might have been set to a different Avatar Self, don't get rid of it if so.
+ if (gAgent.getAvatarObject() == this)
+ {
+ gAgent.setAvatarObject(NULL);
+ gAgentWearables.setAvatarObject(NULL);
+ }
delete mScreenp;
mScreenp = NULL;
}
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index a797d54749..2bd8420925 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -82,6 +82,8 @@
orientation="vertical"
tool_tip="Zoom camera toward focus"
top_pad="0"
+ min_val="0"
+ max_val="1"
width="18">
<commit_callback function="Slider.value_changed"/>
</slider_bar>
diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml
index be32e917e5..214fb6ce54 100644
--- a/indra/newview/skins/default/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_resize="true"
- height="480"
+ height="600"
layout="topleft"
min_height="150"
min_width="500"
@@ -11,7 +11,7 @@
save_rect="true"
single_instance="true"
title="HELP BROWSER"
- width="620">
+ width="650">
<floater.string
name="loading_text">
Loading...
@@ -20,20 +20,20 @@
name="done_text">
</floater.string>
<layout_stack
- bottom="480"
+ bottom="600"
follows="left|right|top|bottom"
layout="topleft"
left="5"
name="stack1"
top="20"
- width="610">
+ width="640">
<layout_panel
layout="topleft"
left_delta="0"
top_delta="0"
name="external_controls"
user_resize="false"
- width="590">
+ width="620">
<web_browser
bottom="-11"
follows="left|right|top|bottom"
@@ -41,8 +41,8 @@
left="0"
name="browser"
top="0"
- height="500"
- width="590" />
+ height="610"
+ width="620" />
<text
follows="bottom|left"
height="16"
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index bd25288a9e..978b40da77 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -19,8 +19,11 @@
left="1"
name="im_box_tab_container"
tab_position="bottom"
- tab_width="80"
+ tab_width="64"
+ tab_max_width = "134"
tab_height="16"
+ use_custom_icon_ctrl="true"
+ tab_icon_ctrl_pad="2"
top="0"
width="390" />
<icon
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 1903e7c714..5d35275e17 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -3,12 +3,10 @@
legacy_header_height="18"
can_minimize="true"
can_resize="true"
- center_horiz="true"
- center_vert="true"
follows="top|right"
height="218"
layout="topleft"
- min_height="60"
+ min_height="174"
min_width="174"
name="Map"
title="Mini Map"
@@ -16,6 +14,8 @@
save_rect="true"
save_visibility="true"
single_instance="true"
+ left="0"
+ top="0"
width="200">
<floater.string
name="mini_map_north">
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index eb772cc0bd..cc9afe4474 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -89,7 +89,7 @@ No Answer. Please try again later.
top="27"
width="315"
word_wrap="true">
- You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat.
+ You have been disconnected from [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY]
</text>
<text
font="SansSerifLarge"
@@ -100,7 +100,7 @@ No Answer. Please try again later.
top="27"
width="315"
word_wrap="true">
- [VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat.
+ [VOICE_CHANNEL_NAME] has ended the call. [RECONNECT_NEARBY]
</text>
<text
font="SansSerif"
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index 775e7d66f7..9ca18d455b 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -2,16 +2,16 @@
<floater
legacy_header_height="13"
can_resize="true"
- height="546"
+ height="600"
layout="topleft"
- min_height="546"
- min_width="670"
+ min_height="400"
+ min_width="450"
name="floater_search"
help_topic="floater_search"
save_rect="true"
single_instance="true"
title="FIND"
- width="670">
+ width="650">
<floater.string
name="loading_text">
Loading...
@@ -21,20 +21,20 @@
Done
</floater.string>
<layout_stack
- bottom="541"
+ bottom="595"
follows="left|right|top|bottom"
layout="topleft"
left="10"
name="stack1"
top="20"
- width="650">
+ width="630">
<layout_panel
layout="topleft"
left_delta="0"
top_delta="0"
name="browser_layout"
user_resize="false"
- width="650">
+ width="630">
<web_browser
bottom="-10"
follows="left|right|top|bottom"
@@ -42,8 +42,8 @@
left="0"
name="browser"
top="0"
- height="500"
- width="650" />
+ height="555"
+ width="630" />
<text
follows="bottom|left"
height="16"
diff --git a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
index dc8f00d5f3..b730f0e511 100644
--- a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
@@ -28,4 +28,17 @@
width="200">
This contains long text and should scroll horizontally to the right
</text_editor>
+ <text_editor
+ height="50"
+ follows="top|left|bottom"
+ font="SansSerif"
+ left="10"
+ name="numeric_text_editor"
+ tool_tip="text editor for numeric text entry only"
+ top_pad="10"
+ text_type="int"
+ width="200">
+ This is text that is NOT a number, so shouldn't appear
+ </text_editor>
+
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index e1df50bf58..34d4b19410 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -4,7 +4,7 @@
can_resize="true"
center_horiz="true"
center_vert="true"
- height="535"
+ height="600"
layout="topleft"
min_height="520"
min_width="520"
@@ -14,16 +14,16 @@
save_visibility="true"
single_instance="true"
title="WORLD MAP"
- width="800">
+ width="650">
<panel
filename="panel_world_map.xml"
follows="all"
- height="500"
+ height="555"
layout="topleft"
left="10"
name="objects_mapview"
top="25"
- width="542" />
+ width="375" />
<panel
name="layout_panel_1"
height="22"
@@ -394,7 +394,7 @@
<panel
follows="right|top|bottom"
- height="270"
+ height="310"
top_pad="0"
width="238">
<icon
@@ -514,7 +514,7 @@
draw_stripes="false"
bg_writeable_color="MouseGray"
follows="all"
- height="115"
+ height="145"
layout="topleft"
left="28"
name="search_results"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cc71f53bd7..72ac457882 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -407,7 +407,7 @@ Do you wish to proceed?
icon="alertmodal.tga"
name="JoinGroupNoCost"
type="alertmodal">
-You are Joining group [NAME].
+You are joining group [NAME].
Do you wish to proceed?
<usetemplate
name="okcancelbuttons"
@@ -3851,7 +3851,7 @@ Are you sure you want to quit?
<notification
icon="alertmodal.tga"
name="HelpReportAbuseEmailLL"
- type="alertmodal">
+ type="alert">
Use this tool to report violations of the [http://secondlife.com/corporate/tos.php Terms of Service] and [http://secondlife.com/corporate/cs.php Community Standards].
All reported abuses are investigated and resolved.
@@ -4763,7 +4763,7 @@ The objects on the selected parcel that are NOT owned by you have been returned
name="ServerObjectMessage"
type="notify">
Message from [NAME]:
-[MSG]
+&lt;nolink&gt;[MSG]&lt;/nolink&gt;
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml
index 89d632c4c6..51e2256a7d 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_header.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml
@@ -19,7 +19,7 @@
name="avatar_icon"
top="3"
width="18" />
- <text_editor
+ <text
allow_scroll="false"
v_pad = "7"
read_only = "true"
diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
index 12ecde1e1e..1375eb87d9 100644
--- a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
@@ -64,7 +64,7 @@
layout="topleft"
left="103"
name="description"
- textbox.mouse_opaque="false"
+ textbox.show_context_menu="false"
top_pad="0"
width="178"
word_wrap="true" />
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index b2ed51abf3..d484564e0d 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -44,6 +44,7 @@
direction="down"
height="23"
image_overlay="Arrow_Left_Off"
+ image_bottom_pad="1"
layout="topleft"
left="10"
name="back_btn"
@@ -55,6 +56,7 @@
direction="down"
height="23"
image_overlay="Arrow_Right_Off"
+ image_bottom_pad="1"
layout="topleft"
left_pad="0"
name="forward_btn"
diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
index 5a6636c435..8b25fb5d2a 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
@@ -64,7 +64,7 @@
layout="topleft"
left="103"
name="picture_descr"
- textbox.mouse_opaque="false"
+ textbox.show_context_menu="false"
top_pad="0"
width="178"
word_wrap="true" />
diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml
index 26568c2a28..c06e67a4bb 100644
--- a/indra/newview/skins/default/xui/en/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_general.xml
@@ -134,6 +134,7 @@
top="200"
width="80" />
<spinner
+ decimal_digits="0"
follows="left|top"
height="20"
increment="1"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index d6db451286..a5dc14c69d 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -251,6 +251,7 @@
<string name="connected">Connected</string>
<string name="unavailable">Voice not available at your current location</string>
<string name="hang_up">Disconnected from in-world Voice Chat</string>
+ <string name="reconnect_nearby">You will now be reconnected to Nearby Voice Chat</string>
<string name="ScriptQuestionCautionChatGranted">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS].</string>
<string name="ScriptQuestionCautionChatDenied">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS].</string>
<string name="ScriptTakeMoney">Take Linden dollars (L$) from you</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/inspector.xml b/indra/newview/skins/default/xui/en/widgets/inspector.xml
index 8ec206023e..23f32253b6 100644
--- a/indra/newview/skins/default/xui/en/widgets/inspector.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inspector.xml
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<!-- See also settings.xml UIFloater* settings for configuration -->
<inspector name="inspector"
- bg_opaque_color="DkGray_66"
- background_visible="true"
- bg_opaque_image="none"
- background_opaque="true"
- bg_alpha_image="none"
- text_color="InspectorTipTextColor"
- />
+ bg_opaque_color="DkGray_66"
+ background_visible="true"
+ bg_opaque_image="none"
+ background_opaque="true"
+ bg_alpha_image="none"
+ mouse_opaque="true"
+ text_color="InspectorTipTextColor"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 626135642b..1d61447e31 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -4,6 +4,8 @@
Currently that doesn't work because LLUIImage::getWidth/getHeight() return 1 for the images.
-->
<location_input font="SansSerifSmall"
+ icon_maturity_general="Parcel_PG_Light"
+ icon_maturity_adult="Parcel_R_Light"
add_landmark_image_enabled="Favorite_Star_Active"
add_landmark_image_disabled="Favorite_Star_Off"
add_landmark_image_hover="Favorite_Star_Over"
@@ -41,6 +43,13 @@
scale_image="false"
top="19"
left="-3" />
+ <maturity_icon
+ name="maturity_icon"
+ width="18"
+ height="16"
+ top="20"
+ follows="left|top"
+ />
<for_sale_button
name="for_sale_btn"
image_unselected="Parcel_ForSale_Light"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 597c4e83b6..4a163fc1e3 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -5,6 +5,7 @@ label_pad_left - padding to the left of tab button labels
-->
<tab_container tab_min_width="60"
tab_max_width="150"
+ use_custom_icon_ctrl="false"
halign="center"
font="SansSerifSmall"
tab_height="21"
diff --git a/indra/newview/skins/default/xui/en/widgets/text_editor.xml b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
index 23ca8ea338..2ced8b1b4b 100644
--- a/indra/newview/skins/default/xui/en/widgets/text_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- Core parameters are in simple_text_editor.xml -->
<text_editor
- allow_html="false"/>
+ allow_html="false"
+ show_context_menu="true"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/tool_tip.xml b/indra/newview/skins/default/xui/en/widgets/tool_tip.xml
index a19201f7c3..9ca15ae50d 100644
--- a/indra/newview/skins/default/xui/en/widgets/tool_tip.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tool_tip.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<!-- See also settings.xml UIFloater* settings for configuration -->
<tool_tip name="tooltip"
max_width="200"
padding="4"
wrap="true"
font="SansSerif"
+ mouse_opaque="false"
bg_opaque_image="Tooltip"
background_opaque="true"
background_visible="true"
- text_color="ToolTipTextColor"
- />
+ text_color="ToolTipTextColor"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_buy_currency.xml b/indra/newview/skins/default/xui/ja/floater_buy_currency.xml
index ffdcf838d3..357b3682ba 100644
--- a/indra/newview/skins/default/xui/ja/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/ja/floater_buy_currency.xml
@@ -46,7 +46,7 @@
L$ [AMT]
</text>
<text name="currency_links">
- [http://www.secondlife.com/my/account/payment_method_management.php?lang=ja-JP payment method] | [http://www.secondlife.com/my/account/currency.php?lang=ja-JP currency] | [http://www.secondlife.com/my/account/exchange_rates.php?lang=ja-JP exchange rate]
+ [http://www.secondlife.com/my/account/payment_method_management.php?lang=ja-JP 支払方法] | [http://www.secondlife.com/my/account/currency.php?lang=ja-JP 通貨] | [http://www.secondlife.com/my/account/exchange_rates.php?lang=ja-JP 換算レート]
</text>
<text name="exchange_rate_note">
金額を再入力して最新換算レートを確認します。
diff --git a/install.xml b/install.xml
index 0c3c88ce72..a35bd4b790 100644
--- a/install.xml
+++ b/install.xml
@@ -1367,23 +1367,23 @@ anguage Infrstructure (CLI) international standard</string>
<key>darwin</key>
<map>
<key>md5sum</key>
- <string>51f3fa1ab39563505df83b48ba432a3c</string>
+ <string>316f86790b7afb5c9bd4f95bc193b80f</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.7852-darwin-20100115.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.7930-darwin-20100205.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
- <string>ab9573d6aa2acdd79a553c144c9ecb09</string>
+ <string>13f6886fa3e6675838e47adcabb0f0ac</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.7852-linux-20100115.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.7930-linux-20100205.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
- <string>88ab785eebdc4f53a7dfc4e0b95f67ec</string>
+ <string>2a81e3c42799c33742746925f16b54ca</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.7852-windows-20100115.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.7930-windows-20100205.tar.bz2</uri>
</map>
</map>
</map>