summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-26 10:36:27 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-26 10:36:27 -0800
commit3d771ed88b1f40ca0a5869530d729a58000ef028 (patch)
treeaabf54705b60159d791944019dcc48c79b1ed0ff /indra
parent020f855f643a198737e7bd4066bdc1757d864a54 (diff)
parentd72748a0af3e77de9a5dfedd2b8c9d87bfe7da24 (diff)
PE merge.
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llaccordionctrl.cpp75
-rw-r--r--indra/llui/llaccordionctrl.h9
-rw-r--r--indra/llui/llaccordionctrltab.cpp34
-rw-r--r--indra/llui/llaccordionctrltab.h1
-rw-r--r--indra/llui/lllineeditor.cpp6
-rw-r--r--indra/llui/llscrolllistctrl.cpp10
-rw-r--r--indra/llui/llscrolllistctrl.h1
-rw-r--r--indra/llui/llscrolllistitem.h2
-rw-r--r--indra/llui/lltextbase.cpp3
-rw-r--r--indra/llui/lltexteditor.cpp14
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llavataractions.cpp7
-rw-r--r--indra/newview/llavataractions.h5
-rw-r--r--indra/newview/llcallfloater.cpp57
-rw-r--r--indra/newview/llcallfloater.h4
-rw-r--r--indra/newview/llcompilequeue.cpp14
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp11
-rw-r--r--indra/newview/llimview.cpp56
-rw-r--r--indra/newview/llimview.h17
-rw-r--r--indra/newview/llinspectavatar.cpp1
-rw-r--r--indra/newview/llmoveview.cpp15
-rw-r--r--indra/newview/llnamelistctrl.cpp21
-rw-r--r--indra/newview/llnamelistctrl.h21
-rw-r--r--indra/newview/llnearbychathandler.cpp5
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp9
-rw-r--r--indra/newview/llpanelgrouproles.cpp10
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp8
-rw-r--r--indra/newview/llpanelplaceinfo.cpp18
-rw-r--r--indra/newview/llpanelplaceprofile.cpp80
-rw-r--r--indra/newview/llpanelplaces.cpp16
-rw-r--r--indra/newview/llpanelplaces.h6
-rw-r--r--indra/newview/llparticipantlist.cpp4
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/llviewerinventory.h2
-rw-r--r--indra/newview/llviewermenu.cpp15
-rw-r--r--indra/newview/llviewermessage.cpp58
-rw-r--r--indra/newview/llvoicechannel.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_other.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_other.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_teleport_history_item.xml1
42 files changed, 466 insertions, 179 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index b5e870228a..d0c73fbfbc 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -63,6 +63,8 @@ static LLDefaultChildRegistry::Register<LLAccordionCtrl> t2("accordion");
LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
, mFitParent(params.fit_parent)
+ , mAutoScrolling( false )
+ , mAutoScrollRate( 0.f )
{
mSingleExpansion = params.single_expansion;
if(mFitParent && !mSingleExpansion)
@@ -72,6 +74,8 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
}
LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
+ , mAutoScrolling( false )
+ , mAutoScrollRate( 0.f )
{
mSingleExpansion = false;
mFitParent = false;
@@ -81,6 +85,19 @@ LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
//---------------------------------------------------------------------------------
void LLAccordionCtrl::draw()
{
+ if (mAutoScrolling)
+ {
+ // add acceleration to autoscroll
+ mAutoScrollRate = llmin(mAutoScrollRate + (LLFrameTimer::getFrameDeltaTimeF32() * AUTO_SCROLL_RATE_ACCEL), MAX_AUTO_SCROLL_RATE);
+ }
+ else
+ {
+ // reset to minimum for next time
+ mAutoScrollRate = MIN_AUTO_SCROLL_RATE;
+ }
+ // clear this flag to be set on next call to autoScroll
+ mAutoScrolling = false;
+
LLRect local_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
LLLocalClipRect clip(local_rect);
@@ -420,6 +437,64 @@ BOOL LLAccordionCtrl::handleKeyHere (KEY key, MASK mask)
return LLPanel::handleKeyHere(key,mask);
}
+BOOL LLAccordionCtrl::handleDragAndDrop (S32 x, S32 y, MASK mask,
+ BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ // Scroll folder view if needed. Never accepts a drag or drop.
+ *accept = ACCEPT_NO;
+ BOOL handled = autoScroll(x, y);
+
+ if( !handled )
+ {
+ handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type,
+ cargo_data, accept, tooltip_msg) != NULL;
+ }
+ return TRUE;
+}
+
+BOOL LLAccordionCtrl::autoScroll (S32 x, S32 y)
+{
+ static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
+ bool scrolling = false;
+ if( mScrollbar->getVisible() )
+ {
+ LLRect rect_local( 0, getRect().getHeight(), getRect().getWidth() - scrollbar_size, 0 );
+ LLRect screen_local_extents;
+
+ // clip rect against root view
+ screenRectToLocal(getRootView()->getLocalRect(), &screen_local_extents);
+ rect_local.intersectWith(screen_local_extents);
+
+ // autoscroll region should take up no more than one third of visible scroller area
+ S32 auto_scroll_region_height = llmin(rect_local.getHeight() / 3, 10);
+ S32 auto_scroll_speed = llround(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32());
+
+ LLRect bottom_scroll_rect = screen_local_extents;
+ bottom_scroll_rect.mTop = rect_local.mBottom + auto_scroll_region_height;
+ if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar->getDocPos() < mScrollbar->getDocPosMax()) )
+ {
+ mScrollbar->setDocPos( mScrollbar->getDocPos() + auto_scroll_speed );
+ mAutoScrolling = true;
+ scrolling = true;
+ }
+
+ LLRect top_scroll_rect = screen_local_extents;
+ top_scroll_rect.mBottom = rect_local.mTop - auto_scroll_region_height;
+ if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar->getDocPos() > 0) )
+ {
+ mScrollbar->setDocPos( mScrollbar->getDocPos() - auto_scroll_speed );
+ mAutoScrolling = true;
+ scrolling = true;
+ }
+ }
+ return scrolling;
+}
+
void LLAccordionCtrl::updateLayout (S32 width, S32 height)
{
S32 panel_top = height - BORDER_MARGIN ;
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index 4cb0f38281..d57a42df32 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -81,6 +81,11 @@ public:
virtual BOOL handleRightMouseDown ( S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel ( S32 x, S32 y, S32 clicks );
virtual BOOL handleKeyHere (KEY key, MASK mask);
+ virtual BOOL handleDragAndDrop (S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
//
// Call reshape after changing splitter's size
@@ -112,11 +117,15 @@ private:
void showScrollbar (S32 width, S32 height);
void hideScrollbar (S32 width, S32 height);
+ BOOL autoScroll (S32 x, S32 y);
+
private:
LLRect mInnerRect;
LLScrollbar* mScrollbar;
bool mSingleExpansion;
bool mFitParent;
+ bool mAutoScrolling;
+ F32 mAutoScrollRate;
};
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 4bfe44135a..daa9e08f14 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -45,6 +45,7 @@ static const std::string DD_HEADER_NAME = "dd_header";
static const S32 HEADER_HEIGHT = 20;
static const S32 HEADER_IMAGE_LEFT_OFFSET = 5;
static const S32 HEADER_TEXT_LEFT_OFFSET = 30;
+static const F32 AUTO_OPEN_TIME = 1.f;
static LLDefaultChildRegistry::Register<LLAccordionCtrlTab> t1("accordion_tab");
@@ -73,6 +74,11 @@ public:
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
+ virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
private:
LLTextBox* mHeaderTextbox;
@@ -92,6 +98,8 @@ private:
LLUIColor mHeaderBGColor;
bool mNeedsHighlight;
+
+ LLFrameTimer mAutoOpenTimer;
};
LLAccordionCtrlTab::LLAccordionCtrlTabHeader::Params::Params()
@@ -209,6 +217,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::onMouseLeave(S32 x, S32 y, MA
{
LLUICtrl::onMouseLeave(x, y, mask);
mNeedsHighlight = false;
+ mAutoOpenTimer.stop();
}
BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, BOOL called_from_parent)
{
@@ -218,8 +227,33 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask,
}
return LLUICtrl::handleKey(key, mask, called_from_parent);
}
+BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent());
+ if ( parent && !parent->getDisplayChildren() && parent->getCollapsible() && parent->canOpenClose() )
+ {
+ if (mAutoOpenTimer.getStarted())
+ {
+ if (mAutoOpenTimer.getElapsedTimeF32() > AUTO_OPEN_TIME)
+ {
+ parent->changeOpenClose(false);
+ mAutoOpenTimer.stop();
+ return TRUE;
+ }
+ }
+ else
+ mAutoOpenTimer.start();
+ }
+ return LLUICtrl::handleDragAndDrop(x, y, mask, drop, cargo_type,
+ cargo_data, accept, tooltip_msg);
+}
LLAccordionCtrlTab::Params::Params()
: title("title")
,display_children("expanded", true)
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index b200d43438..2e0260ab16 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -115,6 +115,7 @@ public:
void changeOpenClose(bool is_open);
void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close;};
+ bool canOpenClose() const { return mCanOpenClose; };
virtual BOOL postBuild();
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 73e4d126f3..cb5aea272d 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -70,6 +70,8 @@ const S32 SCROLL_INCREMENT_DEL = 4; // make space for baskspacing
const F32 AUTO_SCROLL_TIME = 0.05f;
const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. *TODO: make this equal to the double click interval?
+const std::string PASSWORD_ASTERISK( "\xE2\x97\x8F" ); // U+25CF BLACK CIRCLE
+
static LLDefaultChildRegistry::Register<LLLineEditor> r1("line_editor");
// Compiler optimization, generate extern template
@@ -401,7 +403,7 @@ void LLLineEditor::setCursorAtLocalPos( S32 local_mouse_x )
{
for (S32 i = 0; i < mText.length(); i++)
{
- asterix_text += '*';
+ asterix_text += utf8str_to_wstring(PASSWORD_ASTERISK);
}
wtext = asterix_text.c_str();
}
@@ -1599,7 +1601,7 @@ void LLLineEditor::draw()
std::string text;
for (S32 i = 0; i < mText.length(); i++)
{
- text += '*';
+ text += PASSWORD_ASTERISK;
}
mText = text;
}
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 4e84013db0..78386220d9 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -498,7 +498,7 @@ void LLScrollListCtrl::fitContents(S32 max_width, S32 max_height)
{
S32 height = llmin( getRequiredRect().getHeight(), max_height );
if(mPageLines)
- height = llmin( mPageLines * mLineHeight + (mDisplayColumnHeaders ? mHeadingHeight : 0), height );
+ height = llmin( mPageLines * mLineHeight + 2*mBorderThickness + (mDisplayColumnHeaders ? mHeadingHeight : 0), height );
S32 width = getRect().getWidth();
@@ -2760,9 +2760,13 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition
LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos)
{
- if (!item_p.validateBlock()) return NULL;
-
LLScrollListItem *new_item = new LLScrollListItem(item_p);
+ return addRow(new_item, item_p, pos);
+}
+
+LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& item_p, EAddPosition pos)
+{
+ if (!item_p.validateBlock() || !new_item) return NULL;
new_item->setNumColumns(mColumns.size());
// Add any columns we don't already have
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 907dc90bea..d2d2379328 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -148,6 +148,7 @@ public:
// "columns" => [ "column" => column name, "value" => value, "type" => type, "font" => font, "font-style" => style ], "id" => uuid
// Creates missing columns automatically.
virtual LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+ virtual LLScrollListItem* addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& value, EAddPosition pos = ADD_BOTTOM);
virtual LLScrollListItem* addRow(const LLScrollListItem::Params& value, EAddPosition pos = ADD_BOTTOM);
// Simple add element. Takes a single array of:
// [ "value" => value, "font" => font, "font-style" => style ]
diff --git a/indra/llui/llscrolllistitem.h b/indra/llui/llscrolllistitem.h
index 15b86cc945..25ce846d90 100644
--- a/indra/llui/llscrolllistitem.h
+++ b/indra/llui/llscrolllistitem.h
@@ -95,7 +95,7 @@ public:
void setUserdata( void* userdata ) { mUserdata = userdata; }
void* getUserdata() const { return mUserdata; }
- LLUUID getUUID() const { return mItemValue.asUUID(); }
+ virtual LLUUID getUUID() const { return mItemValue.asUUID(); }
LLSD getValue() const { return mItemValue; }
void setRect(LLRect rect) { mRectangle = rect; }
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index ab0d9b2221..8abbc833e5 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -244,7 +244,8 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
LLTextBase::~LLTextBase()
{
- delete mPopupMenu;
+ // Menu, like any other LLUICtrl, is deleted by its parent - gMenuHolder
+
clearSegments();
}
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index f2c3879a6c..06ba0d80e9 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2040,6 +2040,20 @@ void LLTextEditor::showContextMenu(S32 x, S32 y)
LLMenuHolderGL::child_registry_t::instance());
}
+ // Route menu to this class
+ // previously this was done in ::handleRightMoseDown:
+ //if(hasTabStop())
+ // setFocus(TRUE) - why? weird...
+ // and then inside setFocus
+ // ....
+ // gEditMenuHandler = this;
+ // ....
+ // but this didn't work in all cases and just weird...
+ //why not here?
+ // (all this was done for EXT-4443)
+
+ gEditMenuHandler = this;
+
S32 screen_x, screen_y;
localPointToScreen(x, y, &screen_x, &screen_y);
mContextMenu->show(screen_x, screen_y);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 5373556c20..492e3b1c7f 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -343,7 +343,6 @@ set(viewer_SOURCE_FILES
llpanelprimmediacontrols.cpp
llpanelprofile.cpp
llpanelprofileview.cpp
- llpanelshower.cpp
llpanelteleporthistory.cpp
llpanelvolume.cpp
llpanelvolumepulldown.cpp
@@ -846,7 +845,6 @@ set(viewer_HEADER_FILES
llpanelprimmediacontrols.h
llpanelprofile.h
llpanelprofileview.h
- llpanelshower.h
llpanelteleporthistory.h
llpanelvolume.h
llpanelvolumepulldown.h
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index bb14c41cec..7eed2e7b9a 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -250,17 +250,20 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids)
make_ui_sound("UISndStartIM");
}
+/* AD *TODO: Is this function needed any more?
+ I fixed it a bit(added check for canCall), but it appears that it is not used
+ anywhere. Maybe it should be removed?
// static
bool LLAvatarActions::isCalling(const LLUUID &id)
{
- if (id.isNull())
+ if (id.isNull() || !canCall())
{
return false;
}
LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
return (LLIMModel::getInstance()->findIMSession(session_id) != NULL);
-}
+}*/
//static
bool LLAvatarActions::canCall()
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index ebfd40b796..c751661acf 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -126,7 +126,10 @@ public:
/**
* Return true if the avatar is in a P2P voice call with a given user
*/
- static bool isCalling(const LLUUID &id);
+ /* AD *TODO: Is this function needed any more?
+ I fixed it a bit(added check for canCall), but it appears that it is not used
+ anywhere. Maybe it should be removed?
+ static bool isCalling(const LLUUID &id);*/
/**
* @return true if call to the resident can be made
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index d9df537e03..1e713dade8 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -568,33 +568,46 @@ void LLCallFloater::updateParticipantsVoiceState()
if (!found)
{
- // If an avatarID is not found in a speakers list from VoiceClient and
- // a panel with this ID has a JOINED status this means that this person
- // HAS LEFT the call.
- if ((getState(participant_id) == STATE_JOINED))
- {
- setState(item, STATE_LEFT);
+ updateNotInVoiceParticipantState(item);
+ }
+ }
+}
- LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(item->getAvatarId());
- if (speaker.isNull())
- {
- continue;
- }
+void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item)
+{
+ LLUUID participant_id = item->getAvatarId();
+ ESpeakerState current_state = getState(participant_id);
- speaker->mHasLeftCurrentCall = TRUE;
- }
- // If an avatarID is not found in a speakers list from VoiceClient and
- // a panel with this ID has a LEFT status this means that this person
- // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status
- else if ((getState(participant_id) != STATE_LEFT))
- {
- setState(item, STATE_INVITED);
- }
- else
+ switch (current_state)
+ {
+ case STATE_JOINED:
+ // If an avatarID is not found in a speakers list from VoiceClient and
+ // a panel with this ID has a JOINED status this means that this person
+ // HAS LEFT the call.
+ setState(item, STATE_LEFT);
+
+ {
+ LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(participant_id);
+ if (speaker.notNull())
{
- llwarns << "Unsupported (" << getState(participant_id) << ") state: " << item->getAvatarName() << llendl;
+ speaker->mHasLeftCurrentCall = TRUE;
}
}
+ break;
+ case STATE_INVITED:
+ case STATE_LEFT:
+ // nothing to do. These states should not be changed.
+ break;
+ case STATE_UNKNOWN:
+ // If an avatarID is not found in a speakers list from VoiceClient and
+ // a panel with this ID has an UNKNOWN status this means that this person
+ // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status
+ setState(item, STATE_INVITED);
+ break;
+ default:
+ // for possible new future states.
+ llwarns << "Unsupported (" << getState(participant_id) << ") state for: " << item->getAvatarName() << llendl;
+ break;
}
}
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index eded3a426b..766191379b 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -145,6 +145,10 @@ private:
*/
void updateParticipantsVoiceState();
+ /**
+ * Updates voice state of participant not in current voice channel depend on its current state.
+ */
+ void updateNotInVoiceParticipantState(LLAvatarListItem* item);
void setState(LLAvatarListItem* item, ESpeakerState state);
void setState(const LLUUID& speaker_id, ESpeakerState state)
{
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 47f1b7c9f5..5c05a54120 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -446,19 +446,17 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
- //TODO* CHAT: how to show this?
- //LLSD args;
- //args["MESSAGE"] = LLTrans::getString("CompileQueueScriptNotFound);
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = LLTrans::getString("CompileQueueScriptNotFound");
+ LLNotificationsUtil::add("SystemMessage", args);
buffer = LLTrans::getString("CompileQueueProblemDownloading") + (": ") + data->mScriptName;
}
else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
{
- //TODO* CHAT: how to show this?
- //LLSD args;
- //args["MESSAGE"] = LLTrans::getString("CompileQueueScriptNotFound);
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = LLTrans::getString("CompileQueueInsufficientPermDownload");
+ LLNotificationsUtil::add("SystemMessage", args);
buffer = LLTrans::getString("CompileQueueInsufficientPermFor") + (": ") + data->mScriptName;
}
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index 0964ad7f91..8875e35821 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -528,7 +528,16 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild()
std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting");
childSetValue("loading_text", LLSD(msg_waiting));
-
+
+ LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list");
+
+ //set all columns to resizable mode even if some columns will be empty
+ for(S32 column = 0; column < list->getNumColumns(); column++)
+ {
+ LLScrollListColumn* columnp = list->getColumn(column);
+ columnp->mHeader->setHasResizableElement(TRUE);
+ }
+
return StartRequestChain();
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 32b0cbff38..f90a51c3f3 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -95,7 +95,8 @@ void toast_callback(const LLSD& msg){
}
// check whether incoming IM belongs to an active session or not
- if (LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
+ if (LLIMModel::getInstance()->getActiveSessionID().notNull()
+ && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
{
return;
}
@@ -1577,7 +1578,7 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id)
}
}
-bool LLOutgoingCallDialog::lifetimeHasExpired()
+bool LLCallDialog::lifetimeHasExpired()
{
if (mLifetimeTimer.getStarted())
{
@@ -1590,7 +1591,7 @@ bool LLOutgoingCallDialog::lifetimeHasExpired()
return false;
}
-void LLOutgoingCallDialog::onLifetimeExpired()
+void LLCallDialog::onLifetimeExpired()
{
mLifetimeTimer.stop();
closeFloater();
@@ -1744,19 +1745,6 @@ LLCallDialog(payload)
{
}
-bool LLIncomingCallDialog::lifetimeHasExpired()
-{
- if (mLifetimeTimer.getStarted())
- {
- F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32();
- if (elapsed_time > mLifetime)
- {
- return true;
- }
- }
- return false;
-}
-
void LLIncomingCallDialog::onLifetimeExpired()
{
// check whether a call is valid or not
@@ -3218,6 +3206,42 @@ public:
}
};
+LLCallInfoDialog::LLCallInfoDialog(const LLSD& payload) : LLCallDialog(payload)
+{
+}
+
+BOOL LLCallInfoDialog::postBuild()
+{
+ // init notification's lifetime
+ std::istringstream ss( getString("lifetime") );
+ if (!(ss >> mLifetime))
+ {
+ mLifetime = DEFAULT_LIFETIME;
+ }
+ return LLCallDialog::postBuild();
+}
+
+void LLCallInfoDialog::onOpen(const LLSD& key)
+{
+ if(key.has("msg"))
+ {
+ std::string msg = key["msg"];
+ getChild<LLTextBox>("msg")->setValue(msg);
+ }
+
+ mLifetimeTimer.start();
+}
+
+void LLCallInfoDialog::show(const std::string& status_name, const LLSD& args)
+{
+ LLUIString message = LLTrans::getString(status_name);
+ message.setArgs(args);
+
+ LLSD payload;
+ payload["msg"] = message;
+ LLFloaterReg::showInstance("call_info", payload);
+}
+
LLHTTPRegistration<LLViewerChatterBoxSessionStartReply>
gHTTPRegistrationMessageChatterboxsessionstartreply(
"/message/ChatterBoxSessionStartReply");
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index a3b4f78af0..0386ff234d 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -512,8 +512,8 @@ protected:
// notification's lifetime in seconds
S32 mLifetime;
static const S32 DEFAULT_LIFETIME = 5;
- virtual bool lifetimeHasExpired() {return false;};
- virtual void onLifetimeExpired() {};
+ virtual bool lifetimeHasExpired();
+ virtual void onLifetimeExpired();
virtual void getAllowedRect(LLRect& rect);
@@ -543,7 +543,6 @@ public:
static void onStartIM(void* user_data);
private:
- /*virtual*/ bool lifetimeHasExpired();
/*virtual*/ void onLifetimeExpired();
void processCallResponse(S32 response);
};
@@ -562,8 +561,16 @@ public:
private:
// hide all text boxes
void hideAllText();
- /*virtual*/ bool lifetimeHasExpired();
- /*virtual*/ void onLifetimeExpired();
+};
+
+class LLCallInfoDialog : public LLCallDialog
+{
+public:
+ LLCallInfoDialog(const LLSD& payload);
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ static void show(const std::string& status_name, const LLSD& args);
};
// Globals
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 4b0539337b..3a41aebf28 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -229,6 +229,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn",
boost::bind(&LLInspectAvatar::onVisibleZoomIn, this));
mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this));
+ mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableCall", boost::bind(&LLAvatarActions::canCall));
mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this));
mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this));
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 0ab3b07aea..5981baab60 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -589,8 +589,16 @@ void LLPanelStandStopFlying::setVisible(BOOL visible)
updatePosition();
}
- //change visibility of parent layout_panel to animate in/out
- if (getParent()) getParent()->setVisible(visible);
+ // do not change parent visibility in case panel is attached into Move Floater: EXT-3632, EXT-4646
+ if (!mAttached)
+ {
+ //change visibility of parent layout_panel to animate in/out. EXT-2504
+ if (getParent()) getParent()->setVisible(visible);
+ }
+
+ // also change own visibility to avoid displaying the panel in mouselook (broken when EXT-2504 was implemented).
+ // See EXT-4718.
+ LLPanel::setVisible(visible);
}
BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask)
@@ -614,7 +622,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
LLPanel* parent = dynamic_cast<LLPanel*>(getParent());
if (!parent)
{
- llwarns << "Stand/stop flying panel parent is unset" << llendl;
+ llwarns << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << llendl;
return;
}
@@ -684,6 +692,7 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
gAgent.setFlying(FALSE);
setFocus(FALSE); // EXT-482
+ setVisible(FALSE);
}
/**
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 6375362ae2..9f04558d50 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -148,7 +148,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
&& column_index == mNameColumnIndex)
{
// ...this is the column with the avatar name
- LLUUID avatar_id = getItemId(hit_item);
+ LLUUID avatar_id = hit_item->getUUID();
if (avatar_id.notNull())
{
// ...valid avatar id
@@ -230,14 +230,15 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
std::string& suffix)
{
LLUUID id = name_item.value().asUUID();
- LLScrollListItem* item = NULL;
+ LLNameListItem* item = NULL;
// Store item type so that we can invoke the proper inspector.
// *TODO Vadim: Is there a more proper way of storing additional item data?
{
- LLNameListCtrl::NameItem name_item_(name_item);
- name_item_.value = LLSD().with("uuid", id).with("is_group", name_item.target() == GROUP);
- item = LLScrollListCtrl::addRow(name_item_, pos);
+ LLNameListCtrl::NameItem item_p(name_item);
+ item_p.value = LLSD().with("uuid", id).with("is_group", name_item.target() == GROUP);
+ item = new LLNameListItem(item_p);
+ LLScrollListCtrl::addRow(item, item_p, pos);
}
if (!item) return NULL;
@@ -298,7 +299,7 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++)
{
LLScrollListItem* item = *it;
- if (getItemId(item) == agent_id)
+ if (item->getUUID() == agent_id)
{
idx = getItemIndex(item);
break;
@@ -335,7 +336,7 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first,
for (iter = getItemList().begin(); iter != getItemList().end(); iter++)
{
LLScrollListItem* item = *iter;
- if (getItemId(item) == id)
+ if (item->getUUID() == id)
{
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0);
cell = item->getColumn(mNameColumnIndex);
@@ -375,9 +376,3 @@ void LLNameListCtrl::updateColumns()
}
}
}
-
-// static
-LLUUID LLNameListCtrl::getItemId(LLScrollListItem* item)
-{
- return item->getValue()["uuid"].asUUID();
-}
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 192a3a5afa..23b1cb6897 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -122,7 +122,6 @@ public:
/*virtual*/ void updateColumns();
private:
void showInspector(const LLUUID& avatar_id, bool is_group);
- static LLUUID getItemId(LLScrollListItem* item);
private:
S32 mNameColumnIndex;
@@ -130,4 +129,24 @@ private:
BOOL mAllowCallingCardDrop;
};
+/**
+ * LLNameListCtrl item
+ *
+ * We don't use LLScrollListItem to be able to override getUUID(), which is needed
+ * because the name list item value is not simply an UUID but a map (uuid, is_group).
+ */
+class LLNameListItem : public LLScrollListItem
+{
+public:
+ LLUUID getUUID() const { return getValue()["uuid"].asUUID(); }
+
+protected:
+ friend class LLNameListCtrl;
+
+ LLNameListItem( const LLScrollListItem::Params& p )
+ : LLScrollListItem(p)
+ {
+ }
+};
+
#endif
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index c50e049d4c..a1a9d84c14 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -356,12 +356,17 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
initChannel();
}
+ /*
+ //comment all this due to EXT-4432
+ ..may clean up after some time...
+
//only messages from AGENTS
if(CHAT_SOURCE_OBJECT == chat_msg.mSourceType)
{
if(chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG)
return;//ok for now we don't skip messeges from object, so skip only debug messages
}
+ */
LLUUID id;
id.generate();
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index fba5773602..02f948eca9 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -123,7 +123,14 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
message);
// restore active session id
- LLIMModel::instance().setActiveSessionID(active_session_id);
+ if (active_session_id.isNull())
+ {
+ LLIMModel::instance().resetActiveSessionID();
+ }
+ else
+ {
+ LLIMModel::instance().setActiveSessionID(active_session_id);
+ }
}
}
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 45f0381d6f..c6287472fe 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -867,7 +867,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
for (itor = selection.begin();
itor != selection.end(); ++itor)
{
- LLUUID member_id = (*itor)->getValue()["uuid"];
+ LLUUID member_id = (*itor)->getUUID();
selected_members.push_back( member_id );
// Get this member's power mask including any unsaved changes
@@ -1093,7 +1093,7 @@ void LLPanelGroupMembersSubTab::handleEjectMembers()
for (itor = selection.begin() ;
itor != selection.end(); ++itor)
{
- LLUUID member_id = (*itor)->getValue()["uuid"];
+ LLUUID member_id = (*itor)->getUUID();
selected_members.push_back( member_id );
}
@@ -1151,7 +1151,7 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
itor != selection.end(); ++itor)
{
- member_id = (*itor)->getValue()["uuid"];
+ member_id = (*itor)->getUUID();
//see if we requested a change for this member before
if ( mMemberRoleChangeData.find(member_id) == mMemberRoleChangeData.end() )
@@ -1242,7 +1242,7 @@ void LLPanelGroupMembersSubTab::handleMemberDoubleClick()
LLScrollListItem* selected = mMembersList->getFirstSelected();
if (selected)
{
- LLUUID member_id = selected->getValue()["uuid"];
+ LLUUID member_id = selected->getUUID();
LLAvatarActions::showProfile( member_id );
}
}
@@ -1632,7 +1632,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
LLScrollListItem* member = mMembersList->addElement(row);//, ADD_SORTED);
- LLUUID id = member->getValue()["uuid"];
+ LLUUID id = member->getUUID();
mHasMatch = TRUE;
}
}
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 9654e17659..c792fd4fe3 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -98,10 +98,10 @@ void LLPanelLandmarkInfo::resetLocation()
{
LLPanelPlaceInfo::resetLocation();
- std::string not_available = getString("not_available");
- mCreator->setText(not_available);
- mOwner->setText(not_available);
- mCreated->setText(not_available);
+ std::string loading = LLTrans::getString("LoadingData");
+ mCreator->setText(loading);
+ mOwner->setText(loading);
+ mCreated->setText(loading);
mLandmarkTitle->setText(LLStringUtil::null);
mLandmarkTitleEditor->setText(LLStringUtil::null);
mNotesEditor->setText(LLStringUtil::null);
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 0c10f11bfc..5f75668722 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -43,6 +43,8 @@
#include "lliconctrl.h"
#include "lltextbox.h"
+#include "lltrans.h"
+
#include "llagent.h"
#include "llexpandabletextbox.h"
#include "llpanelpick.h"
@@ -99,12 +101,12 @@ void LLPanelPlaceInfo::resetLocation()
mRequestedID.setNull();
mPosRegion.clearVec();
- std::string not_available = getString("not_available");
- mMaturityRatingIcon->setValue(not_available);
- mMaturityRatingText->setValue(not_available);
- mRegionName->setText(not_available);
- mParcelName->setText(not_available);
- mDescEditor->setText(not_available);
+ std::string loading = LLTrans::getString("LoadingData");
+ mMaturityRatingIcon->setValue(loading);
+ mMaturityRatingText->setValue(loading);
+ mRegionName->setText(loading);
+ mParcelName->setText(loading);
+ mDescEditor->setText(loading);
mSnapshotCtrl->setImageAssetID(LLUUID::null);
mSnapshotCtrl->setFallbackImageName("default_land_picture.j2c");
@@ -206,6 +208,10 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
{
mDescEditor->setText(parcel_data.desc);
}
+ else
+ {
+ mDescEditor->setText(getString("not_available"));
+ }
S32 region_x;
S32 region_y;
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index d892e2885b..3c798639d4 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -42,6 +42,8 @@
#include "lltextbox.h"
#include "lltexteditor.h"
+#include "lltrans.h"
+
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llagent.h"
@@ -163,45 +165,45 @@ void LLPanelPlaceProfile::resetLocation()
mForSalePanel->setVisible(FALSE);
mYouAreHerePanel->setVisible(FALSE);
- std::string not_available = getString("not_available");
- mParcelOwner->setValue(not_available);
-
- mParcelRatingIcon->setValue(not_available);
- mParcelRatingText->setText(not_available);
- mVoiceIcon->setValue(not_available);
- mVoiceText->setText(not_available);
- mFlyIcon->setValue(not_available);
- mFlyText->setText(not_available);
- mPushIcon->setValue(not_available);
- mPushText->setText(not_available);
- mBuildIcon->setValue(not_available);
- mBuildText->setText(not_available);
- mScriptsIcon->setValue(not_available);
- mScriptsText->setText(not_available);
- mDamageIcon->setValue(not_available);
- mDamageText->setText(not_available);
-
- mRegionNameText->setValue(not_available);
- mRegionTypeText->setValue(not_available);
- mRegionRatingIcon->setValue(not_available);
- mRegionRatingText->setValue(not_available);
- mRegionOwnerText->setValue(not_available);
- mRegionGroupText->setValue(not_available);
-
- mEstateNameText->setValue(not_available);
- mEstateRatingText->setValue(not_available);
- mEstateOwnerText->setValue(not_available);
- mCovenantText->setValue(not_available);
-
- mSalesPriceText->setValue(not_available);
- mAreaText->setValue(not_available);
- mTrafficText->setValue(not_available);
- mPrimitivesText->setValue(not_available);
- mParcelScriptsText->setValue(not_available);
- mTerraformLimitsText->setValue(not_available);
- mSubdivideText->setValue(not_available);
- mResaleText->setValue(not_available);
- mSaleToText->setValue(not_available);
+ std::string loading = LLTrans::getString("LoadingData");
+ mParcelOwner->setValue(loading);
+
+ mParcelRatingIcon->setValue(loading);
+ mParcelRatingText->setText(loading);
+ mVoiceIcon->setValue(loading);
+ mVoiceText->setText(loading);
+ mFlyIcon->setValue(loading);
+ mFlyText->setText(loading);
+ mPushIcon->setValue(loading);
+ mPushText->setText(loading);
+ mBuildIcon->setValue(loading);
+ mBuildText->setText(loading);
+ mScriptsIcon->setValue(loading);
+ mScriptsText->setText(loading);
+ mDamageIcon->setValue(loading);
+ mDamageText->setText(loading);
+
+ mRegionNameText->setValue(loading);
+ mRegionTypeText->setValue(loading);
+ mRegionRatingIcon->setValue(loading);
+ mRegionRatingText->setValue(loading);
+ mRegionOwnerText->setValue(loading);
+ mRegionGroupText->setValue(loading);
+
+ mEstateNameText->setValue(loading);
+ mEstateRatingText->setValue(loading);
+ mEstateOwnerText->setValue(loading);
+ mCovenantText->setValue(loading);
+
+ mSalesPriceText->setValue(loading);
+ mAreaText->setValue(loading);
+ mTrafficText->setValue(loading);
+ mPrimitivesText->setValue(loading);
+ mParcelScriptsText->setValue(loading);
+ mTerraformLimitsText->setValue(loading);
+ mSubdivideText->setValue(loading);
+ mResaleText->setValue(loading);
+ mSaleToText->setValue(loading);
}
// virtual
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index a8a9717750..7272a8a652 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -34,7 +34,7 @@
#include "llpanelplaces.h"
#include "llassettype.h"
-#include "llwindow.h"
+#include "lltimer.h"
#include "llinventory.h"
#include "lllandmark.h"
@@ -49,6 +49,8 @@
#include "lltrans.h"
#include "lluictrlfactory.h"
+#include "llwindow.h"
+
#include "llagent.h"
#include "llagentpicksinfo.h"
#include "llavatarpropertiesprocessor.h"
@@ -73,6 +75,7 @@
#include "llviewerwindow.h"
static const S32 LANDMARK_FOLDERS_MENU_WIDTH = 250;
+static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0;
static const std::string AGENT_INFO_TYPE = "agent";
static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark";
static const std::string LANDMARK_INFO_TYPE = "landmark";
@@ -830,6 +833,10 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
{
mPlaceProfile->resetLocation();
+ // Do not reset location info until mResetInfoTimer has expired
+ // to avoid text blinking.
+ mResetInfoTimer.setTimerExpirySec(PLACE_INFO_UPDATE_INTERVAL);
+
LLRect rect = getRect();
LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom);
mPlaceProfile->reshape(new_rect.getWidth(), new_rect.getHeight());
@@ -920,11 +927,12 @@ void LLPanelPlaces::changedParcelSelection()
}
}
- // Reset location info only if global position is changed
- // to reduce unnecessary text and icons updates.
- if (prev_pos_global != mPosGlobal)
+ // Reset location info only if global position has changed
+ // and update timer has expired to reduce unnecessary text and icons updates.
+ if (prev_pos_global != mPosGlobal && mResetInfoTimer.hasExpired())
{
mPlaceProfile->resetLocation();
+ mResetInfoTimer.setTimerExpirySec(PLACE_INFO_UPDATE_INTERVAL);
}
mPlaceProfile->displaySelectedParcelInfo(parcel, region, mPosGlobal, is_current_parcel);
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 0eba7f3afc..a098974659 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -34,6 +34,8 @@
#include "llpanel.h"
+class LLTimer;
+
class LLInventoryItem;
class LLFilterEditor;
class LLLandmark;
@@ -132,6 +134,10 @@ private:
// be available (hence zero)
LLVector3d mPosGlobal;
+ // Sets a period of time during which the requested place information
+ // is expected to be updated and doesn't need to be reset.
+ LLTimer mResetInfoTimer;
+
// Information type currently shown in Place Information panel
std::string mPlaceInfoType;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index c0302eee9e..f83f3eba96 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -628,7 +628,9 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD&
}
else if (item == "can_call")
{
- return LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking();
+ bool not_agent = mUUIDs.front() != gAgentID;
+ bool can_call = not_agent && LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking();
+ return can_call;
}
return true;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 3a834e7532..e87d380e4d 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -204,6 +204,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);
+ LLFloaterReg::add("call_info", "floater_call_info.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallInfoDialog>);
LLFloaterReg::add("parcel_info", "floater_preview_url.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterParcelInfo>);
LLFloaterPayUtil::registerFloater();
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 917b8747ea..7f3f019b07 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -58,7 +58,6 @@ public:
protected:
~LLViewerInventoryItem( void ); // ref counted
BOOL extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const { return extractSortFieldAndDisplayName(mName, sortField, displayName); }
- static char getSeparator() { return '@'; }
mutable std::string mDisplayName;
public:
@@ -67,6 +66,7 @@ public:
virtual const std::string& getName() const;
virtual const std::string& getDisplayName() const;
static std::string getDisplayName(const std::string& name);
+ static char getSeparator() { return '@'; }
virtual S32 getSortField() const;
virtual void setSortField(S32 sortField);
virtual void rename(const std::string& new_name);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5ff5b82a17..96251f7571 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6389,10 +6389,9 @@ void handle_selected_texture_info(void*)
msg.assign("Texture info for: ");
msg.append(node->mName);
- //TODO* CHAT: how to show this?
- //LLSD args;
- //args["MESSAGE"] = msg;
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = msg;
+ LLNotificationsUtil::add("SystemMessage", args);
U8 te_count = node->getObject()->getNumTEs();
// map from texture ID to list of faces using it
@@ -6425,10 +6424,9 @@ void handle_selected_texture_info(void*)
msg.append( llformat("%d ", (S32)(it->second[i])));
}
- //TODO* CHAT: how to show this?
- //LLSD args;
- //args["MESSAGE"] = msg;
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = msg;
+ LLNotificationsUtil::add("SystemMessage", args);
}
}
}
@@ -7959,6 +7957,7 @@ void initialize_menus()
commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD()));
view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
+ enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 0358efc0af..d6ce356c4b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1365,10 +1365,9 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
if (check_offer_throttle(mFromName, true))
{
log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString(".");
- //TODO* CHAT: how to show this?
- //LLSD args;
- //args["MESSAGE"] = log_message;
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = log_message;
+ LLNotificationsUtil::add("SystemMessage", args);
}
// we will want to open this item when it comes back.
@@ -1410,11 +1409,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
// send the message
msg->sendReliable(mHost);
- //TODO* CHAT: how to show this?
- //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +".";
- //LLSD args;
- //args["MESSAGE"] = log_message;
- //LLNotificationsUtil::add("SystemMessage", args);
+ log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +".";
+ LLSD args;
+ args["MESSAGE"] = log_message;
+ LLNotificationsUtil::add("SystemMessage", args);
if (busy && (!mFromGroup && !mFromObject))
{
@@ -1436,6 +1434,31 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
return false;
}
+std::string get_display_name(const std::string& name)
+{
+ // We receive landmark name as \'<n>@name\' where <n> is a number
+ // LLViewerInventoryItem::getDisplayName will remove \'<n>@ though we need the \'
+ // Lets save all chars preceding @ and insert them back after <n>@ was removed
+
+ std::string saved;
+
+ if(std::string::npos != name.find(LLViewerInventoryItem::getSeparator()))
+ {
+ int n = 0;
+ while(!isdigit(name[n]) && LLViewerInventoryItem::getSeparator() != name[n])
+ {
+ ++n;
+ }
+ saved = name.substr(0, n);
+ }
+
+ std::string d_name = LLViewerInventoryItem::getDisplayName(name);
+ d_name.insert(0, saved);
+ LLStringUtil::trim(d_name);
+
+ return d_name;
+}
+
void inventory_offer_handler(LLOfferInfo* info)
{
//Until throttling is implmented, busy mode should reject inventory instead of silently
@@ -1475,7 +1498,7 @@ void inventory_offer_handler(LLOfferInfo* info)
if(LLAssetType::AT_LANDMARK == info->mType)
{
- msg = LLViewerInventoryItem::getDisplayName(msg);
+ msg = get_display_name(msg);
}
LLSD args;
@@ -1843,11 +1866,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// history. Pretend the chat is from a local agent,
// so it will go into the history but not be shown on screen.
- //TODO* CHAT: how to show this?
- //and this is not system message...
- //LLSD args;
- //args["MESSAGE"] = buffer;
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = buffer;
+ LLNotificationsUtil::add("SystemMessageTip", args);
}
}
break;
@@ -3078,10 +3099,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
{
// Chat the "back" SLURL. (DEV-4907)
- //TODO* CHAT: how to show this?
- //LLSD args;
- //args["MESSAGE"] = message;
- //LLNotificationsUtil::add("SystemMessage", args);
+ LLSD args;
+ args["MESSAGE"] = "Teleport completed from " + gAgent.getTeleportSourceSLURL();
+ LLNotificationsUtil::add("SystemMessageTip", args);
// Set the new position
avatarp->setPositionAgent(agent_pos);
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 917d69fe16..589999c026 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -389,13 +389,13 @@ void LLVoiceChannel::setState(EState state)
switch(state)
{
case STATE_RINGING:
- gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs);
+ LLCallInfoDialog::show("ringing", mNotifyArgs);
break;
case STATE_CONNECTED:
- gIMMgr->addSystemMessage(mSessionID, "connected", mNotifyArgs);
+ LLCallInfoDialog::show("connected", mNotifyArgs);
break;
case STATE_HUNG_UP:
- gIMMgr->addSystemMessage(mSessionID, "hang_up", mNotifyArgs);
+ LLCallInfoDialog::show("hang_up", mNotifyArgs);
break;
default:
break;
@@ -635,7 +635,7 @@ void LLVoiceChannelGroup::setState(EState state)
case STATE_RINGING:
if ( !mIsRetrying )
{
- gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs);
+ LLCallInfoDialog::show("ringing", mNotifyArgs);
}
doSetState(state);
@@ -698,7 +698,7 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status)
// do not notify user when leaving proximal channel
return;
case STATUS_VOICE_DISABLED:
- gIMMgr->addSystemMessage(LLUUID::null, "unavailable", mNotifyArgs);
+ LLCallInfoDialog::show("unavailable", mNotifyArgs);
return;
default:
break;
@@ -897,7 +897,7 @@ void LLVoiceChannelP2P::setState(EState state)
// so provide a special purpose message here
if (mReceivedCall && state == STATE_RINGING)
{
- gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs);
+ LLCallInfoDialog::show("answering", mNotifyArgs);
doSetState(state);
return;
}
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index b0bb282abd..775e7d66f7 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -2,9 +2,9 @@
<floater
legacy_header_height="13"
can_resize="true"
- height="646"
+ height="546"
layout="topleft"
- min_height="646"
+ min_height="546"
min_width="670"
name="floater_search"
help_topic="floater_search"
@@ -21,7 +21,7 @@
Done
</floater.string>
<layout_stack
- bottom="641"
+ bottom="541"
follows="left|right|top|bottom"
layout="topleft"
left="10"
@@ -42,7 +42,7 @@
left="0"
name="browser"
top="0"
- height="600"
+ height="500"
width="650" />
<text
follows="bottom|left"
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index 5b94645b60..c5b31c7f63 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -30,6 +30,8 @@
name="Call">
<menu_item_call.on_click
function="Avatar.Call" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableCall" />
</menu_item_call>
<menu_item_call
label="Invite to Group"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index 0ad41546d2..ac9101cfd9 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -30,6 +30,8 @@
name="Call">
<menu_item_call.on_click
function="Avatar.Call" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableCall" />
</menu_item_call>
<menu_item_call
label="Invite to Group"
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index dde92f23b6..85ec174829 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -32,6 +32,8 @@
name="call">
<menu_item_call.on_click
function="InspectAvatar.Call"/>
+ <menu_item_call.on_enable
+ function="InspectAvatar.Gear.EnableCall"/>
</menu_item_call>
<menu_item_call
label="Teleport"
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
index 4f40e00815..c5f3fcc27d 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
@@ -41,6 +41,7 @@
height="20"
layout="topleft"
left_pad="5"
+ allow_html="false"
use_ellipses="true"
name="region"
text_color="white"