diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-01 13:54:53 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-01 13:54:53 -0700 |
commit | 8e1a9e2813da6b9d5c17795b375098fb6a386ee1 (patch) | |
tree | 2069ec7c9ab4daf73d7b09b565f862892e6528f3 | |
parent | 11a148415e810706f2a1835b6b717a0a062d458f (diff) |
CHUI-102: Cleaned up code after code review.
-rw-r--r-- | indra/llui/llfolderview.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llfolderview.h | 2 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 1 | ||||
-rwxr-xr-x | indra/newview/llconversationmodel.h | 1 | ||||
-rw-r--r-- | indra/newview/llimfloater.h | 2 | ||||
-rwxr-xr-x | indra/newview/llimfloatercontainer.cpp | 9 |
6 files changed, 15 insertions, 4 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 327a064228..9a4a90206b 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1531,14 +1531,18 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) && menu ) { if (mCallbackRegistrar) + { mCallbackRegistrar->pushScope(); + } updateMenuOptions(menu); menu->updateParent(LLMenuGL::sMenuContainer); LLMenuGL::showPopup(this, menu, x, y); if (mCallbackRegistrar) + { mCallbackRegistrar->popScope(); + } } else { diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 260275269d..487391a477 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -94,7 +94,7 @@ public: use_ellipses, show_item_link_overlays; Mandatory<LLFolderViewModelInterface*> view_model; - Optional<std::string> options_menu; + Mandatory<std::string> options_menu; Params(); diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 1c4c7aefae..f587ef8428 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -28,7 +28,6 @@ #include "llviewerprecompiledheaders.h" #include "llconversationmodel.h" -#include "llmenugl.h" // // Conversation items : common behaviors diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 43fa66e8e2..f84fbe39f1 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -285,6 +285,7 @@ private: // are set as enabled. //(defined in inventorybridge.cpp) +//TODO: Gilbert Linden - Refactor to make this function non-global void hide_context_entries(LLMenuGL& menu, const menuentry_vec_t &entries_to_show, const menuentry_vec_t &disabled_entries); diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index fbaf009939..489e430b26 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -128,7 +128,7 @@ public: static void onIMChicletCreated(const LLUUID& session_id); bool getStartConferenceInSameFloater() const { return mStartConferenceInSameFloater; } - LLUUID getOtherParticipantUUID() {return mOtherParticipantUUID;} + const LLUUID& getOtherParticipantUUID() {return mOtherParticipantUUID;} static boost::signals2::connection setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb); static floater_showed_signal_t sIMFloaterShowedSignal; diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index b4802c71f9..58d2020801 100755 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -689,13 +689,20 @@ void LLIMFloaterContainer::doToSelected(const LLSD& userdata) LLIMFloater * conversation; getSelectedUUIDs(selected_uuids); + //Find the conversation floater associated with the selected id conversation = LLIMFloater::findInstance(selected_uuids.front()); - + + //When a one-on-one conversation exists, retrieve the participant id from the conversation floater b/c + //selected_uuids.front() does not pertain to the UUID of the person you are having the conversation with. if(conversation && + mConversationsRoot && + mConversationsRoot->getCurSelectedItem() && + mConversationsRoot->getCurSelectedItem()->getViewModelItem() && static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem())->getType() == LLConversationItem::CONV_SESSION_1_ON_1) { currentSelectedUUID = conversation->getOtherParticipantUUID(); } + //Otherwise can get the UUID directly from selected_uuids else { currentSelectedUUID = selected_uuids.front(); |