diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-02-13 17:02:13 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-02-13 17:02:13 -0800 |
commit | c17b41b5266cc5e2b318768d75e4686c59bb4990 (patch) | |
tree | 6954fd8ebac3f9ef35423c95aad910ac09e594c8 /indra/newview | |
parent | 30248c2049f6e20fa20e5b9f61cbd1402905d9b8 (diff) | |
parent | 61ac85c5434b8273277e550bf184663090a59d1c (diff) |
merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings_per_account.xml | 11 | ||||
-rw-r--r-- | indra/newview/llconversationlog.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 34 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.h | 5 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelpeoplemenus.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llworld.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_conversation.xml | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_people_nearby.xml | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 4 |
13 files changed, 94 insertions, 30 deletions
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 0b589e2da6..363713f2f4 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -176,17 +176,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>LogInstantMessages</key> - <map> - <key>Comment</key> - <string>Log Instant Messages</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>LogShowHistory</key> <map> <key>Comment</key> diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 15d61e978d..22277e6421 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -532,7 +532,6 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD& { if (0 == LLNotificationsUtil::getSelectedOption(notification, response)) { - LLLogChat::deleteTranscripts(); mConversations.clear(); notifyObservers(); } diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index bfc564f407..0977056b2a 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -151,7 +151,8 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 items.push_back(std::string("Moderator Options")); items.push_back(std::string("AllowTextChat")); items.push_back(std::string("moderate_voice_separator")); - items.push_back(std::string("ModerateVoiceToggleMuteSelected")); + items.push_back(std::string("ModerateVoiceMuteSelected")); + items.push_back(std::string("ModerateVoiceUnMuteSelected")); items.push_back(std::string("ModerateVoiceMute")); items.push_back(std::string("ModerateVoiceUnmute")); } diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index ba3d4036c9..e30dd51acb 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1520,8 +1520,10 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); - lldebugs << "Saved favorites for " << av_name.getAccountName() << llendl; - fav_llsd[av_name.getAccountName()] = user_llsd; + // Note : use the "John Doe" and not the "john.doe" version of the name + // as we'll compare it with the stored credentials in the login panel. + lldebugs << "Saved favorites for " << av_name.getUserName() << llendl; + fav_llsd[av_name.getUserName()] = user_llsd; llofstream file; file.open(filename); @@ -1539,10 +1541,12 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); - lldebugs << "Removed favorites for " << av_name.getAccountName() << llendl; - if (fav_llsd.has(av_name.getAccountName())) + // Note : use the "John Doe" and not the "john.doe" version of the name. + // See saveFavoritesSLURLs() here above for the reason why. + lldebugs << "Removed favorites for " << av_name.getUserName() << llendl; + if (fav_llsd.has(av_name.getUserName())) { - fav_llsd.erase(av_name.getAccountName()); + fav_llsd.erase(av_name.getUserName()); } llofstream out_file; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index cef45a5b56..21bd8ab1d2 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -68,8 +68,9 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2)); mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2)); - mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMContainer::checkContextMenuItem, this, _2)); - mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMContainer::enableContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMContainer::checkContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMContainer::enableContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("Avatar.VisibleItem", boost::bind(&LLFloaterIMContainer::visibleContextMenuItem, this, _2)); mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMContainer::doToSelected, this, _2)); mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&LLFloaterIMContainer::doToSelectedGroup, this, _2)); @@ -259,6 +260,7 @@ void LLFloaterIMContainer::onOpen(const LLSD& key) { LLMultiFloater::onOpen(key); openNearbyChat(); + reSelectConversation(); assignResizeLimits(); } @@ -1245,7 +1247,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v { return LLAvatarActions::canOfferTeleport(uuids); } - else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute_unmute" == item)) + else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute" == item) || ("can_unmute" == item)) { // *TODO : get that out of here... return enableModerateContextMenuItem(item); @@ -1290,6 +1292,22 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve return false; } +bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) +{ + const std::string& item = userdata.asString(); + + if ("show_mute" == item) + { + return !isMuted(getCurSelectedViewModelItem()->getUUID()); + } + else if ("show_unmute" == item) + { + return isMuted(getCurSelectedViewModelItem()->getUUID()); + } + + return true; +} + void LLFloaterIMContainer::showConversation(const LLUUID& session_id) { setVisibleAndFrontmost(false); @@ -1589,10 +1607,18 @@ bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& user bool voice_channel = speakerp->isInVoiceChannel(); - if ("can_moderate_voice" == userdata || "can_mute_unmute" == userdata) + if ("can_moderate_voice" == userdata) { return voice_channel; } + else if ("can_mute" == userdata) + { + return voice_channel && !isMuted(getCurSelectedViewModelItem()->getUUID()); + } + else if ("can_unmute" == userdata) + { + return voice_channel && isMuted(getCurSelectedViewModelItem()->getUUID()); + } // The last invoke is used to check whether the "can_allow_text_chat" will enabled return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID()); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index a28dba3b98..265ae8df4c 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -140,8 +140,9 @@ private: const LLConversationItem * getCurSelectedViewModelItem(); void getParticipantUUIDs(uuid_vec_t& selected_uuids); void doToSelected(const LLSD& userdata); - bool checkContextMenuItem(const LLSD& userdata); - bool enableContextMenuItem(const LLSD& userdata); + bool checkContextMenuItem(const LLSD& userdata); + bool enableContextMenuItem(const LLSD& userdata); + bool visibleContextMenuItem(const LLSD& userdata); void doToSelectedConversation(const std::string& command, uuid_vec_t& selectedIDS); void doToSelectedGroup(const LLSD& userdata); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 90e857265d..6667706333 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1032,6 +1032,10 @@ void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl) } LLUUID clicked_id = item->getAvatarId(); + if(gAgent.getID() == clicked_id) + { + return; + } #if 0 // SJB: Useful for testing, but not currently functional or to spec LLAvatarActions::showProfile(clicked_id); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 899771f3b9..61e9468ce5 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -99,6 +99,10 @@ LLContextMenu* NearbyMenu::createMenu() bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) { + if(gAgent.getID() == mUUIDs.front()) + { + return false; + } std::string item = userdata.asString(); // Note: can_block and can_delete is used only for one person selected menu @@ -176,6 +180,11 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canOfferTeleport(mUUIDs); } + else if (item == std::string("can_im") || item == std::string("can_callog") || item == std::string("can_invite") || + item == std::string("can_share") || item == std::string("can_pay")) + { + return true; + } return false; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ab86f752c1..37e6ded986 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -917,6 +917,13 @@ bool idle_startup() // Overwrite default user settings with user settings LLAppViewer::instance()->loadSettingsFromDirectory("Account"); + // Convert 'LogInstantMessages' into 'KeepConversationLogTranscripts' for backward compatibility (CHUI-743). + LLControlVariablePtr logInstantMessagesControl = gSavedPerAccountSettings.getControl("LogInstantMessages"); + if (logInstantMessagesControl.notNull()) + { + gSavedPerAccountSettings.setS32("KeepConversationLogTranscripts", logInstantMessagesControl->getValue() ? 2 : 1); + } + // Need to set the LastLogoff time here if we don't have one. LastLogoff is used for "Recent Items" calculation // and startup time is close enough if we don't have a real value. if (gSavedPerAccountSettings.getU32("LastLogoff") == 0) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 09d17b3701..793becf0c8 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1192,7 +1192,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi { LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; - if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy) + if (!pVOAvatar->isDead() && !pVOAvatar->mIsDummy) { LLVector3d pos_global = pVOAvatar->getPositionGlobal(); LLUUID uuid = pVOAvatar->getID(); diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index 46c6e19fa5..fd5c86b3ca 100644 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -163,11 +163,20 @@ </menu_item_check> <menu_item_separator layout="topleft" name="moderate_voice_separator" /> <menu_item_call - label="Toggle mute this participant" + label="Mute this participant" layout="topleft" - name="ModerateVoiceToggleMuteSelected"> + name="ModerateVoiceMuteSelected"> <on_click function="Avatar.DoToSelected" parameter="selected" /> - <on_enable function="Avatar.EnableItem" parameter="can_mute_unmute" /> + <on_enable function="Avatar.EnableItem" parameter="can_mute" /> + <on_visible function="Avatar.VisibleItem" parameter="show_mute" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click function="Avatar.DoToSelected" parameter="selected" /> + <on_enable function="Avatar.EnableItem" parameter="can_unmute" /> + <on_visible function="Avatar.VisibleItem" parameter="show_unmute" /> </menu_item_call> <menu_item_call label="Mute everyone" diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index 8014e81469..60a6c98514 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -15,6 +15,9 @@ name="IM"> <menu_item_call.on_click function="Avatar.IM" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_im"/> </menu_item_call> <menu_item_call label="Offer Teleport" @@ -42,6 +45,9 @@ name="Chat history"> <menu_item_call.on_click function="Avatar.Calllog" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_callog"/> </menu_item_call> <menu_item_separator /> <menu_item_call @@ -70,6 +76,9 @@ name="Invite"> <menu_item_call.on_click function="Avatar.InviteToGroup" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_invite"/> </menu_item_call> <menu_item_separator /> <menu_item_call @@ -88,6 +97,9 @@ name="Share"> <menu_item_call.on_click function="Avatar.Share" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_share"/> </menu_item_call> <menu_item_call label="Pay" @@ -95,6 +107,9 @@ name="Pay"> <menu_item_call.on_click function="Avatar.Pay" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_pay"/> </menu_item_call> <menu_item_check label="Block/Unblock" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f8a35337ed..3ae9b206a4 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -10006,7 +10006,7 @@ Cannot create large prims that intersect other players. Please re-try when othe icon="alertmodal.tga" name="PreferenceChatClearLog" type="alertmodal"> - This will delete the log of previous conversations, and all transcripts of those conversations. Proceed? + This will delete the log of previous conversations. Proceed? <tag>confirm</tag> <usetemplate ignoretext="Confirm before I delete the log of previous conversations." @@ -10019,7 +10019,7 @@ Cannot create large prims that intersect other players. Please re-try when othe icon="alertmodal.tga" name="PreferenceChatDeleteTranscripts" type="alertmodal"> - This will delete transcripts for all previous conversations. The list of conversations will not be affected. Proceed? + This will delete transcripts for all previous conversations. The list of conversations will not be affected. If you run scripts on your chat transcript files, you may want to proceed with caution. Proceed? <tag>confirm</tag> <usetemplate ignoretext="Confirm before I delete transcripts." |