summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-22 00:21:18 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-22 00:21:18 +0000
commit0041d485b1c5a1b18c9d5b2ae016f2c1e5ea6b8e (patch)
treee69610d38613885aa123c2744dd07db581a810d2 /indra/newview
parent67c4555a3793850ca8a8142b1e3e72c90d5001f4 (diff)
Merging revisions 2129-2144 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry
* Bugs: EXT-1293 EXT-1611 EXT-1613 EXT-1176 EXT-1724 EXT-1186 EXT-1662 EXT-1760 EXT-1720 * Dev: EXT-1575 EXT-1770 EXT-1232 EXT-1234
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/llagentpicksinfo.cpp130
-rw-r--r--indra/newview/llagentpicksinfo.h106
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp6
-rw-r--r--indra/newview/llchiclet.cpp37
-rw-r--r--indra/newview/llchiclet.h19
-rw-r--r--indra/newview/lldndbutton.cpp60
-rw-r--r--indra/newview/lldndbutton.h89
-rw-r--r--indra/newview/llfloaterinventory.cpp33
-rw-r--r--indra/newview/llfloaterinventory.h14
-rw-r--r--indra/newview/llimview.cpp9
-rw-r--r--indra/newview/llmutelist.h8
-rw-r--r--indra/newview/llnearbychat.cpp269
-rw-r--r--indra/newview/llnearbychat.h34
-rw-r--r--indra/newview/llpanellandmarks.cpp69
-rw-r--r--indra/newview/llpanellandmarks.h9
-rw-r--r--indra/newview/llpanelpick.cpp13
-rw-r--r--indra/newview/llpanelpick.h1
-rw-r--r--indra/newview/llpanelpicks.cpp12
-rw-r--r--indra/newview/llpanelpicks.h1
-rw-r--r--indra/newview/llpanelplaceinfo.cpp77
-rw-r--r--indra/newview/llpanelplaceinfo.h14
-rw-r--r--indra/newview/llpanelplaces.cpp13
-rw-r--r--indra/newview/llpanelplaces.h1
-rw-r--r--indra/newview/llstartup.cpp3
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/favorites_bar_button.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_nearby_chat.xml36
-rw-r--r--indra/newview/skins/default/xui/en/menu_landmark.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_place.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_profile.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmarks.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml16
37 files changed, 712 insertions, 395 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index fbf14a7359..26170d1713 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -70,6 +70,7 @@ set(viewer_SOURCE_FILES
llagentaccess.cpp
llagentdata.cpp
llagentlanguage.cpp
+ llagentpicksinfo.cpp
llagentpilot.cpp
llagentui.cpp
llagentwearables.cpp
@@ -112,6 +113,7 @@ set(viewer_SOURCE_FILES
lldebugview.cpp
lldelayedgestureerror.cpp
lldirpicker.cpp
+ lldndbutton.cpp
lldrawable.cpp
lldrawpoolalpha.cpp
lldrawpoolavatar.cpp
@@ -537,6 +539,7 @@ set(viewer_HEADER_FILES
llagentaccess.h
llagentdata.h
llagentlanguage.h
+ llagentpicksinfo.h
llagentpilot.h
llagentui.h
llagentwearables.h
@@ -581,6 +584,7 @@ set(viewer_HEADER_FILES
lldebugview.h
lldelayedgestureerror.h
lldirpicker.h
+ lldndbutton.h
lldrawable.h
lldrawpool.h
lldrawpoolalpha.h
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
new file mode 100644
index 0000000000..6e5835bace
--- /dev/null
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -0,0 +1,130 @@
+/**
+ * @file llagentpicksinfo.cpp
+ * @brief LLAgentPicksInfo class implementation
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llagentpicksinfo.h"
+
+#include "llagent.h"
+#include "llavatarconstants.h"
+#include "llavatarpropertiesprocessor.h"
+
+class LLAgentPicksInfo::LLAgentPicksObserver : public LLAvatarPropertiesObserver
+{
+public:
+ LLAgentPicksObserver()
+ {
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(gAgent.getID(), this);
+ }
+
+ ~LLAgentPicksObserver()
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this);
+ }
+
+ void sendAgentPicksRequest()
+ {
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(gAgent.getID());
+ }
+
+ typedef boost::function<void(LLAvatarPicks*)> server_respond_callback_t;
+
+ void setServerRespondCallback(const server_respond_callback_t& cb)
+ {
+ mServerRespondCallback = cb;
+ }
+
+ virtual void processProperties(void* data, EAvatarProcessorType type)
+ {
+ if(APT_PICKS == type)
+ {
+ LLAvatarPicks* picks = static_cast<LLAvatarPicks*>(data);
+ if(picks && gAgent.getID() == picks->target_id)
+ {
+ if(mServerRespondCallback)
+ {
+ mServerRespondCallback(picks);
+ }
+ }
+ }
+ }
+
+private:
+
+ server_respond_callback_t mServerRespondCallback;
+};
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLAgentPicksInfo::LLAgentPicksInfo()
+ : mAgentPicksObserver(NULL)
+ , mMaxNumberOfPicks(MAX_AVATAR_PICKS)
+ // Disable Pick creation until we get number of Picks from server - in case
+ // avatar has maximum number of Picks.
+ , mNumberOfPicks(mMaxNumberOfPicks)
+{
+}
+
+LLAgentPicksInfo::~LLAgentPicksInfo()
+{
+ delete mAgentPicksObserver;
+}
+
+void LLAgentPicksInfo::requestNumberOfPicks()
+{
+ if(!mAgentPicksObserver)
+ {
+ mAgentPicksObserver = new LLAgentPicksObserver();
+
+ mAgentPicksObserver->setServerRespondCallback(boost::bind(
+ &LLAgentPicksInfo::onServerRespond, this, _1));
+ }
+
+ mAgentPicksObserver->sendAgentPicksRequest();
+}
+
+bool LLAgentPicksInfo::isPickLimitReached()
+{
+ return getNumberOfPicks() >= getMaxNumberOfPicks();
+}
+
+void LLAgentPicksInfo::onServerRespond(LLAvatarPicks* picks)
+{
+ if(!picks)
+ {
+ llerrs << "Unexpected value" << llendl;
+ return;
+ }
+
+ setNumberOfPicks(picks->picks_list.size());
+}
diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h
new file mode 100644
index 0000000000..0e30f2c5a0
--- /dev/null
+++ b/indra/newview/llagentpicksinfo.h
@@ -0,0 +1,106 @@
+/**
+ * @file llagentpicksinfo.h
+ * @brief LLAgentPicksInfo class header file
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLAGENTPICKS_H
+#define LL_LLAGENTPICKS_H
+
+#include "llsingleton.h"
+
+struct LLAvatarPicks;
+
+/**
+ * Class that provides information about Agent Picks
+ */
+class LLAgentPicksInfo : public LLSingleton<LLAgentPicksInfo>
+{
+ class LLAgentPicksObserver;
+
+public:
+
+ LLAgentPicksInfo();
+
+ virtual ~LLAgentPicksInfo();
+
+ /**
+ * Requests number of picks from server.
+ *
+ * Number of Picks is requested from server, thus it is not available immediately.
+ */
+ void requestNumberOfPicks();
+
+ /**
+ * Returns number of Picks.
+ */
+ S32 getNumberOfPicks() { return mNumberOfPicks; }
+
+ /**
+ * Returns maximum number of Picks.
+ */
+ S32 getMaxNumberOfPicks() { return mMaxNumberOfPicks; }
+
+ /**
+ * Returns TRUE if Agent has maximum allowed number of Picks.
+ */
+ bool isPickLimitReached();
+
+ /**
+ * After creating or deleting a Pick we can assume operation on server will be
+ * completed successfully. Incrementing/decrementing number of picks makes new number
+ * of picks available immediately. Actual number of picks will be updated when we receive
+ * response from server.
+ */
+ void incrementNumberOfPicks() { ++mNumberOfPicks; }
+
+ void decrementNumberOfPicks() { --mNumberOfPicks; }
+
+private:
+
+ void onServerRespond(LLAvatarPicks* picks);
+
+ /**
+ * Sets number of Picks.
+ */
+ void setNumberOfPicks(S32 number) { mNumberOfPicks = number; }
+
+ /**
+ * Sets maximum number of Picks.
+ */
+ void setMaxNumberOfPicks(S32 max_picks) { mMaxNumberOfPicks = max_picks; }
+
+private:
+
+ LLAgentPicksObserver* mAgentPicksObserver;
+ S32 mMaxNumberOfPicks;
+ S32 mNumberOfPicks;
+};
+
+#endif //LL_LLAGENTPICKS_H
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index f58c85d8c5..fb43b5a7d7 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -36,6 +36,7 @@
// Viewer includes
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llviewergenericmessage.h"
// Linden library includes
@@ -438,6 +439,9 @@ void LLAvatarPropertiesProcessor::sendPickDelete( const LLUUID& pick_id )
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_PickID, pick_id);
gAgent.sendReliableMessage();
+
+ LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
+ LLAgentPicksInfo::getInstance()->decrementNumberOfPicks();
}
void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
@@ -470,6 +474,8 @@ void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
msg->addBOOL(_PREHASH_Enabled, new_pick->enabled);
gAgent.sendReliableMessage();
+
+ LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
}
void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 43aca430a2..2ebbae33ad 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -868,19 +868,29 @@ BOOL LLChicletPanel::postBuild()
return TRUE;
}
+S32 LLChicletPanel::calcChickletPanleWidth()
+{
+ S32 res = 0;
+
+ for (chiclet_list_t::iterator it = mChicletList.begin(); it
+ != mChicletList.end(); it++)
+ {
+ res = (*it)->getRect().getWidth() + getChicletPadding();
+ }
+ return res;
+}
+
bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index)
{
if(mScrollArea->addChild(chiclet))
{
+ // chicklets should be aligned to right edge of scroll panel
S32 offset = 0;
- // if index == 0 and chickelt list isn't empty insert chiclet before first in the list
- // without scrolling, so other visible chicklets aren't change screen position
- if (0 == index && !mChicletList.empty())
+ if (!canScrollLeft())
{
- offset = getChiclet(0)->getRect().mLeft
- - (chiclet->getRequiredRect().getWidth()
- + getChicletPadding());
+ offset = mScrollArea->getRect().getWidth()
+ - chiclet->getRect().getWidth() - calcChickletPanleWidth();
}
mChicletList.insert(mChicletList.begin() + index, chiclet);
@@ -1073,25 +1083,16 @@ void LLChicletPanel::arrange()
void LLChicletPanel::trimChiclets()
{
// trim right
- if(canScrollLeft() && !canScrollRight())
+ if(!mChicletList.empty())
{
S32 last_chiclet_right = (*mChicletList.rbegin())->getRect().mRight;
+ S32 first_chiclet_left = getChiclet(0)->getRect().mLeft;
S32 scroll_width = mScrollArea->getRect().getWidth();
- if(last_chiclet_right < scroll_width)
+ if(last_chiclet_right < scroll_width || first_chiclet_left > 0)
{
shiftChiclets(scroll_width - last_chiclet_right);
}
}
-
- // trim left
- if(!mChicletList.empty())
- {
- LLRect first_chiclet_rect = getChiclet(0)->getRect();
- if(first_chiclet_rect.mLeft > 0)
- {
- shiftChiclets( - first_chiclet_rect.mLeft);
- }
- }
}
void LLChicletPanel::showScrollButtonsIfNeeded()
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 932e05d95a..1713c0258d 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -653,9 +653,14 @@ public:
virtual ~LLChicletPanel();
/*
- * Creates chiclet and adds it to chiclet list.
+ * Creates chiclet and adds it to chiclet list at specified index.
*/
- template<class T> T* createChiclet(const LLUUID& session_id = LLUUID::null, S32 index = 0);
+ template<class T> T* createChiclet(const LLUUID& session_id, S32 index);
+
+ /*
+ * Creates chiclet and adds it to chiclet list at right.
+ */
+ template<class T> T* createChiclet(const LLUUID& session_id);
/*
* Returns pointer to chiclet of specified type at specified index.
@@ -723,6 +728,8 @@ protected:
LLChicletPanel(const Params&p);
friend class LLUICtrlFactory;
+ S32 calcChickletPanleWidth();
+
/*
* Adds chiclet to list and rearranges all chiclets.
*/
@@ -863,7 +870,7 @@ private:
};
template<class T>
-T* LLChicletPanel::createChiclet(const LLUUID& session_id /*= LLUUID::null*/, S32 index /*= 0*/)
+T* LLChicletPanel::createChiclet(const LLUUID& session_id, S32 index)
{
typename T::Params params;
T* chiclet = LLUICtrlFactory::create<T>(params);
@@ -890,6 +897,12 @@ T* LLChicletPanel::createChiclet(const LLUUID& session_id /*= LLUUID::null*/, S3
}
template<class T>
+T* LLChicletPanel::createChiclet(const LLUUID& session_id)
+{
+ return createChiclet<T>(session_id, mChicletList.size());
+}
+
+template<class T>
T* LLChicletPanel::findChiclet(const LLUUID& im_session_id)
{
if(im_session_id.isNull())
diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp
new file mode 100644
index 0000000000..22f2bb1d16
--- /dev/null
+++ b/indra/newview/lldndbutton.cpp
@@ -0,0 +1,60 @@
+/**
+ * @file lldndbutton.cpp
+ * @brief Implementation of the drag-n-drop button.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lldndbutton.h"
+
+
+static LLDefaultChildRegistry::Register<LLDragAndDropButton> r("dnd_button");
+
+LLDragAndDropButton::Params::Params()
+{
+
+}
+
+LLDragAndDropButton::LLDragAndDropButton(Params& params)
+: LLButton(params)
+{
+
+}
+
+BOOL LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
+{
+ if (mDragDropHandler)
+ {
+ return mDragDropHandler(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
+ return false;
+}
+
+// EOF
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
new file mode 100644
index 0000000000..c888268187
--- /dev/null
+++ b/indra/newview/lldndbutton.h
@@ -0,0 +1,89 @@
+/**
+ * @file lldndbutton.h
+ * @brief Declaration of the drag-n-drop button.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLDNDBUTTON_H
+#define LL_LLDNDBUTTON_H
+
+#include "llbutton.h"
+
+/**
+ * Class representing a button which can handle Drag-And-Drop event.
+ *
+ * LLDragAndDropButton does not contain any logic to handle Drag-And-Drop itself.
+ * Instead it provides drag_drop_handler_t which can be set to the button.
+ * Then each Drag-And-Drop will be delegated to this handler without any pre/post processing.
+ *
+ * All xml parameters are the same as LLButton has.
+ *
+ * @see LLLandmarksPanel for example of usage of this class.
+ */
+class LLDragAndDropButton : public LLButton
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLButton::Params>
+ {
+ Params();
+ };
+
+ LLDragAndDropButton(Params& params);
+
+ typedef boost::function<bool (
+ S32 /*x*/, S32 /*y*/, MASK /*mask*/, BOOL /*drop*/,
+ EDragAndDropType /*cargo_type*/,
+ void* /*cargo_data*/,
+ EAcceptance* /*accept*/,
+ std::string& /*tooltip_msg*/)> drag_drop_handler_t;
+
+
+ /**
+ * Sets a handler which should process Drag-And-Drop.
+ */
+ void setDragAndDropHandler(drag_drop_handler_t handler) { mDragDropHandler = handler; }
+
+
+ /**
+ * Process Drag-And-Drop by delegating the event to drag_drop_handler_t.
+ *
+ * @return BOOL - value returned by drag_drop_handler_t if it is set, FALSE otherwise.
+ */
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
+private:
+ drag_drop_handler_t mDragDropHandler;
+};
+
+
+#endif // LL_LLDNDBUTTON_H
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index 4013f52f10..4596ae7739 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -1174,7 +1174,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p)
mHasInventoryConnection(false),
mStartFolderString(p.start_folder)
, mBuildDefaultHierarchy(true)
-, mRootInventoryItemUUID(LLUUID::null)
, mInvFVBridgeBuilder(NULL)
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
@@ -1241,7 +1240,19 @@ BOOL LLInventoryPanel::postBuild()
// determine the root folder, if any, so inventory contents show just the children
// of that folder (i.e. not including the folder itself).
const LLAssetType::EType preferred_type = LLAssetType::lookupHumanReadable(mStartFolderString);
- mStartFolderID = (preferred_type != LLAssetType::AT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+
+ if ("inventory" == mStartFolderString)
+ {
+ mStartFolderID = gInventory.getRootFolderID();
+ }
+ else if ("library" == mStartFolderString)
+ {
+ mStartFolderID = gInventory.getLibraryRootFolderID();
+ }
+ else
+ {
+ mStartFolderID = (preferred_type != LLAssetType::AT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+ }
// build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mHasInventoryConnection)
@@ -1462,24 +1473,6 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
-void LLInventoryPanel::setInvFVBridgeBuilder(const LLInventoryFVBridgeBuilder* bridge_builder)
-{
- if (NULL == bridge_builder)
- {
- llwarns << "NULL is passed as Inventory Bridge Builder. Default will be used." << llendl;
- }
- else
- {
- mInvFVBridgeBuilder = bridge_builder;
- }
-
- if (mInventory->isInventoryUsable() && !mHasInventoryConnection)
- {
- rebuildViewsFor(mRootInventoryItemUUID);
- mHasInventoryConnection = true;
- }
-}
-
void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
{
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index 1666f18c05..4c9ac5d4c6 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -175,9 +175,6 @@ protected:
void rebuildViewsFor(const LLUUID& id);
virtual void buildNewViews(const LLUUID& id); // made virtual to support derived classes. EXT-719
- // Be sure that passed pointer will be destroyed where it was created.
- void setInvFVBridgeBuilder(const LLInventoryFVBridgeBuilder* bridge_builder);
-
protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
@@ -187,6 +184,12 @@ protected:
//private: // Can not make these private - needed by llinventorysubtreepanel
LLFolderView* mFolders;
std::string mStartFolderString;
+
+ /**
+ * Contains UUID of Inventory item from which hierarchy should be built.
+ * Can be set with the "start_folder" xml property.
+ * Default is LLUUID::null that means total Inventory hierarchy.
+ */
LLUUID mStartFolderID;
LLScrollContainer* mScroller;
bool mHasInventoryConnection;
@@ -196,11 +199,6 @@ protected:
*/
bool mBuildDefaultHierarchy;
- /**
- * Contains UUID of Inventory item from which hierarchy should be built.
- * Should be set by derived class before modelChanged() is called.
- * Default is LLUUID::null that means total Inventory hierarchy.
- */
LLUUID mRootInventoryItemUUID;
/**
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 9974de0ef1..c6b04cbcc8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -635,7 +635,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
}
// Add the recipient to the recent people list.
- //*TODO should be deleted, because speaker manager updates through callback the recent list
LLRecentPeople::instance().add(other_participant_id);
}
@@ -1415,12 +1414,10 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
}
else // going to IM session
{
- LLFloaterIMPanel* floaterp = findFloaterBySession(session_id);
- if (floaterp)
+ if (hasSession(session_id))
{
- message = floaterp->getString(message_name);
+ message = LLTrans::getString(message_name + "-im");
message.setArgs(args);
-
gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString());
}
}
@@ -1775,7 +1772,7 @@ LLFloaterIMPanel* LLIMMgr::findFloaterBySession(const LLUUID& session_id)
BOOL LLIMMgr::hasSession(const LLUUID& session_id)
{
- return (findFloaterBySession(session_id) != NULL);
+ return LLIMModel::getInstance()->findIMSession(session_id) != NULL;
}
void LLIMMgr::clearPendingInvitation(const LLUUID& session_id)
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index dec8d7576e..409b637bf2 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -153,7 +153,13 @@ private:
{
bool operator()(const LLMute& a, const LLMute& b) const
{
- return a.mName < b.mName;
+ std::string name1 = a.mName;
+ std::string name2 = b.mName;
+
+ LLStringUtil::toUpper(name1);
+ LLStringUtil::toUpper(name2);
+
+ return name1 < name2;
}
};
struct compare_by_id
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 7160cce5cb..6e90d22d89 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -54,17 +54,15 @@
#include "llstylemap.h"
#include "lldraghandle.h"
-
+#include "lltrans.h"
static const S32 RESIZE_BAR_THICKNESS = 3;
LLNearbyChat::LLNearbyChat(const LLSD& key) :
- LLFloater(key),
- mEChatTearofState(CHAT_PINNED),
- mChatCaptionPanel(NULL),
- mChatHistory(NULL)
+ LLFloater(key)
+ ,mChatHistory(NULL)
{
- m_isDirty = false;
+
}
LLNearbyChat::~LLNearbyChat()
@@ -73,25 +71,6 @@ LLNearbyChat::~LLNearbyChat()
BOOL LLNearbyChat::postBuild()
{
- //resize bars
- setCanResize(true);
-
- mResizeBar[LLResizeBar::BOTTOM]->setVisible(false);
- mResizeBar[LLResizeBar::LEFT]->setVisible(false);
- mResizeBar[LLResizeBar::RIGHT]->setVisible(false);
-
- mResizeBar[LLResizeBar::BOTTOM]->setResizeLimits(120,500);
- mResizeBar[LLResizeBar::TOP]->setResizeLimits(120,500);
- mResizeBar[LLResizeBar::LEFT]->setResizeLimits(220,600);
- mResizeBar[LLResizeBar::RIGHT]->setResizeLimits(220,600);
-
- mResizeHandle[0]->setVisible(false);
- mResizeHandle[1]->setVisible(false);
- mResizeHandle[2]->setVisible(false);
- mResizeHandle[3]->setVisible(false);
-
- getDragHandle()->setVisible(false);
-
//menu
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
@@ -101,17 +80,15 @@ BOOL LLNearbyChat::postBuild()
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_nearby_chat.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-
if(menu)
mPopupMenuHandle = menu->getHandle();
gSavedSettings.declareS32("nearbychat_showicons_and_names",2,"NearByChat header settings",true);
- mChatCaptionPanel = getChild<LLPanel>("chat_caption", false);
mChatHistory = getChild<LLChatHistory>("chat_history");
- reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
-
+ setCanResize(true);
+
return LLFloater::postBuild();
}
@@ -181,6 +158,22 @@ LLColor4 nearbychat_get_text_color(const LLChat& chat)
return text_color;
}
+std::string formatCurrentTime()
+{
+ time_t utc_time;
+ utc_time = time_corrected();
+ std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:["
+ +LLTrans::getString("TimeMin")+"] ";
+
+ LLSD substitution;
+
+ substitution["datetime"] = (S32) utc_time;
+ LLStringUtil::format (timeStr, substitution);
+
+ return timeStr;
+}
+
+
void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& color)
{
S32 font_size = gSavedSettings.getS32("ChatFontSize");
@@ -205,7 +198,7 @@ void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& colo
style_params.font(fontp);
LLUUID uuid = chat.mFromID;
std::string from = chat.mFromName;
- std::string time = "";
+ std::string time = formatCurrentTime();
std::string message = chat.mText;
mChatHistory->appendWidgetMessage(uuid, from, time, message, style_params);
}
@@ -239,193 +232,6 @@ void LLNearbyChat::onNearbySpeakers()
LLSideTray::getInstance()->showPanel("panel_people",param);
}
-void LLNearbyChat::onTearOff()
-{
- if(mEChatTearofState == CHAT_PINNED)
- float_panel();
- else
- pinn_panel();
-}
-
-void LLNearbyChat::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
-
- LLFloater::reshape(width, height, called_from_parent);
-
- LLRect resize_rect;
- resize_rect.setLeftTopAndSize( 0, height, width, RESIZE_BAR_THICKNESS);
- if (mResizeBar[LLResizeBar::TOP])
- {
- mResizeBar[LLResizeBar::TOP]->reshape(width,RESIZE_BAR_THICKNESS);
- mResizeBar[LLResizeBar::TOP]->setRect(resize_rect);
- }
-
- resize_rect.setLeftTopAndSize( 0, RESIZE_BAR_THICKNESS, width, RESIZE_BAR_THICKNESS);
- if (mResizeBar[LLResizeBar::BOTTOM])
- {
- mResizeBar[LLResizeBar::BOTTOM]->reshape(width,RESIZE_BAR_THICKNESS);
- mResizeBar[LLResizeBar::BOTTOM]->setRect(resize_rect);
- }
-
- resize_rect.setLeftTopAndSize( 0, height, RESIZE_BAR_THICKNESS, height);
- if (mResizeBar[LLResizeBar::LEFT])
- {
- mResizeBar[LLResizeBar::LEFT]->reshape(RESIZE_BAR_THICKNESS,height);
- mResizeBar[LLResizeBar::LEFT]->setRect(resize_rect);
- }
-
- resize_rect.setLeftTopAndSize( width - RESIZE_BAR_THICKNESS, height, RESIZE_BAR_THICKNESS, height);
- if (mResizeBar[LLResizeBar::RIGHT])
- {
- mResizeBar[LLResizeBar::RIGHT]->reshape(RESIZE_BAR_THICKNESS,height);
- mResizeBar[LLResizeBar::RIGHT]->setRect(resize_rect);
- }
-
- // *NOTE: we must check mChatCaptionPanel and mChatHistory against NULL because reshape is called from the
- // LLView::initFromParams BEFORE postBuild is called and child controls are not exist yet
- LLRect caption_rect;
- if (NULL != mChatCaptionPanel)
- {
- caption_rect = mChatCaptionPanel->getRect();
- caption_rect.setLeftTopAndSize( 2, height - RESIZE_BAR_THICKNESS, width - 4, caption_rect.getHeight());
- mChatCaptionPanel->reshape( width - 4, caption_rect.getHeight(), 1);
- mChatCaptionPanel->setRect(caption_rect);
- }
-
- if (NULL != mChatHistory)
- {
- LLRect scroll_rect = mChatHistory->getRect();
- scroll_rect.setLeftTopAndSize( 2, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS, width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2);
- mChatHistory->reshape( width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2, 1);
- mChatHistory->setRect(scroll_rect);
- }
-
- //
- if(mEChatTearofState == CHAT_PINNED)
- {
- const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
-
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( parent_rect.mLeft+2, parent_rect.mBottom+height+4, width, height);
- setRect(panel_rect);
- }
- else
- {
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( getRect().mLeft, getRect().mTop, width, height);
- setRect(panel_rect);
- }
-
-}
-
-BOOL LLNearbyChat::handleMouseDown (S32 x, S32 y, MASK mask)
-{
- LLUICtrl* nearby_speakers_btn = mChatCaptionPanel->getChild<LLUICtrl>("nearby_speakers_btn");
- LLUICtrl* tearoff_btn = mChatCaptionPanel->getChild<LLUICtrl>("tearoff_btn");
- LLUICtrl* close_btn = mChatCaptionPanel->getChild<LLUICtrl>("close_btn");
-
- S32 caption_local_x = x - mChatCaptionPanel->getRect().mLeft;
- S32 caption_local_y = y - mChatCaptionPanel->getRect().mBottom;
-
- S32 local_x = caption_local_x - nearby_speakers_btn->getRect().mLeft;
- S32 local_y = caption_local_y - nearby_speakers_btn->getRect().mBottom;
- if(nearby_speakers_btn->pointInView(local_x, local_y))
- {
-
- onNearbySpeakers();
- bringToFront( x, y );
- return true;
- }
- local_x = caption_local_x - tearoff_btn->getRect().mLeft;
- local_y = caption_local_y- tearoff_btn->getRect().mBottom;
- if(tearoff_btn->pointInView(local_x, local_y))
- {
- onTearOff();
- bringToFront( x, y );
- return true;
- }
-
- local_x = caption_local_x - close_btn->getRect().mLeft;
- local_y = caption_local_y - close_btn->getRect().mBottom;
- if(close_btn->pointInView(local_x, local_y))
- {
- setVisible(false);
- bringToFront( x, y );
- return true;
- }
-
- if(mEChatTearofState == CHAT_UNPINNED && mChatCaptionPanel->pointInView(caption_local_x, caption_local_y) )
- {
- //start draggind
- gFocusMgr.setMouseCapture(this);
- mStart_Y = y;
- mStart_X = x;
- bringToFront( x, y );
- return true;
- }
-
- return LLFloater::handleMouseDown(x,y,mask);
-}
-
-BOOL LLNearbyChat::handleMouseUp(S32 x, S32 y, MASK mask)
-{
- if( hasMouseCapture() )
- {
- // Release the mouse
- gFocusMgr.setMouseCapture( NULL );
- mStart_X = 0;
- mStart_Y = 0;
- return true;
- }
-
- return LLFloater::handleMouseUp(x,y,mask);
-}
-
-BOOL LLNearbyChat::handleHover(S32 x, S32 y, MASK mask)
-{
- if( hasMouseCapture() )
- {
- translate(x-mStart_X,y-mStart_Y);
- return true;
- }
- return LLFloater::handleHover(x,y,mask);
-}
-
-void LLNearbyChat::pinn_panel()
-{
- mEChatTearofState = CHAT_PINNED;
- LLIconCtrl* tearoff_btn = mChatCaptionPanel->getChild<LLIconCtrl>("tearoff_btn",false);
-
- tearoff_btn->setValue("Inv_Landmark");
-
- const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
-
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( parent_rect.mLeft+2, parent_rect.mBottom+getRect().getHeight()+4, getRect().getWidth(), getRect().getHeight());
- setRect(panel_rect);
-
- mResizeBar[LLResizeBar::BOTTOM]->setVisible(false);
- mResizeBar[LLResizeBar::LEFT]->setVisible(false);
- mResizeBar[LLResizeBar::RIGHT]->setVisible(false);
-
- getDragHandle()->setVisible(false);
-
-}
-
-void LLNearbyChat::float_panel()
-{
- mEChatTearofState = CHAT_UNPINNED;
- LLIconCtrl* tearoff_btn = mChatCaptionPanel->getChild<LLIconCtrl>("tearoff_btn", false);
-
- tearoff_btn->setValue("Inv_Landmark");
- mResizeBar[LLResizeBar::BOTTOM]->setVisible(true);
- mResizeBar[LLResizeBar::LEFT]->setVisible(true);
- mResizeBar[LLResizeBar::RIGHT]->setVisible(true);
-
- getDragHandle()->setVisible(true);
-
- translate(4,4);
-}
void LLNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata)
{
@@ -438,23 +244,6 @@ bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
return false;
}
-BOOL LLNearbyChat::handleRightMouseDown(S32 x, S32 y, MASK mask)
-{
- if(mChatCaptionPanel->pointInView(x - mChatCaptionPanel->getRect().mLeft, y - mChatCaptionPanel->getRect().mBottom) )
- {
- LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
-
- if(menu)
- {
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, menu, x, y);
- }
- return true;
- }
- return LLFloater::handleRightMouseDown(x, y, mask);
-}
-
void LLNearbyChat::onOpen(const LLSD& key )
{
LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
@@ -464,9 +253,15 @@ void LLNearbyChat::onOpen(const LLSD& key )
}
}
-void LLNearbyChat::draw ()
+void LLNearbyChat::setDocked (bool docked, bool pop_on_undock)
{
- LLFloater::draw();
-}
+ LLFloater::setDocked(docked, pop_on_undock);
+ if(docked)
+ {
+ //move nearby_chat to right bottom
+ LLRect rect = gFloaterView->getRect();
+ setRect(LLRect(rect.mLeft,getRect().getHeight(),rect.mLeft+getRect().getWidth(),0));
+ }
+}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 47cae8ed0d..63e780c4bf 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -43,55 +43,27 @@ class LLChatHistory;
class LLNearbyChat: public LLFloater
{
public:
- // enumerations used by the chat system
- typedef enum e_chat_tearof_state
- {
- CHAT_PINNED = 0,
- CHAT_UNPINNED = 1,
- } EChatTearofState;
-
- enum { RESIZE_BAR_COUNT=4 };
-
LLNearbyChat(const LLSD& key);
~LLNearbyChat();
BOOL postBuild ();
- void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- BOOL handleMouseDown (S32 x, S32 y, MASK mask);
- BOOL handleMouseUp (S32 x, S32 y, MASK mask);
- BOOL handleHover (S32 x, S32 y, MASK mask);
-
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
-
void addMessage (const LLChat& message);
- void onNearbySpeakers ();
- void onTearOff();
-
void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
- /*virtual*/ void onOpen (const LLSD& key);
+ void setDocked (bool docked, bool pop_on_undock);
- /*virtual*/ void draw ();
+ /*virtual*/ void onOpen (const LLSD& key);
private:
+ void onNearbySpeakers ();
void add_timestamped_line(const LLChat& chat, const LLColor4& color);
- void pinn_panel();
- void float_panel();
private:
- EChatTearofState mEChatTearofState;
- S32 mStart_X;
- S32 mStart_Y;
-
LLHandle<LLView> mPopupMenuHandle;
- LLPanel* mChatCaptionPanel;
LLChatHistory* mChatHistory;
-
- bool m_isDirty;
};
#endif
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index f05029582c..daeeb50561 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -39,7 +39,9 @@
#include "llaccordionctrltab.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llagentui.h"
+#include "lldndbutton.h"
#include "llfloaterworldmap.h"
#include "llfolderviewitem.h"
#include "llinventorysubtreepanel.h"
@@ -57,7 +59,6 @@ static const std::string ADD_LANDMARK_BUTTON_NAME = "add_landmark_btn";
static const std::string ADD_FOLDER_BUTTON_NAME = "add_folder_btn";
static const std::string TRASH_BUTTON_NAME = "trash_btn";
-static const LLPlacesInventoryBridgeBuilder PLACES_INVENTORY_BUILDER;
// helper functions
static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string);
@@ -327,9 +328,7 @@ void LLLandmarksPanel::initFavoritesInventroyPanel()
{
mFavoritesInventoryPanel = getChild<LLInventorySubTreePanel>("favorites_list");
- LLUUID start_folder_id = mFavoritesInventoryPanel->getModel()->findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
-
- initLandmarksPanel(mFavoritesInventoryPanel, start_folder_id);
+ initLandmarksPanel(mFavoritesInventoryPanel);
initAccordion("tab_favorites", mFavoritesInventoryPanel);
}
@@ -338,9 +337,8 @@ void LLLandmarksPanel::initLandmarksInventroyPanel()
{
mLandmarksInventoryPanel = getChild<LLInventorySubTreePanel>("landmarks_list");
- LLUUID start_folder_id = mLandmarksInventoryPanel->getModel()->findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+ initLandmarksPanel(mLandmarksInventoryPanel);
- initLandmarksPanel(mLandmarksInventoryPanel, start_folder_id);
mLandmarksInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);
// subscribe to have auto-rename functionality while creating New Folder
@@ -353,9 +351,7 @@ void LLLandmarksPanel::initMyInventroyPanel()
{
mMyInventoryPanel= getChild<LLInventorySubTreePanel>("my_inventory_list");
- LLUUID start_folder_id = mMyInventoryPanel->getModel()->getRootFolderID();
-
- initLandmarksPanel(mMyInventoryPanel, start_folder_id);
+ initLandmarksPanel(mMyInventoryPanel);
initAccordion("tab_inventory", mMyInventoryPanel);
}
@@ -364,18 +360,13 @@ void LLLandmarksPanel::initLibraryInventroyPanel()
{
mLibraryInventoryPanel = getChild<LLInventorySubTreePanel>("library_list");
- LLUUID start_folder_id = mLibraryInventoryPanel->getModel()->getLibraryRootFolderID();
-
- initLandmarksPanel(mLibraryInventoryPanel, start_folder_id);
+ initLandmarksPanel(mLibraryInventoryPanel);
initAccordion("tab_library", mLibraryInventoryPanel);
}
-
-void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_list, const LLUUID& start_folder_id)
+void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_list)
{
- inventory_list->buildSubtreeViewsFor(start_folder_id, &PLACES_INVENTORY_BUILDER);
-
inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);
inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2));
@@ -446,8 +437,15 @@ void LLLandmarksPanel::initListCommandsHandlers()
mListCommands->childSetAction(TRASH_BUTTON_NAME, boost::bind(&LLLandmarksPanel::onTrashButtonClick, this));
+ LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>(TRASH_BUTTON_NAME);
+ trash_btn->setDragAndDropHandler(boost::bind(&LLLandmarksPanel::handleDragAndDropToTrash, this
+ , _4 // BOOL drop
+ , _5 // EDragAndDropType cargo_type
+ , _7 // EAcceptance* accept
+ ));
+
mCommitCallbackRegistrar.add("Places.LandmarksGear.Add.Action", boost::bind(&LLLandmarksPanel::onAddAction, this, _2));
- mCommitCallbackRegistrar.add("Places.LandmarksGear.CopyPaste.Action", boost::bind(&LLLandmarksPanel::onCopyPasteAction, this, _2));
+ mCommitCallbackRegistrar.add("Places.LandmarksGear.CopyPaste.Action", boost::bind(&LLLandmarksPanel::onClipboardAction, this, _2));
mCommitCallbackRegistrar.add("Places.LandmarksGear.Custom.Action", boost::bind(&LLLandmarksPanel::onCustomAction, this, _2));
mCommitCallbackRegistrar.add("Places.LandmarksGear.Folding.Action", boost::bind(&LLLandmarksPanel::onFoldingAction, this, _2));
mEnableCallbackRegistrar.add("Places.LandmarksGear.Enable", boost::bind(&LLLandmarksPanel::isActionEnabled, this, _2));
@@ -539,9 +537,7 @@ void LLLandmarksPanel::onAddFolderButtonClick() const
void LLLandmarksPanel::onTrashButtonClick() const
{
- if(!mCurrentSelectedList) return;
-
- mCurrentSelectedList->getRootFolder()->doToSelected(mCurrentSelectedList->getModel(), "delete");
+ onClipboardAction("delete");
}
void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
@@ -557,7 +553,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
}
}
-void LLLandmarksPanel::onCopyPasteAction(const LLSD& userdata) const
+void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const
{
if(!mCurrentSelectedList)
return;
@@ -644,6 +640,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
{
return rootFolderView->getSelectedCount() == 1;
}
+ else if("create_pick" == command_name)
+ {
+ return !LLAgentPicksInfo::getInstance()->isPickLimitReached();
+ }
else
{
llwarns << "Unprocessed command has come: " << command_name << llendl;
@@ -791,6 +791,33 @@ void LLLandmarksPanel::onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* own
pick_panel = NULL;
}
+bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept)
+{
+ *accept = ACCEPT_NO;
+
+ switch (cargo_type)
+ {
+
+ case DAD_LANDMARK:
+ case DAD_CATEGORY:
+ {
+ bool is_enabled = isActionEnabled("delete");
+
+ if (is_enabled) *accept = ACCEPT_YES_MULTI;
+
+ if (is_enabled && drop)
+ {
+ onClipboardAction("delete");
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return true;
+}
+
//////////////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 52ad317afe..11d703dcde 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -81,7 +81,7 @@ private:
void initLandmarksInventroyPanel();
void initMyInventroyPanel();
void initLibraryInventroyPanel();
- void initLandmarksPanel(LLInventorySubTreePanel* inventory_list, const LLUUID& start_folder_id);
+ void initLandmarksPanel(LLInventorySubTreePanel* inventory_list);
void initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list);
void onAccordionExpandedCollapsed(const LLSD& param, LLInventorySubTreePanel* inventory_list);
void deselectOtherThan(const LLInventorySubTreePanel* inventory_list);
@@ -94,7 +94,7 @@ private:
void onAddFolderButtonClick() const;
void onTrashButtonClick() const;
void onAddAction(const LLSD& command_name) const;
- void onCopyPasteAction(const LLSD& command_name) const;
+ void onClipboardAction(const LLSD& command_name) const;
void onFoldingAction(const LLSD& command_name);
bool isActionEnabled(const LLSD& command_name) const;
void onCustomAction(const LLSD& command_name);
@@ -108,6 +108,11 @@ private:
bool canSelectedBeModified(const std::string& command_name) const;
void onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* owner, const LLSD& params);
+ /**
+ * Processes drag-n-drop of the Landmarks and folders into trash button.
+ */
+ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
+
private:
LLInventorySubTreePanel* mFavoritesInventoryPanel;
LLInventorySubTreePanel* mLandmarksInventoryPanel;
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 664ebfd7a4..cb9f641bf8 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -38,6 +38,7 @@
#include "llpanel.h"
#include "message.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llbutton.h"
#include "lllineeditor.h"
#include "llparcel.h"
@@ -310,6 +311,7 @@ LLPanelPickEdit::LLPanelPickEdit()
: LLPanelPickInfo()
, mLocationChanged(false)
, mNeedData(true)
+ , mNewPick(false)
{
}
@@ -325,6 +327,8 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
// creating new Pick
if(pick_id.isNull())
{
+ mNewPick = true;
+
setAvatarId(gAgent.getID());
resetData();
@@ -356,6 +360,7 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
// editing existing pick
else
{
+ mNewPick = false;
LLPanelPickInfo::onOpen(key);
enableSaveButton(false);
@@ -463,6 +468,14 @@ void LLPanelPickEdit::sendUpdate()
pick_data.enabled = TRUE;
LLAvatarPropertiesProcessor::instance().sendPickInfoUpdate(&pick_data);
+
+ if(mNewPick)
+ {
+ // Assume a successful create pick operation, make new number of picks
+ // available immediately. Actual number of picks will be requested in
+ // LLAvatarPropertiesProcessor::sendPickInfoUpdate and updated upon server respond.
+ LLAgentPicksInfo::getInstance()->incrementNumberOfPicks();
+ }
}
void LLPanelPickEdit::onPickChanged(LLUICtrl* ctrl)
diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h
index c5b13c69ea..9b605cd6b1 100644
--- a/indra/newview/llpanelpick.h
+++ b/indra/newview/llpanelpick.h
@@ -235,6 +235,7 @@ protected:
bool mLocationChanged;
bool mNeedData;
+ bool mNewPick;
};
#endif // LL_LLPANELPICK_H
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index d6040c497c..1219a08c6c 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llavatarconstants.h"
#include "llflatlistview.h"
#include "llfloaterreg.h"
@@ -302,14 +303,13 @@ void LLPanelPicks::onDoubleClickItem(LLUICtrl* item)
void LLPanelPicks::updateButtons()
{
- int picks_num = mPicksList->size();
bool has_selected = mPicksList->numSelected();
childSetEnabled(XML_BTN_INFO, has_selected);
if (getAvatarId() == gAgentID)
{
- childSetEnabled(XML_BTN_NEW, picks_num < MAX_AVATAR_PICKS);
+ childSetEnabled(XML_BTN_NEW, !LLAgentPicksInfo::getInstance()->isPickLimitReached());
childSetEnabled(XML_BTN_DELETE, has_selected);
}
@@ -364,6 +364,12 @@ void LLPanelPicks::onPanelPickClose(LLPanel* panel)
panel->setVisible(FALSE);
}
+void LLPanelPicks::onPanelPickSave(LLPanel* panel)
+{
+ onPanelPickClose(panel);
+ updateButtons();
+}
+
void LLPanelPicks::createPickInfoPanel()
{
if(!mPanelPickInfo)
@@ -381,7 +387,7 @@ void LLPanelPicks::createPickEditPanel()
{
mPanelPickEdit = LLPanelPickEdit::create();
mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
- mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
+ mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit));
mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
mPanelPickEdit->setVisible(FALSE);
}
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 6264a19318..7cf8f2de2a 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -86,6 +86,7 @@ private:
void onClickNew();
void onClickInfo();
void onPanelPickClose(LLPanel* panel);
+ void onPanelPickSave(LLPanel* panel);
void onPanelPickEdit();
void onClickMenuEdit();
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 2372063fbd..609b205920 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -56,10 +56,12 @@
#include "llagentui.h"
#include "llavatarpropertiesprocessor.h"
#include "llfloaterworldmap.h"
+#include "llfloaterbuycurrency.h"
#include "llinventorymodel.h"
#include "lllandmarkactions.h"
#include "llpanelpick.h"
#include "lltexturectrl.h"
+#include "llstatusbar.h"
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
@@ -87,7 +89,10 @@ LLPanelPlaceInfo::LLPanelPlaceInfo()
mMinHeight(0),
mScrollingPanel(NULL),
mInfoPanel(NULL),
- mMediaPanel(NULL)
+ mMediaPanel(NULL),
+ mForSalePanel(NULL),
+ mYouAreHerePanel(NULL),
+ mSelectedParcelID(-1)
{}
LLPanelPlaceInfo::~LLPanelPlaceInfo()
@@ -103,14 +108,15 @@ BOOL LLPanelPlaceInfo::postBuild()
mTitle = getChild<LLTextBox>("panel_title");
mCurrentTitle = mTitle->getText();
- mForSaleIcon = getChild<LLIconCtrl>("icon_for_sale");
+ mForSalePanel = getChild<LLPanel>("for_sale_panel");
+ mYouAreHerePanel = getChild<LLPanel>("here_panel");
+ LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLPanelPlaceInfo::updateYouAreHereBanner,this));
+
+ //Icon value should contain sale price of last selected parcel.
+ mForSalePanel->getChild<LLIconCtrl>("icon_for_sale")->
+ setMouseDownCallback(boost::bind(&LLPanelPlaceInfo::onForSaleBannerClick, this));
- // Since this is only used in the directory browser, always
- // disable the snapshot control. Otherwise clicking on it will
- // open a texture picker.
mSnapshotCtrl = getChild<LLTextureCtrl>("logo");
- mSnapshotCtrl->setEnabled(FALSE);
-
mRegionName = getChild<LLTextBox>("region_title");
mParcelName = getChild<LLTextBox>("parcel_title");
mDescEditor = getChild<LLTextEditor>("description");
@@ -266,7 +272,8 @@ void LLPanelPlaceInfo::resetLocation()
mRequestedID.setNull();
mLandmarkID.setNull();
mPosRegion.clearVec();
- mForSaleIcon->setVisible(FALSE);
+ mForSalePanel->setVisible(FALSE);
+ mYouAreHerePanel->setVisible(FALSE);
std::string not_available = getString("not_available");
mMaturityRatingText->setValue(not_available);
mParcelOwner->setValue(not_available);
@@ -479,9 +486,9 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
//update for_sale banner, here we should use DFQ_FOR_SALE instead of PF_FOR_SALE
//because we deal with remote parcel response format
- bool isForSale = (parcel_data.flags & DFQ_FOR_SALE) &&
+ bool is_for_sale = (parcel_data.flags & DFQ_FOR_SALE) &&
mInfoType == AGENT ? TRUE : FALSE;
- mForSaleIcon->setVisible(isForSale);
+ mForSalePanel->setVisible(is_for_sale);
S32 region_x;
S32 region_y;
@@ -797,11 +804,11 @@ void LLPanelPlaceInfo::displaySelectedParcelInfo(LLParcel* parcel,
}
}
+ mSelectedParcelID = parcel->getLocalID();
+ mLastSelectedRegionID = region->getRegionID();
processParcelInfo(parcel_data);
- // TODO: If agent is in currently within the selected parcel
- // show the "You Are Here" banner.
-
+ mYouAreHerePanel->setVisible(is_current_parcel);
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale);
}
@@ -978,6 +985,50 @@ void LLPanelPlaceInfo::populateFoldersList()
mFolderCombo->add(it->second, LLSD(it->first));
}
+void LLPanelPlaceInfo::updateYouAreHereBanner()
+{
+ //YouAreHere Banner should be displayed only for selected places,
+ // If you want to display it for landmark or teleport history item, you should check by mParcelId
+
+ bool is_you_are_here = false;
+ if (mSelectedParcelID != S32(-1) && !mLastSelectedRegionID.isNull())
+ {
+ is_you_are_here = gAgent.getRegion()->getRegionID()== mLastSelectedRegionID &&
+ mSelectedParcelID == LLViewerParcelMgr::getInstance()->getAgentParcel()->getLocalID();
+ }
+ mYouAreHerePanel->setVisible(is_you_are_here);
+}
+
+void LLPanelPlaceInfo::onForSaleBannerClick()
+{
+ LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance();
+ LLParcelSelectionHandle hParcel = mgr->getFloatingParcelSelection();
+ LLViewerRegion* selected_region = mgr->getSelectionRegion();
+ if(!hParcel.isNull() && selected_region)
+ {
+ if(hParcel->getParcel()->getLocalID() == mSelectedParcelID &&
+ mLastSelectedRegionID ==selected_region->getRegionID())
+ {
+ if(hParcel->getParcel()->getSalePrice() - gStatusBar->getBalance() > 0)
+ {
+ LLFloaterBuyCurrency::buyCurrency("Buying selected land ", hParcel->getParcel()->getSalePrice());
+ }
+ else
+ {
+ LLViewerParcelMgr::getInstance()->startBuyLand();
+ }
+ }
+ else
+ {
+ LL_WARNS("Places") << "User is trying to buy remote parcel.Operation is not supported"<< LL_ENDL;
+ }
+
+ }
+
+
+}
+
+
static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right)
{
return left.second < right.second;
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index 06fee2224e..7b3a8f050b 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -135,7 +135,12 @@ public:
private:
void populateFoldersList();
+ void updateYouAreHereBanner();
+ void onForSaleBannerClick();
+ /**
+ * mParcelID is valid only for remote places, in other cases it's null. See resetLocation()
+ */
LLUUID mParcelID;
LLUUID mRequestedID;
LLUUID mLandmarkID;
@@ -144,8 +149,15 @@ private:
S32 mMinHeight;
INFO_TYPE mInfoType;
+ /**
+ * Hold last displayed parcel. Needs for YouAreHere banner.
+ */
+ S32 mSelectedParcelID;
+ LLUUID mLastSelectedRegionID;
+
LLTextBox* mTitle;
- LLIconCtrl* mForSaleIcon;
+ LLPanel* mForSalePanel;
+ LLPanel* mYouAreHerePanel;
LLTextureCtrl* mSnapshotCtrl;
LLTextBox* mRegionName;
LLTextBox* mParcelName;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index f30bb1a0a6..5ab823b6e5 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -50,6 +50,7 @@
#include "lluictrlfactory.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llavatarpropertiesprocessor.h"
#include "llfloaterworldmap.h"
#include "llinventorybridge.h"
@@ -178,6 +179,8 @@ BOOL LLPanelPlaces::postBuild()
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2));
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+ enable_registrar.add("Places.OverflowMenu.Enable", boost::bind(&LLPanelPlaces::onOverflowMenuItemEnable, this, _2));
mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!mPlaceMenu)
@@ -606,6 +609,16 @@ void LLPanelPlaces::onOverflowButtonClicked()
LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop);
}
+bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param)
+{
+ std::string value = param.asString();
+ if("can_create_pick" == value)
+ {
+ return !LLAgentPicksInfo::getInstance()->isPickLimitReached();
+ }
+ return true;
+}
+
void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
{
std::string item = param.asString();
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 70c50b2058..e2d281dd84 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -77,6 +77,7 @@ private:
void onCancelButtonClicked();
void onOverflowButtonClicked();
void onOverflowMenuItemClicked(const LLSD& param);
+ bool onOverflowMenuItemEnable(const LLSD& param);
void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
void onBackButtonClicked();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index ac1d66157a..8793d22646 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -83,6 +83,7 @@
#include "v3math.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llagentwearables.h"
#include "llagentpilot.h"
#include "llfloateravatarpicker.h"
@@ -2602,7 +2603,7 @@ bool idle_startup()
// reset timers now that we are running "logged in" logic
LLFastTimer::reset();
-
+ LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
return TRUE;
}
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 81917ec76e..9ccff0c44e 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -190,7 +190,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("syswell_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLSysWellWindow>);
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
- LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 546a06b93f..eca5130426 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -118,6 +118,8 @@
<texture name="Icon_Dock_Press" file_name="windows/Icon_Dock_Press.png" preload="true" />
<texture name="Icon_For_Sale" file_name="icons/Icon_For_sale.png" preload="false" />
+ <texture name="Banner_ForSale" file_name="Banner_ForSale.png" preload="false" />
+ <texture name="Banner_YouAreHere" file_name="Banner_YouAreHere.png" preload="false" />
<texture name="Icon_Gear_Background" file_name="windows/Icon_Gear_Background.png" preload="false" />
<texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
index a8d3f440c3..9cd7056866 100644
--- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml
+++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
@@ -18,6 +18,6 @@
left="0"
name="favorites_bar_btn"
tab_stop="false"
- top="10"
+ top="0"
use_ellipses="true"
width="120" />
diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
index 6fbfed5f60..90c5463aa7 100644
--- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
@@ -1,47 +1,31 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater
- background_opaque="false"
- background_visible="true"
- bevel_style="in"
- bg_alpha_color="0.3 0.3 0.3 1.0"
+ can_dock="true"
+ can_minimize="true"
+ can_close="true"
+ center_horiz="true"
height="300"
layout="topleft"
name="nearby_chat"
help_topic="nearby_chat"
save_rect="true"
title="Nearby Chat"
- single_instance="true"
+ save_visibility="true"
width="320">
- <panel top="20" width="320" height="30" background_visible="true" background_opaque="false" bg_alpha_color="0.0 0.0 0.0 1.0" name="chat_caption">
- <text
- width="140" left="25" height="20" follows="left|right|top"
- font="SansSerifBigBold" text_color="white" word_wrap="true"
- mouse_opaque="true" name="sender_name" >NEARBY CHAT </text>
- <icon top="5" left="250"
- width="20" height="20" follows="top|right"
- color="1 1 1 1" enabled="true" image_name="icn_voice-groupfocus.tga"
- mouse_opaque="true" name="nearby_speakers_btn"/>
- <icon top="5" left="275"
- width="20" height="20" follows="top|right"
- color="1 1 1 1" enabled="true" image_name="inv_item_landmark_visited.tga"
- mouse_opaque="true" name="tearoff_btn"/>
- <icon top="5" left="300"
- width="15" height="15" follows="top|right"
- color="1 1 1 1" enabled="true" image_name="closebox.tga"
- name="close_btn"/>
- </panel>
<chat_history
allow_html="true"
bg_readonly_color="ChatHistoryBgColor"
bg_writeable_color="ChatHistoryBgColor"
- follows="left|top|right"
+ follows="all"
+ left="0"
+ top="15"
font="SansSerif"
layout="topleft"
- height="320"
+ height="280"
name="chat_history"
parse_highlights="true"
text_color="ChatHistoryTextColor"
text_readonly_color="ChatHistoryTextColor"
- width="250"/>
+ width="320"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_landmark.xml b/indra/newview/skins/default/xui/en/menu_landmark.xml
index 54a4095967..93b6db222a 100644
--- a/indra/newview/skins/default/xui/en/menu_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_landmark.xml
@@ -28,6 +28,9 @@
<menu_item_call.on_click
function="Places.OverflowMenu.Action"
parameter="pick" />
+ <menu_item_call.on_enable
+ function="Places.OverflowMenu.Enable"
+ parameter="can_create_pick" />
</menu_item_call>
<menu_item_call
label="Add to Favorites Bar"
diff --git a/indra/newview/skins/default/xui/en/menu_place.xml b/indra/newview/skins/default/xui/en/menu_place.xml
index 01f62985ca..1b96eb51f0 100644
--- a/indra/newview/skins/default/xui/en/menu_place.xml
+++ b/indra/newview/skins/default/xui/en/menu_place.xml
@@ -20,6 +20,9 @@
<menu_item_call.on_click
function="Places.OverflowMenu.Action"
parameter="pick" />
+ <menu_item_call.on_enable
+ function="Places.OverflowMenu.Enable"
+ parameter="can_create_pick" />
</menu_item_call>
<menu_item_separator
layout="topleft"/>
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
index 9d2d162270..c60f670fa6 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
@@ -155,5 +155,8 @@
<on_click
function="Places.LandmarksGear.Custom.Action"
parameter="create_pick" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="create_pick" />
</menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
index 7e78eb8291..b002034a08 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
+ background_visible="true"
class="edit_profile_panel"
follows="all"
height="535"
diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml
index ad452b16a7..c33f68eaf7 100644
--- a/indra/newview/skins/default/xui/en/panel_landmarks.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml
@@ -31,6 +31,7 @@
left="0"
mouse_opaque="true"
name="favorites_list"
+ start_folder="favorite"
width="380"/>
</accordion_tab>
<accordion_tab
@@ -62,6 +63,7 @@
left="0"
mouse_opaque="true"
name="my_inventory_list"
+ start_folder="inventory"
width="380"/>
</accordion_tab>
<accordion_tab
@@ -77,6 +79,7 @@
left="0"
mouse_opaque="true"
name="library_list"
+ start_folder="library"
width="380"/>
</accordion_tab>
</accordion>
@@ -127,7 +130,7 @@
picture_style="true"
tool_tip="Add new folder"
width="18" />
- <button
+ <dnd_button
follows="bottom|right"
height="18"
image_selected="TrashItem_Press"
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 00100693cc..4e1ea0f490 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -137,6 +137,6 @@
name="favorite"
image_drag_indication="Arrow_Down"
chevron_button_tool_tip="Show more of My Favorites"
- top="32"
+ bottom="65"
width="590" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml
index 4d890b1d46..9c2829d92d 100644
--- a/indra/newview/skins/default/xui/en/panel_notification.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification.xml
@@ -12,6 +12,7 @@
width="350">
<panel
background_visible="true"
+ bg_alpha_color="0.3 0.3 0.3 0"
follows="left|right|top"
height="100"
label="info_panel"
@@ -70,6 +71,7 @@
</panel>
<panel
background_visible="true"
+ bg_alpha_color="0.3 0.3 0.3 0"
follows="left|right|bottom"
height="40"
label="control_panel"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 39124efabd..a57c9cd97f 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2884,6 +2884,22 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
</string>
<!-- IM system messages -->
+ <string name="ringing-im">
+ Joining Voice Chat...
+ </string>
+ <string name="connected-im">
+ Connected, click End Call to hang up
+ </string>
+ <string name="hang_up-im">
+ Left Voice Chat
+ </string>
+ <string name="answering-im">
+ Connecting...
+ </string>
+ <string name="inventory_item_offered-im">
+ Inventory item offered
+ </string>
+
<string name="only_user_message">
You are the only user in this session.
</string>