summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lllayoutstack.h2
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llbottomtray.cpp88
-rw-r--r--indra/newview/llbottomtray.h17
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp37
-rw-r--r--indra/newview/llfavoritesbar.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp47
-rw-r--r--indra/newview/llinventorymodel.cpp41
-rw-r--r--indra/newview/llinventorymodel.h9
-rw-r--r--indra/newview/llnearbychathandler.cpp10
-rw-r--r--indra/newview/llpanelgroupnotices.cpp2
-rw-r--r--indra/newview/lltexturectrl.cpp8
-rw-r--r--indra/newview/llviewerinventory.cpp16
-rw-r--r--indra/newview/llviewerinventory.h13
-rw-r--r--indra/newview/llviewermenu.cpp46
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml2
16 files changed, 257 insertions, 87 deletions
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index aba35773ee..c4f10038f8 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -93,6 +93,8 @@ public:
void updateLayout(BOOL force_resize = FALSE);
S32 getPanelSpacing() const { return mPanelSpacing; }
+ BOOL getAnimate () const { return mAnimate; }
+ void setAnimate (BOOL animate) { mAnimate = animate; }
static void updateClass();
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 297bcfd1df..da0e9238d6 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2806,6 +2806,7 @@ void LLAgent::endAnimationUpdateUI()
gStatusBar->setVisibleForMouselook(true);
LLBottomTray::getInstance()->setVisible(TRUE);
+ LLBottomTray::getInstance()->onMouselookModeOut();
LLSideTray::getInstance()->getButtonsPanel()->setVisible(TRUE);
LLSideTray::getInstance()->updateSidetrayVisibility();
@@ -2904,6 +2905,7 @@ void LLAgent::endAnimationUpdateUI()
LLNavigationBar::getInstance()->setVisible(FALSE);
gStatusBar->setVisibleForMouselook(false);
+ LLBottomTray::getInstance()->onMouselookModeIn();
LLBottomTray::getInstance()->setVisible(FALSE);
LLSideTray::getInstance()->getButtonsPanel()->setVisible(FALSE);
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index beccefa430..8a7ed23b59 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -52,6 +52,15 @@
// Build time optimization, generate extern template once in .cpp file
template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
+namespace
+{
+ const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
+ const std::string& PANEL_CHATBAR_NAME = "chat_bar";
+ const std::string& PANEL_MOVEMENT_NAME = "movement_panel";
+ const std::string& PANEL_CAMERA_NAME = "cam_panel";
+ const std::string& PANEL_GESTURE_NAME = "gesture_panel";
+}
+
LLBottomTray::LLBottomTray(const LLSD&)
: mChicletPanel(NULL),
mSpeakPanel(NULL),
@@ -236,6 +245,57 @@ void LLBottomTray::onFocusLost()
}
}
+void LLBottomTray::savePanelsShape()
+{
+ mSavedShapeList.clear();
+ for (child_list_const_iter_t
+ child_it = mToolbarStack->beginChild(),
+ child_it_end = mToolbarStack->endChild();
+ child_it != child_it_end; ++child_it)
+ {
+ mSavedShapeList.push_back( (*child_it)->getRect() );
+ }
+}
+
+void LLBottomTray::restorePanelsShape()
+{
+ if (mSavedShapeList.size() != mToolbarStack->getChildCount())
+ return;
+ int i = 0;
+ for (child_list_const_iter_t
+ child_it = mToolbarStack->beginChild(),
+ child_it_end = mToolbarStack->endChild();
+ child_it != child_it_end; ++child_it)
+ {
+ (*child_it)->setShape(mSavedShapeList[i++]);
+ }
+}
+
+void LLBottomTray::onMouselookModeOut()
+{
+ // Apply the saved settings when we are not in mouselook mode, see EXT-3988.
+ {
+ setTrayButtonVisibleIfPossible (RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton"), false);
+ setTrayButtonVisibleIfPossible (RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton"), false);
+ setTrayButtonVisibleIfPossible (RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton"), false);
+ setTrayButtonVisibleIfPossible (RS_BUTTON_SNAPSHOT, gSavedSettings.getBOOL("ShowSnapshotButton"),false);
+ }
+ // HACK: To avoid usage the LLLayoutStack logic of resizing, we force the updateLayout
+ // and then restore children saved shapes. See EXT-4309.
+ BOOL saved_anim = mToolbarStack->getAnimate();
+ mToolbarStack->updatePanelAutoResize(PANEL_CHATBAR_NAME, FALSE);
+ mToolbarStack->setAnimate(FALSE);
+ mToolbarStack->updateLayout();
+ mToolbarStack->setAnimate(saved_anim);
+ restorePanelsShape();
+}
+
+void LLBottomTray::onMouselookModeIn()
+{
+ savePanelsShape();
+ mToolbarStack->updatePanelAutoResize(PANEL_CHATBAR_NAME, TRUE);
+}
+
//virtual
// setVisible used instead of onVisibilityChange, since LLAgent calls it on entering/leaving mouselook mode.
// If bottom tray is already visible in mouselook mode, then onVisibilityChange will not be called from setVisible(true),
@@ -255,23 +315,15 @@ void LLBottomTray::setVisible(BOOL visible)
LLView* viewp = *child_it;
std::string name = viewp->getName();
- // Chat bar and gesture button are shown even in mouselook mode. But the move, camera and snapshot buttons shouldn't be displayed. See EXT-3988.
- if ("chat_bar" == name || "gesture_panel" == name || (visibility && ("movement_panel" == name || "cam_panel" == name || "snapshot_panel" == name)))
+ // Chat bar and gesture button are shown even in mouselook mode.
+ // But the move, camera and snapshot buttons shouldn't be displayed. See EXT-3988.
+ if ("chat_bar" == name || "gesture_panel" == name)
continue;
else
{
viewp->setVisible(visibility);
}
}
-
- // Apply the saved settings when we are not in mouselook mode, see EXT-3988.
- if (visibility)
- {
- showCameraButton(gSavedSettings.getBOOL("ShowCameraButton"));
- showSnapshotButton(gSavedSettings.getBOOL("ShowSnapshotButton"));
- showMoveButton(gSavedSettings.getBOOL("ShowMoveButton"));
- showGestureButton(gSavedSettings.getBOOL("ShowGestureButton"));
- }
}
}
@@ -337,15 +389,6 @@ void LLBottomTray::showSnapshotButton(BOOL visible)
setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible);
}
-namespace
-{
- const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
- const std::string& PANEL_CHATBAR_NAME = "chat_bar";
- const std::string& PANEL_MOVEMENT_NAME = "movement_panel";
- const std::string& PANEL_CAMERA_NAME = "cam_panel";
- const std::string& PANEL_GESTURE_NAME = "gesture_panel";
-}
-
BOOL LLBottomTray::postBuild()
{
@@ -1018,7 +1061,7 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis
panel->setVisible(visible);
}
-void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible)
+void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification)
{
bool can_be_set = true;
@@ -1058,7 +1101,8 @@ void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type
{
// mark this button to show it while future bottom tray extending
mResizeState |= shown_object_type;
- LLNotificationsUtil::add("BottomTrayButtonCanNotBeShown");
+ if ( raise_notification )
+ LLNotificationsUtil::add("BottomTrayButtonCanNotBeShown");
}
}
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 9be0e5810f..562ee56912 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -92,7 +92,10 @@ public:
void showMoveButton(BOOL visible);
void showCameraButton(BOOL visible);
void showSnapshotButton(BOOL visible);
-
+
+ void onMouselookModeIn();
+ void onMouselookModeOut();
+
/**
* Creates IM Chiclet based on session type (IM chat or Group chat)
*/
@@ -167,7 +170,14 @@ private:
* - if hidden via context menu button should be shown but there is no enough room for now
* it will be shown while extending.
*/
- void setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible);
+ void setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification = true);
+
+ /**
+ * Save and restore children shapes.
+ * Used to avoid the LLLayoutStack resizing logic between mouse look mode switching.
+ */
+ void savePanelsShape();
+ void restorePanelsShape();
MASK mResizeState;
@@ -177,6 +187,9 @@ private:
typedef std::map<EResizeState, S32> state_object_width_map_t;
state_object_width_map_t mObjectDefaultWidthMap;
+ typedef std::vector<LLRect> shape_list_t;
+ shape_list_t mSavedShapeList;
+
protected:
LLBottomTray(const LLSD& key = LLSD());
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 9ce3f29853..f7f7ee83af 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -168,27 +168,30 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
msg_text->setText(std::string(""));
- std::string str_sender;
-
- str_sender = fromName;
+ if ( notification["chat_style"].asInteger() != CHAT_STYLE_IRC )
+ {
+ std::string str_sender;
- str_sender+=" ";
+ str_sender = fromName;
- //append user name
- {
- LLStyle::Params style_params_name;
+ str_sender+=" ";
- LLColor4 userNameColor = LLUIColorTable::instance().getColor("ChatToastAgentNameColor");
+ //append user name
+ {
+ LLStyle::Params style_params_name;
- style_params_name.color(userNameColor);
-
- std::string font_name = LLFontGL::nameFromFont(messageFont);
- std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
- style_params_name.font.name(font_name);
- style_params_name.font.size(font_style_size);
-
- msg_text->appendText(str_sender, FALSE, style_params_name);
-
+ LLColor4 userNameColor = LLUIColorTable::instance().getColor("ChatToastAgentNameColor");
+
+ style_params_name.color(userNameColor);
+
+ std::string font_name = LLFontGL::nameFromFont(messageFont);
+ std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
+ style_params_name.font.name(font_name);
+ style_params_name.font.size(font_style_size);
+
+ msg_text->appendText(str_sender, FALSE, style_params_name);
+
+ }
}
//append text
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index fd6a92c47a..fb94657278 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -483,6 +483,10 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (drop)
{
+ if (mItems.empty())
+ {
+ setLandingTab(NULL);
+ }
handleNewFavoriteDragAndDrop(item, favorites_id, x, y);
showDragMarker(FALSE);
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index e9176da715..099f863dc9 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2931,27 +2931,6 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
return false;
}
-// See also LLInventorySort where landmarks in the Favorites folder are sorted.
-class LLViewerInventoryItemSort
-{
-public:
- bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b)
- {
- return a->getSortField() < b->getSortField();
- }
-};
-
-/**
- * Sorts passed items by LLViewerInventoryItem sort field.
- *
- * @param[in, out] items - array of items, not sorted.
- */
-void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items)
-{
- static LLViewerInventoryItemSort sort_functor;
- std::sort(items.begin(), items.end(), sort_functor);
-}
-
BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
BOOL drop)
{
@@ -3034,36 +3013,34 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// if dragging from/into favorites folder only reorder items
if ((mUUID == inv_item->getParentUUID()) && folder_allows_reorder)
{
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- LLIsType is_type(LLAssetType::AT_LANDMARK);
- model->collectDescendentsIf(mUUID, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
-
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
if (itemp)
{
LLUUID srcItemId = inv_item->getUUID();
LLUUID destItemId = itemp->getListener()->getUUID();
-
- // ensure items are sorted properly before changing order. EXT-3498
- rearrange_item_order_by_sort_field(items);
-
- // update order
- LLInventoryModel::updateItemsOrder(items, srcItemId, destItemId);
-
- gInventory.saveItemsOrder(items);
+ gInventory.rearrangeFavoriteLandmarks(srcItemId, destItemId);
}
}
else if (favorites_id == mUUID) // if target is the favorites folder we use copy
{
+ // use callback to rearrange favorite landmarks after adding
+ // to have new one placed before target (on which it was dropped). See EXT-4312.
+ LLPointer<AddFavoriteLandmarkCallback> cb = new AddFavoriteLandmarkCallback();
+ LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLFolderViewItem* drag_over_item = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
+ if (drag_over_item && drag_over_item->getListener())
+ {
+ cb.get()->setTargetLandmarkId(drag_over_item->getListener()->getUUID());
+ }
+
copy_inventory_item(
gAgent.getID(),
inv_item->getPermissions().getOwner(),
inv_item->getUUID(),
mUUID,
std::string(),
- LLPointer<LLInventoryCallback>(NULL));
+ cb);
}
else if (move_is_into_current_outfit || move_is_into_outfit)
{
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index ef18386e57..4f38fdbde4 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3648,6 +3648,9 @@ void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, c
LLViewerInventoryItem* src_item = *it_src;
items.erase(it_src);
+
+ // target iterator can nt be valid due to container was changed, so update it.
+ it_dest = find_item_iter_by_uuid(items, dest_item_id);
items.insert(it_dest, src_item);
}
@@ -3673,6 +3676,44 @@ void LLInventoryModel::saveItemsOrder(const LLInventoryModel::item_array_t& item
notifyObservers();
}
+// See also LLInventorySort where landmarks in the Favorites folder are sorted.
+class LLViewerInventoryItemSort
+{
+public:
+ bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b)
+ {
+ return a->getSortField() < b->getSortField();
+ }
+};
+
+/**
+ * Sorts passed items by LLViewerInventoryItem sort field.
+ *
+ * @param[in, out] items - array of items, not sorted.
+ */
+static void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items)
+{
+ static LLViewerInventoryItemSort sort_functor;
+ std::sort(items.begin(), items.end(), sort_functor);
+}
+
+void LLInventoryModel::rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id)
+{
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLIsType is_type(LLAssetType::AT_LANDMARK);
+ LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
+
+ // ensure items are sorted properly before changing order. EXT-3498
+ rearrange_item_order_by_sort_field(items);
+
+ // update order
+ updateItemsOrder(items, source_item_id, target_item_id);
+
+ saveItemsOrder(items);
+}
+
//----------------------------------------------------------------------------
// *NOTE: DEBUG functionality
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index e8698c0759..2a2b48ce3c 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -408,6 +408,15 @@ public:
*/
void saveItemsOrder(const LLInventoryModel::item_array_t& items);
+ /**
+ * Rearranges Landmarks inside Favorites folder.
+ * Moves source landmark before target one.
+ *
+ * @param source_item_id - LLUUID of the source item to be moved into new position
+ * @param target_item_id - LLUUID of the target item before which source item should be placed.
+ */
+ void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id);
+
protected:
// Internal methods which add inventory and make sure that all of
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 96442fafcc..c50e049d4c 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -180,11 +180,6 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
if(panel && panel->messageID() == fromID && panel->canAddText())
{
- if (CHAT_STYLE_IRC == notification["chat_style"].asInteger())
- {
- notification["message"] = notification["from"].asString() + notification["message"].asString();
- }
-
panel->addMessage(notification);
toast->reshapeToPanel();
toast->resetTimer();
@@ -349,7 +344,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
// Handle irc styled messages for toast panel
if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
{
- tmp_chat.mText = tmp_chat.mText.substr(3);
+ if(!tmp_chat.mFromName.empty())
+ tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
+ else
+ tmp_chat.mText = tmp_chat.mText.substr(3);
}
// arrange a channel on a screen
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 6210973dae..45fc3d4688 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -614,7 +614,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject,
mViewInventoryIcon->setVisible(TRUE);
std::stringstream ss;
- ss << " " << inventory_name;
+ ss << " " << LLViewerInventoryItem::getDisplayName(inventory_name);
mViewInventoryName->setText(ss.str());
mBtnOpenAttachment->setEnabled(TRUE);
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index a5ddb0a620..b980f65e68 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1190,8 +1190,12 @@ void LLTextureCtrl::draw()
}
else if (!mImageAssetID.isNull())
{
- mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES);
- mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
+ LLPointer<LLViewerFetchedTexture> texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES,LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+
+ texture->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
+ texture->forceToSaveRawImage(0) ;
+
+ mTexturep = texture;
}
else if (!mFallbackImageName.empty())
{
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 8781c46796..b330c1ba83 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -840,6 +840,13 @@ void CreateGestureCallback::fire(const LLUUID& inv_item)
gFloaterView->adjustToFitScreen(preview, FALSE);
}
+void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id)
+{
+ if (mTargetLandmarkId.isNull()) return;
+
+ gInventory.rearrangeFavoriteLandmarks(inv_item_id, mTargetLandmarkId);
+}
+
LLInventoryCallbackManager gInventoryCallbacks;
void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
@@ -1175,6 +1182,15 @@ const std::string& LLViewerInventoryItem::getDisplayName() const
return mDisplayName = hasSortField ? result : LLInventoryItem::getName();
}
+// static
+std::string LLViewerInventoryItem::getDisplayName(const std::string& name)
+{
+ std::string result;
+ BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result);
+
+ return hasSortField ? result : name;
+}
+
S32 LLViewerInventoryItem::getSortField() const
{
S32 result;
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 412a2c66e6..917b8747ea 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -66,6 +66,7 @@ public:
virtual const LLUUID& getAssetUUID() const;
virtual const std::string& getName() const;
virtual const std::string& getDisplayName() const;
+ static std::string getDisplayName(const std::string& name);
virtual S32 getSortField() const;
virtual void setSortField(S32 sortField);
virtual void rename(const std::string& new_name);
@@ -279,6 +280,18 @@ public:
void fire(const LLUUID& inv_item);
};
+class AddFavoriteLandmarkCallback : public LLInventoryCallback
+{
+public:
+ AddFavoriteLandmarkCallback() : mTargetLandmarkId(LLUUID::null) {}
+ void setTargetLandmarkId(const LLUUID& target_uuid) { mTargetLandmarkId = target_uuid; }
+
+private:
+ void fire(const LLUUID& inv_item);
+
+ LLUUID mTargetLandmarkId;
+};
+
// misc functions
//void inventory_reliable_callback(void**, S32 status);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index d2ba898cf0..f87d5693e8 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3369,10 +3369,52 @@ class LLShowPanelPeopleTab : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+ std::string panel_name = userdata.asString();
+
// Open tab of the "People" panel in side tray.
LLSD param;
- param["people_panel_tab_name"] = userdata.asString();
- LLSideTray::getInstance()->showPanel("panel_people", param);
+ param["people_panel_tab_name"] = panel_name;
+
+ static LLPanel* friends_panel = NULL;
+ static LLPanel* groups_panel = NULL;
+ static LLPanel* nearby_panel = NULL;
+
+ if (panel_name == "friends_panel")
+ {
+ return togglePanel(friends_panel, param);
+ }
+ else if (panel_name == "groups_panel")
+ {
+ return togglePanel(groups_panel, param);
+ }
+ else if (panel_name == "nearby_panel")
+ {
+ return togglePanel(nearby_panel, param);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ static bool togglePanel(LLPanel* &panel, const LLSD& param)
+ {
+ if(!panel)
+ {
+ panel = LLSideTray::getInstance()->findChild<LLPanel>(param["people_panel_tab_name"].asString());
+ if(!panel)
+ return false;
+ }
+
+ if (panel->isInVisibleChain())
+ {
+ LLSideTray::getInstance()->collapseSideBar();
+ }
+ else
+ {
+ LLSideTray::getInstance()->showPanel("panel_people", param);
+ }
+
return true;
}
};
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 9ad99b1f13..58cb5fed5d 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -126,6 +126,8 @@
<combo_editor
label="Search [SECOND_LIFE]"
name="search_combo_editor"/>
+ <combo_list
+ draw_border="true" />
</search_combo_box>
</panel>
<favorites_bar