summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-10-30 08:12:41 +0800
committerangela <angela@lindenlab.com>2009-10-30 08:12:41 +0800
commit8c7f5e902625173aada5377c5972b72a684bedf0 (patch)
tree188d9445f4e610b2a6e05b6af667ab47d38e65a2 /indra
parentc3b2f98012a32c0f241b814a27113e756961778c (diff)
parent5c4ec60c966bd1857fb195f73d2d09117b783f9a (diff)
branch merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llcharacter/llvisualparam.cpp10
-rw-r--r--indra/llcharacter/llvisualparam.h6
-rw-r--r--indra/llui/llbutton.h4
-rw-r--r--indra/llui/lldraghandle.cpp9
-rw-r--r--indra/llui/llfloater.cpp194
-rw-r--r--indra/llui/llfloater.h8
-rw-r--r--indra/llui/llmenugl.cpp3
-rw-r--r--indra/llui/llmultifloater.cpp9
-rw-r--r--indra/llui/llpanel.cpp45
-rw-r--r--indra/llui/llpanel.h30
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp7
-rw-r--r--indra/newview/app_settings/settings.xml21
-rw-r--r--indra/newview/llagentwearables.cpp11
-rw-r--r--indra/newview/llagentwearables.h2
-rw-r--r--indra/newview/llavatarlist.cpp75
-rw-r--r--indra/newview/llavatarlist.h8
-rw-r--r--indra/newview/llavatarlistitem.cpp50
-rw-r--r--indra/newview/llavatarlistitem.h6
-rw-r--r--indra/newview/llchathistory.cpp38
-rw-r--r--indra/newview/llchiclet.cpp3
-rw-r--r--indra/newview/lldriverparam.cpp1
-rw-r--r--indra/newview/llfloatercamera.cpp4
-rw-r--r--indra/newview/llfloaterchat.cpp13
-rw-r--r--indra/newview/llfloaterchat.h2
-rw-r--r--indra/newview/llfloatercolorpicker.cpp6
-rw-r--r--indra/newview/llfloatergroupinvite.cpp5
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp3
-rw-r--r--indra/newview/llfloateruipreview.cpp3
-rw-r--r--indra/newview/llimfloater.cpp50
-rw-r--r--indra/newview/llimfloater.h2
-rw-r--r--indra/newview/llimpanel.cpp42
-rw-r--r--indra/newview/llimpanel.h1
-rw-r--r--indra/newview/llimview.cpp63
-rw-r--r--indra/newview/llimview.h6
-rw-r--r--indra/newview/llinventorybridge.cpp264
-rw-r--r--indra/newview/lllogchat.cpp60
-rw-r--r--indra/newview/lllogchat.h11
-rw-r--r--indra/newview/llmoveview.cpp8
-rw-r--r--indra/newview/llmutelist.cpp1
-rw-r--r--indra/newview/llnavigationbar.cpp11
-rw-r--r--indra/newview/llnavigationbar.h5
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp56
-rw-r--r--indra/newview/llscreenchannel.cpp1
-rw-r--r--indra/newview/lltexlayerparams.cpp17
-rw-r--r--indra/newview/lltexlayerparams.h1
-rw-r--r--indra/newview/lltexturectrl.cpp2
-rw-r--r--indra/newview/lltoastimpanel.cpp1
-rw-r--r--indra/newview/llviewercontrol.cpp25
-rw-r--r--indra/newview/llviewercontrol.h3
-rw-r--r--indra/newview/llviewermedia.cpp31
-rw-r--r--indra/newview/llviewermedia.h5
-rw-r--r--indra/newview/llviewermessage.cpp1
-rw-r--r--indra/newview/llviewertexteditor.cpp56
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/llvoavatar.cpp47
-rw-r--r--indra/newview/llvoavatar.h5
-rw-r--r--indra/newview/llvoavatarself.cpp40
-rw-r--r--indra/newview/llvoavatarself.h2
-rw-r--r--indra/newview/llwearable.cpp31
-rw-r--r--indra/newview/llwearable.h1
-rw-r--r--indra/newview/skins/default/textures/map_avatar_8.tgabin300 -> 300 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml160
-rw-r--r--indra/newview/skins/default/textures/windows/Inspector_Background.pngbin400 -> 348 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Toast_Background.pngbin0 -> 349 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_Background.pngbin950 -> 509 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_Foreground.pngbin959 -> 508 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_NoTitle_Background.pngbin0 -> 289 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.pngbin0 -> 290 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_hardware_settings.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/inspect_avatar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/inspect_group.xml2
-rw-r--r--indra/newview/skins/default/xui/en/inspect_object.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_object_icon.xml27
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_avatar_list_item.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_instant_message.xml43
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification.xml59
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml105
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml45
-rw-r--r--indra/newview/skins/default/xui/en/widgets/floater.xml7
-rw-r--r--indra/newview/skins/default/xui/en/widgets/panel.xml6
83 files changed, 1187 insertions, 732 deletions
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp
index 9e4957342c..6232c7588b 100644
--- a/indra/llcharacter/llvisualparam.cpp
+++ b/indra/llcharacter/llvisualparam.cpp
@@ -173,7 +173,8 @@ LLVisualParam::LLVisualParam()
mTargetWeight( 0.f ),
mIsAnimating( FALSE ),
mID( -1 ),
- mInfo( 0 )
+ mInfo( 0 ),
+ mIsDummy(FALSE)
{
}
@@ -251,6 +252,13 @@ void LLVisualParam::setWeight(F32 weight, BOOL set_by_user)
//-----------------------------------------------------------------------------
void LLVisualParam::setAnimationTarget(F32 target_value, BOOL set_by_user)
{
+ // don't animate dummy parameters
+ if (mIsDummy)
+ {
+ setWeight(target_value, set_by_user);
+ return;
+ }
+
if (mInfo)
{
if (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 0b516b9374..affc49debf 100644
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -148,15 +148,19 @@ public:
LLVisualParam* getNextParam() { return mNext; }
void setNextParam( LLVisualParam *next );
- virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating; }
+ virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; }
BOOL getAnimating() const { return mIsAnimating; }
+ void setIsDummy(BOOL is_self) { mIsDummy = is_self; }
+
protected:
F32 mCurWeight; // current weight
F32 mLastWeight; // last weight
LLVisualParam* mNext; // next param in a shared chain
F32 mTargetWeight; // interpolation target
BOOL mIsAnimating; // this value has been given an interpolation target
+ BOOL mIsDummy; // this is used to prevent dummy visual params from animating
+
S32 mID; // id for storing weight/morphtarget compares compactly
LLVisualParamInfo *mInfo;
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 839b196466..85580a98bf 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -242,8 +242,8 @@ public:
void setForcePressedState(BOOL b) { mForcePressedState = b; }
protected:
- const LLPointer<LLUIImage>& getImageUnselected() const { return mImageUnselected; }
- const LLPointer<LLUIImage>& getImageSelected() const { return mImageSelected; }
+ LLPointer<LLUIImage> getImageUnselected() const { return mImageUnselected; }
+ LLPointer<LLUIImage> getImageSelected() const { return mImageSelected; }
LLFrameTimer mMouseDownTimer;
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 8eccd709ce..d9b98b1c28 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -49,9 +49,9 @@
#include "lluictrlfactory.h"
const S32 LEADING_PAD = 5;
-const S32 TITLE_PAD = 8;
+const S32 TITLE_HPAD = 8;
const S32 BORDER_PAD = 1;
-const S32 LEFT_PAD = BORDER_PAD + TITLE_PAD + LEADING_PAD;
+const S32 LEFT_PAD = BORDER_PAD + TITLE_HPAD + LEADING_PAD;
const S32 RIGHT_PAD = BORDER_PAD + 32; // HACK: space for close btn and minimize btn
S32 LLDragHandle::sSnapMargin = 5;
@@ -240,19 +240,20 @@ void LLDragHandleLeft::draw()
void LLDragHandleTop::reshapeTitleBox()
{
+ static LLUICachedControl<S32> title_vpad("UIFloaterTitleVPad", 0);
if( ! mTitleBox)
{
return;
}
const LLFontGL* font = LLFontGL::getFontSansSerif();
- S32 title_width = font->getWidth( mTitleBox->getText() ) + TITLE_PAD;
+ S32 title_width = font->getWidth( mTitleBox->getText() ) + TITLE_HPAD;
if (getMaxTitleWidth() > 0)
title_width = llmin(title_width, getMaxTitleWidth());
S32 title_height = llround(font->getLineHeight());
LLRect title_rect;
title_rect.setLeftTopAndSize(
LEFT_PAD,
- getRect().getHeight() - BORDER_PAD,
+ getRect().getHeight() - title_vpad,
getRect().getWidth() - LEFT_PAD - RIGHT_PAD,
title_height);
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 021e2e94ac..c8e26ecaea 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -191,9 +191,11 @@ LLFloater::Params::Params()
can_tear_off("can_tear_off", true),
save_rect("save_rect", false),
save_visibility("save_visibility", false),
+ can_dock("can_dock", false),
+ header_height("header_height", 0),
+ legacy_header_height("legacy_header_height", 0),
open_callback("open_callback"),
- close_callback("close_callback"),
- can_dock("can_dock", false)
+ close_callback("close_callback")
{
visible = false;
}
@@ -219,7 +221,7 @@ void LLFloater::initClass()
static LLWidgetNameRegistry::StaticRegistrar sRegisterFloaterParams(&typeid(LLFloater::Params), "floater");
LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
-: LLPanel(),
+: LLPanel(), // intentionally do not pass params here, see initFromParams
mDragHandle(NULL),
mTitle(p.title),
mShortTitle(p.short_title),
@@ -233,6 +235,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mResizable(p.can_resize),
mMinWidth(p.min_width),
mMinHeight(p.min_height),
+ mHeaderHeight(p.header_height),
+ mLegacyHeaderHeight(p.legacy_header_height),
mMinimized(FALSE),
mForeground(FALSE),
mFirstLook(TRUE),
@@ -274,16 +278,16 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
// chrome floaters don't take focus at all
setFocusRoot(!getIsChrome());
+ addDragHandle();
+ addResizeCtrls();
+ enableResizeCtrls(mResizable);
+
initFloater();
}
// Note: Floaters constructed from XML call init() twice!
void LLFloater::initFloater()
{
- addDragHandle();
-
- addResizeCtrls();
-
// Close button.
if (mCanClose)
{
@@ -323,9 +327,6 @@ void LLFloater::initFloater()
void LLFloater::addDragHandle()
{
- static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
- S32 close_box_size = mCanClose ? floater_close_box_size : 0;
-
if (!mDragHandle)
{
if (mDragOnLeft)
@@ -346,6 +347,14 @@ void LLFloater::addDragHandle()
}
addChild(mDragHandle);
}
+ layoutDragHandle();
+}
+
+void LLFloater::layoutDragHandle()
+{
+ static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
+ S32 close_box_size = mCanClose ? floater_close_box_size : 0;
+
LLRect rect;
if (mDragOnLeft)
{
@@ -361,40 +370,17 @@ void LLFloater::addDragHandle()
}
void LLFloater::addResizeCtrls()
-{
- for (S32 i = 0; i < 4; i++)
- {
- if (mResizeBar[i])
- {
- removeChild(mResizeBar[i]);
- delete mResizeBar[i];
- mResizeBar[i] = NULL;
- }
- if (mResizeHandle[i])
- {
- removeChild(mResizeHandle[i]);
- delete mResizeHandle[i];
- mResizeHandle[i] = NULL;
- }
- }
- if( !mResizable )
- {
- return;
- }
-
+{
// Resize bars (sides)
- const S32 RESIZE_BAR_THICKNESS = 3;
LLResizeBar::Params p;
p.name("resizebar_left");
p.resizing_view(this);
- p.rect(LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0));
p.min_size(mMinWidth);
p.side(LLResizeBar::LEFT);
mResizeBar[LLResizeBar::LEFT] = LLUICtrlFactory::create<LLResizeBar>(p);
addChild( mResizeBar[LLResizeBar::LEFT] );
p.name("resizebar_top");
- p.rect(LLRect( 0, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_BAR_THICKNESS));
p.min_size(mMinHeight);
p.side(LLResizeBar::TOP);
@@ -402,15 +388,12 @@ void LLFloater::addResizeCtrls()
addChild( mResizeBar[LLResizeBar::TOP] );
p.name("resizebar_right");
- p.rect(LLRect(getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0));
p.min_size(mMinWidth);
- p.side(LLResizeBar::RIGHT);
-
+ p.side(LLResizeBar::RIGHT);
mResizeBar[LLResizeBar::RIGHT] = LLUICtrlFactory::create<LLResizeBar>(p);
addChild( mResizeBar[LLResizeBar::RIGHT] );
p.name("resizebar_bottom");
- p.rect(LLRect(0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0));
p.min_size(mMinHeight);
p.side(LLResizeBar::BOTTOM);
mResizeBar[LLResizeBar::BOTTOM] = LLUICtrlFactory::create<LLResizeBar>(p);
@@ -421,27 +404,69 @@ void LLFloater::addResizeCtrls()
// handles must not be mouse-opaque, otherwise they block hover events
// to other buttons like the close box. JC
handle_p.mouse_opaque(false);
- handle_p.rect(LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT, getRect().getWidth(), 0));
handle_p.min_width(mMinWidth);
handle_p.min_height(mMinHeight);
handle_p.corner(LLResizeHandle::RIGHT_BOTTOM);
mResizeHandle[0] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
addChild(mResizeHandle[0]);
- handle_p.rect(LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_HANDLE_HEIGHT));
handle_p.corner(LLResizeHandle::RIGHT_TOP);
mResizeHandle[1] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
addChild(mResizeHandle[1]);
- handle_p.rect(LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 ));
handle_p.corner(LLResizeHandle::LEFT_BOTTOM);
mResizeHandle[2] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
addChild(mResizeHandle[2]);
- handle_p.rect(LLRect( 0, getRect().getHeight(), RESIZE_HANDLE_WIDTH, getRect().getHeight() - RESIZE_HANDLE_HEIGHT ));
handle_p.corner(LLResizeHandle::LEFT_TOP);
mResizeHandle[3] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
addChild(mResizeHandle[3]);
+
+ layoutResizeCtrls();
+}
+
+void LLFloater::layoutResizeCtrls()
+{
+ LLRect rect;
+
+ // Resize bars (sides)
+ const S32 RESIZE_BAR_THICKNESS = 3;
+ rect = LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0);
+ mResizeBar[LLResizeBar::LEFT]->setRect(rect);
+
+ rect = LLRect( 0, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_BAR_THICKNESS);
+ mResizeBar[LLResizeBar::TOP]->setRect(rect);
+
+ rect = LLRect(getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0);
+ mResizeBar[LLResizeBar::RIGHT]->setRect(rect);
+
+ rect = LLRect(0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0);
+ mResizeBar[LLResizeBar::BOTTOM]->setRect(rect);
+
+ // Resize handles (corners)
+ rect = LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT, getRect().getWidth(), 0);
+ mResizeHandle[0]->setRect(rect);
+
+ rect = LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_HANDLE_HEIGHT);
+ mResizeHandle[1]->setRect(rect);
+
+ rect = LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 );
+ mResizeHandle[2]->setRect(rect);
+
+ rect = LLRect( 0, getRect().getHeight(), RESIZE_HANDLE_WIDTH, getRect().getHeight() - RESIZE_HANDLE_HEIGHT );
+ mResizeHandle[3]->setRect(rect);
+}
+
+void LLFloater::enableResizeCtrls(bool enable)
+{
+ for (S32 i = 0; i < 4; ++i)
+ {
+ mResizeBar[i]->setVisible(enable);
+ mResizeBar[i]->setEnabled(enable);
+
+ mResizeHandle[i]->setVisible(enable);
+ mResizeHandle[i]->setEnabled(enable);
+ }
}
// virtual
@@ -909,7 +934,8 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
void LLFloater::setMinimized(BOOL minimize)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
static LLUICachedControl<S32> minimized_width ("UIMinimizedWidth", 0);
if (minimize == mMinimized) return;
@@ -1082,7 +1108,8 @@ void LLFloater::setFocus( BOOL b )
void LLFloater::setRect(const LLRect &rect)
{
LLPanel::setRect(rect);
- addDragHandle(); // re-add drag handle, sized based on rect
+ layoutDragHandle();
+ layoutResizeCtrls();
}
// virtual
@@ -1389,9 +1416,9 @@ void LLFloater::onClickMinimize(LLFloater* self)
void LLFloater::onClickTearOff(LLFloater* self)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
if (!self)
return;
+ S32 floater_header_size = self->mHeaderHeight;
LLMultiFloater* host_floater = self->getHost();
if (host_floater) //Tear off
{
@@ -1548,26 +1575,42 @@ void LLFloater::draw()
shadow_color % alpha,
llround(shadow_offset));
- // No transparent windows in simple UI
+ LLUIImage* image = NULL;
+ LLColor4 color;
if (isBackgroundOpaque())
{
- gl_rect_2d( left, top, right, bottom, getBackgroundColor() % alpha );
+ // NOTE: image may not be set
+ image = getBackgroundImage();
+ color = getBackgroundColor();
}
else
{
- gl_rect_2d( left, top, right, bottom, getTransparentColor() % alpha );
+ image = getTransparentImage();
+ color = getTransparentColor();
}
- if(hasFocus()
- && !getIsChrome()
- && !getCurrentTitle().empty())
+ if (image)
{
- static LLUIColor titlebar_focus_color = LLUIColorTable::instance().getColor("TitleBarFocusColor");
+ // We're using images for this floater's backgrounds
+ image->draw(getLocalRect(), UI_VERTEX_COLOR % alpha);
+ }
+ else
+ {
+ // We're not using images, use old-school flat colors
+ gl_rect_2d( left, top, right, bottom, color % alpha );
+
// draw highlight on title bar to indicate focus. RDW
- const LLFontGL* font = LLFontGL::getFontSansSerif();
- LLRect r = getRect();
- gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - (S32)font->getLineHeight() - 1,
- titlebar_focus_color % alpha, 0, TRUE);
+ if(hasFocus()
+ && !getIsChrome()
+ && !getCurrentTitle().empty())
+ {
+ static LLUIColor titlebar_focus_color = LLUIColorTable::instance().getColor("TitleBarFocusColor");
+
+ const LLFontGL* font = LLFontGL::getFontSansSerif();
+ LLRect r = getRect();
+ gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - (S32)font->getLineHeight() - 1,
+ titlebar_focus_color % alpha, 0, TRUE);
+ }
}
}
@@ -1617,18 +1660,6 @@ void LLFloater::draw()
drawChild(focused_child);
}
- if( isBackgroundVisible() )
- {
- // add in a border to improve spacialized visual aclarity ;)
- // use lines instead of gl_rect_2d so we can round the edges as per james' recommendation
- static LLUIColor focus_border_color = LLUIColorTable::instance().getColor("FloaterFocusBorderColor");
- static LLUIColor unfocus_border_color = LLUIColorTable::instance().getColor("FloaterUnfocusBorderColor");
- LLUI::setLineWidth(1.5f);
- LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? focus_border_color : unfocus_border_color;
- gl_rect_2d_offset_local(0, getRect().getHeight() + 1, getRect().getWidth() + 1, 0, outlineColor % alpha, -LLPANEL_BORDER_WIDTH, FALSE);
- LLUI::setLineWidth(1.f);
- }
-
// update tearoff button for torn off floaters
// when last host goes away
if (mCanTearOff && !getHost())
@@ -1677,7 +1708,7 @@ void LLFloater::setCanTearOff(BOOL can_tear_off)
void LLFloater::setCanResize(BOOL can_resize)
{
mResizable = can_resize;
- addResizeCtrls();
+ enableResizeCtrls(can_resize);
}
void LLFloater::setCanDrag(BOOL can_drag)
@@ -2113,7 +2144,8 @@ void LLFloaterView::focusFrontFloater()
void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
static LLUICachedControl<S32> minimized_width ("UIMinimizedWidth", 0);
S32 col = 0;
LLRect snap_rect_local = getLocalSnapRect();
@@ -2528,6 +2560,9 @@ void LLFloater::setupParamsForExport(Params& p, LLView* parent)
void LLFloater::initFromParams(const LLFloater::Params& p)
{
+ // *NOTE: We have too many classes derived from LLPanel to retrofit them
+ // all to pass in params via constructors. So we use this method.
+
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
LLPanel::initFromParams(p);
@@ -2544,6 +2579,8 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mResizable = p.can_resize;
mMinWidth = p.min_width;
mMinHeight = p.min_height;
+ mHeaderHeight = p.header_height;
+ mLegacyHeaderHeight = p.legacy_header_height;
mSingleInstance = p.single_instance;
mAutoTile = p.auto_tile;
@@ -2599,6 +2636,23 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o
LLFloater::setFloaterHost(last_host);
}
+ // HACK: When we changed the header height to 25 pixels in Viewer 2, rather
+ // than re-layout all the floaters we use this value in pixels to make the
+ // whole floater bigger and change the top-left coordinate for widgets.
+ // The goal is to eventually set mLegacyHeaderHeight to zero, which would
+ // make the top-left corner for widget layout the same as the top-left
+ // corner of the window's content area. James
+ S32 header_stretch = (mHeaderHeight - mLegacyHeaderHeight);
+ if (header_stretch > 0)
+ {
+ // Stretch the floater vertically, don't move widgets
+ LLRect rect = getRect();
+ rect.mTop += header_stretch;
+
+ // This will also update drag handle, title bar, close box, etc.
+ setRect(rect);
+ }
+
BOOL result;
{
LLFastTimer ft(POST_BUILD);
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 2fdaecf59a..afdc4ccf00 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -125,6 +125,8 @@ public:
save_rect,
save_visibility,
can_dock;
+ Optional<S32> header_height,
+ legacy_header_height; // HACK see initFromXML()
Optional<CommitCallbackParam> open_callback,
close_callback;
@@ -209,6 +211,7 @@ public:
bool isDragOnLeft() const{ return mDragOnLeft; }
S32 getMinWidth() const{ return mMinWidth; }
S32 getMinHeight() const{ return mMinHeight; }
+ S32 getHeaderHeight() const { return mHeaderHeight; }
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
@@ -302,7 +305,10 @@ private:
void buildButtons();
BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButtons index);
void addResizeCtrls();
+ void layoutResizeCtrls();
+ void enableResizeCtrls(bool enable);
void addDragHandle();
+ void layoutDragHandle(); // repair layout
public:
// Called when floater is opened, passes mKey
@@ -340,6 +346,8 @@ private:
S32 mMinWidth;
S32 mMinHeight;
+ S32 mHeaderHeight; // height in pixels of header for title, drag bar
+ S32 mLegacyHeaderHeight;// HACK see initFloaterXML()
BOOL mMinimized;
BOOL mForeground;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index cf013efca0..6e058e4c62 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3435,7 +3435,7 @@ void LLMenuHolderGL::setActivatedItem(LLMenuItemGL* item)
LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) :
LLFloater(LLSD())
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ S32 floater_header_size = getHeaderHeight();
setName(menup->getName());
setTitle(menup->getLabel());
@@ -3479,7 +3479,6 @@ LLTearOffMenu::~LLTearOffMenu()
void LLTearOffMenu::draw()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
mMenu->setBackgroundVisible(isBackgroundOpaque());
mMenu->needsArrange();
diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp
index e8ce1a8d97..7d21c7e0c1 100644
--- a/indra/llui/llmultifloater.cpp
+++ b/indra/llui/llmultifloater.cpp
@@ -54,7 +54,8 @@ LLMultiFloater::LLMultiFloater(const LLSD& key, const LLFloater::Params& params)
void LLMultiFloater::buildTabContainer()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
LLTabContainer::Params p;
p.name(std::string("Preview Tabs"));
@@ -131,7 +132,8 @@ BOOL LLMultiFloater::closeAllFloaters()
void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
{
static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0);
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size;
S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2);
S32 new_height = llmax(getRect().getHeight(), content_height + floater_header_size + tabcntr_header_height);
@@ -461,7 +463,8 @@ BOOL LLMultiFloater::postBuild()
void LLMultiFloater::updateResizeLimits()
{
static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0);
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size;
// initialize minimum size constraint to the original xml values.
S32 new_min_width = mOrigMinWidth;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 095200ddc3..0d340699c5 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -71,10 +71,12 @@ const LLPanel::Params& LLPanel::getDefaultParams()
LLPanel::Params::Params()
: has_border("border", false),
border(""),
- bg_opaque_color("bg_opaque_color"),
- bg_alpha_color("bg_alpha_color"),
background_visible("background_visible", false),
background_opaque("background_opaque", false),
+ bg_opaque_color("bg_opaque_color"),
+ bg_alpha_color("bg_alpha_color"),
+ bg_opaque_image("bg_opaque_image"),
+ bg_alpha_image("bg_alpha_image"),
min_width("min_width", 100),
min_height("min_height", 100),
strings("string"),
@@ -92,10 +94,12 @@ LLPanel::Params::Params()
LLPanel::LLPanel(const LLPanel::Params& p)
: LLUICtrl(p),
- mBgColorAlpha(p.bg_alpha_color()),
- mBgColorOpaque(p.bg_opaque_color()),
mBgVisible(p.background_visible),
mBgOpaque(p.background_opaque),
+ mBgOpaqueColor(p.bg_opaque_color()),
+ mBgAlphaColor(p.bg_alpha_color()),
+ mBgOpaqueImage(p.bg_opaque_image()),
+ mBgAlphaImage(p.bg_alpha_image()),
mDefaultBtn(NULL),
mBorder(NULL),
mLabel(p.label),
@@ -103,6 +107,8 @@ LLPanel::LLPanel(const LLPanel::Params& p)
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
mXMLFilename(p.filename)
+ // *NOTE: Be sure to also change LLPanel::initFromParams(). We have too
+ // many classes derived from LLPanel to retrofit them all to pass in params.
{
setIsChrome(FALSE);
@@ -178,19 +184,31 @@ void LLPanel::draw()
// draw background
if( mBgVisible )
{
- //RN: I don't see the point of this
- S32 left = 0;//LLPANEL_BORDER_WIDTH;
- S32 top = getRect().getHeight();// - LLPANEL_BORDER_WIDTH;
- S32 right = getRect().getWidth();// - LLPANEL_BORDER_WIDTH;
- S32 bottom = 0;//LLPANEL_BORDER_WIDTH;
-
+ LLRect local_rect = getLocalRect();
if (mBgOpaque )
{
- gl_rect_2d( left, top, right, bottom, mBgColorOpaque.get() % alpha);
+ // opaque, in-front look
+ if (mBgOpaqueImage.notNull())
+ {
+ mBgOpaqueImage->draw( local_rect, UI_VERTEX_COLOR % alpha );
+ }
+ else
+ {
+ // fallback to flat colors when there are no images
+ gl_rect_2d( local_rect, mBgOpaqueColor.get() % alpha);
+ }
}
else
{
- gl_rect_2d( left, top, right, bottom, mBgColorAlpha.get() % alpha);
+ // transparent, in-back look
+ if (mBgAlphaImage.notNull())
+ {
+ mBgAlphaImage->draw( local_rect, UI_VERTEX_COLOR % alpha );
+ }
+ else
+ {
+ gl_rect_2d( local_rect, mBgAlphaColor.get() % alpha );
+ }
}
}
@@ -443,7 +461,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
setBackgroundOpaque(p.background_opaque);
setBackgroundColor(p.bg_opaque_color().get());
setTransparentColor(p.bg_alpha_color().get());
-
+ mBgOpaqueImage = p.bg_opaque_image();
+ mBgAlphaImage = p.bg_alpha_image();
}
static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup");
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index e8db68ffbb..c213809d68 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -48,6 +48,7 @@ const BOOL BORDER_YES = TRUE;
const BOOL BORDER_NO = FALSE;
class LLButton;
+class LLUIImage;
/*
* General purpose concrete view base class.
@@ -72,12 +73,15 @@ public:
Optional<bool> has_border;
Optional<LLViewBorder::Params> border;
- Optional<LLUIColor> bg_opaque_color,
- bg_alpha_color;
-
Optional<bool> background_visible,
background_opaque;
+ Optional<LLUIColor> bg_opaque_color,
+ bg_alpha_color;
+ // opaque image is for "panel in foreground" look
+ Optional<LLUIImage*> bg_opaque_image,
+ bg_alpha_image;
+
Optional<S32> min_width,
min_height;
@@ -127,10 +131,12 @@ public:
BOOL hasBorder() const { return mBorder != NULL; }
void setBorderVisible( BOOL b );
- void setBackgroundColor( const LLColor4& color ) { mBgColorOpaque = color; }
- const LLColor4& getBackgroundColor() const { return mBgColorOpaque; }
- void setTransparentColor(const LLColor4& color) { mBgColorAlpha = color; }
- const LLColor4& getTransparentColor() const { return mBgColorAlpha; }
+ void setBackgroundColor( const LLColor4& color ) { mBgOpaqueColor = color; }
+ const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; }
+ void setTransparentColor(const LLColor4& color) { mBgAlphaColor = color; }
+ const LLColor4& getTransparentColor() const { return mBgAlphaColor; }
+ LLPointer<LLUIImage> getBackgroundImage() const { return mBgOpaqueImage; }
+ LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; }
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
BOOL isBackgroundVisible() const { return mBgVisible; }
void setBackgroundOpaque(BOOL b) { mBgOpaque = b; }
@@ -248,10 +254,12 @@ protected:
std::string mHelpTopic; // the name of this panel's help topic to display in the Help Viewer
private:
- LLUIColor mBgColorAlpha;
- LLUIColor mBgColorOpaque;
- BOOL mBgVisible;
- BOOL mBgOpaque;
+ BOOL mBgVisible; // any background at all?
+ BOOL mBgOpaque; // use opaque color or image
+ LLUIColor mBgOpaqueColor;
+ LLUIColor mBgAlphaColor;
+ LLPointer<LLUIImage> mBgOpaqueImage; // "panel in front" look
+ LLPointer<LLUIImage> mBgAlphaImage; // "panel in back" look
LLViewBorder* mBorder;
LLButton* mDefaultBtn;
LLUIString mLabel;
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 7c9e27a760..3ce8ff3deb 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -207,14 +207,13 @@ private:
// don't flip bitmap
LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
- // Set the background color to black
- LLQtWebKit::getInstance()->
// set background color to be black - mostly for initial login page
LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, 0x00, 0x00, 0x00 );
- // go to the "home page"
// Don't do this here -- it causes the dreaded "white flash" when loading a browser instance.
-// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
+ // FIXME: Re-added this because navigating to a "page" initializes things correctly - especially
+ // for the HTTP AUTH dialog issues (DEV-41731). Will fix at a later date.
+ LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
// set flag so we don't do this again
mBrowserInitialized = true;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6bc95b9cdb..f9d4a06de8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8812,13 +8812,13 @@
<key>UICloseBoxFromTop</key>
<map>
<key>Comment</key>
- <string>Size of UI floater close box from top</string>
+ <string>Distance from top of floater to top of close box icon, pixels</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>1</real>
+ <real>5</real>
</map>
<key>UIExtraTriangleHeight</key>
<map>
@@ -8853,17 +8853,6 @@
<key>Value</key>
<real>16</real>
</map>
- <key>UIFloaterHeaderSize</key>
- <map>
- <key>Comment</key>
- <string>Size of UI floater header size</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <real>18</real>
- </map>
<key>UIFloaterHPad</key>
<map>
<key>Comment</key>
@@ -8886,16 +8875,16 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>UIFloaterVPad</key>
+ <key>UIFloaterTitleVPad</key>
<map>
<key>Comment</key>
- <string>Size of UI floater vertical pad</string>
+ <string>Distance from top of floater to top of title string, pixels</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>6</real>
+ <real>7</real>
</map>
<key>UIImgDefaultEyesUUID</key>
<map>
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index b9a0b4293d..380469f5b3 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1985,6 +1985,17 @@ bool LLAgentWearables::canWearableBeRemoved(const LLWearable* wearable) const
return !(((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES))
&& (getWearableCount(type) <= 1) );
}
+void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL set_by_user)
+{
+ for( S32 type = 0; type < WT_COUNT; ++type )
+ {
+ for (S32 count = 0; count < (S32)getWearableCount((EWearableType)type); ++count)
+ {
+ LLWearable *wearable = getWearable((EWearableType)type,count);
+ wearable->animateParams(delta, set_by_user);
+ }
+ }
+}
void LLAgentWearables::updateServer()
{
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 667cb94552..97de785c87 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -79,6 +79,8 @@ public:
// Note: False for shape, skin, eyes, and hair, unless you have MORE than 1.
bool canWearableBeRemoved(const LLWearable* wearable) const;
+
+ void animateAllWearableParams(F32 delta, BOOL set_by_user);
//--------------------------------------------------------------------
// Accessors
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index e93d0dfa50..65a2b8b5e6 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -37,11 +37,15 @@
// newview
#include "llcallingcard.h" // for LLAvatarTracker
#include "llcachename.h"
+#include "llrecentpeople.h"
#include "llvoiceclient.h"
#include "llviewercontrol.h" // for gSavedSettings
static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list");
+// Last interaction time update period.
+static const F32 LIT_UPDATE_PERIOD = 5;
+
// Maximum number of avatars that can be added to a list in one pass.
// Used to limit time spent for avatar list update per frame.
static const unsigned ADD_LIMIT = 50;
@@ -74,19 +78,34 @@ static const LLFlatListView::ItemReverseComparator REVERSE_NAME_COMPARATOR(NAME_
LLAvatarList::Params::Params()
: ignore_online_status("ignore_online_status", false)
+, show_last_interaction_time("show_last_interaction_time", false)
{
}
LLAvatarList::LLAvatarList(const Params& p)
: LLFlatListView(p)
, mIgnoreOnlineStatus(p.ignore_online_status)
+, mShowLastInteractionTime(p.show_last_interaction_time)
, mContextMenu(NULL)
, mDirty(true) // to force initial update
+, mLITUpdateTimer(NULL)
{
setCommitOnSelectionChange(true);
// Set default sort order.
setComparator(&NAME_COMPARATOR);
+
+ if (mShowLastInteractionTime)
+ {
+ mLITUpdateTimer = new LLTimer();
+ mLITUpdateTimer->setTimerExpirySec(0); // zero to force initial update
+ mLITUpdateTimer->start();
+ }
+}
+
+LLAvatarList::~LLAvatarList()
+{
+ delete mLITUpdateTimer;
}
void LLAvatarList::setShowIcons(std::string param_name)
@@ -105,6 +124,12 @@ void LLAvatarList::draw()
if (mDirty)
refresh();
+
+ if (mShowLastInteractionTime && mLITUpdateTimer->hasExpired())
+ {
+ updateLastInteractionTimes();
+ mLITUpdateTimer->setTimerExpirySec(LIT_UPDATE_PERIOD); // restart the timer
+ }
}
void LLAvatarList::setNameFilter(const std::string& filter)
@@ -218,12 +243,12 @@ void LLAvatarList::refresh()
void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
LLAvatarListItem* item = new LLAvatarListItem();
- item->showStatus(false);
item->showInfoBtn(true);
item->showSpeakingIndicator(true);
item->setName(name);
item->setAvatarId(id, mIgnoreOnlineStatus);
item->setOnline(mIgnoreOnlineStatus ? true : is_online);
+ item->showLastInteractionTime(mShowLastInteractionTime);
item->setContextMenu(mContextMenu);
item->childSetVisible("info_btn", false);
@@ -279,6 +304,54 @@ void LLAvatarList::computeDifference(
vadded.erase(it, vadded.end());
}
+static std::string format_secs(S32 secs)
+{
+ // *TODO: reinventing the wheel?
+ // *TODO: i18n
+ static const int LL_AL_MIN = 60;
+ static const int LL_AL_HOUR = LL_AL_MIN * 60;
+ static const int LL_AL_DAY = LL_AL_HOUR * 24;
+ static const int LL_AL_WEEK = LL_AL_DAY * 7;
+ static const int LL_AL_MONTH = LL_AL_DAY * 31;
+ static const int LL_AL_YEAR = LL_AL_DAY * 365;
+
+ std::string s;
+
+ if (secs >= LL_AL_YEAR)
+ s = llformat("%dy", secs / LL_AL_YEAR);
+ else if (secs >= LL_AL_MONTH)
+ s = llformat("%dmon", secs / LL_AL_MONTH);
+ else if (secs >= LL_AL_WEEK)
+ s = llformat("%dw", secs / LL_AL_WEEK);
+ else if (secs >= LL_AL_DAY)
+ s = llformat("%dd", secs / LL_AL_DAY);
+ else if (secs >= LL_AL_HOUR)
+ s = llformat("%dh", secs / LL_AL_HOUR);
+ else if (secs >= LL_AL_MIN)
+ s = llformat("%dm", secs / LL_AL_MIN);
+ else
+ s = llformat("%ds", secs);
+
+ return s;
+}
+
+// Refresh shown time of our last interaction with all listed avatars.
+void LLAvatarList::updateLastInteractionTimes()
+{
+ S32 now = (S32) LLDate::now().secondsSinceEpoch();
+ std::vector<LLPanel*> items;
+ getItems(items);
+
+ for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
+ {
+ // *TODO: error handling
+ LLAvatarListItem* item = static_cast<LLAvatarListItem*>(*it);
+ S32 secs_since = now - (S32) LLRecentPeople::instance().getDate(item->getAvatarId()).secondsSinceEpoch();
+ if (secs_since >= 0)
+ item->setLastInteractionTime(format_secs(secs_since));
+ }
+}
+
bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const
{
const LLAvatarListItem* avatar_item1 = dynamic_cast<const LLAvatarListItem*>(item1);
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index f60f1f00f3..8f2f0249a6 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -37,6 +37,8 @@
#include "llavatarlistitem.h"
+class LLTimer;
+
/**
* Generic list of avatars.
*
@@ -56,11 +58,12 @@ public:
struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
{
Optional<bool> ignore_online_status; // show all items as online
+ Optional<bool> show_last_interaction_time; // show most recent interaction time. *HACK: move this to a derived class
Params();
};
LLAvatarList(const Params&);
- virtual ~LLAvatarList() {}
+ virtual ~LLAvatarList();
virtual void draw(); // from LLView
@@ -85,13 +88,16 @@ protected:
const std::vector<LLUUID>& vnew,
std::vector<LLUUID>& vadded,
std::vector<LLUUID>& vremoved);
+ void updateLastInteractionTimes();
private:
bool mIgnoreOnlineStatus;
+ bool mShowLastInteractionTime;
bool mDirty;
bool mShowIcons;
+ LLTimer* mLITUpdateTimer; // last interaction time update timer
std::string mIconParamName;
std::string mNameFilter;
uuid_vector_t mIDs;
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 4ecb9537ba..8464430501 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -48,7 +48,7 @@ LLAvatarListItem::LLAvatarListItem()
: LLPanel(),
mAvatarIcon(NULL),
mAvatarName(NULL),
- mStatus(NULL),
+ mLastInteractionTime(NULL),
mSpeakingIndicator(NULL),
mInfoBtn(NULL),
mProfileBtn(NULL),
@@ -74,8 +74,8 @@ BOOL LLAvatarListItem::postBuild()
{
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
mAvatarName = getChild<LLTextBox>("avatar_name");
- mStatus = getChild<LLTextBox>("avatar_status");
-
+ mLastInteractionTime = getChild<LLTextBox>("last_interaction");
+
mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
mInfoBtn = getChild<LLButton>("info_btn");
mProfileBtn = getChild<LLButton>("profile_btn");
@@ -97,12 +97,6 @@ BOOL LLAvatarListItem::postBuild()
rect.setLeftTopAndSize(mName->getRect().mLeft, mName->getRect().mTop, mName->getRect().getWidth() + 30, mName->getRect().getHeight());
mName->setRect(rect);
- if(mStatus)
- {
- rect.setLeftTopAndSize(mStatus->getRect().mLeft + 30, mStatus->getRect().mTop, mStatus->getRect().getWidth(), mStatus->getRect().getHeight());
- mStatus->setRect(rect);
- }
-
if(mLocator)
{
rect.setLeftTopAndSize(mLocator->getRect().mLeft + 30, mLocator->getRect().mTop, mLocator->getRect().getWidth(), mLocator->getRect().getHeight());
@@ -137,11 +131,6 @@ void LLAvatarListItem::onMouseLeave(S32 x, S32 y, MASK mask)
LLPanel::onMouseLeave(x, y, mask);
}
-void LLAvatarListItem::setStatus(const std::string& status)
-{
- mStatus->setValue(status);
-}
-
// virtual, called by LLAvatarTracker
void LLAvatarListItem::changed(U32 mask)
{
@@ -195,6 +184,24 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes)
gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3));
}
+void LLAvatarListItem::showLastInteractionTime(bool show)
+{
+ if (show)
+ return;
+
+ LLRect name_rect = mAvatarName->getRect();
+ LLRect time_rect = mLastInteractionTime->getRect();
+
+ mLastInteractionTime->setVisible(false);
+ name_rect.mRight += (time_rect.mRight - name_rect.mRight);
+ mAvatarName->setRect(name_rect);
+}
+
+void LLAvatarListItem::setLastInteractionTime(const std::string& val)
+{
+ mLastInteractionTime->setValue(val);
+}
+
void LLAvatarListItem::setAvatarIconVisible(bool visible)
{
// Already done? Then do nothing.
@@ -240,21 +247,6 @@ void LLAvatarListItem::onProfileBtnClick()
LLAvatarActions::showProfile(mAvatarId);
}
-void LLAvatarListItem::showStatus(bool show_status)
-{
- // *HACK: dirty hack until we can determine correct avatar status (EXT-1076).
-
- if (show_status)
- return;
-
- LLRect name_rect = mAvatarName->getRect();
- LLRect status_rect = mStatus->getRect();
-
- mStatus->setVisible(show_status);
- name_rect.mRight += (status_rect.mRight - name_rect.mRight);
- mAvatarName->setRect(name_rect);
-}
-
void LLAvatarListItem::setValue( const LLSD& value )
{
if (!value.isMap()) return;;
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index a8d3919217..10c0b17005 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -60,10 +60,10 @@ public:
virtual void setValue(const LLSD& value);
virtual void changed(U32 mask); // from LLFriendObserver
- void setStatus(const std::string& status);
void setOnline(bool online);
void setName(const std::string& name);
void setAvatarId(const LLUUID& id, bool ignore_status_changes = false);
+ void setLastInteractionTime(const std::string& val);
void setAvatarIconVisible(bool visible);
const LLUUID& getAvatarId() const;
@@ -74,7 +74,7 @@ public:
void showSpeakingIndicator(bool show) { mSpeakingIndicator->setVisible(show); }
void showInfoBtn(bool show_info_btn) {mInfoBtn->setVisible(show_info_btn); }
- void showStatus(bool show_status);
+ void showLastInteractionTime(bool show);
void setContextMenu(ContextMenu* menu) { mContextMenu = menu; }
@@ -90,7 +90,7 @@ private:
LLAvatarIconCtrl* mAvatarIcon;
LLTextBox* mAvatarName;
- LLTextBox* mStatus;
+ LLTextBox* mLastInteractionTime;
LLOutputMonitorCtrl* mSpeakingIndicator;
LLButton* mInfoBtn;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index aaca568320..e561507e69 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -43,6 +43,8 @@
#include "llagentdata.h"
#include "llavataractions.h"
#include "lltrans.h"
+#include "llfloaterreg.h"
+#include "llmutelist.h"
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
static const std::string MESSAGE_USERNAME_DATE_SEPARATOR(" ----- ");
@@ -77,6 +79,19 @@ public:
return LLPanel::handleMouseUp(x,y,mask);
}
+ void onObjectIconContextMenuItemClicked(const LLSD& userdata)
+ {
+ std::string level = userdata.asString();
+
+ if (level == "profile")
+ {
+ }
+ else if (level == "block")
+ {
+ LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT));
+ }
+ }
+
void onAvatarIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@@ -109,11 +124,17 @@ public:
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
+ registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-
mPopupMenuHandleAvatar = menu->getHandle();
+ menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mPopupMenuHandleObject = menu->getHandle();
+
+ LLPanel* visible_panel = getChild<LLPanel>("im_header");
+ visible_panel->setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
+
return LLPanel::postBuild();
}
@@ -145,6 +166,12 @@ public:
return LLPanel::handleRightMouseDown(x,y,mask);
}
+
+ void onHeaderPanelClick(S32 x, S32 y, MASK mask)
+ {
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID));
+ }
+
const LLUUID& getAvatarId () const { return mAvatarID;}
const std::string& getFirstName() const { return mFirstName; }
const std::string& getLastName () const { return mLastName; }
@@ -163,7 +190,10 @@ public:
LLTextBox* userName = getChild<LLTextBox>("user_name");
if(!chat.mFromName.empty())
+ {
userName->setValue(chat.mFromName);
+ mFrom = chat.mFromName;
+ }
else
{
std::string SL = LLTrans::getString("SECOND_LIFE");
@@ -206,8 +236,12 @@ protected:
void showSystemContextMenu(S32 x,S32 y)
{
}
+
void showObjectContextMenu(S32 x,S32 y)
{
+ LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleObject.get();
+ if(menu)
+ LLMenuGL::showPopup(this, menu, x, y);
}
void showAvatarContextMenu(S32 x,S32 y)
@@ -238,11 +272,13 @@ protected:
protected:
LLHandle<LLView> mPopupMenuHandleAvatar;
+ LLHandle<LLView> mPopupMenuHandleObject;
LLUUID mAvatarID;
EChatSourceType mSourceType;
std::string mFirstName;
std::string mLastName;
+ std::string mFrom;
};
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 61a60a24be..670f8717a2 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -37,7 +37,6 @@
#include "llbottomtray.h"
#include "llgroupactions.h"
#include "lliconctrl.h"
-#include "llimpanel.h" // LLFloaterIMPanel
#include "llimfloater.h"
#include "llimview.h"
#include "llfloaterreg.h"
@@ -1398,7 +1397,7 @@ void LLTalkButton::onClick_ShowBtn()
LLAvatarListItem* item = new LLAvatarListItem();
- item->showStatus(true);
+ item->showLastInteractionTime(false);
item->showInfoBtn(true);
item->showSpeakingIndicator(true);
item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE);
diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp
index 45f4b4fbd0..527656ab6b 100644
--- a/indra/newview/lldriverparam.cpp
+++ b/indra/newview/lldriverparam.cpp
@@ -224,6 +224,7 @@ void LLDriverParam::setAvatar(LLVOAvatar *avatarp)
}
}
*new_param = *this;
+ new_param->setIsDummy(FALSE);
return new_param;
}
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index dca0773139..d1317f7c36 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -268,8 +268,8 @@ void LLFloaterCamera::updateState()
LLRect controls_rect;
if (childGetRect(CONTROLS, controls_rect))
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
- static S32 height = controls_rect.getHeight() - floater_header_size;
+ S32 floater_header_size = getHeaderHeight();
+ S32 height = controls_rect.getHeight() - floater_header_size;
S32 newHeight = rect.getHeight();
if (showControls)
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 86abebe7ce..ed14079ae9 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -182,13 +182,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
void log_chat_text(const LLChat& chat)
{
- std::string histstr;
- if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
- histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText;
- else
- histstr = chat.mText;
-
- LLLogChat::saveHistory(std::string("chat"),histstr);
+ LLLogChat::saveHistory(std::string("chat"), chat.mFromName, chat.mFromID, chat.mText);
}
// static
void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
@@ -476,7 +470,7 @@ void LLFloaterChat::loadHistory()
}
//static
-void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string line, void* userdata)
+void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , const LLSD& line, void* userdata)
{
switch (type)
{
@@ -485,9 +479,10 @@ void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string l
// *TODO: nice message from XML file here
break;
case LLLogChat::LOG_LINE:
+ case LLLogChat::LOG_LLSD:
{
LLChat chat;
- chat.mText = line;
+ chat.mText = line["message"].asString();
get_text_color(chat);
addChatHistory(chat, FALSE);
}
diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h
index 6ba3165d6a..aed82a6781 100644
--- a/indra/newview/llfloaterchat.h
+++ b/indra/newview/llfloaterchat.h
@@ -78,7 +78,7 @@ public:
static void onClickMute(void *data);
static void onClickToggleShowMute(LLUICtrl* caller, void *data);
static void onClickToggleActiveSpeakers(void* userdata);
- static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata);
+ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& line, void* userdata);
static void loadHistory();
static void* createSpeakersPanel(void* data);
static void* createChatPanel(void* data);
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 8e385fca78..73b79d8e13 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -561,7 +561,7 @@ void LLFloaterColorPicker::draw()
// create rgb area outline
gl_rect_2d ( mRGBViewerImageLeft,
mRGBViewerImageTop - mRGBViewerImageHeight,
- mRGBViewerImageLeft + mRGBViewerImageWidth,
+ mRGBViewerImageLeft + mRGBViewerImageWidth + 1,
mRGBViewerImageTop,
LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ),
FALSE );
@@ -591,7 +591,7 @@ void LLFloaterColorPicker::draw()
// draw luminance slider outline
gl_rect_2d ( mLumRegionLeft,
mLumRegionTop - mLumRegionHeight,
- mLumRegionLeft + mLumRegionWidth,
+ mLumRegionLeft + mLumRegionWidth + 1,
mLumRegionTop,
LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ),
FALSE );
@@ -607,7 +607,7 @@ void LLFloaterColorPicker::draw()
// draw selected color swatch outline
gl_rect_2d ( mSwatchRegionLeft,
mSwatchRegionTop - mSwatchRegionHeight,
- mSwatchRegionLeft + mSwatchRegionWidth,
+ mSwatchRegionLeft + mSwatchRegionWidth + 1,
mSwatchRegionTop,
LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ),
FALSE );
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index 3598479305..bf484c6343 100644
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -81,7 +81,7 @@ void LLFloaterGroupInvite::impl::closeFloater(void* data)
LLFloaterGroupInvite::LLFloaterGroupInvite(const LLUUID& group_id)
: LLFloater(group_id)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ S32 floater_header_size = getHeaderHeight();
LLRect contents;
mImpl = new impl(group_id);
@@ -114,7 +114,8 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
// static
void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = floater_params.header_height;
LLRect contents;
// Make sure group_id isn't null
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index f2dff55044..f20fca1258 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -221,7 +221,8 @@ void LLFloaterNotificationConsole::removeChannel(const std::string& name)
//static
void LLFloaterNotificationConsole::updateResizeLimits()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = floater_params.header_height;
LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels");
setResizeLimits(getMinWidth(), floater_header_size + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index ac743df4f1..2fe21f28de 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -865,7 +865,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
}
else // if it is a panel...
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = floater_params.header_height;
LLPanel::Params panel_params;
LLPanel* panel = LLUICtrlFactory::create<LLPanel>(panel_params); // create a new panel
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index b86795f696..f3fec70ac9 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -235,11 +235,6 @@ BOOL LLIMFloater::postBuild()
setTitle(LLIMModel::instance().getName(mSessionID));
setDocked(true);
-
- if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
- {
- LLLogChat::loadHistory(getTitle(), &chatFromLogFile, (void *)this);
- }
mTypingStart = LLTrans::getString("IM_typing_start_string");
@@ -453,9 +448,6 @@ void LLIMFloater::updateMessages()
{
std::list<LLSD> messages;
LLIMModel::instance().getMessages(mSessionID, messages, mLastMessageIndex+1);
- std::string agent_name;
-
- gCacheName->getFullName(gAgentID, agent_name);
if (messages.size())
{
@@ -464,20 +456,17 @@ void LLIMFloater::updateMessages()
std::ostringstream message;
std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
std::list<LLSD>::const_reverse_iterator iter_end = messages.rend();
- for (; iter != iter_end; ++iter)
+ for (; iter != iter_end; ++iter)
{
LLSD msg = *iter;
- std::string from = msg["from"].asString();
std::string time = msg["time"].asString();
LLUUID from_id = msg["from_id"].asUUID();
+ std::string from = from_id != gAgentID ? msg["from"].asString() : LLTrans::getString("You");
std::string message = msg["message"].asString();
LLStyle::Params style_params;
style_params.color(chat_color);
- if (from == agent_name)
- from = LLTrans::getString("You");
-
LLChat chat(message);
chat.mFromID = from_id;
chat.mFromName = from;
@@ -657,38 +646,3 @@ void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info)
}
}
-void LLIMFloater::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata)
-{
- if (!userdata) return;
-
- LLIMFloater* self = (LLIMFloater*) userdata;
- std::string message = line;
- S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions");
- switch (type)
- {
- case LLLogChat::LOG_EMPTY:
- // add warning log enabled message
- if (im_log_option!=LOG_CHAT)
- {
- message = LLTrans::getString("IM_logging_string");
- }
- break;
- case LLLogChat::LOG_END:
- // add log end message
- if (im_log_option!=LOG_CHAT)
- {
- message = LLTrans::getString("IM_logging_string");
- }
- break;
- case LLLogChat::LOG_LINE:
- // just add normal lines from file
- break;
- default:
- // nothing
- break;
- }
-
- self->mChatHistory->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor")));
- self->mChatHistory->blockUndo();
-}
-
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 3da27ac941..d2aac57ee2 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -106,8 +106,6 @@ private:
// gets a rect that bounds possible positions for the LLIMFloater on a screen (EXT-1111)
void getAllowedRect(LLRect& rect);
- static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);
-
// Add the "User is typing..." indicator.
void addTypingIndicator(const LLIMInfo* im_info);
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 77ee90f681..c4beb666ea 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -181,13 +181,6 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
// enable line history support for instant message bar
mInputEditor->setEnableLineHistory(TRUE);
- if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
- {
- LLLogChat::loadHistory(mSessionLabel,
- &chatFromLogFile,
- (void *)this);
- }
-
//*TODO we probably need the same "awaiting message" thing in LLIMFloater
LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionUUID);
if (!im_session)
@@ -977,41 +970,6 @@ void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info)
}
}
-//static
-void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
- std::string message = line;
- S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions");
- switch (type)
- {
- case LLLogChat::LOG_EMPTY:
- // add warning log enabled message
- if (im_log_option!=LOG_CHAT)
- {
- message = LLTrans::getString("IM_logging_string");
- }
- break;
- case LLLogChat::LOG_END:
- // add log end message
- if (im_log_option!=LOG_CHAT)
- {
- message = LLTrans::getString("IM_logging_string");
- }
- break;
- case LLLogChat::LOG_LINE:
- // just add normal lines from file
- break;
- default:
- // nothing
- break;
- }
-
- //self->addHistoryLine(line, LLColor4::grey, FALSE);
- self->mHistoryEditor->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor")));
- self->mHistoryEditor->blockUndo();
-}
-
//static
void LLFloaterIMPanel::onKickSpeaker(void* user_data)
{
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
index 39107d9a22..b8f99d45c9 100644
--- a/indra/newview/llimpanel.h
+++ b/indra/newview/llimpanel.h
@@ -127,7 +127,6 @@ public:
// Handle other participant in the session typing.
void processIMTyping(const LLIMInfo* im_info, BOOL typing);
- static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);
private:
// Called by UI methods.
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 8a55ab41b9..49fc9d8055 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -135,7 +135,6 @@ LLIMModel::LLIMModel()
addNewMsgCallback(toast_callback);
}
-
LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids)
: mSessionID(session_id),
mName(name),
@@ -179,6 +178,9 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID);
mOtherParticipantIsAvatar = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionID);
}
+
+ if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
+ LLLogChat::loadHistory(mName, &chatFromLogFile, (void *)this);
}
LLIMModel::LLIMSession::~LLIMSession()
@@ -220,6 +222,34 @@ void LLIMModel::LLIMSession::sessionInitReplyReceived(const LLUUID& new_session_
}
}
+void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time)
+{
+ LLSD message;
+ message["from"] = from;
+ message["from_id"] = from_id;
+ message["message"] = utf8_text;
+ message["time"] = time;
+ message["index"] = (LLSD::Integer)mMsgs.size();
+
+ mMsgs.push_front(message);
+}
+
+void LLIMModel::LLIMSession::chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata)
+{
+ if (!userdata) return;
+
+ LLIMSession* self = (LLIMSession*) userdata;
+
+ if (type == LLLogChat::LOG_LINE)
+ {
+ self->addMessage("", LLSD(), msg["message"].asString(), "");
+ }
+ else if (type == LLLogChat::LOG_LLSD)
+ {
+ self->addMessage(msg["from"].asString(), msg["from_id"].asUUID(), msg["message"].asString(), msg["time"].asString());
+ }
+}
+
LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const
{
return get_if_there(LLIMModel::instance().sSessionsMap, session_id,
@@ -348,39 +378,25 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
return false;
}
- LLSD message;
- message["from"] = from;
- message["from_id"] = from_id;
- message["message"] = utf8_text;
- message["time"] = LLLogChat::timestamp(false); //might want to add date separately
- message["index"] = (LLSD::Integer)session->mMsgs.size();
-
- session->mMsgs.push_front(message);
+ session->addMessage(from, from_id, utf8_text, LLLogChat::timestamp(false)); //might want to add date separately
return true;
-
}
//*TODO rewrite chat history persistence using LLSD serialization (IB)
-bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const std::string& utf8_text)
+bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)
{
S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions");
if (im_log_option != LOG_CHAT)
{
- std::string histstr;
- if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
- histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + from + IM_SEPARATOR + utf8_text;
- else
- histstr = from + IM_SEPARATOR + utf8_text;
-
if(im_log_option == LOG_BOTH_TOGETHER)
{
- LLLogChat::saveHistory(std::string("chat"), histstr);
+ LLLogChat::saveHistory(std::string("chat"), from, from_id, utf8_text);
return true;
}
else
{
- LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), histstr);
+ LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), from, from_id, utf8_text);
return true;
}
}
@@ -398,7 +414,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
}
addToHistory(session_id, from, from_id, utf8_text);
- if (log2file) logToFile(session_id, from, utf8_text);
+ if (log2file) logToFile(session_id, from, from_id, utf8_text);
session->mNumUnread++;
@@ -1360,14 +1376,9 @@ void LLIMMgr::addMessage(
fixed_session_name = session_name;
}
- bool new_session = !hasSession(session_id);
+ bool new_session = !hasSession(new_session_id);
if (new_session)
{
- // *NOTE dzaporozhan
- // Workaround for critical bug EXT-1918
-
- // *TODO
- // Investigate cases when session_id == NULL and find solution to handle those cases
LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id);
}
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index ae8fd355ea..d0bd594df1 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -40,6 +40,7 @@
#include "llinstantmessage.h"
#include "lluuid.h"
#include "llmultifloater.h"
+#include "lllogchat.h"
class LLFloaterChatterBox;
class LLUUID;
@@ -57,6 +58,8 @@ public:
virtual ~LLIMSession();
void sessionInitReplyReceived(const LLUUID& new_session_id);
+ void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time);
+ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata);
LLUUID mSessionID;
std::string mName;
@@ -193,8 +196,7 @@ private:
/**
* Save an IM message into a file
*/
- //*TODO should also save uuid of a sender
- bool logToFile(const LLUUID& session_id, const std::string& from, const std::string& utf8_text);
+ bool logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text);
};
class LLIMSessionObserver
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3aa35d98f8..59f70ea1bd 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1,11 +1,11 @@
-/**
+/**
* @file llinventorybridge.cpp
* @brief Implementation of the Inventory-Folder-View-Bridge classes.
*
* $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
@@ -13,17 +13,17 @@
* ("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.
@@ -83,7 +83,7 @@
#include "llvoavatar.h"
#include "llwearable.h"
#include "llwearablelist.h"
-#include "llviewermessage.h"
+#include "llviewermessage.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "lltabcontainer.h"
@@ -147,8 +147,8 @@ std::string ICON_NAME[ICON_NAME_COUNT] =
"Inv_Undershirt",
"Inv_Underpants",
"Inv_Skirt",
- "inv_item_alpha.tga",
- "inv_item_tattoo.tga",
+ "Inv_Alpha",
+ "Inv_Tattoo",
"Inv_Animation",
"Inv_Gesture",
@@ -237,7 +237,7 @@ void LLInvFVBridge::renameLinkedItems(const LLUUID &item_id, const std::string&
{
return;
}
-
+
LLInventoryModel::item_array_t item_array = model->collectLinkedItems(item_id);
for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
iter != item_array.end();
@@ -245,7 +245,7 @@ void LLInvFVBridge::renameLinkedItems(const LLUUID &item_id, const std::string&
{
LLViewerInventoryItem *linked_item = (*iter);
if (linked_item->getUUID() == item_id) continue;
-
+
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(linked_item);
new_item->rename(new_name);
new_item->updateServer(FALSE);
@@ -290,7 +290,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc
S32 count = batch.count();
S32 i,j;
for(i = 0; i < count; ++i)
- {
+ {
bridge = (LLInvFVBridge*)(batch.get(i));
if(!bridge || !bridge->isItemRemovable()) continue;
item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID());
@@ -303,7 +303,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc
}
}
for(i = 0; i < count; ++i)
- {
+ {
bridge = (LLInvFVBridge*)(batch.get(i));
if(!bridge || !bridge->isItemRemovable()) continue;
cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
@@ -506,7 +506,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return TRUE;
}
-void hideContextEntries(LLMenuGL& menu,
+void hideContextEntries(LLMenuGL& menu,
const std::vector<std::string> &entries_to_show,
const std::vector<std::string> &disabled_entries)
{
@@ -523,8 +523,8 @@ void hideContextEntries(LLMenuGL& menu,
{
hideContextEntries(*branchp->getBranch(), entries_to_show, disabled_entries);
}
-
-
+
+
bool found = false;
std::vector<std::string>::const_iterator itor2;
for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2)
@@ -552,8 +552,8 @@ void hideContextEntries(LLMenuGL& menu,
}
// Helper for commonly-used entries
-void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
- std::vector<std::string> &items,
+void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
+ std::vector<std::string> &items,
std::vector<std::string> &disabled_items, U32 flags)
{
items.push_back(std::string("Rename"));
@@ -565,7 +565,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
if (show_asset_id)
{
items.push_back(std::string("Copy Asset UUID"));
- if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
+ if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
|| (flags & FIRST_SELECTED_ITEM) == 0)
{
disabled_items.push_back(std::string("Copy Asset UUID"));
@@ -638,7 +638,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
return FALSE;
}
-
+
*id = obj->getUUID();
//object_ids.put(obj->getUUID());
@@ -808,7 +808,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
}
new_listener = new LLLandmarkBridge(inventory, uuid, flags);
break;
-
+
case LLAssetType::AT_CALLINGCARD:
if(!(inv_type == LLInventoryType::IT_CALLINGCARD))
{
@@ -1100,7 +1100,7 @@ PermissionMask LLItemBridge::getPermissionMask() const
{
LLViewerInventoryItem* item = getItem();
PermissionMask perm_mask = 0;
- if(item)
+ if(item)
{
BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
@@ -1126,9 +1126,9 @@ const std::string& LLItemBridge::getDisplayName() const
void LLItemBridge::buildDisplayName(LLInventoryItem* item, std::string& name)
{
- if(item)
+ if(item)
{
- name.assign(item->getName());
+ name.assign(item->getName());
}
else
{
@@ -1137,9 +1137,9 @@ void LLItemBridge::buildDisplayName(LLInventoryItem* item, std::string& name)
}
LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const
-{
+{
U8 font = LLFontGL::NORMAL;
-
+
if( gAgentWearables.isWearingItem( mUUID ) )
{
// llinfos << "BOLD" << llendl;
@@ -1165,7 +1165,7 @@ std::string LLItemBridge::getLabelSuffix() const
static std::string BROKEN_LINK = LLTrans::getString("broken_link");
std::string suffix;
LLInventoryItem* item = getItem();
- if(item)
+ if(item)
{
// it's a bit confusing to put nocopy/nomod/etc on calling cards.
if(LLAssetType::AT_CALLINGCARD != item->getType()
@@ -1294,9 +1294,9 @@ BOOL LLItemBridge::isItemCopyable() const
{
return FALSE;
}
-
+
// All items can be copied, not all can be pasted.
- // The only time an item can't be copied is if it's a link
+ // The only time an item can't be copied is if it's a link
// return (item->getPermissions().allowCopyBy(gAgent.getID()));
if (item->getIsLinkType())
{
@@ -1348,7 +1348,7 @@ BOOL LLItemBridge::isItemPermissive() const
LLFolderBridge* LLFolderBridge::sSelf=NULL;
// Can be moved to another folder
-BOOL LLFolderBridge::isItemMovable() const
+BOOL LLFolderBridge::isItemMovable() const
{
LLInventoryObject* obj = getInventoryObject();
if(obj)
@@ -1367,7 +1367,7 @@ void LLFolderBridge::selectItem()
BOOL LLFolderBridge::isItemRemovable()
{
LLInventoryModel* model = getInventoryModel();
- if(!model)
+ if(!model)
{
return FALSE;
}
@@ -1478,7 +1478,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const
LLInventoryClipboard::instance().retrieve(objects);
const LLViewerInventoryCategory *current_cat = getCategory();
- // Search for the direct descendent of current Friends subfolder among all pasted items,
+ // Search for the direct descendent of current Friends subfolder among all pasted items,
// and return false if is found.
for(S32 i = objects.count() - 1; i >= 0; --i)
{
@@ -1500,7 +1500,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
{
return FALSE;
}
-
+
const LLInventoryModel* model = getInventoryModel();
if (!model)
{
@@ -1523,7 +1523,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
{
const LLUUID &cat_id = cat->getUUID();
// Don't allow recursive pasting
- if ((cat_id == current_cat_id) ||
+ if ((cat_id == current_cat_id) ||
model->isObjectDescendentOf(current_cat_id, cat_id))
{
return FALSE;
@@ -1549,7 +1549,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
BOOL drop)
{
- // This should never happen, but if an inventory item is incorrectly parented,
+ // This should never happen, but if an inventory item is incorrectly parented,
// the UI will get confused and pass in a NULL.
if(!inv_cat) return FALSE;
@@ -1611,7 +1611,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
break;
}
}
-
+
if( is_movable )
{
if( move_is_into_trash )
@@ -1642,7 +1642,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
-
+
accept = is_movable
&& (mUUID != cat_id) // Can't move a folder into itself
&& (mUUID != inv_cat->getParentUUID()) // Avoid moves that would change nothing
@@ -1663,7 +1663,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
// if target is an outfit or current outfit folder we use link
- if (move_is_into_current_outfit || move_is_into_outfit)
+ if (move_is_into_current_outfit || move_is_into_outfit)
{
#if SUPPORT_ENSEMBLES
// BAP - should skip if dup.
@@ -1686,7 +1686,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
else
{
-
+
// Reparent the folder and restamp children if it's moving
// into trash.
LLInvFVBridge::changeCategoryParent(
@@ -1723,7 +1723,7 @@ void warn_move_inventory(LLViewerObject* object, LLMoveInv* move_inv)
// Move/copy all inventory items from the Contents folder of an in-world
// object to the agent's inventory, inside a given category.
-BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
+BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
BOOL drop,
void (*callback)(S32, void*),
@@ -1750,7 +1750,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
llinfos << "Object contents not found for drop." << llendl;
return FALSE;
}
-
+
BOOL accept = TRUE;
BOOL is_move = FALSE;
@@ -1836,7 +1836,7 @@ bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat,
{
LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); // BAP - safe?
// BAP remove AT_NONE support after ensembles are fully working?
- return (linked_category &&
+ return (linked_category &&
((linked_category->getPreferredType() == LLAssetType::AT_NONE) ||
(LLAssetType::lookupIsEnsembleCategoryType(linked_category->getPreferredType()))));
}
@@ -1878,7 +1878,7 @@ public:
gInventory.removeObserver(this);
delete this;
}
-
+
protected:
LLUUID mCatID;
@@ -1973,7 +1973,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryWearObserver
//
-// Observer for "copy and wear" operation to support knowing
+// Observer for "copy and wear" operation to support knowing
// when the all of the contents have been added to inventory.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryCopyAndWearObserver : public LLInventoryObserver
@@ -1995,7 +1995,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
{
if((mask & (LLInventoryObserver::ADD)) != 0)
{
- if (!mFolderAdded)
+ if (!mFolderAdded)
{
const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
@@ -2003,7 +2003,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
std::set<LLUUID>::const_iterator id_end = changed_items.end();
for (;id_it != id_end; ++id_it)
{
- if ((*id_it) == mCatID)
+ if ((*id_it) == mCatID)
{
mFolderAdded = TRUE;
break;
@@ -2011,7 +2011,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
}
}
- if (mFolderAdded)
+ if (mFolderAdded)
{
LLViewerInventoryCategory* category = gInventory.getCategory(mCatID);
@@ -2029,7 +2029,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
LLAppearanceManager::wearInventoryCategory(category, FALSE, TRUE);
delete this;
}
- }
+ }
}
}
@@ -2091,12 +2091,12 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
if(!model) return;
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
-
+
remove_inventory_category_from_avatar ( cat );
return;
- }
+ }
else if ("purge" == action)
- {
+ {
purgeItem(model, mUUID);
return;
}
@@ -2270,7 +2270,7 @@ void LLFolderBridge::pasteFromClipboard()
{
if(LLInventoryClipboard::instance().isCutMode())
{
- // move_inventory_item() is not enough,
+ // move_inventory_item() is not enough,
//we have to update inventory locally too
changeItemParent(model, dynamic_cast<LLViewerInventoryItem*>(item), parent_id, FALSE);
}
@@ -2347,7 +2347,7 @@ void LLFolderBridge::folderOptionsMenu()
// BAP change once we're no longer treating regular categories as ensembles.
const bool is_ensemble = category && (type == LLAssetType::AT_NONE ||
LLAssetType::lookupIsEnsembleCategoryType(type));
-
+
// calling card related functionality for folders.
// Only enable calling-card related options for non-default folders.
@@ -2361,7 +2361,7 @@ void LLFolderBridge::folderOptionsMenu()
mItems.push_back(std::string("IM All Contacts In Folder"));
}
}
-
+
// wearables related functionality for folders.
//is_wearable
LLFindWearables is_wearable;
@@ -2416,7 +2416,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND);
mItems.clear(); //adding code to clear out member Items (which means Items should not have other data here at this point)
- mDisabledItems.clear(); //adding code to clear out disabled members from previous
+ mDisabledItems.clear(); //adding code to clear out disabled members from previous
if (lost_and_found_id == mUUID)
{
// This is the lost+found folder.
@@ -2458,13 +2458,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
mItems.push_back(std::string("New Clothes"));
mItems.push_back(std::string("New Body Parts"));
mItems.push_back(std::string("Change Type"));
-
+
LLViewerInventoryCategory *cat = getCategory();
if (cat && LLAssetType::lookupIsProtectedCategoryType(cat->getPreferredType()))
{
mDisabledItems.push_back(std::string("Change Type"));
}
-
+
getClipboardEntries(false, mItems, mDisabledItems, flags);
}
else
@@ -2479,24 +2479,24 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
//Added by spatters to force inventory pull on right-click to display folder options correctly. 07-17-06
mCallingCards = mWearables = FALSE;
-
+
LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD);
if (checkFolderForContentsOfType(model, is_callingcard))
{
mCallingCards=TRUE;
}
-
+
LLFindWearables is_wearable;
LLIsType is_object( LLAssetType::AT_OBJECT );
LLIsType is_gesture( LLAssetType::AT_GESTURE );
-
+
if (checkFolderForContentsOfType(model, is_wearable) ||
checkFolderForContentsOfType(model, is_object) ||
checkFolderForContentsOfType(model, is_gesture) )
{
mWearables=TRUE;
}
-
+
mMenu = &menu;
sSelf = this;
LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(FALSE);
@@ -2709,7 +2709,7 @@ void LLFolderBridge::modifyOutfit(BOOL append)
if(!model) return;
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
-
+
// BAP - was:
// wear_inventory_category_on_avatar( cat, append );
LLAppearanceManager::wearInventoryCategory( cat, FALSE, append );
@@ -2735,8 +2735,8 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
}
two_uuids_list_t::iterator move_it;
- for (move_it = move_inv->mMoveList.begin();
- move_it != move_inv->mMoveList.end();
+ for (move_it = move_inv->mMoveList.begin();
+ move_it != move_inv->mMoveList.end();
++move_it)
{
object->moveInventory(move_it->first, move_it->second);
@@ -2845,7 +2845,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
LLUUID current_outfit_id = model->findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLAssetType::AT_OUTFIT);
-
+
if(is_movable && move_is_into_trash)
{
switch(inv_item->getType())
@@ -2873,7 +2873,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
is_movable = ! LLFriendCardsManager::instance()
.isObjDirectDescendentOfCategory (inv_item, getCategory());
}
-
+
LLUUID favorites_id = model->findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
// we can move item inside a folder only if this folder is Favorites. See EXT-719
@@ -2979,7 +2979,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
-
+
{
accept = TRUE;
}
@@ -3010,7 +3010,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
LLNotifications::instance().forceResponse(params, 0);
}
}
-
+
}
else if(LLToolDragAndDrop::SOURCE_NOTECARD == source)
{
@@ -3063,11 +3063,11 @@ LLUIImagePtr LLTextureBridge::getIcon() const
{
return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0, FALSE);
}
-
+
void LLTextureBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3086,7 +3086,7 @@ LLUIImagePtr LLSoundBridge::getIcon() const
void LLSoundBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3155,7 +3155,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// +=================================================+
LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, const LLUUID& uuid, U32 flags/* = 0x00*/) :
-LLItemBridge(inventory, uuid)
+LLItemBridge(inventory, uuid)
{
mVisited = FALSE;
if (flags & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
@@ -3244,7 +3244,7 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
LLSideTray::getInstance()->showPanel("panel_places", key);
}
}
- else
+ else
{
LLItemBridge::performAction(folder, model, action);
}
@@ -3268,7 +3268,7 @@ static LLNotificationFunctorRegistration open_landmark_callback_reg("TeleportFro
void LLLandmarkBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3376,7 +3376,7 @@ std::string LLCallingCardBridge::getLabelSuffix() const
void LLCallingCardBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3515,7 +3515,7 @@ BOOL LLCallingCardBridge::removeItem()
LLAvatarActions::removeFriendDialog(getItem()->getCreatorUUID());
return FALSE;
}
- else
+ else
{
return LLItemBridge::removeItem();
}
@@ -3532,7 +3532,7 @@ LLUIImagePtr LLNotecardBridge::getIcon() const
void LLNotecardBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3614,7 +3614,7 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
void LLGestureBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3716,7 +3716,7 @@ void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* mo
LLPreviewAnim::e_activation_type activate = LLPreviewAnim::NONE;
if ("playworld" == action) activate = LLPreviewAnim::PLAY;
if ("playlocal" == action) activate = LLPreviewAnim::AUDITION;
-
+
LLPreviewAnim* preview = LLFloaterReg::showTypedInstance<LLPreviewAnim>("preview_anim", LLSD(mUUID));
if (preview)
{
@@ -3733,7 +3733,7 @@ void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* mo
void LLAnimationBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3841,7 +3841,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
void LLObjectBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -3853,7 +3853,7 @@ void LLObjectBridge::openItem()
}
LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
-{
+{
U8 font = LLFontGL::NORMAL;
LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
@@ -3867,7 +3867,7 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
{
font |= LLFontGL::ITALIC;
}
-
+
return (LLFontGL::StyleFlags)font;
}
@@ -3878,7 +3878,7 @@ std::string LLObjectBridge::getLabelSuffix() const
{
std::string attachment_point_name = avatar->getAttachedPointName(mUUID);
LLStringUtil::toLower(attachment_point_name);
-
+
LLStringUtil::format_map_t args;
args["[ATTACHMENT_POINT]"] = attachment_point_name.c_str();
return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
@@ -3925,7 +3925,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response)
{
LLVOAvatar *avatarp = gAgent.getAvatarObject();
-
+
if (!avatarp->canAttachMoreObjects())
{
LLSD args;
@@ -3938,7 +3938,7 @@ bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& respon
if (option == 0/*YES*/)
{
LLViewerInventoryItem* itemp = gInventory.getItem(notification["payload"]["item_id"].asUUID());
-
+
if (itemp)
{
LLMessageSystem* msg = gMessageSystem;
@@ -3999,7 +3999,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
return;
}
-
+
if( avatarp->isWearingAttachment( mUUID ) )
{
items.push_back(std::string("Detach From Yourself"));
@@ -4023,13 +4023,13 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE);
LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE);
LLVOAvatar *avatarp = gAgent.getAvatarObject();
- if (attach_menu
- && (attach_menu->getChildCount() == 0)
- && attach_hud_menu
- && (attach_hud_menu->getChildCount() == 0)
+ if (attach_menu
+ && (attach_menu->getChildCount() == 0)
+ && attach_hud_menu
+ && (attach_hud_menu->getChildCount() == 0)
&& avatarp)
{
- for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
+ for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
iter != avatarp->mAttachmentPoints.end(); )
{
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
@@ -4110,7 +4110,7 @@ LLUIImagePtr LLLSLTextBridge::getIcon() const
void LLLSLTextBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -4146,7 +4146,7 @@ void wear_add_inventory_item_on_avatar( LLInventoryItem* item )
{
lldebugs << "wear_add_inventory_item_on_avatar( " << item->getName()
<< " )" << llendl;
-
+
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
@@ -4160,8 +4160,8 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
if(!category) return;
lldebugs << "remove_inventory_category_from_avatar( " << category->getName()
<< " )" << llendl;
-
-
+
+
if( gFloaterCustomize )
{
gFloaterCustomize->askToSaveIfDirty(
@@ -4236,8 +4236,8 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
}
}
}
-
-
+
+
if (obj_count > 0)
{
for(i = 0; i < obj_count; ++i)
@@ -4332,7 +4332,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
{
LLViewerInventoryItem* item = getItem();
if (item)
- {
+ {
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
@@ -4347,7 +4347,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
void LLWearableBridge::openItem()
{
LLViewerInventoryItem* item = getItem();
-
+
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
@@ -4431,7 +4431,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
items.push_back(std::string("Wearable Separator"));
-
+
items.push_back(std::string("Wearable Wear"));
items.push_back(std::string("Wearable Add"));
items.push_back(std::string("Wearable Edit"));
@@ -4462,7 +4462,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Wearable Add"));
}
else
- {
+ {
disabled_items.push_back(std::string("Take Off"));
}
break;
@@ -4501,7 +4501,7 @@ void LLWearableBridge::wearOnAvatar()
{
// Don't wear anything until initial wearables are loaded, can
// destroy clothing items.
- if (!gAgentWearables.areWearablesLoaded())
+ if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
return;
@@ -4532,7 +4532,7 @@ void LLWearableBridge::wearAddOnAvatar()
{
// Don't wear anything until initial wearables are loaded, can
// destroy clothing items.
- if (!gAgentWearables.areWearablesLoaded())
+ if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
return;
@@ -4620,7 +4620,7 @@ BOOL LLWearableBridge::canEditOnAvatar(void* user_data)
return (gAgentWearables.isWearingItem(self->mUUID));
}
-// static
+// static
void LLWearableBridge::onEditOnAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
@@ -4658,7 +4658,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
return FALSE;
}
-// static
+// static
void LLWearableBridge::onRemoveFromAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
@@ -4689,7 +4689,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
if( gAgentWearables.isWearingItem( item_id ) )
{
EWearableType type = wearable->getType();
-
+
if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES ) ) //&&
//!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) )
{
@@ -4733,7 +4733,7 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_
case LLAssetType::AT_LANDMARK:
action = new LLLandmarkBridgeAction(uuid,model);
break;
-
+
case LLAssetType::AT_CALLINGCARD:
action = new LLCallingCardBridgeAction(uuid,model);
break;
@@ -4770,7 +4770,7 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_
return action;
}
-//static
+//static
void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type,
const LLUUID& uuid,LLInventoryModel* model)
{
@@ -4782,7 +4782,7 @@ void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type,
}
}
-//static
+//static
void LLInvFVBridgeAction::doAction(const LLUUID& uuid, LLInventoryModel* model)
{
LLAssetType::EType asset_type = model->getItem(uuid)->getType();
@@ -4801,8 +4801,8 @@ LLViewerInventoryItem* LLInvFVBridgeAction::getItem() const
return NULL;
}
-//virtual
-void LLTextureBridgeAction::doIt()
+//virtual
+void LLTextureBridgeAction::doIt()
{
if (getItem())
{
@@ -4813,20 +4813,20 @@ void LLTextureBridgeAction::doIt()
}
//virtual
-void LLSoundBridgeAction::doIt()
+void LLSoundBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if(item)
{
LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES);
}
-
+
LLInvFVBridgeAction::doIt();
}
-//virtual
-void LLLandmarkBridgeAction::doIt()
+//virtual
+void LLLandmarkBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if( item )
@@ -4842,8 +4842,8 @@ void LLLandmarkBridgeAction::doIt()
}
-//virtual
-void LLCallingCardBridgeAction::doIt()
+//virtual
+void LLCallingCardBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if(item && item->getCreatorUUID().notNull())
@@ -4854,9 +4854,9 @@ void LLCallingCardBridgeAction::doIt()
LLInvFVBridgeAction::doIt();
}
-//virtual
-void
-LLNotecardBridgeAction::doIt()
+//virtual
+void
+LLNotecardBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if (item)
@@ -4867,8 +4867,8 @@ LLNotecardBridgeAction::doIt()
LLInvFVBridgeAction::doIt();
}
-//virtual
-void LLGestureBridgeAction::doIt()
+//virtual
+void LLGestureBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if (item)
@@ -4880,8 +4880,8 @@ void LLGestureBridgeAction::doIt()
LLInvFVBridgeAction::doIt();
}
-//virtual
-void LLAnimationBridgeAction::doIt()
+//virtual
+void LLAnimationBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if (item)
@@ -4893,7 +4893,7 @@ void LLAnimationBridgeAction::doIt()
}
-//virtual
+//virtual
void LLObjectBridgeAction::doIt()
{
LLFloaterReg::showInstance("properties", mUUID);
@@ -4902,8 +4902,8 @@ void LLObjectBridgeAction::doIt()
}
-//virtual
-void LLLSLTextBridgeAction::doIt()
+//virtual
+void LLLSLTextBridgeAction::doIt()
{
LLViewerInventoryItem* item = getItem();
if (item)
@@ -4933,7 +4933,7 @@ void LLWearableBridgeAction::wearOnAvatar()
{
// Don't wear anything until initial wearables are loaded, can
// destroy clothing items.
- if (!gAgentWearables.areWearablesLoaded())
+ if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
return;
@@ -4960,7 +4960,7 @@ void LLWearableBridgeAction::wearOnAvatar()
}
}
-//virtual
+//virtual
void LLWearableBridgeAction::doIt()
{
if(isInTrash())
@@ -5036,7 +5036,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Restore Item"));
}
else
- {
+ {
items.push_back(std::string("Delete"));
if (!isItemRemovable())
{
@@ -5086,7 +5086,7 @@ void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Restore Item"));
}
else
- {
+ {
items.push_back(std::string("Goto Link"));
items.push_back(std::string("Delete"));
if (!isItemRemovable())
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 69214b5cab..a16ffe19c6 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -36,6 +36,8 @@
#include "llappviewer.h"
#include "llfloaterchat.h"
#include "lltrans.h"
+#include "llviewercontrol.h"
+#include "llsdserialize.h"
const S32 LOG_RECALL_SIZE = 2048;
@@ -89,41 +91,53 @@ std::string LLLogChat::timestamp(bool withdate)
//static
-void LLLogChat::saveHistory(std::string filename, std::string line)
+void LLLogChat::saveHistory(const std::string& filename,
+ const std::string& from,
+ const LLUUID& from_id,
+ const std::string& line)
{
+ if (!gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
+ return;
+
if(!filename.size())
{
llinfos << "Filename is Empty!" << llendl;
return;
}
- LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); /*Flawfinder: ignore*/
- if (!fp)
+ llofstream file (LLLogChat::makeLogFileName(filename), std::ios_base::app);
+ if (!file.is_open())
{
llinfos << "Couldn't open chat history log!" << llendl;
+ return;
}
- else
- {
- fprintf(fp, "%s\n", line.c_str());
-
- fclose (fp);
- }
+
+ LLSD item;
+
+ if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
+ item["time"] = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate"));
+
+ item["from"] = from;
+ item["from_id"] = from_id;
+ item["message"] = line;
+
+ file << LLSDOStreamer <LLSDNotationFormatter>(item) << std::endl;
+
+ file.close();
}
-void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType,std::string,void*), void* userdata)
+void LLLogChat::loadHistory(const std::string& filename, void (*callback)(ELogLineType, const LLSD&, void*), void* userdata)
{
if(!filename.size())
{
llwarns << "Filename is Empty!" << llendl;
return ;
}
-
+
LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/
if (!fptr)
{
- //LLUIString message = LLTrans::getString("IM_logging_string");
- //callback(LOG_EMPTY,"IM_logging_string",userdata);
- callback(LOG_EMPTY,LLStringUtil::null,userdata);
+ callback(LOG_EMPTY, LLSD(), userdata);
return; //No previous conversation with this name.
}
else
@@ -143,6 +157,9 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType
}
}
+ // the parser's destructor is protected so we cannot create in the stack.
+ LLPointer<LLSDParser> parser = new LLSDNotationParser();
+
while ( fgets(buffer, LOG_RECALL_SIZE, fptr) && !feof(fptr) )
{
len = strlen(buffer) - 1; /*Flawfinder: ignore*/
@@ -150,14 +167,25 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType
if (!firstline)
{
- callback(LOG_LINE,std::string(buffer),userdata);
+ LLSD item;
+ std::string line(buffer);
+ std::istringstream iss(line);
+ if (parser->parse(iss, item, line.length()) == LLSDParser::PARSE_FAILURE)
+ {
+ item["message"] = line;
+ callback(LOG_LINE, item, userdata);
+ }
+ else
+ {
+ callback(LOG_LLSD, item, userdata);
+ }
}
else
{
firstline = FALSE;
}
}
- callback(LOG_END,LLStringUtil::null,userdata);
+ callback(LOG_END, LLSD(), userdata);
fclose(fptr);
}
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index ad903b66fe..e252cd7d41 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -41,13 +41,18 @@ public:
enum ELogLineType {
LOG_EMPTY,
LOG_LINE,
+ LOG_LLSD,
LOG_END
};
static std::string timestamp(bool withdate = false);
static std::string makeLogFileName(std::string(filename));
- static void saveHistory(std::string filename, std::string line);
- static void loadHistory(std::string filename,
- void (*callback)(ELogLineType,std::string,void*),
+ static void saveHistory(const std::string& filename,
+ const std::string& from,
+ const LLUUID& from_id,
+ const std::string& line);
+
+ static void loadHistory(const std::string& filename,
+ void (*callback)(ELogLineType, const LLSD&, void*),
void* userdata);
private:
static std::string cleanFileName(std::string filename);
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 2b4e35208a..14da35594f 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -280,6 +280,14 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)
mCurrentMode = mode;
gAgent.setFlying(MM_FLY == mode);
+ // attempts to set avatar flying can not set it real flying in some cases.
+ // For ex. when avatar fell down & is standing up.
+ // So, no need to continue processing FLY mode. See EXT-1079
+ if (MM_FLY == mode && !gAgent.getFlying())
+ {
+ return;
+ }
+
switch (mode)
{
case MM_RUN:
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index ff7f08bf97..36cf2c1aa8 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -65,7 +65,6 @@
#include "llworld.h" //for particle system banning
#include "llchat.h"
#include "llfloaterchat.h"
-#include "llimpanel.h"
#include "llimview.h"
#include "llnotifications.h"
#include "lluistring.h"
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index c32ef2f22b..9a05812847 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -164,8 +164,6 @@ TODO:
- Load navbar height from saved settings (as it's done for status bar) or think of a better way.
*/
-S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK, used in llviewerwindow.cpp
-
LLNavigationBar::LLNavigationBar()
: mTeleportHistoryMenu(NULL),
mBtnBack(NULL),
@@ -545,6 +543,15 @@ void LLNavigationBar::clearHistoryCache()
mPurgeTPHistoryItems= true;
}
+int LLNavigationBar::getDefNavBarHeight()
+{
+ return mDefaultNbRect.getHeight();
+}
+int LLNavigationBar::getDefFavBarHeight()
+{
+ return mDefaultFpRect.getHeight();
+}
+
void LLNavigationBar::showNavigationPanel(BOOL visible)
{
bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index f1a1b85a86..8b625e7fa6 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -35,8 +35,6 @@
#include "llpanel.h"
-extern S32 NAVIGATION_BAR_HEIGHT;
-
class LLButton;
class LLLocationInputCtrl;
class LLMenuGL;
@@ -63,6 +61,9 @@ public:
void showNavigationPanel(BOOL visible);
void showFavoritesPanel(BOOL visible);
+
+ int getDefNavBarHeight();
+ int getDefFavBarHeight();
private:
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index ca7ebb1ad8..4c552ee815 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -127,7 +127,7 @@ BOOL LLPanelPrimMediaControls::postBuild()
scroll_left_ctrl->setMouseUpCallback(onScrollStop, this);
LLButton* scroll_right_ctrl = getChild<LLButton>("scrollright");
scroll_right_ctrl->setClickedCallback(onScrollRight, this);
- scroll_right_ctrl->setHeldDownCallback(onScrollLeftHeld, this);
+ scroll_right_ctrl->setHeldDownCallback(onScrollRightHeld, this);
scroll_right_ctrl->setMouseUpCallback(onScrollStop, this);
LLButton* scroll_down_ctrl = getChild<LLButton>("scrolldown");
scroll_down_ctrl->setClickedCallback(onScrollDown, this);
@@ -291,7 +291,7 @@ void LLPanelPrimMediaControls::updateShape()
// Disable zoom if HUD
zoom_ctrl->setEnabled(!objectp->isHUDAttachment());
secure_lock_icon->setVisible(false);
- mCurrentURL = media_impl->getMediaURL();
+ mCurrentURL = media_impl->getCurrentMediaURL();
back_ctrl->setEnabled((media_impl != NULL) && media_impl->canNavigateBack() && can_navigate);
fwd_ctrl->setEnabled((media_impl != NULL) && media_impl->canNavigateForward() && can_navigate);
@@ -472,7 +472,7 @@ void LLPanelPrimMediaControls::updateShape()
}
}
- if(media_plugin)
+ if(media_impl)
{
//
// Handle Scrolling
@@ -480,16 +480,18 @@ void LLPanelPrimMediaControls::updateShape()
switch (mScrollState)
{
case SCROLL_UP:
- media_plugin->scrollEvent(0, -1, MASK_NONE);
+ media_impl->scrollWheel(0, -1, MASK_NONE);
break;
case SCROLL_DOWN:
- media_plugin->scrollEvent(0, 1, MASK_NONE);
+ media_impl->scrollWheel(0, 1, MASK_NONE);
break;
case SCROLL_LEFT:
- media_impl->handleKeyHere(KEY_LEFT, MASK_NONE);
+ media_impl->scrollWheel(1, 0, MASK_NONE);
+// media_impl->handleKeyHere(KEY_LEFT, MASK_NONE);
break;
case SCROLL_RIGHT:
- media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
+ media_impl->scrollWheel(-1, 0, MASK_NONE);
+// media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
break;
case SCROLL_NONE:
default:
@@ -758,20 +760,10 @@ void LLPanelPrimMediaControls::onClickHome()
void LLPanelPrimMediaControls::onClickOpen()
{
- LLViewerMediaImpl* impl =getTargetMediaImpl();
+ LLViewerMediaImpl* impl = getTargetMediaImpl();
if(impl)
{
- if(impl->getMediaPlugin())
- {
- if(impl->getMediaPlugin()->getLocation().empty())
- {
- LLWeb::loadURL(impl->getMediaURL());
- }
- else
- {
- LLWeb::loadURL( impl->getMediaPlugin()->getLocation());
- }
- }
+ LLWeb::loadURL(impl->getCurrentMediaURL());
}
}
@@ -895,11 +887,11 @@ void LLPanelPrimMediaControls::onScrollUp(void* user_data)
LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data);
this_panel->focusOnTarget();
- LLPluginClassMedia* plugin = this_panel->getTargetMediaPlugin();
+ LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl();
- if(plugin)
+ if(impl)
{
- plugin->scrollEvent(0, -1, MASK_NONE);
+ impl->scrollWheel(0, -1, MASK_NONE);
}
}
void LLPanelPrimMediaControls::onScrollUpHeld(void* user_data)
@@ -916,7 +908,8 @@ void LLPanelPrimMediaControls::onScrollRight(void* user_data)
if(impl)
{
- impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
+ impl->scrollWheel(-1, 0, MASK_NONE);
+// impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
}
}
void LLPanelPrimMediaControls::onScrollRightHeld(void* user_data)
@@ -934,7 +927,8 @@ void LLPanelPrimMediaControls::onScrollLeft(void* user_data)
if(impl)
{
- impl->handleKeyHere(KEY_LEFT, MASK_NONE);
+ impl->scrollWheel(1, 0, MASK_NONE);
+// impl->handleKeyHere(KEY_LEFT, MASK_NONE);
}
}
void LLPanelPrimMediaControls::onScrollLeftHeld(void* user_data)
@@ -948,11 +942,11 @@ void LLPanelPrimMediaControls::onScrollDown(void* user_data)
LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data);
this_panel->focusOnTarget();
- LLPluginClassMedia* plugin = this_panel->getTargetMediaPlugin();
+ LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl();
- if(plugin)
+ if(impl)
{
- plugin->scrollEvent(0, 1, MASK_NONE);
+ impl->scrollWheel(0, 1, MASK_NONE);
}
}
void LLPanelPrimMediaControls::onScrollDownHeld(void* user_data)
@@ -1000,6 +994,7 @@ void LLPanelPrimMediaControls::onInputURL(LLFocusableElement* caller, void *user
void LLPanelPrimMediaControls::setCurrentURL()
{
+#ifdef USE_COMBO_BOX_FOR_MEDIA_URL
LLComboBox* media_address_combo = getChild<LLComboBox>("media_address_combo");
// redirects will navigate momentarily to about:blank, don't add to history
if (media_address_combo && mCurrentURL != "about:blank")
@@ -1008,6 +1003,13 @@ void LLPanelPrimMediaControls::setCurrentURL()
media_address_combo->add(mCurrentURL, ADD_SORTED);
media_address_combo->selectByValue(mCurrentURL);
}
+#else // USE_COMBO_BOX_FOR_MEDIA_URL
+ LLLineEditor* media_address_url = getChild<LLLineEditor>("media_address_url");
+ if (media_address_url && mCurrentURL != "about:blank")
+ {
+ media_address_url->setValue(mCurrentURL);
+ }
+#endif // USE_COMBO_BOX_FOR_MEDIA_URL
}
void LLPanelPrimMediaControls::onCommitSlider()
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 73dcd1dd92..e4dbcbd219 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -44,7 +44,6 @@
#include "lltrans.h"
#include "lldockablefloater.h"
-#include "llimpanel.h"
#include "llsyswellwindow.h"
#include "llimfloater.h"
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index e1643af71d..74e0fa077e 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -42,8 +42,7 @@
//-----------------------------------------------------------------------------
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
mTexLayer(layer),
- mAvatar(NULL),
- mIsWearableParam(TRUE)
+ mAvatar(NULL)
{
if (mTexLayer != NULL)
{
@@ -56,8 +55,7 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
LLTexLayerParam::LLTexLayerParam(LLVOAvatar *avatar) :
- mTexLayer(NULL),
- mIsWearableParam(FALSE)
+ mTexLayer(NULL)
{
mAvatar = avatar;
}
@@ -177,7 +175,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
{
mCurWeight = new_weight;
- if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
+ if ((mAvatar->getSex() & getSex()) && (mAvatar->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param.
{
if (gAgent.cameraCustomizeAvatar())
{
@@ -192,6 +190,13 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL set_by_user)
{
+ // do not animate dummy parameters
+ if (mIsDummy)
+ {
+ setWeight(target_value, set_by_user);
+ return;
+ }
+
mTargetWeight = target_value;
setWeight(target_value, set_by_user);
mIsAnimating = TRUE;
@@ -468,7 +473,7 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user)
return;
}
- if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
+ if ((mAvatar->getSex() & getSex()) && (mAvatar->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param.
{
onGlobalColorChanged(set_by_user);
if (mTexLayer)
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index dcb108bbf6..98365864f9 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -49,7 +49,6 @@ public:
protected:
LLTexLayerInterface* mTexLayer;
LLVOAvatar* mAvatar;
- BOOL mIsWearableParam;
};
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b5aec1b80b..4940d9b5bb 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -458,7 +458,7 @@ BOOL LLFloaterTexturePicker::postBuild()
// virtual
void LLFloaterTexturePicker::draw()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ S32 floater_header_size = getHeaderHeight();
if (mOwner)
{
// draw cone of context pointing back to texture swatch
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index c2cd63900b..c02fd7a5ef 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -32,7 +32,6 @@
#include "llviewerprecompiledheaders.h"
#include "lltoastimpanel.h"
-#include "llimpanel.h"
const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index b71291f834..35226a1632 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -511,13 +511,34 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)
bool toggle_show_navigation_panel(const LLSD& newvalue)
{
- LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean());
+ LLRect floater_view_rect = gFloaterView->getRect();
+ LLRect notify_view_rect = gNotifyBoxView->getRect();
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+
+ //if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher,
+ //and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower.
+ int pm=newvalue.asBoolean()?-1:1;
+ floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
+ notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
+ gFloaterView->setRect(floater_view_rect);
+ floater_view_rect = gFloaterView->getRect();
+ navbar->showNavigationPanel(newvalue.asBoolean());
return true;
}
bool toggle_show_favorites_panel(const LLSD& newvalue)
{
- LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean());
+ LLRect floater_view_rect = gFloaterView->getRect();
+ LLRect notify_view_rect = gNotifyBoxView->getRect();
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+
+ //if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher,
+ //and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower.
+ int pm=newvalue.asBoolean()?-1:1;
+ floater_view_rect.mTop += pm*navbar->getDefFavBarHeight();
+ notify_view_rect.mTop += pm*navbar->getDefFavBarHeight();
+ gFloaterView->setRect(floater_view_rect);
+ navbar->showFavoritesPanel(newvalue.asBoolean());
return true;
}
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index b1f14eca7b..9b4e80cae0 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -43,6 +43,9 @@
extern BOOL gHackGodmode;
#endif
+bool toggle_show_navigation_panel(const LLSD& newvalue);
+bool toggle_show_favorites_panel(const LLSD& newvalue);
+
// These functions found in llcontroldef.cpp *TODO: clean this up!
//setting variables are declared in this function
void settings_setup_listeners();
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 8bd74dcb04..e2d9f5a2c9 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1023,6 +1023,16 @@ bool LLViewerMediaImpl::hasFocus() const
return mHasFocus;
}
+std::string LLViewerMediaImpl::getCurrentMediaURL()
+{
+ if(!mCurrentMediaURL.empty())
+ {
+ return mCurrentMediaURL;
+ }
+
+ return mMediaURL;
+}
+
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
@@ -1109,6 +1119,18 @@ void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button)
}
//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, MASK mask)
+{
+ scaleMouse(&x, &y);
+ mLastMouseX = x;
+ mLastMouseY = y;
+ if (mMediaSource)
+ {
+ mMediaSource->scrollEvent(x, y, mask);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::onMouseCaptureLost()
{
if (mMediaSource)
@@ -1181,7 +1203,7 @@ void LLViewerMediaImpl::navigateForward()
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::navigateReload()
{
- navigateTo(mMediaURL, "", true, false);
+ navigateTo(getCurrentMediaURL(), "", true, false);
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -1203,6 +1225,9 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi
mMediaURL = url;
mMimeType = mime_type;
+ // Clear the current media URL, since it will no longer be correct.
+ mCurrentMediaURL.clear();
+
// if mime type discovery was requested, we'll need to do it when the media loads
mNavigateRediscoverType = rediscover_type;
@@ -1702,10 +1727,12 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
if(getNavState() == MEDIANAVSTATE_BEGUN)
{
+ mCurrentMediaURL = plugin->getNavigateURI();
setNavState(MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED);
}
else if(getNavState() == MEDIANAVSTATE_SERVER_BEGUN)
{
+ mCurrentMediaURL = plugin->getNavigateURI();
setNavState(MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED);
}
else
@@ -1721,10 +1748,12 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
if(getNavState() == MEDIANAVSTATE_BEGUN)
{
+ mCurrentMediaURL = plugin->getLocation();
setNavState(MEDIANAVSTATE_FIRST_LOCATION_CHANGED);
}
else if(getNavState() == MEDIANAVSTATE_SERVER_BEGUN)
{
+ mCurrentMediaURL = plugin->getLocation();
setNavState(MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED);
}
else
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 4f0d39dd80..5444abf854 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -145,6 +145,7 @@ public:
void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0);
void mouseMove(const LLVector2& texture_coords, MASK mask);
void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0);
+ void scrollWheel(S32 x, S32 y, MASK mask);
void mouseCapture();
void navigateBack();
@@ -159,6 +160,7 @@ public:
bool canNavigateForward();
bool canNavigateBack();
std::string getMediaURL() { return mMediaURL; }
+ std::string getCurrentMediaURL();
std::string getHomeURL() { return mHomeURL; }
void setHomeURL(const std::string& home_url) { mHomeURL = home_url; };
std::string getMimeType() { return mMimeType; }
@@ -272,9 +274,10 @@ public:
LLPluginClassMedia* mMediaSource;
LLUUID mTextureId;
bool mMovieImageHasMips;
- std::string mMediaURL;
+ std::string mMediaURL; // The last media url set with NavigateTo
std::string mHomeURL;
std::string mMimeType;
+ std::string mCurrentMediaURL; // The most current media url from the plugin (via the "location changed" or "navigate complete" events).
S32 mLastMouseX; // save the last mouse coord we get, so when we lose capture we can simulate a mouseup at that point.
S32 mLastMouseY;
S32 mMediaWidth;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 320f0f83ff..ec6ef92a54 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -88,7 +88,6 @@
#include "llhudeffect.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
-#include "llimpanel.h"
#include "llinventorymodel.h"
#include "llfloaterinventory.h"
#include "llmenugl.h"
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 65994dfb30..5c40f2a540 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -44,6 +44,9 @@
#include "llinventory.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
+#include "lllandmark.h"
+#include "lllandmarkactions.h"
+#include "lllandmarklist.h"
#include "llmemorystream.h"
#include "llmenugl.h"
#include "llnotecard.h"
@@ -64,10 +67,47 @@
#include "llviewertexturelist.h"
#include "llviewerwindow.h"
-#include "llappviewer.h" // for gPacificDaylightTime
-
static LLDefaultChildRegistry::Register<LLViewerTextEditor> r("text_editor");
+///-----------------------------------------------------------------------
+/// Class LLEmbeddedLandmarkCopied
+///-----------------------------------------------------------------------
+class LLEmbeddedLandmarkCopied: public LLInventoryCallback
+{
+public:
+
+ LLEmbeddedLandmarkCopied(){}
+ void fire(const LLUUID& inv_item)
+ {
+ showInfo(inv_item);
+ }
+ static void showInfo(const LLUUID& landmark_inv_id)
+ {
+ LLSD key;
+ key["type"] = "landmark";
+ key["id"] = landmark_inv_id;
+ LLSideTray::getInstance()->showPanel("panel_places", key);
+ }
+ static void processForeignLandmark(LLLandmark* landmark,
+ const LLUUID& object_id, const LLUUID& notecard_inventory_id,
+ LLInventoryItem* item)
+ {
+ LLVector3d global_pos;
+ landmark->getGlobalPos(global_pos);
+ LLViewerInventoryItem* agent_lanmark =
+ LLLandmarkActions::findLandmarkForGlobalPos(global_pos);
+
+ if (agent_lanmark)
+ {
+ showInfo(agent_lanmark->getUUID());
+ }
+ else
+ {
+ LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied();
+ copy_inventory_from_notecard(object_id, notecard_inventory_id, item, gInventoryCallbacks.registerCB(cb));
+ }
+ }
+};
///----------------------------------------------------------------------------
/// Class LLEmbeddedNotecardOpener
///----------------------------------------------------------------------------
@@ -1099,14 +1139,12 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc
if (!item)
return;
- LLSD key;
- key["type"] = "landmark";
- key["id"] = item->getUUID();
-
- LLPanelPlaces *panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", key));
- if (panel)
+ LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID(),
+ boost::bind(&LLEmbeddedLandmarkCopied::processForeignLandmark, _1, mObjectID, mNotecardInventoryID, item));
+ if (landmark)
{
- panel->setItem(item);
+ LLEmbeddedLandmarkCopied::processForeignLandmark(landmark, mObjectID,
+ mNotecardInventoryID, item);
}
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b0b69fbae6..ba32e07464 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1518,11 +1518,12 @@ void LLViewerWindow::initWorldUI()
getRootView()->addChild(gMorphView);
// Make space for nav bar.
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
LLRect floater_view_rect = gFloaterView->getRect();
LLRect notify_view_rect = gNotifyBoxView->getRect();
- floater_view_rect.mTop -= NAVIGATION_BAR_HEIGHT;
+ floater_view_rect.mTop -= navbar->getDefNavBarHeight();
floater_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight();
- notify_view_rect.mTop -= NAVIGATION_BAR_HEIGHT;
+ notify_view_rect.mTop -= navbar->getDefNavBarHeight();
notify_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight();
gFloaterView->setRect(floater_view_rect);
gNotifyBoxView->setRect(notify_view_rect);
@@ -1549,20 +1550,19 @@ void LLViewerWindow::initWorldUI()
gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
// Navigation bar
-
- LLNavigationBar* navbar = LLNavigationBar::getInstance();
navbar->reshape(root_rect.getWidth(), navbar->getRect().getHeight(), TRUE); // *TODO: redundant?
navbar->translate(0, root_rect.getHeight() - menu_bar_height - navbar->getRect().getHeight()); // FIXME
navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+
if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
{
- navbar->showNavigationPanel(FALSE);
+ toggle_show_navigation_panel(LLSD(0));
}
if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"))
{
- navbar->showFavoritesPanel(FALSE);
+ toggle_show_favorites_panel(LLSD(0));
}
if (!gSavedSettings.getBOOL("ShowCameraButton"))
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f9c95afc31..4bf66ba17e 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2448,28 +2448,20 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
}
else
{
- F32 blend_frac = calc_bouncy_animation(appearance_anim_time / APPEARANCE_MORPH_TIME);
- F32 last_blend_frac = calc_bouncy_animation(mLastAppearanceBlendTime / APPEARANCE_MORPH_TIME);
- F32 morph_amt;
- if (last_blend_frac == 1.f)
- {
- morph_amt = 1.f;
- }
- else
- {
- morph_amt = (blend_frac - last_blend_frac) / (1.f - last_blend_frac);
- }
-
+ F32 morph_amt = calcMorphAmount();
LLVisualParam *param;
- // animate only top level params
- for (param = getFirstVisualParam();
- param;
- param = getNextVisualParam())
+ if (!isSelf())
{
- if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+ // animate only top level params for non-self avatars
+ for (param = getFirstVisualParam();
+ param;
+ param = getNextVisualParam())
{
- param->animate(morph_amt, mAppearanceAnimSetByUser);
+ if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+ {
+ param->animate(morph_amt, mAppearanceAnimSetByUser);
+ }
}
}
@@ -2487,6 +2479,25 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
}
}
+F32 LLVOAvatar::calcMorphAmount()
+{
+ F32 appearance_anim_time = mAppearanceMorphTimer.getElapsedTimeF32();
+ F32 blend_frac = calc_bouncy_animation(appearance_anim_time / APPEARANCE_MORPH_TIME);
+ F32 last_blend_frac = calc_bouncy_animation(mLastAppearanceBlendTime / APPEARANCE_MORPH_TIME);
+
+ F32 morph_amt;
+ if (last_blend_frac == 1.f)
+ {
+ morph_amt = 1.f;
+ }
+ else
+ {
+ morph_amt = (blend_frac - last_blend_frac) / (1.f - last_blend_frac);
+ }
+
+ return morph_amt;
+}
+
void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
{
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e3add8aa78..f7c794defe 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -205,7 +205,7 @@ public:
virtual BOOL updateCharacter(LLAgent &agent);
void idleUpdateVoiceVisualizer(bool voice_enabled);
void idleUpdateMisc(bool detailed_update);
- void idleUpdateAppearanceAnimation();
+ virtual void idleUpdateAppearanceAnimation();
void idleUpdateLipSync(bool voice_enabled);
void idleUpdateLoadingEffect();
void idleUpdateWindEffect();
@@ -250,6 +250,7 @@ protected:
virtual BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
void updateRuthTimer(bool loading);
+ F32 calcMorphAmount();
private:
BOOL mFullyLoaded;
BOOL mPreviousFullyLoaded;
@@ -276,7 +277,7 @@ public:
protected:
static BOOL parseSkeletonFile(const std::string& filename);
void buildCharacter();
- BOOL loadAvatar();
+ virtual BOOL loadAvatar();
BOOL setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 &current_volume_num, S32 &current_joint_num);
BOOL buildSkeleton(const LLVOAvatarSkeletonInfo *info);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 4760d5a472..758db538a2 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -193,6 +193,25 @@ void LLVOAvatarSelf::markDead()
LLVOAvatar::markDead();
}
+/*virtual*/ BOOL LLVOAvatarSelf::loadAvatar()
+{
+ BOOL success = LLVOAvatar::loadAvatar();
+
+ // set all parameters sotred directly in the avatar to have
+ // the isSelfParam to be TRUE - this is used to prevent
+ // them from being animated or trigger accidental rebakes
+ // when we copy params from the wearable to the base avatar.
+ for (LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam();
+ param;
+ param = (LLViewerVisualParam*) getNextVisualParam())
+ {
+ param->setIsDummy(TRUE);
+ }
+
+ return success;
+}
+
+
BOOL LLVOAvatarSelf::loadAvatarSelf()
{
BOOL success = TRUE;
@@ -704,16 +723,23 @@ void LLVOAvatarSelf::updateVisualParams()
}
}
- LLWearable *shape = gAgentWearables.getWearable(WT_SHAPE,0);
- if (shape)
- {
- F32 gender = shape->getVisualParamWeight(80); // param 80 == gender
- setVisualParamWeight("male",gender ,TRUE);
- }
-
LLVOAvatar::updateVisualParams();
}
+/*virtual*/
+void LLVOAvatarSelf::idleUpdateAppearanceAnimation()
+{
+ // Animate all top-level wearable visual parameters
+ gAgentWearables.animateAllWearableParams(calcMorphAmount(), mAppearanceAnimSetByUser);
+
+ // apply wearable visual params to avatar
+ updateVisualParams();
+
+ //allow avatar to process updates
+ LLVOAvatar::idleUpdateAppearanceAnimation();
+
+}
+
// virtual
void LLVOAvatarSelf::requestStopMotion(LLMotion* motion)
{
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index a555d04a63..6e52b33634 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -57,6 +57,7 @@ public:
virtual void markDead();
virtual void initInstance(); // Called after construction to initialize the class.
protected:
+ /*virtual*/ BOOL loadAvatar();
BOOL loadAvatarSelf();
BOOL buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info);
BOOL buildMenus();
@@ -89,6 +90,7 @@ public:
/*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL set_by_user = FALSE );
/*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight, BOOL set_by_user = FALSE );
/*virtual*/ void updateVisualParams();
+ /*virtual*/ void idleUpdateAppearanceAnimation();
private:
// helper function. Passed in param is assumed to be in avatar's parameter list.
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index a091028ec2..4cd29bb838 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -185,7 +185,9 @@ void LLWearable::createVisualParams()
{
delete mVisualParamIndexMap[param->getID()];
}
- mVisualParamIndexMap[param->getID()] = param->cloneParam(this);
+ LLViewerVisualParam *new_param = param->cloneParam(this);
+ new_param->setIsDummy(FALSE);
+ mVisualParamIndexMap[param->getID()] = new_param;
}
}
@@ -668,21 +670,7 @@ void LLWearable::writeToAvatar( BOOL set_by_user, BOOL update_customize_floater
if( gFloaterCustomize && update_customize_floater )
{
- LLViewerInventoryItem* item;
- // MULTI_WEARABLE:
- item = (LLViewerInventoryItem*)gInventory.getItem(gAgentWearables.getWearableItemID(mType,0));
- U32 perm_mask = PERM_NONE;
- BOOL is_complete = FALSE;
- if(item)
- {
- perm_mask = item->getPermissions().getMaskOwner();
- is_complete = item->isComplete();
- if(!is_complete)
- {
- item->fetchFromServer();
- }
- }
- gFloaterCustomize->setWearable(mType, this, perm_mask, is_complete);
+ gFloaterCustomize->setWearable(mType, 0);
gFloaterCustomize->setCurrentWearableType( mType );
}
@@ -935,6 +923,17 @@ void LLWearable::getVisualParams(visual_param_vec_t &list)
}
}
+void LLWearable::animateParams(F32 delta, BOOL set_by_user)
+{
+ for(visual_param_index_map_t::iterator iter = mVisualParamIndexMap.begin();
+ iter != mVisualParamIndexMap.end();
+ ++iter)
+ {
+ LLVisualParam *param = (LLVisualParam*) iter->second;
+ param->animate(delta, set_by_user);
+ }
+}
+
LLColor4 LLWearable::getClothesColor(S32 te) const
{
LLColor4 color;
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 01bd9652a5..96631811c5 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -119,6 +119,7 @@ public:
F32 getVisualParamWeight(S32 index) const;
LLVisualParam* getVisualParam(S32 index) const;
void getVisualParams(visual_param_vec_t &list);
+ void animateParams(F32 delta, BOOL set_by_user);
LLColor4 getClothesColor(S32 te) const;
void setClothesColor( S32 te, const LLColor4& new_color, BOOL set_by_user );
diff --git a/indra/newview/skins/default/textures/map_avatar_8.tga b/indra/newview/skins/default/textures/map_avatar_8.tga
index 47c8cbed6f..28552f2237 100644
--- a/indra/newview/skins/default/textures/map_avatar_8.tga
+++ b/indra/newview/skins/default/textures/map_avatar_8.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index d3366cdcaa..401f32c908 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -7,7 +7,7 @@
<texture name="Accordion_Off" file_name="containers/Accordion_Off.png" preload="false" />
<texture name="Accordion_Press" file_name="containers/Accordion_Press.png" preload="false" />
- <texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" />
+<texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" />
<texture name="AddItem_Disabled" file_name="icons/AddItem_Disabled.png" preload="false" />
<texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="false" />
@@ -54,11 +54,6 @@
<texture name="CameraView_Off" file_name="bottomtray/CameraView_Off.png" preload="false" />
<texture name="CameraView_Over" file_name="bottomtray/CameraView_Over.png" preload="false" />
- <texture name="CameraPreset_Rear" file_name="camera_presets/camera_presets_rear.png" preload="false" />
- <texture name="CameraPreset_3_4" file_name="camera_presets/camera_presets_3_4.png" preload="false" />
- <texture name="CameraPreset_Front" file_name="camera_presets/camera_presets_front.png" preload="false" />
- <texture name="CameraPreset_Mouselook" file_name="camera_presets/camera_presets_mouselook.png" preload="false" />
-
<texture name="Checkbox_Off_Disabled" file_name="widgets/Checkbox_Disabled.png" preload="true" />
<texture name="Checkbox_On_Disabled" file_name="widgets/Checkbox_On_Disabled.png" preload="true" />
<texture name="Checkbox_Off" file_name="widgets/Checkbox_Off.png" preload="true" />
@@ -93,7 +88,7 @@
<texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="false" />
<texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="false" />
- <texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" />
+ <texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" scale.left="2" scale.top="0" scale.right="2" scale.bottom="0" />
<texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="false" />
<texture name="ForwardArrow_Off" file_name="icons/ForwardArrow_Off.png" preload="false" />
@@ -101,7 +96,6 @@
<texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" />
<texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" />
- <texture name="Generic_Object" file_name="icons/Generic_Object.png" preload="false" />
<texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" />
<texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" />
@@ -147,10 +141,12 @@
<texture name="Info_Over" file_name="icons/Info_Over.png" preload="false" />
<texture name="Info_Press" file_name="navbar/Info_Press.png" preload="false" />
- <texture name="Inspector_Background" file_name="windows/Inspector_Background.png" preload="false" />
+ <texture name="Inspector_Background" file_name="windows/Inspector_Background.png" preload="false"
+ scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" />
<texture name="Inspector_Hover" file_name="windows/Inspector_Hover.png" preload="false" />
<texture name="Inv_Acessories" file_name="icons/Inv_Accessories.png" preload="false" />
+ <texture name="Inv_Alpha" file_name="icons/Inv_Alpha.png" preload="false" />
<texture name="Inv_Animation" file_name="icons/Inv_Animation.png" preload="false" />
<texture name="Inv_BodyShape" file_name="icons/Inv_BodyShape.png" preload="false" />
<texture name="Inv_CallingCard" file_name="icons/Inv_CallingCard.png" preload="false" />
@@ -175,6 +171,7 @@
<texture name="Inv_Snapshot" file_name="icons/Inv_Snapshot.png" preload="false" />
<texture name="Inv_Socks" file_name="icons/Inv_Socks.png" preload="false" />
<texture name="Inv_Sound" file_name="icons/Inv_Sound.png" preload="false" />
+ <texture name="Inv_Tattoo" file_name="icons/Inv_Tattoo.png" preload="false" />
<texture name="Inv_Texture" file_name="icons/Inv_Texture.png" preload="false" />
<texture name="Inv_Trash" file_name="icons/Inv_Trash.png" preload="false" />
<texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" />
@@ -228,9 +225,6 @@
<texture name="NearbyVoice_Lvl3" file_name="bottomtray/NearbyVoice_Lvl3.png" preload="false" />
<texture name="NearbyVoice_On" file_name="bottomtray/NearbyVoice_On.png" preload="false" />
- <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="false" />
- <texture name="NoEntryPassLines" file_name="world/NoEntryPassLines.png" use_mips="true" preload="false" />
-
<texture name="Object_Cone" file_name="build/Object_Cone.png" preload="false" />
<texture name="Object_Cube" file_name="build/Object_Cube.png" preload="false" />
<texture name="Object_Cylinder" file_name="build/Object_Cylinder.png" preload="false" />
@@ -258,42 +252,6 @@
<texture name="Overhead_M" file_name="world/Overhead_M.png" preload="false" />
<texture name="Overhead_S" file_name="world/Overhead_S.png" preload="false" />
- <texture name="parcel_drk_Build" file_name="icons/parcel_drk_Build.png" preload="false" />
- <texture name="parcel_drk_BuildNo" file_name="icons/parcel_drk_BuildNo.png" preload="false" />
- <texture name="parcel_drk_Damage" file_name="icons/parcel_drk_Damage.png" preload="false" />
- <texture name="parcel_drk_DamageNo" file_name="icons/parcel_drk_DamageNo.png" preload="false" />
- <texture name="parcel_drk_Fly" file_name="icons/parcel_drk_Fly.png" preload="false" />
- <texture name="parcel_drk_FlyNo" file_name="icons/parcel_drk_FlyNo.png" preload="false" />
- <texture name="parcel_drk_ForSale" file_name="icons/parcel_drk_ForSale.png" preload="false" />
- <texture name="parcel_drk_ForSaleNo" file_name="icons/parcel_drk_ForSaleNo.png" preload="false" />
- <texture name="parcel_drk_M" file_name="icons/parcel_drk_M.png" preload="false" />
- <texture name="parcel_drk_PG" file_name="icons/parcel_drk_PG.png" preload="false" />
- <texture name="parcel_drk_Push" file_name="icons/parcel_drk_Push.png" preload="false" />
- <texture name="parcel_drk_PushNo" file_name="icons/parcel_drk_PushNo.png" preload="false" />
- <texture name="parcel_drk_R" file_name="icons/parcel_drk_R.png" preload="false" />
- <texture name="parcel_drk_Scripts" file_name="icons/parcel_drk_Scripts.png" preload="false" />
- <texture name="parcel_drk_ScriptsNo" file_name="icons/parcel_drk_ScriptsNo.png" preload="false" />
- <texture name="parcel_drk_Voice" file_name="icons/parcel_drk_Voice.png" preload="false" />
- <texture name="parcel_drk_VoiceNo" file_name="icons/parcel_drk_VoiceNo.png" preload="false" />
-
- <texture name="parcel_lght_Build" file_name="icons/parcel_lght_Build.png" preload="false" />
- <texture name="parcel_lght_BuildNo" file_name="icons/parcel_lght_BuildNo.png" preload="false" />
- <texture name="parcel_lght_Damage" file_name="icons/parcel_lght_Damage.png" preload="false" />
- <texture name="parcel_lght_DamageNo" file_name="icons/parcel_lght_DamageNo.png" preload="false" />
- <texture name="parcel_lght_Fly" file_name="icons/parcel_lght_Fly.png" preload="false" />
- <texture name="parcel_lght_FlyNo" file_name="icons/parcel_lght_FlyNo.png" preload="false" />
- <texture name="parcel_lght_ForSale" file_name="icons/parcel_lght_ForSale.png" preload="false" />
- <texture name="parcel_lght_ForSaleNo" file_name="icons/parcel_lght_ForSaleNo.png" preload="false" />
- <texture name="parcel_lght_M" file_name="icons/parcel_lght_M.png" preload="false" />
- <texture name="parcel_lght_PG" file_name="icons/parcel_lght_PG.png" preload="false" />
- <texture name="parcel_lght_Push" file_name="icons/parcel_lght_Push.png" preload="false" />
- <texture name="parcel_lght_PushNo" file_name="icons/parcel_lght_PushNo.png" preload="false" />
- <texture name="parcel_lght_R" file_name="icons/parcel_lght_R.png" preload="false" />
- <texture name="parcel_lght_Scripts" file_name="icons/parcel_lght_Scripts.png" preload="false" />
- <texture name="parcel_lght_ScriptsNo" file_name="icons/parcel_lght_ScriptsNo.png" preload="false" />
- <texture name="parcel_lght_Voice" file_name="icons/parcel_lght_Voice.png" preload="false" />
- <texture name="parcel_lght_VoiceNo" file_name="icons/parcel_lght_VoiceNo.png" preload="false" />
-
<texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" />
<texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" />
<texture name="Progress_3" file_name="icons/Progress_3.png" preload="false" />
@@ -437,7 +395,8 @@
<texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" />
- <texture name="Toast" file_name="windows/Toast.png" preload="true" />
+ <texture name="Toast_Background" file_name="windows/Toast_Background.png" preload="true"
+ scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" />
<texture name="Tool_Create" file_name="build/Tool_Create.png" preload="false" />
<texture name="Tool_Dozer" file_name="build/Tool_Dozer.png" preload="false" />
@@ -472,18 +431,17 @@
<texture name="Widget_DownArrow" file_name="icons/Widget_DownArrow.png" preload="true" />
<texture name="Widget_UpArrow" file_name="icons/Widget_UpArrow.png" preload="true" />
- <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" />
- <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" />
-
-
-
-
+ <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true"
+ scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
+ <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true"
+ scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
+ <texture name="Window_NoTitle_Background" file_name="windows/Window_NoTitle_Background.png" preload="true"
+ scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
+ <texture name="Window_NoTitle_Foreground" file_name="windows/Window_NoTitle_Foreground.png" preload="true"
+ scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
<!--WARNING OLD ART *do not use*-->
- <texture name="Banner_ForSale" file_name="Banner_ForSale.png" preload="false" />
- <texture name="Banner_YouAreHere" file_name="Banner_YouAreHere.png" preload="false" />
-
<texture name="btn_chatbar.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0" />
<texture name="btn_chatbar_selected.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0" />
@@ -601,6 +559,54 @@
<texture name="icon_popular.tga" />
<texture name="icon_top_pick.tga" />
+ <texture name="inv_folder_animation.tga" />
+ <texture name="inv_folder_bodypart.tga" />
+ <texture name="inv_folder_callingcard.tga" />
+ <texture name="inv_folder_clothing.tga" />
+ <texture name="inv_folder_current_outfit.tga" />
+ <texture name="inv_folder_gesture.tga" />
+ <texture name="inv_folder_landmark.tga" />
+ <texture name="inv_folder_lostandfound.tga" />
+ <texture name="inv_folder_my_outfits.tga" />
+ <texture name="inv_folder_notecard.tga" />
+ <texture name="inv_folder_object.tga" />
+ <texture name="inv_folder_outfit.tga" />
+ <texture name="inv_folder_plain_closed.tga" />
+ <texture name="inv_folder_script.tga" />
+ <texture name="inv_folder_snapshot.tga" />
+ <texture name="inv_folder_sound.tga" />
+ <texture name="inv_folder_texture.tga" />
+ <texture name="inv_folder_trash.tga" />
+
+ <texture name="inv_item_animation.tga" />
+ <texture name="inv_item_skin.tga" />
+ <texture name="inv_item_callingcard_offline.tga" />
+ <texture name="inv_item_callingcard_online.tga" />
+ <texture name="inv_item_eyes.tga" />
+ <texture name="inv_item_gesture.tga" />
+ <texture name="inv_item_gloves.tga" />
+ <texture name="inv_item_hair.tga" />
+ <texture name="inv_item_jacket.tga" />
+ <texture name="inv_item_landmark.tga" />
+ <texture name="inv_item_landmark_visited.tga" />
+ <texture name="inv_item_linkitem.tga" />
+ <texture name="inv_item_linkfolder.tga" />
+ <texture name="inv_item_notecard.tga" />
+ <texture name="inv_item_object.tga" />
+ <texture name="inv_item_object_multi.tga" />
+ <texture name="inv_item_pants.tga" />
+ <texture name="inv_item_script.tga" />
+ <texture name="inv_item_shape.tga" />
+ <texture name="inv_item_shirt.tga" />
+ <texture name="inv_item_shoes.tga" />
+ <texture name="inv_item_skirt.tga" />
+ <texture name="inv_item_snapshot.tga" />
+ <texture name="inv_item_socks.tga" />
+ <texture name="inv_item_sound.tga" />
+ <texture name="inv_item_texture.tga" />
+ <texture name="inv_item_underpants.tga" />
+ <texture name="inv_item_undershirt.tga" />
+
<texture name="lag_status_critical.tga" />
<texture name="lag_status_good.tga" />
<texture name="lag_status_warning.tga" />
@@ -619,12 +625,45 @@
<texture name="media_icon.tga" file_name="icn_label_media.tga" />
<texture name="music_icon.tga" file_name="icn_label_music.tga" />
+ <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="false" />
+ <texture name="NoEntryPassLines" file_name="world/NoEntryPassLines.png" use_mips="true" preload="false" />
<texture name="notify_tip_icon.tga" />
<texture name="notify_caution_icon.tga" />
<texture name="notify_next.png" preload="true" />
<texture name="notify_box_icon.tga" />
+ <texture name="object_cone.tga" />
+ <texture name="object_cone_active.tga" />
+ <texture name="object_cube.tga" />
+ <texture name="object_cube_active.tga" />
+ <texture name="object_cylinder.tga" />
+ <texture name="object_cylinder_active.tga" />
+ <texture name="object_grass.tga" />
+ <texture name="object_grass_active.tga" />
+ <texture name="object_hemi_cone.tga" />
+ <texture name="object_hemi_cone_active.tga" />
+ <texture name="object_hemi_cylinder.tga" />
+ <texture name="object_hemi_cylinder_active.tga" />
+ <texture name="object_hemi_sphere.tga" />
+ <texture name="object_hemi_sphere_active.tga" />
+ <texture name="object_prism.tga" />
+ <texture name="object_prism_active.tga" />
+ <texture name="object_pyramid.tga" />
+ <texture name="object_pyramid_active.tga" />
+ <texture name="object_ring.tga" />
+ <texture name="object_ring_active.tga" />
+ <texture name="object_sphere.tga" />
+ <texture name="object_sphere_active.tga" />
+ <texture name="object_tetrahedron.tga" />
+ <texture name="object_tetrahedron_active.tga" />
+ <texture name="object_torus.tga" />
+ <texture name="object_torus_active.tga" />
+ <texture name="object_tree.tga" />
+ <texture name="object_tree_active.tga" />
+ <texture name="object_tube.tga" />
+ <texture name="object_tube_active.tga" />
+
<texture name="pixiesmall.j2c" use_mips="true" />
<texture name="script_error.j2c" use_mips="true" />
<texture name="silhouette.j2c" use_mips="true" />
@@ -640,6 +679,11 @@
<texture name="status_no_push.tga" />
<texture name="status_no_scripts.tga" />
+ <texture name="tool_dozer.tga" />
+ <texture name="tool_dozer_active.tga" />
+ <texture name="tool_zoom.tga" />
+ <texture name="tool_zoom_active.tga" />
+
<texture name="icn_active-speakers-dot-lvl0.tga" />
<texture name="icn_active-speakers-dot-lvl1.tga" />
<texture name="icn_active-speakers-dot-lvl2.tga" />
diff --git a/indra/newview/skins/default/textures/windows/Inspector_Background.png b/indra/newview/skins/default/textures/windows/Inspector_Background.png
index 807e8e553c..4c2a728ac5 100644
--- a/indra/newview/skins/default/textures/windows/Inspector_Background.png
+++ b/indra/newview/skins/default/textures/windows/Inspector_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Toast_Background.png b/indra/newview/skins/default/textures/windows/Toast_Background.png
new file mode 100644
index 0000000000..f27d1a12ec
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Toast_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png
index e9f15e76b9..db253900af 100644
--- a/indra/newview/skins/default/textures/windows/Window_Background.png
+++ b/indra/newview/skins/default/textures/windows/Window_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png
index e76e9f3c79..b81ec5b43c 100644
--- a/indra/newview/skins/default/textures/windows/Window_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
new file mode 100644
index 0000000000..a570ac06bd
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
new file mode 100644
index 0000000000..d573e8c69a
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
index fe04d1f627..d47c726aa9 100644
--- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
@@ -131,7 +131,7 @@
layout="topleft"
left="10"
max_val="4096"
- name="GrapicsCardTextureMemory"
+ name="GraphicsCardTextureMemory"
tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry."
top_pad="10"
width="300" />
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 29fe046ed3..4e5c8c3747 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -3,6 +3,8 @@
follows="left|top|right"
height="570"
layout="topleft"
+ bg_opaque_image="Window_NoTitle_Foreground"
+ bg_alpha_image="Window_NoTitle_Background"
name="toolbox floater"
help_topic="toolbox_floater"
save_rect="true"
diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml
index 181c80ebc7..1e44032b97 100644
--- a/indra/newview/skins/default/xui/en/inspect_avatar.xml
+++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml
@@ -5,7 +5,7 @@
-->
<floater
bevel_style="in"
- bg_opaque_color="MouseGray"
+ bg_opaque_image="Inspector_Background"
can_close="false"
can_minimize="false"
height="138"
diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml
index 5b166e83b8..477fbfd827 100644
--- a/indra/newview/skins/default/xui/en/inspect_group.xml
+++ b/indra/newview/skins/default/xui/en/inspect_group.xml
@@ -5,7 +5,7 @@
-->
<floater
bevel_style="in"
- bg_opaque_color="MouseGray"
+ bg_opaque_image="Inspector_Background"
can_close="false"
can_minimize="false"
height="138"
diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml
index 454c738a50..38e971e0bd 100644
--- a/indra/newview/skins/default/xui/en/inspect_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_object.xml
@@ -5,7 +5,7 @@
-->
<floater
bevel_style="in"
- bg_opaque_color="MouseGray"
+ bg_opaque_image="Inspector_Background"
can_close="false"
can_minimize="false"
height="145"
diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml
new file mode 100644
index 0000000000..0c8a2af002
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu
+ height="101"
+ layout="topleft"
+ left="100"
+ mouse_opaque="false"
+ name="Object Icon Menu"
+ top="724"
+ visible="false"
+ width="128">
+ <menu_item_call
+ label="Object Profile..."
+ layout="topleft"
+ name="Object Profile">
+ <menu_item_call.on_click
+ function="ObjectIcon.Action"
+ parameter="profile" />
+ </menu_item_call>
+ <menu_item_call
+ label="Block..."
+ layout="topleft"
+ name="Block">
+ <menu_item_call.on_click
+ function="ObjectIcon.Action"
+ parameter="block" />
+ </menu_item_call>
+</menu>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ac98907199..9aacb8a92c 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5837,15 +5837,11 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a
<button
index="0"
name="Keep"
- text="OK"/>
+ text="Accept"/>
<button
index="1"
name="Discard"
- text="Cancel"/>
- <button
- index="2"
- name="Mute"
- text="Block"/>
+ text="No, thanks"/>
</form>
</notification>
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
index f747c557e2..8aaa462aaf 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
@@ -47,17 +47,17 @@
top="6"
use_ellipses="true"
value="Unknown"
- width="166" />
+ width="196" />
<text
- follows="left"
+ follows="right"
font="SansSerifSmall"
height="15"
layout="topleft"
left_pad="10"
- name="avatar_status"
+ name="last_interaction"
text_color="LtGray_50"
- value="Away"
- width="50" />
+ value="0s"
+ width="24" />
<output_monitor
auto_update="true"
follows="right"
@@ -75,6 +75,7 @@
image_pressed="Info_Press"
image_hover="Info_Over"
image_unselected="Info_Off"
+ layout="topleft"
left_pad="3"
right="-25"
name="info_btn"
diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml
index 00ede1fb2c..26d8304551 100644
--- a/indra/newview/skins/default/xui/en/panel_instant_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
- bevel_style="in"
bg_alpha_color="0.3 0.3 0.3 0"
- height="140"
+ height="175"
label="im_panel"
layout="topleft"
left="0"
name="im_panel"
top="0"
- width="350">
+ width="305">
<string
name="message_max_lines_count">
6
@@ -19,50 +18,52 @@
bevel_style="in"
bg_alpha_color="black"
follows="top"
- height="30"
+ height="20"
label="im_header"
layout="topleft"
left="5"
name="im_header"
top="5"
- width="340">
+ width="295">
<avatar_icon
follows="right"
height="20"
image_name="icon_avatar_online.tga"
layout="topleft"
- left="5"
+ left="0"
mouse_opaque="true"
name="avatar_icon"
- top="5"
+ top="0"
width="20" />
<icon
follows="right"
height="20"
image_name="icon_top_pick.tga"
layout="topleft"
- left="5"
+ left="0"
mouse_opaque="true"
name="sys_msg_icon"
- top="5"
+ top="0"
width="20" />
<text
follows="left|right"
- font="SansSerifBigBold"
+ font="SansSerifBold"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="5"
name="user_name"
text_color="white"
top="5"
value="Darth Vader"
- width="250" />
+ width="295" />
+ <!-- TIME STAMP -->
<text
follows="right"
- font="SansSerifBig"
+ font="SansSerif"
height="20"
layout="topleft"
- left_pad="10"
+ halign="right"
+ left="245"
name="time_box"
text_color="white"
top="5"
@@ -71,25 +72,25 @@
</panel>
<text
follows="left|top|bottom|right"
- height="60"
+ height="86"
layout="topleft"
left="10"
name="message"
text_color="white"
- top="40"
+ top="33"
use_ellipses="true"
value="MESSAGE"
- width="330"
+ width="285"
word_wrap="true"
max_length="350" />
<button
follows="bottom"
- font="SansSerifBigBold"
+ font="SansSerifBold"
height="25"
- label="reply"
+ label="Reply"
layout="topleft"
- left="120"
+ left="97"
name="reply"
- top="110"
+ top="137"
width="110" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml
index 9c2829d92d..0d34aa0f08 100644
--- a/indra/newview/skins/default/xui/en/panel_notification.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification.xml
@@ -1,37 +1,51 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_opaque="true"
- background_visible="false"
+ background_opaque="false"
+ border_visible="false"
+ border = "false"
+ border_drop_shadow_visible = "false"
+ drop_shadow_visible = "false"
+ background_visible="true"
bg_alpha_color="0.3 0.3 0.3 0"
- height="140"
+ bg_opaque_color="0.3 0.3 0.3 0"
label="notification_panel"
layout="topleft"
left="0"
name="notification_panel"
top="0"
- width="350">
+ height="10"
+ width="305">
+ <!-- THIS PANEL CONTROLS TOAST HEIGHT? -->
<panel
+ border_visible="false"
+ drop_shadow="false"
+ bevel_style="none"
+ border_style="none"
+ border = "false"
+ border_drop_shadow_visible = "false"
+ drop_shadow_visible = "false"
background_visible="true"
- bg_alpha_color="0.3 0.3 0.3 0"
+ bg_alpha_color="0.3 0.3 0.3 0"
+ bg_opaque_color="0.3 0.3 0.3 0"
follows="left|right|top"
- height="100"
+ height="10"
label="info_panel"
layout="topleft"
left="0"
name="info_panel"
top="0"
- width="350">
- <text
+ width="305">
+ <!-- <text
border_visible="false"
follows="left|right|top|bottom"
font="SansSerif"
height="90"
layout="topleft"
- left="45"
+ left="10"
name="text_box"
read_only="true"
text_color="white"
- top="5"
+ top="10"
visible="false"
width="300"
wrap="true"/>
@@ -47,40 +61,43 @@
top="5"
visible="false"
width="300"
- wrap="true"/>
+ wrap="true"/> -->
<text_editor
+ h_pad="0"
+ v_pad="0"
bg_readonly_color="0.0 0.0 0.0 0"
border_visible="false"
+ border = "false"
+ border_drop_shadow_visible = "false"
+ drop_shadow_visible = "false"
embedded_items="false"
enabled="false"
follows="left|right|top|bottom"
font="SansSerif"
- height="90"
layout="topleft"
- left="45"
+ left="10"
mouse_opaque="false"
name="text_editor_box"
read_only="true"
tab_stop="false"
text_color="white"
text_readonly_color="white"
- top="5"
+ top="10"
visible="false"
- width="300"
+ width="285"
wrap="true"/>
</panel>
<panel
- background_visible="true"
- bg_alpha_color="0.3 0.3 0.3 0"
+ background_visible="false"
follows="left|right|bottom"
- height="40"
label="control_panel"
layout="topleft"
left="0"
+ left_delta="-38"
name="control_panel"
- top_pad="0"
- width="350">
+ top="20">
</panel>
+ <!--
<icon
follows="left|top"
height="32"
@@ -90,5 +107,5 @@
mouse_opaque="false"
name="info_icon"
top="20"
- width="32" />
+ width="32" /> -->
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 69089e0e26..0db5a41cc5 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -303,6 +303,7 @@ background_visible="true"
left="0"
multi_select="true"
name="avatar_list"
+ show_last_interaction_time="true"
top="2"
width="313" />
<panel
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index f42bab14de..91dcdce23b 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -20,8 +20,9 @@
</panel.string>
<check_box
control_name="UseChatBubbles"
+ follows="left|top"
height="16"
- label="Bubble Chat"
+ label="Bubble chat"
layout="topleft"
left="30"
top="10"
@@ -30,6 +31,7 @@
<slider
control_name="ChatBubbleOpacity"
+ follows="left|top"
height="16"
increment="0.05"
initial_value="1"
@@ -40,40 +42,24 @@
label_width="50"
name="bubble_chat_opacity"
width="200" />
-
- <!-- <check_box
- control_name="UIAutoScale"
- height="16"
- label="Resolution independent scale"
- layout="topleft"
- left="30"
- name="ui_auto_scale"
- top_pad="10"
- width="256" />-->
- <!--
- <combo_box
- height="18"
- layout="topleft"
- left_pad="5"
- name="fullscreen combo"
- top_delta="-1"
- width="150" /-->
<text
+ follows="left|top"
type="string"
length="1"
height="25"
layout="topleft"
left="30"
- top_pad="20"
+ top_pad="5"
name="AspectRatioLabel1"
tool_tip="width / height"
label_width="50"
width="120">
- Aspect Ratio
+ Aspect ratio
</text>
<combo_box
allow_text_entry="true"
height="20"
+ follows="left|top"
layout="topleft"
left_pad="0"
max_chars="100"
@@ -104,6 +90,7 @@
</combo_box>
<check_box
control_name="FullScreenAutoDetectAspectRatio"
+ follows="left|top"
height="25"
label="Auto-detect"
layout="topleft"
@@ -113,14 +100,14 @@
<check_box.commit_callback
function="Pref.AutoDetectAspect" />
</check_box>
-
<text
+ follows="left|top"
type="string"
length="1"
height="10"
left="30"
name="heading1"
- top_pad="10"
+ top_pad="5"
width="270">
Camera:
</text>
@@ -128,7 +115,7 @@ Camera:
can_edit_text="true"
control_name="CameraAngle"
decimal_digits="2"
- top_pad="10"
+ top_pad="5"
follows="left|top"
height="16"
increment="0.025"
@@ -159,56 +146,62 @@ Camera:
name="camera_offset_scale"
show_text="false"
width="240"
- top_pad="10"/>
+ top_pad="5"/>
<text
+ follows="left|top"
type="string"
length="1"
height="10"
left="30"
name="heading2"
- width="270">
+ width="270"
+ top_pad="5">
Automatic positioning for:
</text>
<check_box
control_name="EditCameraMovement"
height="20"
+ follows="left|top"
label="Build/Edit"
layout="topleft"
left_delta="50"
name="edit_camera_movement"
tool_tip="Use automatic camera positioning when entering and exiting edit mode"
width="280"
- top_pad="10" />
+ top_pad="5" />
<check_box
control_name="AppearanceCameraMovement"
+ follows="left|top"
height="16"
label="Appearance"
layout="topleft"
name="appearance_camera_movement"
tool_tip="Use automatic camera positioning while in edit mode"
width="242" />
-
<text
+ follows="left|top"
type="string"
length="1"
height="10"
left="30"
name="heading3"
- top_pad="10"
+ top_pad="5"
width="270">
Avatars:
</text>
<check_box
control_name="FirstPersonAvatarVisible"
+ follows="left|top"
height="20"
label="Show me in Mouselook"
layout="topleft"
left_delta="50"
name="first_person_avatar_visible"
width="256"
- top_pad="10"/>
+ top_pad="0"/>
<check_box
control_name="ArrowKeysMoveAvatar"
+ follows="left|top"
height="20"
label="Arrow keys always move me"
layout="topleft"
@@ -218,6 +211,7 @@ Avatars:
top_pad="0"/>
<check_box
control_name="AllowTapTapHoldRun"
+ follows="left|top"
height="20"
label="Tap-tap-hold to run"
layout="topleft"
@@ -227,6 +221,7 @@ Avatars:
top_pad="0"/>
<check_box
control_name="LipSyncEnabled"
+ follows="left|top"
height="20"
label="Move avatar lips when speaking"
layout="topleft"
@@ -236,16 +231,18 @@ Avatars:
top_pad="0" />
<check_box
control_name="ShowScriptErrors"
+ follows="left|top"
height="20"
label="Show script errors"
layout="topleft"
left="30"
name="show_script_errors"
width="256"
- top_pad="10"/>
+ top_pad="5"/>
<radio_group
enabled_control="ShowScriptErrors"
control_name="ShowScriptErrorsLocation"
+ follows="top|left"
draw_border="false"
height="40"
layout="topleft"
@@ -259,17 +256,53 @@ Avatars:
layout="topleft"
left="3"
name="0"
- top="3"
+ top="0"
width="315" />
<radio_item
height="16"
label="In window"
layout="topleft"
- left_delta="0"
+ left_delta="175"
name="1"
- top_delta="16"
+ top_delta="0"
width="315" />
</radio_group>
-
-
+ <check_box
+ follows="top|left"
+ height="20"
+ label="Use Push-to-talk in toggle mode"
+ layout="topleft"
+ left="30"
+ name="push_to_talk_toggle_check"
+ width="237"
+ top_pad="-25"
+ tool_tip="When in toggle mode, press and release the push-to-talk trigger to switch your microphone on and off. When not in toggle mode, the microphone is active only when the trigger is held down."/>
+ <line_editor
+ follows="top|left"
+ height="19"
+ left_delta="50"
+ max_length="254"
+ name="modifier_combo"
+ label="Push-to-talk trigger"
+ top_pad="0"
+ width="280" />
+ <button
+ follows="top|left"
+ height="20"
+ label="Set Key"
+ left_delta="0"
+ name="set_voice_hotkey_button"
+ width="115"
+ top_pad="5" />
+ <button
+ bottom_delta="0"
+ follows="left"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Middle Mouse Button"
+ left_delta="120"
+ mouse_opaque="true"
+ name="set_voice_middlemouse_button"
+ width="160" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 2e500fc2aa..200c6622ee 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -1,41 +1,48 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- All our XML is utf-8 encoded. -->
+<!-- All this does is establish the position of the "close" button on the toast. -->
+
<floater
name="toast"
title=""
visible="false"
layout="topleft"
- width="350"
- height="40"
- left="100"
- top="500"
+ width="305"
+ left="0"
+ top="0"
follows="right|bottom"
- bevel_style="in"
+ bg_opaque_image="Toast_Background"
+ bg_alpha_image="Toast_Background"
can_minimize="false"
can_tear_off="false"
can_resize="false"
can_drag_on_left="false"
can_close="false"
can_dock="false"
+ border_visible = "false"
+ border_drop_shadow_visible = "false"
+ drop_shadow_visible = "false"
+ border = "false"
>
+ <!--
<text
visible="false"
follows="left|top|right|bottom"
font="SansSerifBold"
- height="28"
+ height="40"
layout="topleft"
left="60"
name="toast_text"
word_wrap="true"
text_color="white"
- top="10"
+ top="20"
width="290">
Toast text;
</text>
<icon
- top="4"
+ top="20"
left="10"
width="32"
height="32"
@@ -47,24 +54,24 @@
image_name="notify_tip_icon.tga"
mouse_opaque="true"
name="icon"
- />
+ />-->
<button
layout="topleft"
- top="-5"
- left="335"
- width="20"
- height="20"
+ top="-6"
+ left="293"
+ width="17"
+ height="17"
follows="top|right"
visible="false"
enabled="true"
- mouse_opaque="true"
+ mouse_opaque="false"
name="hide_btn"
label=""
tab_stop="false"
- image_unselected="toast_hide_btn.tga"
- image_disabled="toast_hide_btn.tga"
- image_selected="toast_hide_btn.tga"
- image_hover_selected="toast_hide_btn.tga"
- image_disabled_selected="toast_hide_btn.tga"
+ image_unselected="windows/Toast_CloseBtn.png"
+ image_disabled="windows/Toast_CloseBtn.png"
+ image_selected="windows/Toast_CloseBtn.png"
+ image_hover_selected="windows/Toast_CloseBtn.png"
+ image_disabled_selected="windows/Toast_CloseBtn.png"
/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml
index 4a866c2eb2..82f6d44f78 100644
--- a/indra/newview/skins/default/xui/en/widgets/floater.xml
+++ b/indra/newview/skins/default/xui/en/widgets/floater.xml
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- See also settings.xml UIFloater* settings for configuration -->
<floater name="floater"
bg_opaque_color="FloaterFocusBackgroundColor"
bg_alpha_color="FloaterDefaultBackgroundColor"
+ bg_opaque_image="Window_Foreground"
+ bg_alpha_image="Window_Background"
background_visible="true"
- background_opaque="false"/>
+ background_opaque="false"
+ header_height="25"
+ legacy_header_height="18" />
diff --git a/indra/newview/skins/default/xui/en/widgets/panel.xml b/indra/newview/skins/default/xui/en/widgets/panel.xml
index b81a70b845..127f0f40e8 100644
--- a/indra/newview/skins/default/xui/en/widgets/panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/panel.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Optional parameters:
+ bg_opaque_image - image name for "in-front" panel look
+ bg_alpha_image - image name for "in-back" or transparent panel look
+-->
<panel bg_opaque_color="PanelFocusBackgroundColor"
bg_alpha_color="PanelDefaultBackgroundColor"
background_visible="false"
- background_opaque="false"/> \ No newline at end of file
+ background_opaque="false"/>