diff options
author | Merov Linden <merov@lindenlab.com> | 2013-03-12 19:40:00 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-03-12 19:40:00 -0700 |
commit | c594e848656f2bc1d29c48b7ceae782b5d542ad2 (patch) | |
tree | c668283967304a5e84e0b8d72a07511d5e842e2b /indra/newview | |
parent | cb6574c905806feac3846733ca0ead77e431beb1 (diff) | |
parent | e7a4cce3566988d5b58dc070196a32844d705318 (diff) |
Pull merge from lindenlab/viewer-chui
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llavataractions.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 13 | ||||
-rwxr-xr-x | indra/newview/llconversationview.cpp | 36 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_object_icon.xml | 18 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_url_agent.xml | 17 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_url_objectim.xml | 2 |
7 files changed, 73 insertions, 17 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ce063a9887..b513a52ff7 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -193,7 +193,7 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id, // static void LLAvatarActions::startIM(const LLUUID& id) { - if (id.isNull()) + if (id.isNull() || gAgent.getID() == id) return; LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2)); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0152571e20..53926c1fef 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -58,7 +58,7 @@ #include "llworld.h" #include "lluiconstants.h" #include "llstring.h" - +#include "llurlaction.h" #include "llviewercontrol.h" static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history"); @@ -156,6 +156,17 @@ public: LLFloaterSidePanelContainer::showPanel("people", "panel_people", LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId())); } + else if (level == "map") + { + std::string url = "secondlife://" + mObjectData["slurl"].asString(); + LLUrlAction::showLocationOnMap(url); + } + else if (level == "teleport") + { + std::string url = "secondlife://" + mObjectData["slurl"].asString(); + LLUrlAction::teleportToLocation(url); + } + } void onAvatarIconContextMenuItemClicked(const LLSD& userdata) diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 837389aed5..956abcd586 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -257,20 +257,38 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) //This node (conversation) was selected and a child (participant) was not if(result && getRoot()) { - if(getRoot()->getCurSelectedItem() == this) - { - LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); - LLUUID session_id = item? item->getUUID() : LLUUID(); + selectConversationItem(); + } - LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - im_container->flashConversationItemWidget(session_id,false); - im_container->selectConversationPair(session_id, false); - im_container->collapseMessagesPane(false); - } + return result; +} + +BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask); + + if(result) + { + selectConversationItem(); } + return result; } +void LLConversationViewSession::selectConversationItem() +{ + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectConversationPair(session_id, false); + im_container->collapseMessagesPane(false); + } +} + // virtual S32 LLConversationViewSession::arrange(S32* width, S32* height) { diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 76d3d079ea..3eb2e63792 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -68,6 +68,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ S32 arrange(S32* width, S32* height); @@ -90,6 +91,7 @@ private: void onCurrentVoiceSessionChanged(const LLUUID& session_id); void startFlashing(); + void selectConversationItem(); LLPanel* mItemPanel; LLPanel* mCallIconLayoutPanel; diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index 0c8a2af002..2d4f1792c2 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -24,4 +24,22 @@ function="ObjectIcon.Action" parameter="block" /> </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Show on Map" + layout="topleft" + name="show_on_map"> + <menu_item_call.on_click + function="ObjectIcon.Action" + parameter="map" /> + </menu_item_call> + <menu_item_call + label="Teleport to Object Location" + layout="topleft" + name="teleport_to_object"> + <menu_item_call.on_click + function="ObjectIcon.Action" + parameter="teleport" /> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml index 88ae441bd3..7cd56f257a 100644 --- a/indra/newview/skins/default/xui/en/menu_url_agent.xml +++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml @@ -1,20 +1,27 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <context_menu layout="topleft" - name="Url Popup"> + name="Url Popup"> <menu_item_call - label="Send IM" + label="View Profile" layout="topleft" name="show_agent"> <menu_item_call.on_click + function="Url.ShowProfile" /> + </menu_item_call> + <menu_item_call + label="Send IM..." + layout="topleft" + name="send_im"> + <menu_item_call.on_click function="Url.SendIM" /> </menu_item_call> <menu_item_call - label="Show Resident Profile" + label="Add Friend..." layout="topleft" - name="show_agent"> + name="add_friend"> <menu_item_call.on_click - function="Url.ShowProfile" /> + function="Url.AddFriend" /> </menu_item_call> <menu_item_separator layout="topleft" /> diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml index 35c2269b0d..87ab58e622 100644 --- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml @@ -3,7 +3,7 @@ layout="topleft" name="Url Popup"> <menu_item_call - label="Show Object Information" + label="Object Profile..." layout="topleft" name="show_object"> <menu_item_call.on_click |