summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llavataractions.cpp18
-rw-r--r--indra/newview/llavatarlist.cpp12
-rw-r--r--indra/newview/llavatarlist.h4
-rw-r--r--indra/newview/llavatarlistitem.cpp15
-rw-r--r--indra/newview/llavatarlistitem.h2
-rw-r--r--indra/newview/llcallfloater.cpp27
-rw-r--r--indra/newview/llchiclet.cpp5
-rw-r--r--indra/newview/llfavoritesbar.cpp32
-rw-r--r--indra/newview/llfavoritesbar.h11
-rw-r--r--indra/newview/llfloatergesture.cpp10
-rw-r--r--indra/newview/llfloatergesture.h2
-rw-r--r--indra/newview/llinventorybridge.cpp57
-rw-r--r--indra/newview/llinventorymodel.cpp51
-rw-r--r--indra/newview/llinventorymodel.h24
-rw-r--r--indra/newview/llpanelpeople.cpp19
-rw-r--r--indra/newview/llpanelpeople.h2
-rw-r--r--indra/newview/llpanelteleporthistory.cpp3
-rw-r--r--indra/newview/llparticipantlist.cpp13
-rw-r--r--indra/newview/llparticipantlist.h2
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp34
-rw-r--r--indra/newview/skins/default/xui/en/menu_gesture_gear.xml6
22 files changed, 204 insertions, 149 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index c3deb602ee..40c9bb6afa 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -172,24 +172,6 @@ void LLAvatarActions::offerTeleport(const std::vector<LLUUID>& ids)
return;
handle_lure(ids);
-
- // Record the offer.
- for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++)
- {
- LLUUID target_id = *it;
- std::string target_name;
-
- gCacheName->getFullName(target_id, target_name);
-
- LLSD args;
- args["TO_NAME"] = target_name;
-
- LLSD payload;
- payload["from_id"] = target_id;
- payload["SESSION_NAME"] = target_name;
- payload["SUPPRESS_TOAST"] = true;
- LLNotificationsUtil::add("TeleportOfferSent", args, payload);
- }
}
// static
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 19e9e52ddf..6784e6693b 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -320,6 +320,11 @@ boost::signals2::connection LLAvatarList::setRefreshCompleteCallback(const commi
return mRefreshCompleteSignal.connect(cb);
}
+boost::signals2::connection LLAvatarList::setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb)
+{
+ return mItemDoubleClickSignal.connect(cb);
+}
+
void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
LLAvatarListItem* item = new LLAvatarListItem();
@@ -333,6 +338,8 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
item->setShowProfileBtn(mShowProfileBtn);
item->showSpeakingIndicator(mShowSpeakingIndicator);
+ item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoucleClicked, this, _1, _2, _3, _4));
+
addItem(item, id, pos);
}
@@ -400,6 +407,11 @@ void LLAvatarList::updateLastInteractionTimes()
}
}
+void LLAvatarList::onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
+{
+ mItemDoubleClickSignal(ctrl, x, y, mask);
+}
+
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 0d2ce884ae..a58a562378 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -92,6 +92,8 @@ public:
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
+ boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb);
+
protected:
void refresh();
@@ -101,6 +103,7 @@ protected:
std::vector<LLUUID>& vadded,
std::vector<LLUUID>& vremoved);
void updateLastInteractionTimes();
+ void onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask);
private:
@@ -120,6 +123,7 @@ private:
LLAvatarListItem::ContextMenu* mContextMenu;
commit_signal_t mRefreshCompleteSignal;
+ mouse_signal_t mItemDoubleClickSignal;
};
/** Abstract comparator for avatar items */
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 1043858373..66ab32f3e8 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -258,6 +258,21 @@ void LLAvatarListItem::onProfileBtnClick()
LLAvatarActions::showProfile(mAvatarId);
}
+BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ if(mInfoBtn->getRect().pointInRect(x, y))
+ {
+ onInfoBtnClick();
+ return TRUE;
+ }
+ if(mProfileBtn->getRect().pointInRect(x, y))
+ {
+ onProfileBtnClick();
+ return TRUE;
+ }
+ return LLPanel::handleDoubleClick(x, y, mask);
+}
+
void LLAvatarListItem::setValue( const LLSD& value )
{
if (!value.isMap()) return;;
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index f76ffb391d..479a4833cb 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -103,6 +103,8 @@ public:
void onInfoBtnClick();
void onProfileBtnClick();
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
protected:
/**
* Contains indicator to show voice activity.
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index c0efb85b51..6317a6a392 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -724,13 +724,28 @@ void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id)
bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id)
{
- if (mVoiceType != VC_LOCAL_CHAT)
- return true;
+ bool is_valid = true;
+ switch (mVoiceType)
+ {
+ case VC_LOCAL_CHAT:
+ {
+ // A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice).
+ std::vector<LLUUID> speakers;
+ get_voice_participants_uuids(speakers);
+ is_valid = std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end();
+ }
+ break;
+ case VC_GROUP_CHAT:
+ // if participant had left this call before do not allow add her again. See EXT-4216.
+ // but if she Join she will be added into the list from the LLCallFloater::onChange()
+ is_valid = STATE_LEFT != getState(speaker_id);
+ break;
+ default:
+ // do nothing. required for Linux build
+ break;
+ }
- // A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice).
- std::vector<LLUUID> speakers;
- get_voice_participants_uuids(speakers);
- return std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end();
+ return is_valid;
}
void LLCallFloater::connectToChannel(LLVoiceChannel* channel)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index dc2e22f899..5cbe6f9670 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -540,6 +540,11 @@ void LLIMChiclet::toggleSpeakerControl()
void LLIMChiclet::setCounter(S32 counter)
{
+ if (mCounterCtrl->getCounter() == counter)
+ {
+ return;
+ }
+
mCounterCtrl->setCounter(counter);
setShowCounter(counter);
setShowNewMessagesIcon(counter);
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 4103ccf175..fd6a92c47a 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -508,14 +508,14 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
if (dest)
{
- updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId());
+ LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId());
}
else
{
mItems.push_back(gInventory.getItem(mDragItemId));
}
- saveItemsOrder(mItems);
+ gInventory.saveItemsOrder(mItems);
LLToggleableMenu* menu = (LLToggleableMenu*) mPopupMenuHandle.get();
@@ -1193,25 +1193,6 @@ BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array
return result;
}
-void LLFavoritesBarCtrl::saveItemsOrder(LLInventoryModel::item_array_t& items)
-{
- int sortField = 0;
-
- // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
- {
- LLViewerInventoryItem* item = *i;
-
- item->setSortField(++sortField);
- item->setComplete(TRUE);
- item->updateServer(FALSE);
-
- gInventory.updateItem(item);
- }
-
- gInventory.notifyObservers();
-}
-
LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
{
LLInventoryModel::item_array_t::iterator result = items.end();
@@ -1228,15 +1209,6 @@ LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLIn
return result;
}
-void LLFavoritesBarCtrl::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcItemId, const LLUUID& destItemId)
-{
- LLViewerInventoryItem* srcItem = gInventory.getItem(srcItemId);
- LLViewerInventoryItem* destItem = gInventory.getItem(destItemId);
-
- items.erase(findItemByUUID(items, srcItem->getUUID()));
- items.insert(findItemByUUID(items, destItem->getUUID()), srcItem);
-}
-
void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem)
{
LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId);
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 9ac734baff..40dd551eef 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -126,16 +126,7 @@ private:
// checks if the current order of the favorites items must be saved
BOOL needToSaveItemsOrder(const LLInventoryModel::item_array_t& items);
- // saves current order of the favorites items
- void saveItemsOrder(LLInventoryModel::item_array_t& items);
-
- /*
- * changes favorites items order by insertion of the item identified by srcItemId
- * BEFORE the item identified by destItemId. both items must exist in items array.
- */
- void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcItemId, const LLUUID& destItemId);
-
- /*
+ /**
* inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId.
* this function assumes that an item identified by insertedItemId doesn't exist in items array.
*/
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 6a9c602db2..de65c6f876 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -110,7 +110,7 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key)
mCommitCallbackRegistrar.add("Gesture.Action.ToogleActiveState", boost::bind(&LLFloaterGesture::onActivateBtnClick, this));
mCommitCallbackRegistrar.add("Gesture.Action.ShowPreview", boost::bind(&LLFloaterGesture::onClickEdit, this));
- mCommitCallbackRegistrar.add("Gesture.Action.CopyPast", boost::bind(&LLFloaterGesture::onCopyPastAction, this, _2));
+ mCommitCallbackRegistrar.add("Gesture.Action.CopyPaste", boost::bind(&LLFloaterGesture::onCopyPasteAction, this, _2));
mCommitCallbackRegistrar.add("Gesture.Action.SaveToCOF", boost::bind(&LLFloaterGesture::addToCurrentOutFit, this));
mEnableCallbackRegistrar.add("Gesture.EnableAction", boost::bind(&LLFloaterGesture::isActionEnabled, this, _2));
@@ -245,6 +245,7 @@ void LLFloaterGesture::refreshAll()
void LLFloaterGesture::buildGestureList()
{
+ S32 scroll_pos = mGestureList->getScrollPos();
std::vector<LLUUID> selected_items;
getSelectedIds(selected_items);
LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL;
@@ -274,13 +275,14 @@ void LLFloaterGesture::buildGestureList()
}
}
}
+
// attempt to preserve scroll position through re-builds
- // since we do re-build any time anything dirties
+ // since we do re-build whenever something gets dirty
for(std::vector<LLUUID>::iterator it = selected_items.begin(); it != selected_items.end(); it++)
{
mGestureList->selectByID(*it);
}
- mGestureList->scrollToShowSelected();
+ mGestureList->setScrollPos(scroll_pos);
}
void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gesture,LLCtrlListInterface * list )
@@ -475,7 +477,7 @@ void LLFloaterGesture::onActivateBtnClick()
}
}
-void LLFloaterGesture::onCopyPastAction(const LLSD& command)
+void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
{
std::string command_name = command.asString();
// since we select this comman inventory item had already arrived .
diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h
index 14e132900d..629d77b949 100644
--- a/indra/newview/llfloatergesture.h
+++ b/indra/newview/llfloatergesture.h
@@ -99,7 +99,7 @@ private:
void onClickPlay();
void onClickNew();
void onCommitList();
- void onCopyPastAction(const LLSD& command);
+ void onCopyPasteAction(const LLSD& command);
void onDeleteSelected();
LLUUID mSelectedID;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 6e72a7a4f7..e9176da715 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2931,50 +2931,6 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
return false;
}
-/*
-Next functions intended to reorder items in the inventory folder and save order on server
-Is now used for Favorites folder.
-
-*TODO: refactoring is needed with Favorites Bar functionality. Probably should be moved in LLInventoryModel
-*/
-void saveItemsOrder(LLInventoryModel::item_array_t& items)
-{
- int sortField = 0;
-
- // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
- {
- LLViewerInventoryItem* item = *i;
-
- item->setSortField(++sortField);
- item->setComplete(TRUE);
- item->updateServer(FALSE);
-
- gInventory.updateItem(item);
-
- // Tell the parent folder to refresh its sort order.
- gInventory.addChangedMask(LLInventoryObserver::SORT, item->getParentUUID());
- }
-
- gInventory.notifyObservers();
-}
-
-LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
-{
- LLInventoryModel::item_array_t::iterator result = items.end();
-
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
- {
- if ((*i)->getUUID() == id)
- {
- result = i;
- break;
- }
- }
-
- return result;
-}
-
// See also LLInventorySort where landmarks in the Favorites folder are sorted.
class LLViewerInventoryItemSort
{
@@ -2996,15 +2952,6 @@ void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items)
std::sort(items.begin(), items.end(), sort_functor);
}
-void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcItemId, const LLUUID& destItemId)
-{
- LLViewerInventoryItem* srcItem = gInventory.getItem(srcItemId);
- LLViewerInventoryItem* destItem = gInventory.getItem(destItemId);
-
- items.erase(findItemByUUID(items, srcItem->getUUID()));
- items.insert(findItemByUUID(items, destItem->getUUID()), srcItem);
-}
-
BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
BOOL drop)
{
@@ -3103,9 +3050,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
rearrange_item_order_by_sort_field(items);
// update order
- updateItemsOrder(items, srcItemId, destItemId);
+ LLInventoryModel::updateItemsOrder(items, srcItemId, destItemId);
- saveItemsOrder(items);
+ gInventory.saveItemsOrder(items);
}
}
else if (favorites_id == mUUID) // if target is the favorites folder we use copy
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index c603af9166..ef18386e57 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3622,6 +3622,57 @@ BOOL LLInventoryModel::getIsFirstTimeInViewer2()
return sFirstTimeInViewer2;
}
+static LLInventoryModel::item_array_t::iterator find_item_iter_by_uuid(LLInventoryModel::item_array_t& items, const LLUUID& id)
+{
+ LLInventoryModel::item_array_t::iterator result = items.end();
+
+ for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ {
+ if ((*i)->getUUID() == id)
+ {
+ result = i;
+ break;
+ }
+ }
+
+ return result;
+}
+
+// static
+void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id)
+{
+ LLInventoryModel::item_array_t::iterator it_src = find_item_iter_by_uuid(items, src_item_id);
+ LLInventoryModel::item_array_t::iterator it_dest = find_item_iter_by_uuid(items, dest_item_id);
+
+ if (it_src == items.end() || it_dest == items.end()) return;
+
+ LLViewerInventoryItem* src_item = *it_src;
+ items.erase(it_src);
+ items.insert(it_dest, src_item);
+}
+
+void LLInventoryModel::saveItemsOrder(const LLInventoryModel::item_array_t& items)
+{
+ int sortField = 0;
+
+ // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field
+ for (item_array_t::const_iterator i = items.begin(); i != items.end(); ++i)
+ {
+ LLViewerInventoryItem* item = *i;
+
+ item->setSortField(++sortField);
+ item->setComplete(TRUE);
+ item->updateServer(FALSE);
+
+ updateItem(item);
+
+ // Tell the parent folder to refresh its sort order.
+ addChangedMask(LLInventoryObserver::SORT, item->getParentUUID());
+ }
+
+ notifyObservers();
+}
+
//----------------------------------------------------------------------------
// *NOTE: DEBUG functionality
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 39377b4ae2..e8698c0759 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -384,6 +384,30 @@ public:
void setLibraryOwnerID(const LLUUID& id);
void setLibraryRootFolderID(const LLUUID& id);
+
+ /**
+ * Changes items order by insertion of the item identified by src_item_id
+ * BEFORE the item identified by dest_item_id. Both items must exist in items array.
+ *
+ * Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id.
+ *
+ * @param[in, out] items - vector with items to be updated. It should be sorted in a right way
+ * before calling this method.
+ * @param src_item_id - LLUUID of inventory item to be moved in new position
+ * @param dest_item_id - LLUUID of inventory item before which source item should be placed.
+ */
+ static void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id);
+
+ /**
+ * Saves current order of the passed items using inventory item sort field.
+ *
+ * It reset items' sort fields and saves them on server.
+ * Is used to save order for Favorites folder.
+ *
+ * @param[in] items vector of items in order to be saved.
+ */
+ void saveItemsOrder(const LLInventoryModel::item_array_t& items);
+
protected:
// Internal methods which add inventory and make sure that all of
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 03cc870a59..c14b282488 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -532,10 +532,10 @@ BOOL LLPanelPeople::postBuild()
friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this));
friends_panel->childSetAction("del_btn", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this));
- mOnlineFriendList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mOnlineFriendList));
- mAllFriendList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mAllFriendList));
- mNearbyList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mNearbyList));
- mRecentList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mRecentList));
+ mOnlineFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
+ mAllFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
+ mNearbyList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
+ mRecentList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
mOnlineFriendList->setCommitCallback(boost::bind(&LLPanelPeople::onAvatarListCommitted, this, mOnlineFriendList));
mAllFriendList->setCommitCallback(boost::bind(&LLPanelPeople::onAvatarListCommitted, this, mAllFriendList));
@@ -1005,12 +1005,15 @@ void LLPanelPeople::onTabSelected(const LLSD& param)
mFilterEditor->setLabel(getString("people_filter_label"));
}
-void LLPanelPeople::onAvatarListDoubleClicked(LLAvatarList* list)
+void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl)
{
- LLUUID clicked_id = list->getSelectedUUID();
-
- if (clicked_id.isNull())
+ LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
+ if(!item)
+ {
return;
+ }
+
+ LLUUID clicked_id = item->getAvatarId();
#if 0 // SJB: Useful for testing, but not currently functional or to spec
LLAvatarActions::showProfile(clicked_id);
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index da2c0e368c..7580fdbeef 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -109,7 +109,7 @@ private:
void onNearbyViewSortButtonClicked();
void onFriendsViewSortButtonClicked();
void onGroupsViewSortButtonClicked();
- void onAvatarListDoubleClicked(LLAvatarList* list);
+ void onAvatarListDoubleClicked(LLUICtrl* ctrl);
void onAvatarListCommitted(LLAvatarList* list);
void onGroupPlusButtonClicked();
void onGroupMinusButtonClicked();
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 0a2217fc51..571745ee02 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -723,7 +723,10 @@ void LLTeleportHistoryPanel::onTeleportHistoryChange(S32 removed_index)
if (-1 == removed_index)
showTeleportHistory(); // recreate all items
else
+ {
replaceItem(removed_index); // replace removed item by most recent
+ updateVerbs();
+ }
}
void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b6f78d08f1..0a180512ce 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -70,7 +70,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator");
mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));
- mAvatarListDoubleClickConnection = mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
+ mAvatarListDoubleClickConnection = mAvatarList->setItemDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, _1));
mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2));
// Set onAvatarListDoubleClicked as default on_return action.
mAvatarListReturnConnection = mAvatarList->setReturnCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
@@ -132,10 +132,15 @@ void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible)
mAvatarList->setSpeakingIndicatorsVisible(visible);
};
-void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list)
+void LLParticipantList::onAvatarListDoubleClicked(LLUICtrl* ctrl)
{
- // NOTE(EM): Should we check if there is multiple selection and start conference if it is so?
- LLUUID clicked_id = list->getSelectedUUID();
+ LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
+ if(!item)
+ {
+ return;
+ }
+
+ LLUUID clicked_id = item->getAvatarId();
if (clicked_id.isNull() || clicked_id == gAgent.getID())
return;
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 70badbc40d..e1b1b5af00 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -232,7 +232,7 @@ class LLParticipantList
};
private:
- void onAvatarListDoubleClicked(LLAvatarList* list);
+ void onAvatarListDoubleClicked(LLUICtrl* ctrl);
void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param);
/**
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 42db6bf9c3..b450d38b5a 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -229,10 +229,6 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
mSwitchedIndicatorsOn.insert(*it_uuid);
}
}
- else
- {
- LL_WARNS("SpeakingIndicator") << "indicator was not found among registered: " << *it_uuid << LL_ENDL;
- }
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 4e5655274d..4999ac000e 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -711,6 +711,18 @@ protected:
}
};
+class LLOpenTaskGroupOffer : public LLInventoryAddedObserver
+{
+protected:
+ /*virtual*/ void done()
+ {
+ open_inventory_offer(mAdded, "group_offer");
+ mAdded.clear();
+ gInventory.removeObserver(this);
+ delete this;
+ }
+};
+
//one global instance to bind them
LLOpenTaskOffer* gNewInventoryObserver=NULL;
@@ -929,9 +941,6 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
case LLAssetType::AT_ANIMATION:
LLFloaterReg::showInstance("preview_anim", LLSD(item_id), take_focus);
break;
- case LLAssetType::AT_GESTURE:
- LLFloaterReg::showInstance("preview_gesture", LLSD(item_id), take_focus);
- break;
case LLAssetType::AT_SCRIPT:
LLFloaterReg::showInstance("preview_script", LLSD(item_id), take_focus);
break;
@@ -1146,6 +1155,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
}
break;
case IM_GROUP_NOTICE:
+ opener = new LLOpenTaskGroupOffer;
send_auto_receive_response();
break;
case IM_TASK_INVENTORY_OFFERED:
@@ -5360,8 +5370,24 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
it != notification["payload"]["ids"].endArray();
++it)
{
+ LLUUID target_id = it->asUUID();
+
msg->nextBlockFast(_PREHASH_TargetData);
- msg->addUUIDFast(_PREHASH_TargetID, it->asUUID());
+ msg->addUUIDFast(_PREHASH_TargetID, target_id);
+
+ // Record the offer.
+ {
+ std::string target_name;
+ gCacheName->getFullName(target_id, target_name);
+ LLSD args;
+ args["TO_NAME"] = target_name;
+
+ LLSD payload;
+ payload["from_id"] = target_id;
+ payload["SESSION_NAME"] = target_name;
+ payload["SUPPRESS_TOAST"] = true;
+ LLNotificationsUtil::add("TeleportOfferSent", args, payload);
+ }
}
gAgent.sendReliableMessage();
}
diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
index 4642e82c0b..d96f3c5494 100644
--- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
@@ -17,7 +17,7 @@
layout="topleft"
name="copy_gesture">
<on_click
- function="Gesture.Action.CopyPast"
+ function="Gesture.Action.CopyPaste"
parameter="copy_gesture" />
<on_enable
function="Gesture.EnableAction"
@@ -28,7 +28,7 @@
layout="topleft"
name="paste">
<on_click
- function="Gesture.Action.CopyPast"
+ function="Gesture.Action.CopyPaste"
parameter="paste" />
<on_enable
function="Gesture.EnableAction"
@@ -39,7 +39,7 @@
layout="topleft"
name="copy_uuid">
<on_click
- function="Gesture.Action.CopyPast"
+ function="Gesture.Action.CopyPaste"
parameter="copy_uuid" />
<on_enable
function="Gesture.EnableAction"