From 8ea12297e2e757ad6efbeaebd3ee86c0605ce385 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 9 Nov 2009 13:34:32 +0800 Subject: escape from infinitive loop of fetching inventory folder with NULL uuid --- indra/newview/llinventorybridge.cpp | 1 + indra/newview/llinventorymodel.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 90e48d22ec..c5903eb5ca 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2127,6 +2127,7 @@ void LLFolderBridge::openItem() lldebugs << "LLFolderBridge::openItem()" << llendl; LLInventoryModel* model = getInventoryModel(); if(!model) return; + if(mUUID.isNull()) return; bool fetching_inventory = model->fetchDescendentsOf(mUUID); // Only change folder type if we have the folder contents. if (!fetching_inventory) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index baf34b42ff..c8b9841e5d 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1267,6 +1267,8 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) { + if(folder_id.isNull()) return false; + LLViewerInventoryCategory* cat = getCategory(folder_id); if(!cat) { -- cgit v1.2.3 From f8a010e4dd136aba5443b68a367fe39bd1b1ba33 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 9 Nov 2009 23:46:41 +0800 Subject: check for NULL UUID for friendListFolderID --- indra/newview/llfriendcard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index c956657825..1ff2566dca 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -519,7 +519,7 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) } LLUUID friendListFolderID = findFriendAllSubfolderUUIDImpl(); - if (shouldBeAdded && !invModel->isCategoryComplete(friendListFolderID)) + if (friendListFolderID.notNull() && shouldBeAdded && !invModel->isCategoryComplete(friendListFolderID)) { mFriendsAllFolderCompleted = false; shouldBeAdded = false; -- cgit v1.2.3 From b423ea58ca2fe4f9be36fa7b3e70017bc7e8368d Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 10 Nov 2009 01:04:52 +0800 Subject: fix xml function param problem and adding missing settings in settings.xml --- indra/newview/app_settings/settings.xml | 11 +++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 28 +++++----------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6f6d5fb979..55ff255c38 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3598,6 +3598,17 @@ Value 0 + HideSelectedObjects + + Comment + Hide Selected Objects + Persist + 1 + Type + Boolean + Value + 0 + HtmlHelpLastPage Comment diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 66c9060b06..dbc9601680 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1932,18 +1932,15 @@ function="Advanced.ToggleConsole" parameter="debug" /> - - - - + - - - - + parameter="EnableTextureAtlas" /> + parameter="EnableTextureAtlas" /> Date: Mon, 9 Nov 2009 19:28:14 +0000 Subject: DEV-41317 DEV-41318: Enabled the Call button in the Profile panel. I've added a new LLAvatarActions::startCall() method to make it easy to start a new P2P call. The Resident Profile "Call" button is now hooked up to this. I've also put back the "Call" menu in the avatar popup menu and hooked this up too. While I was there I noticed that the "IM" popup menu code could all be removed in favor of a call to LLAvatarActions::startIM(). --- indra/newview/llavataractions.cpp | 32 ++++++++++++++++++++++ indra/newview/llavataractions.h | 10 +++++++ indra/newview/llviewermenu.cpp | 32 ++++++++++------------ .../newview/skins/default/xui/en/panel_profile.xml | 1 - 4 files changed, 56 insertions(+), 19 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 3fc37aa3d5..dae4296a82 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -185,6 +185,38 @@ void LLAvatarActions::startIM(const LLUUID& id) make_ui_sound("UISndStartIM"); } +// static +void LLAvatarActions::startCall(const LLUUID& id) +{ + if (id.isNull() || isCalling(id)) + { + return; + } + + std::string name; + gCacheName->getFullName(id, name); + LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); + if (session_id != LLUUID::null) + { + // always open IM window when connecting to voice + LLIMFloater::show(session_id); + gIMMgr->startCall(session_id); + } + make_ui_sound("UISndStartIM"); +} + +// static +bool LLAvatarActions::isCalling(const LLUUID &id) +{ + if (id.isNull()) + { + return false; + } + + LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id); + return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); +} + // static void LLAvatarActions::startConference(const std::vector& ids) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 512f673b43..0ec20ae357 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -66,6 +66,11 @@ public: */ static void startIM(const LLUUID& id); + /** + * Start an avatar-to-avatar voice call with another user + */ + static void startCall(const LLUUID& id); + /** * Start conference chat with the given avatars. */ @@ -96,6 +101,11 @@ public: */ static bool isBlocked(const LLUUID& id); + /** + * Return true if the avatar is in a P2P voice call with a given user + */ + static bool isCalling(const LLUUID &id); + /** * Invite avatar to a group. */ diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 07d073c3a9..b086e6d055 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6249,25 +6249,20 @@ class LLAvatarSendIM : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) { - std::string name("IM"); - LLNameValue *first = avatar->getNVPair("FirstName"); - LLNameValue *last = avatar->getNVPair("LastName"); - if (first && last) - { - name.assign( first->getString() ); - name.append(" "); - name.append( last->getString() ); - } + LLAvatarActions::startIM(avatar->getID()); + } + return true; + } +}; - //EInstantMessage type = have_agent_callingcard(gLastHitObjectID) - // ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START; - LLUUID session_id = gIMMgr->addSession(name, - IM_NOTHING_SPECIAL, - avatar->getID()); - if (session_id != LLUUID::null) - { - LLIMFloater::show(session_id); - } +class LLAvatarCall : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); + if(avatar) + { + LLAvatarActions::startCall(avatar->getID()); } return true; } @@ -7938,6 +7933,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); + view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index a0055383b1..0f5e96416d 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -294,7 +294,6 @@ left_pad="5" width="45" />