diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-03 15:00:10 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-03 15:00:10 +0200 |
commit | 6d292f0e816fcb571e73619aabdc9a7cfe179467 (patch) | |
tree | 57a608f999da08a19d115761e602483a96919b9d | |
parent | 4fa120feb419f7ab99998466623696584b7b282d (diff) | |
parent | a7d82c0d0e02f53929e5a5574f6efcb7db91b5af (diff) |
Merge
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llagentpicksinfo.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lllandmarkactions.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lllandmarkactions.h | 2 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.h | 1 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_im_control_panel.xml | 9 |
11 files changed, 55 insertions, 7 deletions
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp index 6e5835bace..3c8d0dac42 100644 --- a/indra/newview/llagentpicksinfo.cpp +++ b/indra/newview/llagentpicksinfo.cpp @@ -47,7 +47,8 @@ public: ~LLAgentPicksObserver() { - LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this); + if (LLAvatarPropertiesProcessor::instanceExists()) + LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this); } void sendAgentPicksRequest() diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index a854eb852f..1049348684 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -830,13 +830,21 @@ LLChicletPanel::~LLChicletPanel() void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); + S32 unread = data["num_unread"].asInteger(); + + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + if (im_floater && im_floater->getVisible()) + { + unread = 0; + } + std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(session_id); std::list<LLChiclet *>::iterator iter; for (iter = chiclets.begin(); iter != chiclets.end(); iter++) { LLChiclet* chiclet = *iter; if (chiclet != NULL) { - chiclet->setCounter(data["num_unread"].asInteger()); + chiclet->setCounter(unread); } else { diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index dee86f4a22..7bad949921 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -106,6 +106,8 @@ void LLIMFloater::onFocusReceived() // virtual void LLIMFloater::onClose(bool app_quitting) { + if (!gIMMgr->hasSession(mSessionID)) return; + setTyping(false); gIMMgr->leaveSession(mSessionID); } diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 0b07dd4f21..319212f604 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -135,13 +135,13 @@ public: // Returns true if the given inventory item is a landmark pointing to the current parcel. // Used to find out if there is at least one landmark from current parcel. -class LLFistAgentParcelLandmark : public LLInventoryCollectFunctor +class LLFirstAgentParcelLandmark : public LLInventoryCollectFunctor { private: bool mFounded;// to avoid unnecessary check public: - LLFistAgentParcelLandmark(): mFounded(false){} + LLFirstAgentParcelLandmark(): mFounded(false){} /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { @@ -202,7 +202,7 @@ bool LLLandmarkActions::landmarkAlreadyExists() //static bool LLLandmarkActions::hasParcelLandmark() { - LLFistAgentParcelLandmark get_first_agent_landmark; + LLFirstAgentParcelLandmark get_first_agent_landmark; LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; fetch_landmarks(cats, items, get_first_agent_landmark); diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h index 312426cab0..1c524c820c 100644 --- a/indra/newview/lllandmarkactions.h +++ b/indra/newview/lllandmarkactions.h @@ -55,7 +55,7 @@ public: static bool landmarkAlreadyExists(); /** - * @brief Checks whether landmark exists for current parcel. + * @brief Checks whether landmark exists for current agent parcel. */ static bool hasParcelLandmark(); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e63daac4af..b35fd6134b 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -50,6 +50,7 @@ #include "llslurl.h" #include "llurlsimstring.h" #include "llviewerinventory.h" +#include "llviewermenu.h" #include "llviewerparcelmgr.h" #include "llworldmap.h" #include "llappviewer.h" @@ -271,6 +272,12 @@ void LLNavigationBar::draw() LLPanel::draw(); } +BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + show_navbar_context_menu(this,x,y); + return TRUE; +} + void LLNavigationBar::onBackButtonClicked() { LLTeleportHistory::getInstance()->goBack(); diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 8b625e7fa6..21645664da 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -54,6 +54,7 @@ public: virtual ~LLNavigationBar(); /*virtual*/ void draw(); + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL postBuild(); void handleLoginComplete(); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e97eb1df2b..133f13aab8 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -32,6 +32,11 @@ #include "llviewerprecompiledheaders.h" +// common includes +#include "lltrans.h" +#include "llavataractions.h" +#include "llagent.h" + #include "llparticipantlist.h" #include "llavatarlist.h" #include "llspeakers.h" @@ -49,6 +54,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove"); mSpeakerMgr->addListener(mSpeakerClearListener, "clear"); + mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); + mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList)); + //Lets fill avatarList with existing speakers LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); @@ -62,6 +70,16 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->sortByName(); } +void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list) +{ + LLUUID clicked_id = list->getSelectedUUID(); + + if (clicked_id.isNull() || clicked_id == gAgent.getID()) + return; + + LLAvatarActions::startIM(clicked_id); +} + LLParticipantList::~LLParticipantList() { delete mSpeakerAddListener; diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 68aae0aee5..a3a55303c0 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -74,6 +74,8 @@ class LLParticipantList LLAvatarList* mAvatarList; }; private: + void onAvatarListDoubleClicked(LLAvatarList* list); + LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index c314fce42d..c4324b425a 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -28,10 +28,10 @@ name="panel_im_control_panel" layout="topleft" top_delta="-3" - width="146" height="305" follows="left" label="IM Control Panel" + auto_resize="false" user_resize="false" /> <layout_panel height="305" width="200" diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index a9396661e0..04ee1a19cb 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -5,26 +5,31 @@ border="false"> <avatar_icon name="avatar_icon" + follows="left|top" width="96" height="96" /> <button name="view_profile_btn" + follows="left|bottom" label="View Profile" left_delta="3" width="125" height="20" /> <button name="add_friend_btn" + follows="left|bottom" label="Add Friend" width="125" height="20" /> <button name="call_btn" + follows="left|bottom" label="Call" width="125" height="20" /> <button + follows="left|bottom" height="20" label="End Call" name="end_call_btn" @@ -33,6 +38,7 @@ <button enabled="false" + follows="left|bottom" name="voice_ctrls_btn" label="Open Voice Controls" width="125" @@ -40,14 +46,17 @@ visible="false"/> <button name="teleport_btn" + follows="left|bottom" label="Teleport" width="125" height="20" /> <button name="share_btn" + follows="left|bottom" label="Share" width="125" height="20" /> <button name="pay_btn" + follows="left|bottom" label="Pay" width="125" height="20" /> |