summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/settings.xml46
-rw-r--r--indra/newview/app_settings/settings_per_account.xml11
-rwxr-xr-x[-rw-r--r--]indra/newview/llappearancemgr.cpp29
-rwxr-xr-x[-rw-r--r--]indra/newview/llappearancemgr.h9
-rw-r--r--indra/newview/llappviewer.cpp1
-rwxr-xr-xindra/newview/llavataractions.cpp2
-rw-r--r--indra/newview/llchathistory.cpp22
-rw-r--r--indra/newview/llchiclet.cpp5
-rw-r--r--indra/newview/llconversationlog.cpp48
-rw-r--r--indra/newview/llconversationlog.h2
-rw-r--r--indra/newview/llconversationloglist.cpp71
-rw-r--r--indra/newview/llconversationmodel.cpp2
-rwxr-xr-xindra/newview/llconversationview.cpp51
-rwxr-xr-xindra/newview/llconversationview.h2
-rw-r--r--indra/newview/lldelayedgestureerror.cpp8
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.cpp25
-rw-r--r--indra/newview/llfloaterimcontainer.cpp104
-rw-r--r--indra/newview/llfloaterimcontainer.h8
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp42
-rw-r--r--indra/newview/llfloaterimnearbychat.h1
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp10
-rw-r--r--indra/newview/llfloaterimsession.cpp7
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp113
-rw-r--r--indra/newview/llfloaterimsessiontab.h16
-rwxr-xr-xindra/newview/llfloaterpreference.cpp8
-rw-r--r--indra/newview/llimview.cpp44
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp64
-rw-r--r--indra/newview/lllogchat.cpp22
-rw-r--r--indra/newview/lllogchat.h2
-rw-r--r--indra/newview/llpanelpeople.cpp13
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp118
-rw-r--r--indra/newview/llpanelpeoplemenus.h20
-rw-r--r--indra/newview/llsidepanelappearance.cpp5
-rw-r--r--indra/newview/llspeakers.cpp28
-rw-r--r--indra/newview/llspeakers.h1
-rwxr-xr-xindra/newview/lltexturefetch.cpp164
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerassetstats.cpp39
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerassetstats.h6
-rw-r--r--indra/newview/llviewerdisplay.cpp1
-rwxr-xr-xindra/newview/llviewermessage.cpp108
-rw-r--r--indra/newview/llviewertexture.cpp11
-rwxr-xr-xindra/newview/llviewerwindow.cpp2
-rwxr-xr-x[-rw-r--r--]indra/newview/llvoavatar.cpp102
-rwxr-xr-x[-rw-r--r--]indra/newview/llvoavatar.h11
-rwxr-xr-x[-rw-r--r--]indra/newview/llvoavatarself.cpp11
-rw-r--r--indra/newview/llworldmapview.cpp3
-rw-r--r--indra/newview/skins/default/textures/icons/collapse_to_one_line.pngbin0 -> 538 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/expand_one_liner.pngbin0 -> 545 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml137
-rw-r--r--indra/newview/skins/default/xui/en/menu_conversation.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_im_conversation.xml7
-rw-r--r--indra/newview/skins/default/xui/en/menu_object_icon.xml18
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby.xml40
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml14
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_agent.xml17
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_group.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_objectim.xml2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml1
-rwxr-xr-x[-rw-r--r--]indra/newview/tests/llviewerassetstats_test.cpp51
62 files changed, 1183 insertions, 549 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index e1b86ae121..f66d8fca5b 100644..100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1584,6 +1584,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ChatLoadGroupMaxMembers</key>
+ <map>
+ <key>Comment</key>
+ <string>Max number of active members we'll show up for an unresponsive group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>100</real>
+ </map>
+ <key>ChatLoadGroupTimeout</key>
+ <map>
+ <key>Comment</key>
+ <string>Time we give the server to send group participants before we hit the server for group info (seconds)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>10.0</real>
+ </map>
<key>ChatOnlineNotification</key>
<map>
<key>Comment</key>
@@ -1694,17 +1716,6 @@
<key>Value</key>
<integer>131073</integer>
</map>
- <key>NearbyChatIsNotTornOff</key>
- <map>
- <key>Comment</key>
- <string>saving torn-off state of the nearby chat between sessions</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>CloseChatOnReturn</key>
<map>
<key>Comment</key>
@@ -4315,6 +4326,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>IMShowContentPanel</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Toolbar and Body Panels</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>IgnoreAllNotifications</key>
<map>
<key>Comment</key>
@@ -7456,7 +7478,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
<key>QuietSnapshotsToDisk</key>
<map>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 363713f2f4..ada374f892 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -281,6 +281,17 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>NearbyChatIsNotTornOff</key>
+ <map>
+ <key>Comment</key>
+ <string>saving torn-off state of the nearby chat between sessions</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ShowFavoritesOnLogin</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index cb9e4471ef..43439bac5d 100644..100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1191,21 +1191,6 @@ S32 LLAppearanceMgr::getCOFVersion() const
}
}
-S32 LLAppearanceMgr::getLastUpdateRequestCOFVersion() const
-{
- return mLastUpdateRequestCOFVersion;
-}
-
-S32 LLAppearanceMgr::getLastAppearanceUpdateCOFVersion() const
-{
- return mLastAppearanceUpdateCOFVersion;
-}
-
-void LLAppearanceMgr::setLastAppearanceUpdateCOFVersion(S32 new_val)
-{
- mLastAppearanceUpdateCOFVersion = new_val;
-}
-
const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink()
{
const LLUUID& current_outfit_cat = getCOF();
@@ -3302,8 +3287,8 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
responder_ptr = new RequestAgentUpdateAppearanceResponder;
}
LLHTTPClient::post(url, body, responder_ptr);
- llassert(cof_version >= mLastUpdateRequestCOFVersion);
- mLastUpdateRequestCOFVersion = cof_version;
+ llassert(cof_version >= gAgentAvatarp->mLastUpdateRequestCOFVersion);
+ gAgentAvatarp->mLastUpdateRequestCOFVersion = cof_version;
}
class LLIncrementCofVersionResponder : public LLHTTPClient::Responder
@@ -3331,12 +3316,10 @@ protected:
}
S32 new_version = content["category"]["version"].asInteger();
- LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance();
-
// cof_version should have increased
- llassert(new_version > app_mgr->mLastUpdateRequestCOFVersion);
+ llassert(new_version > gAgentAvatarp->mLastUpdateRequestCOFVersion);
- app_mgr->mLastUpdateRequestCOFVersion = new_version;
+ gAgentAvatarp->mLastUpdateRequestCOFVersion = new_version;
}
virtual void httpFailure()
@@ -3590,9 +3573,7 @@ LLAppearanceMgr::LLAppearanceMgr():
mAttachmentInvLinkEnabled(false),
mOutfitIsDirty(false),
mOutfitLocked(false),
- mIsInUpdateAppearanceFromCOF(false),
- mLastUpdateRequestCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN),
- mLastAppearanceUpdateCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
+ mIsInUpdateAppearanceFromCOF(false)
{
LLOutfitObserver& outfit_observer = LLOutfitObserver::instance();
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index d49f5d6c15..46252afbde 100644..100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -97,15 +97,6 @@ public:
// Debugging - get truncated LLSD summary of COF contents.
LLSD dumpCOF() const;
- // COF version of last viewer-initiated appearance update request.
- S32 mLastUpdateRequestCOFVersion;
- S32 getLastUpdateRequestCOFVersion() const;
-
- // COF version of last appearance message received for self av.
- S32 mLastAppearanceUpdateCOFVersion;
- S32 getLastAppearanceUpdateCOFVersion() const;
- void setLastAppearanceUpdateCOFVersion(S32 new_val);
-
// Finds the folder link to the currently worn outfit
const LLViewerInventoryItem *getBaseOutfitLink();
bool getBaseOutfitName(std::string &name);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dac268ec92..3adf956ae3 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4392,7 +4392,6 @@ void LLAppViewer::idle()
// The 5-second interval is nice for this purpose. If the object debug
// bit moves or is disabled, please give this a suitable home.
LLViewerAssetStatsFF::record_fps_main(gFPSClamped);
- LLViewerAssetStatsFF::record_avatar_stats();
}
}
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 c4f63d9256..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)
@@ -820,6 +831,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
body_message_params.font.style = "ITALIC";
}
+ if(chat.mChatType == CHAT_TYPE_WHISPER)
+ {
+ body_message_params.font.style = "ITALIC";
+ }
+ else if(chat.mChatType == CHAT_TYPE_SHOUT)
+ {
+ body_message_params.font.style = "BOLD";
+ }
+
bool message_from_log = chat.mChatStyle == CHAT_STYLE_HISTORY;
// We graying out chat history by graying out messages that contains full date in a time string
if (message_from_log)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index e34130aff2..f50a19761a 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -427,14 +427,15 @@ LLChicletPanel::~LLChicletPanel()
void LLChicletPanel::onMessageCountChanged(const LLSD& data)
{
- //LLUUID session_id = data["session_id"].asUUID();
- //S32 unread = data["participant_unread"].asInteger();
+ // *TODO : we either suppress this method or return a value. Right now, it servers no purpose.
+ /*
//LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id);
//if (im_floater && im_floater->getVisible() && im_floater->hasFocus())
//{
// unread = 0;
//}
+ */
}
void LLChicletPanel::objectChicletCallback(const LLSD& data)
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 4be169e267..7883e4cb89 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -28,9 +28,11 @@
#include "llagent.h"
#include "llavatarnamecache.h"
#include "llconversationlog.h"
+#include "lldiriterator.h"
#include "llnotificationsutil.h"
#include "lltrans.h"
+#include <boost/foreach.hpp>
#include "boost/lexical_cast.hpp"
const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days by spec
@@ -192,14 +194,17 @@ LLConversationLog::LLConversationLog() :
mAvatarNameCacheConnection(),
mLoggingEnabled(false)
{
- LLControlVariable * keep_log_ctrlp = gSavedPerAccountSettings.getControl("KeepConversationLogTranscripts").get();
- S32 log_mode = keep_log_ctrlp->getValue();
- keep_log_ctrlp->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
- if (log_mode > 0)
+ if(gSavedPerAccountSettings.controlExists("KeepConversationLogTranscripts"))
{
- loadFromFile(getFileName());
+ LLControlVariable * keep_log_ctrlp = gSavedPerAccountSettings.getControl("KeepConversationLogTranscripts").get();
+ S32 log_mode = keep_log_ctrlp->getValue();
+ keep_log_ctrlp->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
+ if (log_mode > 0)
+ {
+ loadFromFile(getFileName());
- enableLogging(log_mode);
+ enableLogging(log_mode);
+ }
}
}
@@ -380,6 +385,36 @@ void LLConversationLog::cache()
}
}
+void LLConversationLog::getListOfBackupLogs(std::vector<std::string>& list_of_backup_logs)
+{
+ // get Users log directory
+ std::string dirname = gDirUtilp->getPerAccountChatLogsDir();
+
+ // add final OS dependent delimiter
+ dirname += gDirUtilp->getDirDelimiter();
+
+ // create search pattern
+ std::string pattern = "conversation.log.backup*";
+
+ LLDirIterator iter(dirname, pattern);
+ std::string filename;
+ while (iter.next(filename))
+ {
+ list_of_backup_logs.push_back(gDirUtilp->add(dirname, filename));
+ }
+}
+
+void LLConversationLog::deleteBackupLogs()
+{
+ std::vector<std::string> backup_logs;
+ getListOfBackupLogs(backup_logs);
+
+ BOOST_FOREACH(const std::string& fullpath, backup_logs)
+ {
+ LLFile::remove(fullpath);
+ }
+}
+
bool LLConversationLog::moveLog(const std::string &originDirectory, const std::string &targetDirectory)
{
@@ -575,5 +610,6 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD&
mConversations.clear();
notifyObservers();
cache();
+ deleteBackupLogs();
}
}
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 58e698de25..265b1f0ef0 100644
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -138,6 +138,8 @@ public:
*/
void cache();
bool moveLog(const std::string &originDirectory, const std::string &targetDirectory);
+ void getListOfBackupLogs(std::vector<std::string>& list_of_backup_logs);
+ void deleteBackupLogs();
void onClearLog();
void onClearLogResponse(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 96b225b841..5ab108b39f 100644
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -198,6 +198,8 @@ void LLConversationLogList::refresh()
void LLConversationLogList::rebuildList()
{
+ const LLConversation * selected_conversationp = getSelectedConversation();
+
clear();
bool have_filter = !mNameFilter.empty();
@@ -214,7 +216,12 @@ void LLConversationLogList::rebuildList()
addNewItem(&*iter);
}
-
+
+ // try to restore selection of item
+ if (NULL != selected_conversationp)
+ {
+ selectItemByUUID(selected_conversationp->getSessionID());
+ }
bool logging_enabled = log_instance.getIsLoggingEnabled();
bool log_empty = log_instance.isLogEmpty();
@@ -238,8 +245,16 @@ void LLConversationLogList::rebuildList()
void LLConversationLogList::onCustomAction(const LLSD& userdata)
{
+ const LLConversation * selected_conversationp = getSelectedConversation();
+
+ if (NULL == selected_conversationp)
+ {
+ return;
+ }
+
const std::string command_name = userdata.asString();
- const LLUUID& selected_id = getSelectedConversation()->getParticipantID();
+ const LLUUID& selected_conversation_participant_id = selected_conversationp->getParticipantID();
+ const LLUUID& selected_conversation_session_id = selected_conversationp->getSessionID();
LLIMModel::LLIMSession::SType stype = getSelectedSessionType();
if ("im" == command_name)
@@ -247,11 +262,11 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
switch (stype)
{
case LLIMModel::LLIMSession::P2P_SESSION:
- LLAvatarActions::startIM(selected_id);
+ LLAvatarActions::startIM(selected_conversation_participant_id);
break;
case LLIMModel::LLIMSession::GROUP_SESSION:
- LLGroupActions::startIM(getSelectedConversation()->getSessionID());
+ LLGroupActions::startIM(selected_conversation_session_id);
break;
default:
@@ -263,11 +278,11 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
switch (stype)
{
case LLIMModel::LLIMSession::P2P_SESSION:
- LLAvatarActions::startCall(selected_id);
+ LLAvatarActions::startCall(selected_conversation_participant_id);
break;
case LLIMModel::LLIMSession::GROUP_SESSION:
- LLGroupActions::startCall(getSelectedConversation()->getSessionID());
+ LLGroupActions::startCall(selected_conversation_session_id);
break;
default:
@@ -279,11 +294,11 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
switch (stype)
{
case LLIMModel::LLIMSession::P2P_SESSION:
- LLAvatarActions::showProfile(selected_id);
+ LLAvatarActions::showProfile(selected_conversation_participant_id);
break;
case LLIMModel::LLIMSession::GROUP_SESSION:
- LLGroupActions::show(getSelectedConversation()->getSessionID());
+ LLGroupActions::show(selected_conversation_session_id);
break;
default:
@@ -292,52 +307,53 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
}
else if ("chat_history" == command_name)
{
- const LLUUID& session_id = getSelectedConversation()->getSessionID();
- LLFloaterReg::showInstance("preview_conversation", session_id, true);
+ LLFloaterReg::showInstance("preview_conversation", selected_conversation_session_id, true);
}
else if ("offer_teleport" == command_name)
{
- LLAvatarActions::offerTeleport(selected_id);
+ LLAvatarActions::offerTeleport(selected_conversation_participant_id);
}
else if("add_friend" == command_name)
{
- if (!LLAvatarActions::isFriend(selected_id))
+ if (!LLAvatarActions::isFriend(selected_conversation_participant_id))
{
- LLAvatarActions::requestFriendshipDialog(selected_id);
+ LLAvatarActions::requestFriendshipDialog(selected_conversation_participant_id);
}
}
else if("remove_friend" == command_name)
{
- if (LLAvatarActions::isFriend(selected_id))
+ if (LLAvatarActions::isFriend(selected_conversation_participant_id))
{
- LLAvatarActions::removeFriendDialog(selected_id);
+ LLAvatarActions::removeFriendDialog(selected_conversation_participant_id);
}
}
else if ("invite_to_group" == command_name)
{
- LLAvatarActions::inviteToGroup(selected_id);
+ LLAvatarActions::inviteToGroup(selected_conversation_participant_id);
}
else if ("show_on_map" == command_name)
{
- LLAvatarActions::showOnMap(selected_id);
+ LLAvatarActions::showOnMap(selected_conversation_participant_id);
}
else if ("share" == command_name)
{
- LLAvatarActions::share(selected_id);
+ LLAvatarActions::share(selected_conversation_participant_id);
}
else if ("pay" == command_name)
{
- LLAvatarActions::pay(selected_id);
+ LLAvatarActions::pay(selected_conversation_participant_id);
}
else if ("block" == command_name)
{
- LLAvatarActions::toggleBlock(selected_id);
+ LLAvatarActions::toggleBlock(selected_conversation_participant_id);
}
}
bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
{
- if (numSelected() != 1)
+ const LLConversation * selected_conversationp = getSelectedConversation();
+
+ if (NULL == selected_conversationp || numSelected() > 1)
{
return false;
}
@@ -345,7 +361,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
const std::string command_name = userdata.asString();
LLIMModel::LLIMSession::SType stype = getSelectedSessionType();
- const LLUUID& selected_id = getSelectedConversation()->getParticipantID();
+ const LLUUID& selected_id = selected_conversationp->getParticipantID();
bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype;
bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype;
@@ -374,7 +390,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
{
return is_p2p && LLAvatarActions::canOfferTeleport(selected_id);
}
- else if ("can_show_on_map")
+ else if ("can_show_on_map" == command_name)
{
return is_p2p && ((LLAvatarTracker::instance().isBuddyOnline(selected_id) && is_agent_mappable(selected_id)) || gAgent.isGodlike());
}
@@ -384,9 +400,16 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
bool LLConversationLogList::isActionChecked(const LLSD& userdata)
{
+ const LLConversation * selected_conversationp = getSelectedConversation();
+
+ if (NULL == selected_conversationp)
+ {
+ return false;
+ }
+
const std::string command_name = userdata.asString();
- const LLUUID& selected_id = getSelectedConversation()->getParticipantID();
+ const LLUUID& selected_id = selected_conversationp->getParticipantID();
bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == getSelectedSessionType();
if ("is_blocked" == command_name)
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 009fce0a92..c74ce24872 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -139,6 +139,8 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32
items.push_back(std::string("remove_friend"));
items.push_back(std::string("invite_to_group"));
items.push_back(std::string("separator_invite_to_group"));
+ if (static_cast<LLConversationItem*>(mParent)->getType() == CONV_SESSION_NEARBY)
+ items.push_back(std::string("zoom_in"));
items.push_back(std::string("map"));
items.push_back(std::string("share"));
items.push_back(std::string("pay"));
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 74b348cd81..956abcd586 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -104,6 +104,15 @@ LLConversationViewSession::~LLConversationViewSession()
void LLConversationViewSession::setFlashState(bool flash_state)
{
+ if (flash_state && !mFlashStateOn)
+ {
+ // flash chat toolbar button if scrolled out of sight (because flashing will not be visible)
+ if (mContainer->isScrolledOutOfSight(this))
+ {
+ gToolBarView->flashCommand(LLCommandId("chat"), true);
+ }
+ }
+
mFlashStateOn = flash_state;
mFlashStarted = false;
mFlashTimer->stopFlashing();
@@ -115,12 +124,6 @@ void LLConversationViewSession::startFlashing()
{
mFlashStarted = true;
mFlashTimer->startFlashing();
-
- // flash chat toolbar button if scrolled out of sight (because flashing will not be visible)
- if (mContainer->isScrolledOutOfSight(this))
- {
- gToolBarView->flashCommand(LLCommandId("chat"), true);
- }
}
}
@@ -254,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/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp
index 80e7c9f1b2..ef1b644ad4 100644
--- a/indra/newview/lldelayedgestureerror.cpp
+++ b/indra/newview/lldelayedgestureerror.cpp
@@ -113,9 +113,11 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok)
}
}
-
- LLNotificationsUtil::add(ent.mNotifyName, args);
-
+ if(!LLApp::isQuitting())
+ {
+ LLNotificationsUtil::add(ent.mNotifyName, args);
+ }
+
return true;
}
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 22f35752bd..be20adeb8a 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -33,6 +33,7 @@
#include "lldir.h"
#include "llerror.h"
#include "llfloaterreg.h"
+#include "llimview.h"
#include "llnotifications.h"
#include "llnotificationhandler.h"
#include "llnotificationstorage.h"
@@ -145,6 +146,8 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
LLNotifications& instance = LLNotifications::instance();
bool imToastExists = false;
+ bool group_ad_hoc_toast_exists = false;
+ S32 toastSessionType;
bool offerExists = false;
for (LLSD::array_const_iterator notification_it = data.beginArray();
@@ -158,7 +161,20 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
if(notificationName == toastName)
{
- imToastExists = true;
+ toastSessionType = notification_params["payload"]["SESSION_TYPE"];
+ if(toastSessionType == LLIMModel::LLIMSession::P2P_SESSION)
+ {
+ imToastExists = true;
+ }
+ //Don't add group/ad-hoc messages to the notification system because
+ //this means the group/ad-hoc session has to be re-created
+ else if(toastSessionType == LLIMModel::LLIMSession::GROUP_SESSION
+ || toastSessionType == LLIMModel::LLIMSession::ADHOC_SESSION)
+ {
+ //Just allows opening the conversation log for group/ad-hoc messages upon startup
+ group_ad_hoc_toast_exists = true;
+ continue;
+ }
}
else if(notificationName == offerName)
{
@@ -197,7 +213,12 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
LLFloaterReg::showInstance("im_container");
}
- if(imToastExists || offerExists)
+ if(group_ad_hoc_toast_exists)
+ {
+ LLFloaterReg::showInstance("conversation");
+ }
+
+ if(imToastExists || group_ad_hoc_toast_exists || offerExists)
{
make_ui_sound_deferred("UISndNewIncomingIMSession");
}
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index a0c386717b..5e0cd8ef78 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -53,6 +53,7 @@
#include "llcallbacklist.h"
#include "llworld.h"
#include "llsdserialize.h"
+#include "llviewerobjectlist.h"
//
// LLFloaterIMContainer
@@ -62,8 +63,7 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param
mExpandCollapseBtn(NULL),
mConversationsRoot(NULL),
mConversationsEventStream("ConversationsEvents"),
- mInitialized(false),
- mIsFirstLaunch(false)
+ mInitialized(false)
{
mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2));
mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2));
@@ -114,6 +114,7 @@ void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::str
void LLFloaterIMContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
{
selectConversationPair(session_id, true);
+ collapseMessagesPane(false);
}
void LLFloaterIMContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)
@@ -225,10 +226,11 @@ BOOL LLFloaterIMContainer::postBuild()
childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed"));
- collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed"));
+ collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed"), false);
LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false));
mMicroChangedSignal = LLVoiceClient::getInstance()->MicroChangedCallback(boost::bind(&LLFloaterIMContainer::updateSpeakBtnState, this));
- if (! mMessagesPane->isCollapsed())
+
+ if (! mMessagesPane->isCollapsed() && ! mConversationsPane->isCollapsed())
{
S32 conversations_panel_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth");
LLRect conversations_panel_rect = mConversationsPane->getRect();
@@ -243,7 +245,6 @@ BOOL LLFloaterIMContainer::postBuild()
mGeneralTitle = getTitle();
mInitialized = true;
- mIsFirstLaunch = true;
// Add callbacks:
// We'll take care of view updates on idle
@@ -278,12 +279,6 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp,
LLUUID session_id = floaterp->getKey();
- // Make sure the message panel is open when adding a floater or it stays mysteriously hidden
- if (!mIsFirstLaunch)
- {
- collapseMessagesPane(false);
- }
-
// Add the floater
LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point);
@@ -644,8 +639,6 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse)
return;
}
- mIsFirstLaunch = false;
-
// Save current width of panels before collapsing/expanding right pane.
S32 conv_pane_width = mConversationsPane->getRect().getWidth();
S32 msg_pane_width = mMessagesPane->getRect().getWidth();
@@ -667,7 +660,7 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse)
// Make sure layout is updated before resizing conversation pane.
mConversationsStack->updateLayout();
- updateState(collapse, gSavedPerAccountSettings.getS32("ConversationsMessagePaneWidth"));
+ reshapeFloaterAndSetResizeLimits(collapse, gSavedPerAccountSettings.getS32("ConversationsMessagePaneWidth"));
if (!collapse)
{
@@ -676,7 +669,7 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse)
}
}
-void LLFloaterIMContainer::collapseConversationsPane(bool collapse)
+void LLFloaterIMContainer::collapseConversationsPane(bool collapse, bool save_is_allowed /*=true*/)
{
if (mConversationsPane->isCollapsed() == collapse)
{
@@ -690,7 +683,7 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse)
// Save current width of Conversation panel before collapsing/expanding right pane.
S32 conv_pane_width = mConversationsPane->getRect().getWidth();
- if (collapse)
+ if (collapse && save_is_allowed)
{
// Save the conversations pane width before collapsing it.
gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", conv_pane_width);
@@ -700,10 +693,18 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse)
}
mConversationsStack->collapsePanel(mConversationsPane, collapse);
+ if (!collapse)
+ {
+ // Make sure layout is updated before resizing conversation pane.
+ mConversationsStack->updateLayout();
+ // Restore conversation's pane previous width.
+ mConversationsPane->setTargetDim(gSavedPerAccountSettings.getS32("ConversationsListPaneWidth"));
+ }
- S32 delta_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim();
+ S32 delta_width =
+ gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim();
- updateState(collapse, delta_width);
+ reshapeFloaterAndSetResizeLimits(collapse, delta_width);
for (conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
widget_it != mConversationsWidgets.end(); ++widget_it)
@@ -723,21 +724,20 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse)
}
}
-void LLFloaterIMContainer::updateState(bool collapse, S32 delta_width)
+void LLFloaterIMContainer::reshapeFloaterAndSetResizeLimits(bool collapse, S32 delta_width)
{
LLRect floater_rect = getRect();
floater_rect.mRight += ((collapse ? -1 : 1) * delta_width);
// Set by_user = true so that reshaped rect is saved in user_settings.
setShape(floater_rect, true);
-
updateResizeLimits();
- bool is_left_pane_expanded = !mConversationsPane->isCollapsed();
- bool is_right_pane_expanded = !mMessagesPane->isCollapsed();
+ bool at_least_one_panel_is_expanded =
+ ! (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed());
- setCanResize(is_left_pane_expanded || is_right_pane_expanded);
- setCanMinimize(is_left_pane_expanded || is_right_pane_expanded);
+ setCanResize(at_least_one_panel_is_expanded);
+ setCanMinimize(at_least_one_panel_is_expanded);
assignResizeLimits();
@@ -766,15 +766,9 @@ void LLFloaterIMContainer::assignResizeLimits()
S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0;
S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders;
- if (is_conv_pane_expanded)
- {
- // Save the conversations pane width.
- gSavedPerAccountSettings.setS32(
- "ConversationsListPaneWidth",
- mConversationsPane->getRect().getWidth());
- }
-
setResizeLimits(new_min_width, getMinHeight());
+
+ mConversationsStack->updateLayout();
}
void LLFloaterIMContainer::onAddButtonClicked()
@@ -1033,6 +1027,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
{
LLAvatarActions::inviteToGroup(userID);
}
+ else if ("zoom_in" == command)
+ {
+ handle_zoom_to_object(userID);
+ }
else if ("map" == command)
{
LLAvatarActions::showOnMap(userID);
@@ -1254,6 +1252,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
{
return LLAvatarActions::canCall();
}
+ else if ("can_zoom_in" == item)
+ {
+ return is_single_select && gObjectList.findObject(single_id);
+ }
else if ("can_show_on_map" == item)
{
return (is_single_select ? (LLAvatarTracker::instance().isBuddyOnline(single_id) && is_agent_mappable(single_id)) || gAgent.isGodlike() : false);
@@ -1327,6 +1329,9 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
{
setVisibleAndFrontmost(false);
selectConversationPair(session_id, true);
+
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
+ session_floater->restoreFloater();
}
void LLFloaterIMContainer::clearAllFlashStates()
@@ -1402,6 +1407,10 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
// Switch to the conversation floater that is being selected
selectFloater(session_floater);
}
+ else
+ {
+ showStub(true);
+ }
}
// Set the focus on the selected floater
@@ -1412,7 +1421,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
session_floater->setMinimized(is_minimized);
}
}
-
+ flashConversationItemWidget(session_id,false);
return handled;
}
@@ -1880,6 +1889,9 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve
{
llassert(conversation_item_widget != NULL);
+ // make sure the widget is actually in the right spot first
+ mConversationsRoot->arrange(NULL, NULL);
+
// check whether the widget is in the visible portion of the scroll container
LLRect widget_rect;
conversation_item_widget->localRectToOtherView(conversation_item_widget->getLocalRect(), &widget_rect, mConversationsRoot);
@@ -1907,7 +1919,19 @@ BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask )
return TRUE;
}
-bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next)
+bool LLFloaterIMContainer::selectAdjacentConversation(bool focus_selected)
+{
+ bool selectedAdjacentConversation = selectNextorPreviousConversation(true, focus_selected);
+
+ if(!selectedAdjacentConversation)
+ {
+ selectedAdjacentConversation = selectNextorPreviousConversation(false, focus_selected);
+ }
+
+ return selectedAdjacentConversation;
+}
+
+bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bool focus_selected)
{
if (mConversationsWidgets.size() > 1)
{
@@ -1928,12 +1952,7 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next)
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
if (vmi)
{
- selectConversationPair(vmi->getUUID(), true);
- LLFloater* floaterp = get_ptr_in_map(mSessions, getSelectedSession());
- if(floaterp && !floaterp->isTornOff())
- {
- setFocus(TRUE);
- }
+ selectConversationPair(vmi->getUUID(), true, focus_selected);
return true;
}
}
@@ -1957,11 +1976,6 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
// Most of the time the user will never see this state.
setMinimized(FALSE);
- // Save the conversations pane width.
- gSavedPerAccountSettings.setS32(
- "ConversationsListPaneWidth",
- mConversationsPane->getRect().getWidth());
-
LLFloater::closeFloater(app_quitting);
}
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index c84d4978ec..2cbc1e99f9 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -72,7 +72,8 @@ public:
void selectNextConversationByID(const LLUUID& session_id);
BOOL selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true);
void clearAllFlashStates();
- bool selectNextorPreviousConversation(bool select_next);
+ bool selectAdjacentConversation(bool focus_selected);
+ bool selectNextorPreviousConversation(bool select_next, bool focus_selected = true);
void expandConversation();
/*virtual*/ void tabClose();
@@ -128,9 +129,9 @@ private:
void processParticipantsStyleUpdate();
void onSpeakButtonClicked();
- void collapseConversationsPane(bool collapse);
+ void collapseConversationsPane(bool collapse, bool save_is_allowed=true);
- void updateState(bool collapse, S32 delta_width);
+ void reshapeFloaterAndSetResizeLimits(bool collapse, S32 delta_width);
void onAddButtonClicked();
void onAvatarPicked(const uuid_vec_t& ids);
@@ -173,7 +174,6 @@ private:
LLLayoutStack* mConversationsStack;
bool mInitialized;
- bool mIsFirstLaunch;
LLUUID mSelectedSession;
std::string mGeneralTitle;
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index dfaf4bbdd6..b287950c21 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -257,14 +257,25 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible)
}
}
+
+void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
+{
+ LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key);
+
+ if(!isTornOff() && matchesKey(key))
+ {
+ LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, false);
+ }
+}
+
// virtual
void LLFloaterIMNearbyChat::onTearOffClicked()
{
LLFloaterIMSessionTab::onTearOffClicked();
// see CHUI-170: Save torn-off state of the nearby chat between sessions
- BOOL in_the_multifloater = !isTornOff();
- gSavedSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater);
+ BOOL in_the_multifloater = (BOOL)getHost();
+ gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater);
}
@@ -279,6 +290,7 @@ void LLFloaterIMNearbyChat::onOpen(const LLSD& key)
void LLFloaterIMNearbyChat::onClose(bool app_quitting)
{
// Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater
+ LLFloaterIMSessionTab::restoreFloater();
onClickCloseBtn();
}
@@ -286,8 +298,10 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting)
void LLFloaterIMNearbyChat::onClickCloseBtn()
{
if (!isTornOff())
+ {
return;
- onTearOffClicked();
+ }
+ LLFloaterIMSessionTab::onTearOffClicked();
LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance();
if (im_box)
@@ -323,7 +337,7 @@ bool LLFloaterIMNearbyChat::isChatVisible() const
if (im_box != NULL)
{
isVisible =
- isChatMultiTab() && gSavedSettings.getBOOL("NearbyChatIsNotTornOff")?
+ isChatMultiTab() && gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff")?
im_box->getVisible() && !im_box->isMinimized() :
getVisible() && !isMinimized();
}
@@ -334,6 +348,11 @@ bool LLFloaterIMNearbyChat::isChatVisible() const
void LLFloaterIMNearbyChat::showHistory()
{
openFloater();
+ if(!isMessagePaneExpanded())
+ {
+ restoreFloater();
+ setFocus(true);
+ }
setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT);
}
@@ -406,6 +425,12 @@ BOOL LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std:
void LLFloaterIMNearbyChat::onChatBoxKeystroke()
{
+ LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance();
+ if (im_box)
+ {
+ im_box->flashConversationItemWidget(mSessionID,false);
+ }
+
LLFirstUse::otherAvatarChatFirst(false);
LLWString raw_text = mInputEditor->getWText();
@@ -714,7 +739,14 @@ void LLFloaterIMNearbyChat::startChat(const char* line)
LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
if (nearby_chat)
{
- nearby_chat->show();
+ if(!nearby_chat->isTornOff())
+ {
+ nearby_chat->show();
+ }
+ if(nearby_chat->isMinimized())
+ {
+ nearby_chat->setMinimized(false);
+ }
nearby_chat->setVisible(TRUE);
nearby_chat->setFocus(TRUE);
nearby_chat->mInputEditor->setFocus(TRUE);
diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h
index 4ad37eb0c7..05b48cccb0 100644
--- a/indra/newview/llfloaterimnearbychat.h
+++ b/indra/newview/llfloaterimnearbychat.h
@@ -54,6 +54,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
/*virtual*/ void closeHostedFloater();
void loadHistory();
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 8870d54cd2..7afcf288ce 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -559,12 +559,14 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- if( nearby_chat->hasFocus()
+ if(( nearby_chat->hasFocus()
|| im_box->hasFocus()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
|| mChannel.isDead()
- || !mChannel.get()->getShowToasts() ) // to prevent toasts in Do Not Disturb mode
+ || !mChannel.get()->getShowToasts() )
+ && nearby_chat->isMessagePaneExpanded())
+ // to prevent toasts in Do Not Disturb mode
return;//no need in toast if chat is visible or if bubble chat is enabled
// arrange a channel on a screen
@@ -606,7 +608,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
//Don't show nearby toast, if conversation is visible but not focused
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID());
- if (session_floater
+ if (session_floater && session_floater->isMessagePaneExpanded()
&& session_floater->isInVisibleChain() && !session_floater->isMinimized()
&& !(session_floater->getHost() && session_floater->getHost()->isMinimized()))
{
@@ -614,7 +616,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
}
//Will show toast when chat preference is set
- if(gSavedSettings.getString("NotificationNearbyChatOptions") == "toast")
+ if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded())
{
// Add a nearby chat toast.
LLUUID id;
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index ce5d798ddb..3635d3bb2c 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -618,7 +618,7 @@ void LLFloaterIMSession::onClose(bool app_quitting)
// Last change:
// EXT-3516 X Button should end IM session, _ button should hide
gIMMgr->leaveSession(mSessionID);
-
+ LLFloaterIMSessionTab::restoreFloater();
// Clean up the conversation *after* the session has been ended
LLFloaterIMSessionTab::onClose(app_quitting);
}
@@ -892,6 +892,11 @@ void LLFloaterIMSession::onInputEditorFocusLost(LLFocusableElement* caller, void
void LLFloaterIMSession::onInputEditorKeystroke(LLTextEditor* caller, void* userdata)
{
LLFloaterIMSession* self = (LLFloaterIMSession*)userdata;
+ LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance();
+ if (im_box)
+ {
+ im_box->flashConversationItemWidget(self->mSessionID,false);
+ }
std::string text = self->mInputEditor->getText();
// Deleting all text counts as stopping typing.
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index d3fcfbbc56..5df1a382cd 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -61,6 +61,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
, mRefreshTimer(new LLTimer())
, mIsHostAttached(false)
, mHasVisibleBeenInitialized(false)
+ , mIsParticipantListExpanded(true)
{
setAutoFocus(FALSE);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
@@ -169,7 +170,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id)
conversp->setHostAttached(true);
if (!conversp->isNearbyChat()
- || gSavedSettings.getBOOL("NearbyChatIsNotTornOff"))
+ || gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff"))
{
floater_container->addFloater(conversp, false, LLTabContainer::RIGHT_OF_CURRENT);
}
@@ -180,6 +181,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id)
// LLFloater::mLastHostHandle = floater_container (a "future" host)
conversp->setHost(floater_container);
conversp->setHost(NULL);
+
conversp->forceReshape();
}
// Added floaters share some state (like sort order) with their host
@@ -192,19 +194,28 @@ BOOL LLFloaterIMSessionTab::postBuild()
{
BOOL result;
+ mBodyStack = getChild<LLLayoutStack>("main_stack");
+
+
mCloseBtn = getChild<LLButton>("close_btn");
mCloseBtn->setCommitCallback(boost::bind(&LLFloater::onClickClose, this));
mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn");
mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onSlide, this));
+ mExpandCollapseLineBtn = getChild<LLButton>("minz_btn");
+ mExpandCollapseLineBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onCollapseToLine, this));
+
mTearOffBtn = getChild<LLButton>("tear_off_btn");
mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this));
mGearBtn = getChild<LLButton>("gear_btn");
mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
-
+ mToolbarPanel = getChild<LLLayoutPanel>("toolbar_panel");
+ mContentPanel = getChild<LLLayoutPanel>("body_panel");
+ mInputButtonPanel = getChild<LLLayoutPanel>("input_button_layout_panel");
+ mInputButtonPanel->setVisible(false);
// Add a scroller for the folder (participant) view
LLRect scroller_view_rect = mParticipantListPanel->getRect();
scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
@@ -231,7 +242,7 @@ BOOL LLFloaterIMSessionTab::postBuild()
setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE);
mSaveRect = isNearbyChat()
- && !gSavedSettings.getBOOL("NearbyChatIsNotTornOff");
+ && !gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff");
initRectControl();
if (isChatMultiTab())
@@ -253,6 +264,7 @@ BOOL LLFloaterIMSessionTab::postBuild()
p.root = NULL;
p.use_ellipses = true;
p.options_menu = "menu_conversation.xml";
+ p.name = "root";
mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
// Attach that root to the scroller
@@ -261,6 +273,8 @@ BOOL LLFloaterIMSessionTab::postBuild()
mConversationsRoot->setFollowsAll();
mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox);
+ setMessagePaneExpanded(true);
+
buildConversationViewParticipant();
refreshConversation();
@@ -268,6 +282,12 @@ BOOL LLFloaterIMSessionTab::postBuild()
mRefreshTimer->setTimerExpirySec(0);
mRefreshTimer->start();
initBtns();
+
+ if (mIsParticipantListExpanded != (bool)gSavedSettings.getBOOL("IMShowControlPanel"))
+ {
+ LLFloaterIMSessionTab::onSlide(this);
+ }
+
return result;
}
@@ -324,13 +344,6 @@ void LLFloaterIMSessionTab::onFocusReceived()
}
LLTransientDockableFloater::onFocusReceived();
-
- LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
- if (container)
- {
- container->selectConversationPair(mSessionID, true);
- container->showStub(! getHost());
- }
}
void LLFloaterIMSessionTab::onFocusLost()
@@ -644,11 +657,12 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()
// Participant list should be visible only in torn off floaters.
bool is_participant_list_visible =
!is_not_torn_off
- && gSavedSettings.getBOOL("IMShowControlPanel")
+ && mIsParticipantListExpanded
&& !mIsP2PChat;
mParticipantListPanel->setVisible(is_participant_list_visible);
+
// Display collapse image (<<) if the floater is hosted
// or if it is torn off but has an open control panel.
bool is_expanded = is_not_torn_off || is_participant_list_visible;
@@ -672,6 +686,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()
mTearOffBtn->setImageOverlay(getString(is_not_torn_off? "tear_off_icon" : "return_icon"));
mTearOffBtn->setToolTip(getString(is_not_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window"));
+
mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat);
enableDisableCallBtn();
@@ -775,11 +790,67 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)
// Expand/collapse the IM control panel
self->mParticipantListPanel->setVisible(expand);
+ gSavedSettings.setBOOL("IMShowControlPanel", expand);
+ self->mIsParticipantListExpanded = expand;
+ self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon"));
+ }
+ }
+}
- gSavedSettings.setBOOL("IMShowControlPanel", expand);
+void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self)
+{
+ LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(self->getHost());
+ if (!host_floater)
+ {
+ bool expand = self->isMessagePaneExpanded();
+ self->mExpandCollapseLineBtn->setImageOverlay(self->getString(expand ? "collapseline_icon" : "expandline_icon"));
+ self->mContentPanel->setVisible(!expand);
+ self->mToolbarPanel->setVisible(!expand);
+ self->reshapeFloater(expand);
+ self->setMessagePaneExpanded(!expand);
+ }
+}
- self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon"));
+void LLFloaterIMSessionTab::reshapeFloater(bool collapse)
+{
+ LLRect floater_rect = getRect();
+
+ if(collapse)
+ {
+ mFloaterHeight = floater_rect.getHeight();
+ S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight();
+ floater_rect.mTop -= height;
+ enableResizeCtrls(true, true, false);
+ }
+ else
+ {
+ floater_rect.mTop = floater_rect.mBottom + mFloaterHeight;
+ enableResizeCtrls(true, true, true);
+
+ }
+
+ setShape(floater_rect, true);
+ mBodyStack->updateLayout();
+
+}
+
+void LLFloaterIMSessionTab::restoreFloater()
+{
+ if(!isMessagePaneExpanded())
+ {
+ if(isMinimized())
+ {
+ setMinimized(false);
}
+ mContentPanel->setVisible(true);
+ mToolbarPanel->setVisible(true);
+ LLRect floater_rect = getRect();
+ floater_rect.mTop = floater_rect.mBottom + mFloaterHeight;
+ setShape(floater_rect, true);
+ mBodyStack->updateLayout();
+ mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon"));
+ setMessagePaneExpanded(true);
+ enableResizeCtrls(true, true, true);
}
}
@@ -792,19 +863,33 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key)
// Show the messages pane when opening a floater hosted in the Conversations
host_floater->collapseMessagesPane(false);
}
+
+ mInputButtonPanel->setVisible(isTornOff());
}
void LLFloaterIMSessionTab::onTearOffClicked()
{
- setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE);
+ restoreFloater();
+ setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE);
mSaveRect = isTornOff();
initRectControl();
LLFloater::onClickTearOff(this);
+ LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
+
if (isTornOff())
{
+ container->selectAdjacentConversation(false);
forceReshape();
}
+ //Upon re-docking the torn off floater, select the corresponding conversation line item
+ else
+ {
+ container->selectConversation(mSessionID);
+
+ }
+ mInputButtonPanel->setVisible(isTornOff());
+
refreshConversation();
updateGearBtn();
}
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index d55b021df7..f22e2b5744 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -98,6 +98,9 @@ public:
LLConversationItem* getCurSelectedViewModelItem();
void forceReshape();
virtual BOOL handleKeyHere( KEY key, MASK mask );
+ bool isMessagePaneExpanded(){return mMessagePaneExpanded;}
+ void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;}
+ void restoreFloater();
protected:
@@ -111,6 +114,8 @@ protected:
bool onIMShowModesMenuItemCheck(const LLSD& userdata);
bool onIMShowModesMenuItemEnable(const LLSD& userdata);
static void onSlide(LLFloaterIMSessionTab *self);
+ static void onCollapseToLine(LLFloaterIMSessionTab *self);
+ void reshapeFloater(bool collapse);
// refresh a visual state of the Call button
void updateCallBtnState(bool callIsActive);
@@ -139,13 +144,21 @@ protected:
bool mIsNearbyChat;
bool mIsP2PChat;
+ bool mMessagePaneExpanded;
+ bool mIsParticipantListExpanded;
+
+
LLIMModel::LLIMSession* mSession;
// Participants list: model and view
LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item);
LLUUID mSessionID;
+ LLLayoutStack* mBodyStack;
LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel
+ LLLayoutPanel* mContentPanel;
+ LLLayoutPanel* mToolbarPanel;
+ LLLayoutPanel* mInputButtonPanel;
LLParticipantList* getParticipantList();
conversations_widgets_map mConversationsWidgets;
LLConversationViewModel mConversationViewModel;
@@ -157,11 +170,14 @@ protected:
LLChatEntry* mInputEditor;
int mInputEditorTopPad; // padding between input field and chat history
+ LLButton* mExpandCollapseLineBtn;
LLButton* mExpandCollapseBtn;
LLButton* mTearOffBtn;
LLButton* mCloseBtn;
LLButton* mGearBtn;
+ S32 mFloaterHeight;
+
private:
// Handling selection and contextual menu
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 3f8c23ba83..a28af2101b 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -443,6 +443,8 @@ BOOL LLFloaterPreference::postBuild()
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
setCacheLocation(cache_location);
+ getChild<LLUICtrl>("log_path_string")->setEnabled(FALSE); // make it read-only but selectable
+
getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this));
getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions"));
@@ -1572,7 +1574,6 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
getChildView("send_im_to_email")->setEnabled(TRUE);
getChild<LLUICtrl>("send_im_to_email")->setValue(im_via_email);
getChildView("favorites_on_login_check")->setEnabled(TRUE);
- getChildView("log_path_string")->setEnabled(FALSE);// LineEditor becomes readonly in this case.
getChildView("log_path_button")->setEnabled(TRUE);
getChildView("chat_font_size")->setEnabled(TRUE);
}
@@ -1667,7 +1668,10 @@ void LLFloaterPreference::onClickActionChange()
void LLFloaterPreference::onDeleteTranscripts()
{
- LLNotificationsUtil::add("PreferenceChatDeleteTranscripts", LLSD(), LLSD(), boost::bind(&LLFloaterPreference::onDeleteTranscriptsResponse, this, _1, _2));
+ LLSD args;
+ args["FOLDER"] = gDirUtilp->getUserName();
+
+ LLNotificationsUtil::add("PreferenceChatDeleteTranscripts", args, LLSD(), boost::bind(&LLFloaterPreference::onDeleteTranscriptsResponse, this, _1, _2));
}
void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification, const LLSD& response)
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index a422fa210d..ab3fdfaba7 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -154,6 +154,7 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id,
args["FROM"] = av_name.getCompleteName();
args["FROM_ID"] = msg["from_id"];
args["SESSION_ID"] = msg["session_id"];
+ args["SESSION_TYPE"] = msg["session_type"];
LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID()));
}
@@ -199,13 +200,13 @@ void on_new_message(const LLSD& msg)
// execution of the action
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
-
- if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id)
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
+ if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id
+ && !(session_floater->getHost() ? im_box->isMinimized() : session_floater->isMinimized()))
{
return;
}
-
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
//session floater not focused (visible or not)
bool session_floater_not_focused = session_floater && !session_floater->hasFocus();
@@ -226,17 +227,18 @@ void on_new_message(const LLSD& msg)
&& !session_floater->isMinimized()
&& !(session_floater->getHost() && session_floater->getHost()->isMinimized());
- if ("toast" == action && !session_floater_is_open)
+ bool conversation_floater_collapsed = !session_floater->isMessagePaneExpanded();
+ if (("toast" == action && !session_floater_is_open) || conversation_floater_collapsed)
{
//User is not focused on conversation containing the message
- if(session_floater_not_focused)
+ if(session_floater_not_focused || conversation_floater_collapsed)
{
if(!LLMuteList::getInstance()->isMuted(participant_id))
{
im_box->flashConversationItemWidget(session_id, true);
}
//The conversation floater isn't focused/open
- if(conversation_floater_not_focused)
+ if(conversation_floater_not_focused || conversation_floater_collapsed)
{
if(!LLMuteList::getInstance()->isMuted(participant_id)
&& !gAgent.isDoNotDisturb())
@@ -285,6 +287,24 @@ void on_new_message(const LLSD& msg)
{
//Surface conversations floater
LLFloaterReg::showInstance("im_container");
+ im_box->collapseMessagesPane(false);
+ if (session_floater)
+ {
+ if (session_floater->getHost())
+ {
+ if (NULL != im_box && im_box->isMinimized())
+ {
+ LLFloater::onClickMinimize(im_box);
+ }
+ }
+ else
+ {
+ if (session_floater->isMinimized())
+ {
+ LLFloater::onClickMinimize(session_floater);
+ }
+ }
+ }
}
//If in DND mode, allow notification to be stored so upon DND exit
@@ -636,8 +656,7 @@ void LLIMModel::LLIMSession::loadHistory()
LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const
{
- return get_if_there(mId2SessionMap, session_id,
- (LLIMModel::LLIMSession*) NULL);
+ return get_if_there(mId2SessionMap, session_id, (LLIMModel::LLIMSession*) NULL);
}
//*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code
@@ -990,6 +1009,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
arg["from"] = from;
arg["from_id"] = from_id;
arg["time"] = LLLogChat::timestamp(false);
+ arg["session_type"] = session->mSessionType;
mNewMsgSignal(arg);
return true;
@@ -2646,7 +2666,7 @@ void LLIMMgr::addMessage(
if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
{
// Evaluate if we need to skip this message when that setting is true (default is false)
- LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
+ LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id);
skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends...
skip_message &= !session->isGroupSessionType(); // Do not skip group chats...
skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself
@@ -2662,7 +2682,7 @@ void LLIMMgr::addMessage(
{
LLFloaterReg::showInstance("im_container");
LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->
- flashConversationItemWidget(session_id, true);
+ flashConversationItemWidget(new_session_id, true);
}
}
@@ -2817,7 +2837,7 @@ LLUUID LLIMMgr::addSession(
}
}
- bool new_session = !LLIMModel::getInstance()->findIMSession(session_id);
+ bool new_session = (LLIMModel::getInstance()->findIMSession(session_id) == NULL);
//works only for outgoing ad-hoc sessions
if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size())
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index e1537033f9..01b0e647a9 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -1,6 +1,6 @@
/**
- * @file llinventorymodel.cpp
- * @brief Implementation of the inventory model used to track agent inventory.
+ * @file llinventorymodelbackgroundfetch.cpp
+ * @brief Implementation of background fetching of inventory.
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -365,25 +365,19 @@ class LLInventoryModelFetchItemResponder : public LLInventoryModel::fetchInvento
{
LOG_CLASS(LLInventoryModelFetchItemResponder);
public:
- LLInventoryModelFetchItemResponder(const LLSD& request_sd) : LLInventoryModel::fetchInventoryResponder(request_sd) {};
+ LLInventoryModelFetchItemResponder(const LLSD& request_sd) :
+ LLInventoryModel::fetchInventoryResponder(request_sd)
+ {
+ LLInventoryModelBackgroundFetch::instance().incrFetchCount(1);
+ }
private:
- /* virtual */ void httpSuccess();
- /* virtual */ void httpFailure();
+ /* virtual */ void httpCompleted()
+ {
+ LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
+ LLInventoryModel::fetchInventoryResponder::httpCompleted();
+ }
};
-void LLInventoryModelFetchItemResponder::httpSuccess()
-{
- LLInventoryModel::fetchInventoryResponder::httpSuccess();
- LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
-}
-
-void LLInventoryModelFetchItemResponder::httpFailure()
-{
- LLInventoryModel::fetchInventoryResponder::httpFailure();
- LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
-}
-
-
class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder
{
LOG_CLASS(LLInventoryModelFetchDescendentsResponder);
@@ -391,9 +385,16 @@ public:
LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd, uuid_vec_t recursive_cats) :
mRequestSD(request_sd),
mRecursiveCatUUIDs(recursive_cats)
- {};
+ {
+ LLInventoryModelBackgroundFetch::instance().incrFetchCount(1);
+ }
//LLInventoryModelFetchDescendentsResponder() {};
private:
+ /* virtual */ void httpCompleted()
+ {
+ LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
+ LLHTTPClient::Responder::httpCompleted();
+ }
/* virtual */ void httpSuccess();
/* virtual */ void httpFailure();
protected:
@@ -527,8 +528,6 @@ void LLInventoryModelFetchDescendentsResponder::httpSuccess()
<< "Error: " << folder_sd["error"].asString() << llendl;
}
}
-
- fetcher->incrFetchCount(-1);
if (fetcher->isBulkFetchProcessingComplete())
{
@@ -545,8 +544,6 @@ void LLInventoryModelFetchDescendentsResponder::httpFailure()
llwarns << dumpResponse() << llendl;
LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
- fetcher->incrFetchCount(-1);
-
if (getStatus()==HTTP_INTERNAL_ERROR) // timed out or curl failure
{
for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();
@@ -595,7 +592,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
(mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches))
{
return; // just bail if we are disconnected
- }
+ }
U32 item_count=0;
U32 folder_count=0;
@@ -698,7 +695,6 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
std::string url = region->getCapability("FetchInventoryDescendents2");
if ( !url.empty() )
{
- mFetchCount++;
if (folder_request_body["folders"].size())
{
LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats);
@@ -711,7 +707,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats);
LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0);
}
- }
+ }
}
if (item_count)
{
@@ -719,39 +715,23 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
if (item_request_body.size())
{
- mFetchCount++;
url = region->getCapability("FetchInventory2");
if (!url.empty())
{
LLSD body;
- body["agent_id"] = gAgent.getID();
body["items"] = item_request_body;
LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body));
}
- //else
- //{
- // LLMessageSystem* msg = gMessageSystem;
- // msg->newMessage("FetchInventory");
- // msg->nextBlock("AgentData");
- // msg->addUUID("AgentID", gAgent.getID());
- // msg->addUUID("SessionID", gAgent.getSessionID());
- // msg->nextBlock("InventoryData");
- // msg->addUUID("OwnerID", mPermissions.getOwner());
- // msg->addUUID("ItemID", mUUID);
- // gAgent.sendReliableMessage();
- //}
}
if (item_request_body_lib.size())
{
- mFetchCount++;
url = region->getCapability("FetchLib2");
if (!url.empty())
{
LLSD body;
- body["agent_id"] = gAgent.getID();
body["items"] = item_request_body_lib;
LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body));
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 448100c5d6..2d7454b636 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -444,7 +444,7 @@ std::string LLLogChat::oldLogFileName(std::string filename)
}
// static
-void LLLogChat::getListOfTranscriptFiles(std::vector<std::string>& list_of_transcriptions)
+void LLLogChat::findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions)
{
// get Users log directory
std::string dirname = gDirUtilp->getPerAccountChatLogsDir();
@@ -452,9 +452,6 @@ void LLLogChat::getListOfTranscriptFiles(std::vector<std::string>& list_of_trans
// add final OS dependent delimiter
dirname += gDirUtilp->getDirDelimiter();
- // create search pattern
- std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION;
-
LLDirIterator iter(dirname, pattern);
std::string filename;
while (iter.next(filename))
@@ -490,6 +487,22 @@ void LLLogChat::getListOfTranscriptFiles(std::vector<std::string>& list_of_trans
}
}
+// static
+void LLLogChat::getListOfTranscriptFiles(std::vector<std::string>& list_of_transcriptions)
+{
+ // create search pattern
+ std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION;
+ findTranscriptFiles(pattern, list_of_transcriptions);
+}
+
+// static
+void LLLogChat::getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions)
+{
+ // create search pattern
+ std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION + ".backup*";
+ findTranscriptFiles(pattern, list_of_transcriptions);
+}
+
//static
boost::signals2::connection LLLogChat::setSaveHistorySignal(const save_history_signal_t::slot_type& cb)
{
@@ -581,6 +594,7 @@ void LLLogChat::deleteTranscripts()
{
std::vector<std::string> list_of_transcriptions;
getListOfTranscriptFiles(list_of_transcriptions);
+ getListOfTranscriptBackupFiles(list_of_transcriptions);
BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions)
{
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index 784786a565..e819f00dd9 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -49,7 +49,9 @@ public:
const std::string& from,
const LLUUID& from_id,
const std::string& line);
+ static void findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions);
static void getListOfTranscriptFiles(std::vector<std::string>& list);
+ static void getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions);
static void loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params = LLSD());
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index c5283404f1..4138558bad 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -611,10 +611,10 @@ BOOL LLPanelPeople::postBuild()
mGroupList->setNoItemsMsg(getString("no_groups_msg"));
mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg"));
- mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
- mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
- mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
- mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
+ mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyPeopleContextMenu);
+ mRecentList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
+ mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
+ mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
setSortOrder(mRecentList, (ESortOrder)gSavedSettings.getU32("RecentPeopleSortOrder"), false);
setSortOrder(mAllFriendList, (ESortOrder)gSavedSettings.getU32("FriendsSortOrder"), false);
@@ -1143,7 +1143,10 @@ void LLPanelPeople::onGearButtonClicked(LLUICtrl* btn)
uuid_vec_t selected_uuids;
getCurrentItemIDs(selected_uuids);
// Spawn at bottom left corner of the button.
- LLPanelPeopleMenus::gNearbyMenu.show(btn, selected_uuids, 0, 0);
+ if (getActiveTabName() == NEARBY_TAB_NAME)
+ LLPanelPeopleMenus::gNearbyPeopleContextMenu.show(btn, selected_uuids, 0, 0);
+ else
+ LLPanelPeopleMenus::gPeopleContextMenu.show(btn, selected_uuids, 0, 0);
}
void LLPanelPeople::onImButtonClicked()
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 47d6b49a50..49f7361c4a 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -39,15 +39,18 @@
#include "llcallingcard.h" // for LLAvatarTracker
#include "lllogchat.h"
#include "llviewermenu.h" // for gMenuHolder
+#include "llconversationmodel.h"
+#include "llviewerobjectlist.h"
namespace LLPanelPeopleMenus
{
-NearbyMenu gNearbyMenu;
+PeopleContextMenu gPeopleContextMenu;
+NearbyPeopleContextMenu gNearbyPeopleContextMenu;
-//== NearbyMenu ===============================================================
+//== PeopleContextMenu ===============================================================
-LLContextMenu* NearbyMenu::createMenu()
+LLContextMenu* PeopleContextMenu::createMenu()
{
// set up the callbacks for all of the avatar menu items
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -64,7 +67,8 @@ LLContextMenu* NearbyMenu::createMenu()
registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendDialog, id));
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id));
- registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
+ registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this));
+ registrar.add("Avatar.ZoomIn", boost::bind(&handle_zoom_to_object, id));
registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id));
registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id));
registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
@@ -72,33 +76,72 @@ LLContextMenu* NearbyMenu::createMenu()
registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, id));
registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id));
- enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2));
- enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2));
+ enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2));
+ enable_registrar.add("Avatar.CheckItem", boost::bind(&PeopleContextMenu::checkContextMenuItem, this, _2));
// create the context menu from the XUI
menu = createFromFile("menu_people_nearby.xml");
+ buildContextMenu(*menu, 0x0);
}
else
{
// Set up for multi-selected People
// registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented
- registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null));
- registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null));
- registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
- registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs));
+ registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null));
+ registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null));
+ registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this));
+ registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs));
// registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented
- // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented
- enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2));
+ // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented
+
+ enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2));
// create the context menu from the XUI
menu = createFromFile("menu_people_nearby_multiselect.xml");
+ buildContextMenu(*menu, ITEM_IN_MULTI_SELECTION);
}
return menu;
}
-bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
+void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
+{
+ menuentry_vec_t items;
+ menuentry_vec_t disabled_items;
+
+ if (flags & ITEM_IN_MULTI_SELECTION)
+ {
+ items.push_back(std::string("add_friends"));
+ items.push_back(std::string("remove_friends"));
+ items.push_back(std::string("im"));
+ items.push_back(std::string("call"));
+ items.push_back(std::string("share"));
+ items.push_back(std::string("pay"));
+ items.push_back(std::string("offer_teleport"));
+ }
+ else
+ {
+ items.push_back(std::string("view_profile"));
+ items.push_back(std::string("im"));
+ items.push_back(std::string("offer_teleport"));
+ items.push_back(std::string("voice_call"));
+ items.push_back(std::string("chat_history"));
+ items.push_back(std::string("separator_chat_history"));
+ items.push_back(std::string("add_friend"));
+ items.push_back(std::string("remove_friend"));
+ items.push_back(std::string("invite_to_group"));
+ items.push_back(std::string("separator_invite_to_group"));
+ items.push_back(std::string("map"));
+ items.push_back(std::string("share"));
+ items.push_back(std::string("pay"));
+ items.push_back(std::string("block_unblock"));
+ }
+
+ hide_context_entries(menu, items, disabled_items);
+}
+
+bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
{
if(gAgent.getID() == mUUIDs.front())
{
@@ -170,6 +213,12 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
{
return LLAvatarActions::canCall();
}
+ else if (item == std::string("can_zoom_in"))
+ {
+ const LLUUID& id = mUUIDs.front();
+
+ return gObjectList.findObject(id);
+ }
else if (item == std::string("can_show_on_map"))
{
const LLUUID& id = mUUIDs.front();
@@ -193,7 +242,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
return false;
}
-bool NearbyMenu::checkContextMenuItem(const LLSD& userdata)
+bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata)
{
std::string item = userdata.asString();
const LLUUID& id = mUUIDs.front();
@@ -206,11 +255,50 @@ bool NearbyMenu::checkContextMenuItem(const LLSD& userdata)
return false;
}
-void NearbyMenu::offerTeleport()
+void PeopleContextMenu::offerTeleport()
{
// boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(),
// so we have to use a wrapper.
LLAvatarActions::offerTeleport(mUUIDs);
}
+//== NearbyPeopleContextMenu ===============================================================
+
+void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
+{
+ menuentry_vec_t items;
+ menuentry_vec_t disabled_items;
+
+ if (flags & ITEM_IN_MULTI_SELECTION)
+ {
+ items.push_back(std::string("add_friends"));
+ items.push_back(std::string("remove_friends"));
+ items.push_back(std::string("im"));
+ items.push_back(std::string("call"));
+ items.push_back(std::string("share"));
+ items.push_back(std::string("pay"));
+ items.push_back(std::string("offer_teleport"));
+ }
+ else
+ {
+ items.push_back(std::string("view_profile"));
+ items.push_back(std::string("im"));
+ items.push_back(std::string("offer_teleport"));
+ items.push_back(std::string("voice_call"));
+ items.push_back(std::string("chat_history"));
+ items.push_back(std::string("separator_chat_history"));
+ items.push_back(std::string("add_friend"));
+ items.push_back(std::string("remove_friend"));
+ items.push_back(std::string("invite_to_group"));
+ items.push_back(std::string("separator_invite_to_group"));
+ items.push_back(std::string("zoom_in"));
+ items.push_back(std::string("map"));
+ items.push_back(std::string("share"));
+ items.push_back(std::string("pay"));
+ items.push_back(std::string("block_unblock"));
+ }
+
+ hide_context_entries(menu, items, disabled_items);
+}
+
} // namespace LLPanelPeopleMenus
diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h
index d51eaec716..0a1dcef303 100644
--- a/indra/newview/llpanelpeoplemenus.h
+++ b/indra/newview/llpanelpeoplemenus.h
@@ -33,19 +33,33 @@ namespace LLPanelPeopleMenus
{
/**
- * Menu used in the nearby people list.
+ * Menu used in the people lists.
*/
-class NearbyMenu : public LLListContextMenu
+class PeopleContextMenu : public LLListContextMenu
{
public:
/*virtual*/ LLContextMenu* createMenu();
+
+protected:
+ virtual void buildContextMenu(class LLMenuGL& menu, U32 flags);
+
private:
bool enableContextMenuItem(const LLSD& userdata);
bool checkContextMenuItem(const LLSD& userdata);
void offerTeleport();
};
-extern NearbyMenu gNearbyMenu;
+/**
+ * Menu used in the nearby people list.
+ */
+class NearbyPeopleContextMenu : public PeopleContextMenu
+{
+protected:
+ /*virtual*/ void buildContextMenu(class LLMenuGL& menu, U32 flags);
+};
+
+extern PeopleContextMenu gPeopleContextMenu;
+extern NearbyPeopleContextMenu gNearbyPeopleContextMenu;
} // namespace LLPanelPeopleMenus
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 025b20d676..74fa5a87bb 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -375,7 +375,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam
if (!disable_camera_switch) // if we're just switching between outfit and wearable editing, don't end customization.
{
LLVOAvatarSelf::onCustomizeEnd(disable_camera_switch);
- LLAppearanceMgr::getInstance()->setOutfitDirty( FALSE );
+ LLAppearanceMgr::getInstance()->updateIsDirty();
}
}
}
@@ -410,7 +410,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab
{
// Save changes if closing.
mEditWearable->saveChanges();
- LLAppearanceMgr::getInstance()->setOutfitDirty( FALSE );
+ LLAppearanceMgr::getInstance()->updateIsDirty();
if (!disable_camera_switch) // if we're just switching between outfit and wearable editing, don't end customization.
{
LLVOAvatarSelf::onCustomizeEnd(disable_camera_switch);
@@ -453,7 +453,6 @@ void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *dat
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
if (panel)
{
- panel->showOutfitsInventoryPanel();
panel->showWearableEditPanel(wearable, disable_camera_switch);
}
}
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 1f9a0bd6b9..3c3c699d17 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -38,6 +38,8 @@
#include "llvoavatar.h"
#include "llworld.h"
+extern LLControlGroup gSavedSettings;
+
const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f);
const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f);
@@ -313,6 +315,7 @@ LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) :
mModerateModeHandledFirstTime(false),
mSpeakerListUpdated(false)
{
+ mGetListTime.reset();
static LLUICachedControl<F32> remove_delay ("SpeakerParticipantRemoveDelay", 10.0);
mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLSpeakerMgr::removeSpeaker, this, _1), remove_delay);
@@ -411,12 +414,10 @@ void LLSpeakerMgr::update(BOOL resort_ok)
// update status of all current speakers
BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
- for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();)
+ for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++)
{
LLUUID speaker_id = speaker_it->first;
LLSpeaker* speakerp = speaker_it->second;
-
- speaker_it++;
if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id))
{
@@ -541,30 +542,39 @@ void LLSpeakerMgr::updateSpeakerList()
LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
if (session->isGroupSessionType() && (mSpeakers.size() <= 1))
{
+ const F32 load_group_timeout = gSavedSettings.getF32("ChatLoadGroupTimeout");
// For groups, we need to hit the group manager.
// Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail.
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id);
- if (!gdatap)
+ if (!gdatap && (mGetListTime.getElapsedTimeF32() >= load_group_timeout))
{
// Request the data the first time around
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(session_id);
}
- else if (gdatap->isMemberDataComplete() && !gdatap->mMembers.empty())
+ else if (gdatap && gdatap->isMemberDataComplete() && !gdatap->mMembers.empty())
{
// Add group members when we get the complete list (note: can take a while before we get that list)
LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin();
+ const S32 load_group_max_members = gSavedSettings.getS32("ChatLoadGroupMaxMembers");
+ S32 updated = 0;
while (member_it != gdatap->mMembers.end())
{
LLGroupMemberData* member = member_it->second;
- // Add only the members who are online
- if (member->getOnlineStatus() == "Online")
+ LLUUID id = member_it->first;
+ // Add only members who are online and not already in the list
+ if ((member->getOnlineStatus() == "Online") && (mSpeakers.find(id) == mSpeakers.end()))
{
- LLPointer<LLSpeaker> speakerp = setSpeaker(member_it->first, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
+ LLPointer<LLSpeaker> speakerp = setSpeaker(id, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
speakerp->mIsModerator = ((member->getAgentPowers() & GP_SESSION_MODERATOR) == GP_SESSION_MODERATOR);
+ updated++;
}
++member_it;
+ // Limit the number of "manually updated" participants to a reasonable number to avoid severe fps drop
+ // *TODO : solve the perf issue of having several hundreds of widgets in the conversation list
+ if (updated >= load_group_max_members)
+ break;
}
- mSpeakerListUpdated = true;
+ mSpeakerListUpdated = true;
}
}
else if (mSpeakers.size() == 0)
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index 5f5095097e..e953dd0e1a 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -264,6 +264,7 @@ protected:
typedef std::map<LLUUID, LLPointer<LLSpeaker> > speaker_map_t;
speaker_map_t mSpeakers;
bool mSpeakerListUpdated;
+ LLTimer mGetListTime;
speaker_list_t mSpeakersSorted;
LLFrameTimer mSpeechTimer;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index d526e17553..9e9efa7ebd 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -502,6 +502,7 @@ private:
};
static const char* sStateDescs[];
e_state mState;
+ void setState(e_state new_state);
e_write_to_cache_state mWriteToCacheState;
LLTextureFetch* mFetcher;
LLPointer<LLImageFormatted> mFormattedImage;
@@ -1028,7 +1029,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE);
if ((prioritize && mState == INIT) || mState == DONE)
{
- mState = INIT;
+ setState(INIT);
U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_HIGH;
setPriority(work_priority);
}
@@ -1092,12 +1093,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR)
{
+ LL_DEBUGS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << llendl;
return true; // abort
}
}
if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP)
{
//nowhere to get data, abort.
+ LL_WARNS("Texture") << mID << " abort, nowhere to get data" << llendl;
return true ;
}
@@ -1140,7 +1143,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
clearPackets(); // TODO: Shouldn't be necessary
mCacheReadHandle = LLTextureCache::nullHandle();
mCacheWriteHandle = LLTextureCache::nullHandle();
- mState = LOAD_FROM_TEXTURE_CACHE;
+ setState(LOAD_FROM_TEXTURE_CACHE);
mInCache = FALSE;
mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE
LL_DEBUGS("Texture") << mID << ": Priority: " << llformat("%8.0f",mImagePriority)
@@ -1157,7 +1160,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
S32 size = mDesiredSize - offset;
if (size <= 0)
{
- mState = CACHE_POST;
+ setState(CACHE_POST);
return false;
}
mFileSize = 0;
@@ -1175,7 +1178,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
offset, size, responder);
mCacheReadTimer.reset();
}
- else if ((mUrl.empty()||mFTType==FTT_SERVER_BAKE) && mFetcher->canLoadFromCache())
+/* SH-3980 - disabling caching of server bakes until we can fix the blurring problems */
+/* else if ((mUrl.empty()||mFTType==FTT_SERVER_BAKE) && mFetcher->canLoadFromCache()) */
+ else if (mUrl.empty() && mFetcher->canLoadFromCache())
{
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
@@ -1188,12 +1193,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
else if(!mUrl.empty() && mCanUseHTTP)
{
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = WAIT_HTTP_RESOURCE;
+ setState(WAIT_HTTP_RESOURCE);
}
else
{
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = LOAD_FROM_NETWORK;
+ setState(LOAD_FROM_NETWORK);
}
}
@@ -1203,7 +1208,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mFetcher->mTextureCache->readComplete(mCacheReadHandle, false))
{
mCacheReadHandle = LLTextureCache::nullHandle();
- mState = CACHE_POST;
+ setState(CACHE_POST);
// fall through
}
else
@@ -1211,6 +1216,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//
//This should never happen
//
+ LL_DEBUGS("Texture") << mID << " this should never happen" << llendl;
return false;
}
}
@@ -1229,7 +1235,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
// we have enough data, decode it
llassert_always(mFormattedImage->getDataSize() > 0);
mLoadedDiscard = mDesiredDiscard;
- mState = DECODE_IMAGE;
+ if (mLoadedDiscard < 0)
+ {
+ LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
+ << ", should be >=0" << llendl;
+ }
+ setState(DECODE_IMAGE);
mInCache = TRUE;
mWriteToCacheState = NOT_WRITE ;
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
@@ -1242,13 +1253,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mUrl.compare(0, 7, "file://") == 0)
{
// failed to load local file, we're done.
+ LL_WARNS("Texture") << mID << ": abort, failed to load local file " << mUrl << LL_ENDL;
return true;
}
// need more data
else
{
LL_DEBUGS("Texture") << mID << ": Not in Cache" << LL_ENDL;
- mState = LOAD_FROM_NETWORK;
+ setState(LOAD_FROM_NETWORK);
}
// fall through
@@ -1289,13 +1301,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
mCanUseHTTP = false;
}
}
+#if 0 /* SH-3980 - disabling caching of server bakes until we can fix the blurring problems */
if (mFTType == FTT_SERVER_BAKE)
{
mWriteToCacheState = CAN_WRITE;
}
+#endif
if (mCanUseHTTP && !mUrl.empty())
{
- mState = WAIT_HTTP_RESOURCE;
+ setState(WAIT_HTTP_RESOURCE);
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
if(mWriteToCacheState != NOT_WRITE)
{
@@ -1325,6 +1339,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
//mFetcher->addToNetworkQueue(this);
//recordTextureStart(false);
//setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
+
+ LL_DEBUGS("Texture") << mID << " does this happen?" << llendl;
return false;
}
}
@@ -1343,10 +1359,16 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
// processSimulatorPackets() failed
// llwarns << "processSimulatorPackets() failed to load buffer" << llendl;
+ LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << llendl;
return true; // failed
}
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ if (mLoadedDiscard < 0)
+ {
+ LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
+ << ", should be >=0" << llendl;
+ }
+ setState(DECODE_IMAGE);
mWriteToCacheState = SHOULD_WRITE;
recordTextureDone(false);
}
@@ -1370,14 +1392,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
// Otherwise, advance into the HTTP states.
if (mFetcher->getHttpWaitersCount() || ! acquireHttpSemaphore())
{
- mState = WAIT_HTTP_RESOURCE2;
+ setState(WAIT_HTTP_RESOURCE2);
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mFetcher->addHttpWaiter(this->mID);
++mResourceWaitCount;
return false;
}
- mState = SEND_HTTP_REQ;
+ setState(SEND_HTTP_REQ);
// *NOTE: You must invoke releaseHttpSemaphore() if you transition
// to a state other than SEND_HTTP_REQ or WAIT_HTTP_REQ or abort
// the request.
@@ -1394,6 +1416,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (! mCanUseHTTP)
{
releaseHttpSemaphore();
+ LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << llendl;
return true; // abort
}
@@ -1410,13 +1433,19 @@ bool LLTextureFetchWorker::doWork(S32 param)
// We already have all the data, just decode it
mLoadedDiscard = mFormattedImage->getDiscardLevel();
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ if (mLoadedDiscard < 0)
+ {
+ LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
+ << ", should be >=0" << llendl;
+ }
+ setState(DECODE_IMAGE);
releaseHttpSemaphore();
return false;
}
else
{
releaseHttpSemaphore();
+ LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << llendl;
return true; // abort.
}
}
@@ -1474,7 +1503,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFetcher->addToHTTPQueue(mID);
recordTextureStart(true);
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
- mState = WAIT_HTTP_REQ;
+ setState(WAIT_HTTP_REQ);
// fall through
}
@@ -1492,8 +1521,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if(mWriteToCacheState == NOT_WRITE) //map tiles
{
- mState = DONE;
+ setState(DONE);
releaseHttpSemaphore();
+ LL_DEBUGS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << llendl;
return true; // failed, means no map tile on the empty region.
}
@@ -1502,7 +1532,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// roll back to try UDP
if (mCanUseNET)
{
- mState = INIT;
+ setState(INIT);
mCanUseHTTP = false;
mUrl.clear();
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
@@ -1533,15 +1563,21 @@ bool LLTextureFetchWorker::doWork(S32 param)
// Use available data
mLoadedDiscard = mFormattedImage->getDiscardLevel();
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ if (mLoadedDiscard < 0)
+ {
+ LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
+ << ", should be >=0" << llendl;
+ }
+ setState(DECODE_IMAGE);
releaseHttpSemaphore();
return false;
}
// Fail harder
resetFormattedData();
- mState = DONE;
+ setState(DONE);
releaseHttpSemaphore();
+ LL_WARNS("Texture") << mID << " abort: fail harder" << llendl;
return true; // failed
}
@@ -1550,6 +1586,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// next time the texture is requested, even if the data have already been fetched.
if(mWriteToCacheState != NOT_WRITE)
{
+ // Why do we want to keep url if NOT_WRITE - is this a proxy for map tiles?
mUrl.clear();
}
@@ -1563,7 +1600,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// abort.
- mState = DONE;
+ setState(DONE);
+ LL_WARNS("Texture") << mID << " abort: no data received" << llendl;
releaseHttpSemaphore();
return true;
}
@@ -1581,7 +1619,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
LL_WARNS("Texture") << "Partial HTTP response produces break in image data for texture "
<< mID << ". Aborting load." << LL_ENDL;
- mState = DONE;
+ setState(DONE);
releaseHttpSemaphore();
return true;
}
@@ -1629,7 +1667,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
mHttpReplyOffset = 0;
mLoadedDiscard = mRequestedDiscard;
- mState = DECODE_IMAGE;
+ if (mLoadedDiscard < 0)
+ {
+ LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
+ << ", should be >=0" << llendl;
+ }
+ setState(DECODE_IMAGE);
if (mWriteToCacheState != NOT_WRITE)
{
mWriteToCacheState = SHOULD_WRITE ;
@@ -1660,31 +1703,34 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (textures_decode_disabled)
{
// for debug use, don't decode
- mState = DONE;
+ setState(DONE);
return true;
}
if (mDesiredDiscard < 0)
{
// We aborted, don't decode
- mState = DONE;
+ setState(DONE);
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << llendl;
return true;
}
if (mFormattedImage->getDataSize() <= 0)
{
- //llerrs << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl;
+ llwarns << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl;
//abort, don't decode
- mState = DONE;
+ setState(DONE);
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << llendl;
return true;
}
if (mLoadedDiscard < 0)
{
- //llerrs << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl;
+ llwarns << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl;
//abort, don't decode
- mState = DONE;
+ setState(DONE);
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << llendl;
return true;
}
@@ -1694,7 +1740,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
S32 discard = mHaveAllData ? 0 : mLoadedDiscard;
U32 image_priority = LLWorkerThread::PRIORITY_NORMAL | mWorkPriority;
mDecoded = FALSE;
- mState = DECODE_IMAGE_UPDATE;
+ setState(DECODE_IMAGE_UPDATE);
LL_DEBUGS("Texture") << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard
<< " All Data: " << mHaveAllData << LL_ENDL;
mDecodeHandle = mFetcher->mImageDecodeThread->decodeImage(mFormattedImage, image_priority, discard, mNeedsAux,
@@ -1722,13 +1768,13 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFormattedImage = NULL;
++mRetryAttempt;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = INIT;
+ setState(INIT);
return false;
}
else
{
// llwarns << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << llendl;
- mState = DONE; // failed
+ setState(DONE); // failed
}
}
else
@@ -1737,7 +1783,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS("Texture") << mID << ": Decoded. Discard: " << mDecodedDiscard
<< " Raw Image: " << llformat("%dx%d",mRawImage->getWidth(),mRawImage->getHeight()) << LL_ENDL;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = WRITE_TO_CACHE;
+ setState(WRITE_TO_CACHE);
}
// fall through
}
@@ -1753,7 +1799,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
// If we're in a local cache or we didn't actually receive any new data,
// or we failed to load anything, skip
- mState = DONE;
+ setState(DONE);
return false;
}
S32 datasize = mFormattedImage->getDataSize();
@@ -1772,7 +1818,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
U32 cache_priority = mWorkPriority;
mWritten = FALSE;
- mState = WAIT_ON_WRITE;
+ setState(WAIT_ON_WRITE);
++mCacheWriteCount;
CacheWriteResponder* responder = new CacheWriteResponder(mFetcher, mID);
mCacheWriteHandle = mFetcher->mTextureCache->writeToCache(mID, cache_priority,
@@ -1785,7 +1831,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if (writeToCacheComplete())
{
- mState = DONE;
+ setState(DONE);
// fall through
}
else
@@ -1806,7 +1852,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mDecodedDiscard >= 0 && mDesiredDiscard < mDecodedDiscard)
{
// More data was requested, return to INIT
- mState = INIT;
+ setState(INIT);
+ LL_DEBUGS("Texture") << mID << " more data requested, returning to INIT: "
+ << " mDecodedDiscard " << mDecodedDiscard << ">= 0 && mDesiredDiscard " << mDesiredDiscard
+ << "<" << " mDecodedDiscard " << mDecodedDiscard << llendl;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false;
}
@@ -1846,10 +1895,10 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
bool partial = false;
LLCore::HttpStatus status(response->getStatus());
- lldebugs << "HTTP COMPLETE: " << mID
- << " status: " << status.toHex()
- << " '" << status.toString() << "'"
- << llendl;
+ LL_DEBUGS("Texture") << "HTTP COMPLETE: " << mID
+ << " status: " << status.toHex()
+ << " '" << status.toString() << "'"
+ << llendl;
// unsigned int offset(0), length(0), full_length(0);
// response->getRange(&offset, &length, &full_length);
// llwarns << "HTTP COMPLETE: " << mID << " handle: " << handle
@@ -2434,6 +2483,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
std::string exten = gDirUtilp->getExtension(url);
if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
{
+ LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << llendl;
// Only do partial requests for J2C at the moment
desired_size = MAX_IMAGE_DATA_SIZE;
desired_discard = 0;
@@ -2476,7 +2526,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
worker->setCanUseHTTP(can_use_http) ;
if (!worker->haveWork())
{
- worker->mState = LLTextureFetchWorker::INIT;
+ worker->setState(LLTextureFetchWorker::INIT);
worker->unlockWorkMutex(); // -Mw
worker->addWork(0, LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
@@ -2500,7 +2550,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
worker->unlockWorkMutex(); // -Mw
}
-// llinfos << "REQUESTED: " << id << " Discard: " << desired_discard << llendl;
+ LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << llendl;
return true;
}
@@ -3169,6 +3219,30 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
return true;
}
+void LLTextureFetchWorker::setState(e_state new_state)
+{
+ static const char* e_state_name[] =
+ {
+ "INVALID",
+ "INIT",
+ "LOAD_FROM_TEXTURE_CACHE",
+ "CACHE_POST",
+ "LOAD_FROM_NETWORK",
+ "LOAD_FROM_SIMULATOR",
+ "WAIT_HTTP_RESOURCE",
+ "WAIT_HTTP_RESOURCE2",
+ "SEND_HTTP_REQ",
+ "WAIT_HTTP_REQ",
+ "DECODE_IMAGE",
+ "DECODE_IMAGE_UPDATE",
+ "WRITE_TO_CACHE",
+ "WAIT_ON_WRITE",
+ "DONE"
+ };
+ LL_DEBUGS("Texture") << "id: " << mID << " FTType: " << mFTType << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << llendl;
+ mState = new_state;
+}
+
// Threads: T*
bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 codec, U16 packets, U32 totalbytes,
U16 data_size, U8* data)
@@ -3225,7 +3299,7 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
llassert_always(data_size == FIRST_PACKET_SIZE || data_size == worker->mFileSize);
res = worker->insertPacket(0, data, data_size);
worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
- worker->mState = LLTextureFetchWorker::LOAD_FROM_SIMULATOR;
+ worker->setState(LLTextureFetchWorker::LOAD_FROM_SIMULATOR);
worker->unlockWorkMutex(); // -Mw
return res;
}
@@ -3275,7 +3349,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
(worker->mState == LLTextureFetchWorker::LOAD_FROM_NETWORK))
{
worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
- worker->mState = LLTextureFetchWorker::LOAD_FROM_SIMULATOR;
+ worker->setState(LLTextureFetchWorker::LOAD_FROM_SIMULATOR);
}
else
{
@@ -3538,7 +3612,7 @@ void LLTextureFetch::releaseHttpWaiters()
break;
}
- worker->mState = LLTextureFetchWorker::SEND_HTTP_REQ;
+ worker->setState(LLTextureFetchWorker::SEND_HTTP_REQ);
worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
worker->unlockWorkMutex(); // -Mw
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index 4c59fd0371..aaa81c57d4 100644..100755
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -160,9 +160,7 @@ LLViewerAssetStats::LLViewerAssetStats()
LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src)
: mRegionHandle(src.mRegionHandle),
- mResetTimestamp(src.mResetTimestamp),
- mPhaseStats(src.mPhaseStats),
- mAvatarRezStates(src.mAvatarRezStates)
+ mResetTimestamp(src.mResetTimestamp)
{
const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
@@ -258,17 +256,6 @@ LLViewerAssetStats::recordFPS(F32 fps)
mCurRegionStats->mFPS.record(fps);
}
-void
-LLViewerAssetStats::recordAvatarStats()
-{
- std::vector<S32> rez_counts;
- LLVOAvatar::getNearbyRezzedStats(rez_counts);
- mAvatarRezStates = rez_counts;
- mPhaseStats.clear();
- mPhaseStats["cloud"] = LLViewerStats::PhaseMap::getPhaseStats("cloud");
- mPhaseStats["cloud-or-gray"] = LLViewerStats::PhaseMap::getPhaseStats("cloud-or-gray");
-}
-
LLSD
LLViewerAssetStats::asLLSD(bool compact_output)
{
@@ -299,11 +286,6 @@ LLViewerAssetStats::asLLSD(bool compact_output)
static const LLSD::String max_tag("max");
static const LLSD::String mean_tag("mean");
- // Avatar sub-tags
- static const LLSD::String avatar_tag("avatar");
- static const LLSD::String avatar_nearby_tag("nearby");
- static const LLSD::String avatar_phase_stats_tag("phase_stats");
-
const duration_t now = LLViewerAssetStatsFF::get_timestamp();
mCurRegionStats->accumulateTime(now);
@@ -362,16 +344,6 @@ LLViewerAssetStats::asLLSD(bool compact_output)
LLSD ret = LLSD::emptyMap();
ret["regions"] = regions;
ret["duration"] = LLSD::Real((now - mResetTimestamp) * 1.0e-6);
- LLSD avatar_info;
- avatar_info[avatar_nearby_tag] = LLSD::emptyArray();
- for (S32 rez_stat=0; rez_stat < mAvatarRezStates.size(); ++rez_stat)
- {
- std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat);
- avatar_info[avatar_nearby_tag][rez_status_name] = mAvatarRezStates[rez_stat];
- }
- avatar_info[avatar_phase_stats_tag]["cloud"] = mPhaseStats["cloud"].getData();
- avatar_info[avatar_phase_stats_tag]["cloud-or-gray"] = mPhaseStats["cloud-or-gray"].getData();
- ret[avatar_tag] = avatar_info;
return ret;
}
@@ -470,15 +442,6 @@ record_fps_main(F32 fps)
gViewerAssetStatsMain->recordFPS(fps);
}
-void
-record_avatar_stats()
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordAvatarStats();
-}
-
// 'thread1' - should be for TextureFetch thread
void
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index 8319752230..e4581d2120 100644..100755
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -256,10 +256,6 @@ protected:
// Time of last reset
duration_t mResetTimestamp;
-
- // Nearby avatar stats
- std::vector<S32> mAvatarRezStates;
- LLViewerStats::phase_stats_t mPhaseStats;
};
@@ -318,8 +314,6 @@ void record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_t
void record_fps_main(F32 fps);
-void record_avatar_stats();
-
/**
* Region context, event and duration loggers for Thread 1.
*/
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 70256d0e78..cf59e67955 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1038,7 +1038,6 @@ void render_hud_attachments()
if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices())
{
LLCamera hud_cam = *LLViewerCamera::getInstance();
- //LLVector3 origin = hud_cam.getOrigin();
hud_cam.setOrigin(-1.f,0,0);
hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1));
LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 0178982d45..40e6b0d09e 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2379,7 +2379,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false);
break;
- case IM_NOTHING_SPECIAL:
+ case IM_NOTHING_SPECIAL: // p2p IM
// Don't show dialog, just do IM
if (!gAgent.isGodlike()
&& gAgent.getRegion()->isPrelude()
@@ -2780,42 +2780,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
break;
- case IM_SESSION_SEND:
- {
- if (is_do_not_disturb)
- {
- return;
- }
-
- // Only show messages if we have a session open (which
- // should happen after you get an "invitation"
- if ( !gIMMgr->hasSession(session_id) )
- {
- return;
- }
-
- // standard message, not from system
- std::string saved;
- if(offline == IM_OFFLINE)
- {
- saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
- }
- buffer = saved + message;
- gIMMgr->addMessage(
- session_id,
- from_id,
- name,
- buffer,
- IM_OFFLINE == offline,
- ll_safe_string((char*)binary_bucket),
- IM_SESSION_INVITE,
- parent_estate_id,
- region_id,
- position,
- true);
- }
- break;
-
case IM_FROM_TASK:
{
if (is_do_not_disturb && !is_owned_by_me)
@@ -2914,6 +2878,76 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group);
}
break;
+
+ case IM_SESSION_SEND: // ad-hoc or group IMs
+
+ // Only show messages if we have a session open (which
+ // should happen after you get an "invitation"
+ if ( !gIMMgr->hasSession(session_id) )
+ {
+ return;
+ }
+
+ else if (offline == IM_ONLINE && is_do_not_disturb)
+ {
+
+ // return a standard "do not disturb" message, but only do it to online IM
+ // (i.e. not other auto responses and not store-and-forward IM)
+ if (!gIMMgr->hasSession(session_id))
+ {
+ // if there is not a panel for this conversation (i.e. it is a new IM conversation
+ // initiated by the other party) then...
+ send_do_not_disturb_message(msg, from_id, session_id);
+ }
+
+ // now store incoming IM in chat history
+
+ buffer = message;
+
+ LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
+
+ // add to IM panel, but do not bother the user
+ gIMMgr->addMessage(
+ session_id,
+ from_id,
+ name,
+ buffer,
+ IM_OFFLINE == offline,
+ ll_safe_string((char*)binary_bucket),
+ IM_SESSION_INVITE,
+ parent_estate_id,
+ region_id,
+ position,
+ true);
+ }
+ else
+ {
+ // standard message, not from system
+ std::string saved;
+ if(offline == IM_OFFLINE)
+ {
+ saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
+ }
+
+ buffer = saved + message;
+
+ LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
+
+ gIMMgr->addMessage(
+ session_id,
+ from_id,
+ name,
+ buffer,
+ IM_OFFLINE == offline,
+ ll_safe_string((char*)binary_bucket),
+ IM_SESSION_INVITE,
+ parent_estate_id,
+ region_id,
+ position,
+ true);
+ }
+ break;
+
case IM_FROM_TASK_AS_ALERT:
if (is_do_not_disturb && !is_owned_by_me)
{
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 1d0bda34a7..236b95253c 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1819,7 +1819,10 @@ bool LLViewerFetchedTexture::updateFetch()
// We finished but received no data
if (current_discard < 0)
{
- llwarns << "!mIsFetching, setting as missing" << llendl;
+ llwarns << "!mIsFetching, setting as missing, decode_priority " << decode_priority
+ << " mRawDiscardLevel " << mRawDiscardLevel
+ << " current_discard " << current_discard
+ << llendl;
setIsMissingAsset();
desired_discard = -1;
}
@@ -1952,11 +1955,13 @@ bool LLViewerFetchedTexture::updateFetch()
}
else if (mHasFetcher && !mIsFetching)
{
- // Only delete requests that haven't receeived any network data for a while
+ // Only delete requests that haven't received any network data
+ // for a while. Note - this is the normal mechanism for
+ // deleting requests, not just a place to handle timeouts.
const F32 FETCH_IDLE_TIME = 5.f;
if (mLastPacketTimer.getElapsedTimeF32() > FETCH_IDLE_TIME)
{
-// llinfos << "Deleting request: " << getID() << " Discard: " << current_discard << " <= min:" << mMinDiscardLevel << " or priority == 0: " << decode_priority << llendl;
+ LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << llendl;
LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
mHasFetcher = FALSE;
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 52299a6ae3..8a52a8f334 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2837,7 +2837,6 @@ void LLViewerWindow::updateUI()
BOOL handled = FALSE;
- //BOOL handled_by_top_ctrl = FALSE;
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
LLView* captor_view = dynamic_cast<LLView*>(mouse_captor);
@@ -3022,7 +3021,6 @@ void LLViewerWindow::updateUI()
S32 local_x, local_y;
top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleHover(local_x, local_y, mask);
- //handled_by_top_ctrl = TRUE;
}
if ( !handled )
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f4a2663d43..d492524789 100644..100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -707,7 +707,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mLastRezzedStatus(-1),
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
- mUseServerBakes(FALSE) // FIXME DRANO consider using boost::optional, defaulting to unknown.
+ mUseServerBakes(FALSE), // FIXME DRANO consider using boost::optional, defaulting to unknown.
+ mLastUpdateRequestCOFVersion(-1),
+ mLastUpdateReceivedCOFVersion(-1)
{
//VTResume(); // VTune
@@ -2533,43 +2535,43 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
return;
}
- BOOL new_name = FALSE;
- if (visible_chat != mVisibleChat)
+ BOOL new_name = FALSE;
+ if (visible_chat != mVisibleChat)
+ {
+ mVisibleChat = visible_chat;
+ new_name = TRUE;
+ }
+
+ if (sRenderGroupTitles != mRenderGroupTitles)
+ {
+ mRenderGroupTitles = sRenderGroupTitles;
+ new_name = TRUE;
+ }
+
+ // First Calculate Alpha
+ // If alpha > 0, create mNameText if necessary, otherwise delete it
+ F32 alpha = 0.f;
+ if (mAppAngle > 5.f)
+ {
+ const F32 START_FADE_TIME = NAME_SHOW_TIME - FADE_DURATION;
+ if (!visible_chat && sRenderName == RENDER_NAME_FADE && time_visible > START_FADE_TIME)
{
- mVisibleChat = visible_chat;
- new_name = TRUE;
+ alpha = 1.f - (time_visible - START_FADE_TIME) / FADE_DURATION;
}
-
- if (sRenderGroupTitles != mRenderGroupTitles)
+ else
{
- mRenderGroupTitles = sRenderGroupTitles;
- new_name = TRUE;
+ // ...not fading, full alpha
+ alpha = 1.f;
}
-
- // First Calculate Alpha
- // If alpha > 0, create mNameText if necessary, otherwise delete it
- F32 alpha = 0.f;
- if (mAppAngle > 5.f)
- {
- const F32 START_FADE_TIME = NAME_SHOW_TIME - FADE_DURATION;
- if (!visible_chat && sRenderName == RENDER_NAME_FADE && time_visible > START_FADE_TIME)
- {
- alpha = 1.f - (time_visible - START_FADE_TIME) / FADE_DURATION;
- }
- else
- {
- // ...not fading, full alpha
- alpha = 1.f;
- }
- }
- else if (mAppAngle > 2.f)
- {
- // far away is faded out also
- alpha = (mAppAngle-2.f)/3.f;
- }
+ }
+ else if (mAppAngle > 2.f)
+ {
+ // far away is faded out also
+ alpha = (mAppAngle-2.f)/3.f;
+ }
if (alpha <= 0.f)
- {
+ {
if (mNameText)
{
mNameText->markDead();
@@ -2579,19 +2581,19 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
return;
}
- if (!mNameText)
- {
+ if (!mNameText)
+ {
mNameText = static_cast<LLHUDNameTag*>( LLHUDObject::addHUDObject(
LLHUDObject::LL_HUD_NAME_TAG) );
//mNameText->setMass(10.f);
- mNameText->setSourceObject(this);
+ mNameText->setSourceObject(this);
mNameText->setVertAlignment(LLHUDNameTag::ALIGN_VERT_TOP);
- mNameText->setVisibleOffScreen(TRUE);
- mNameText->setMaxLines(11);
- mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
- sNumVisibleChatBubbles++;
- new_name = TRUE;
- }
+ mNameText->setVisibleOffScreen(TRUE);
+ mNameText->setMaxLines(11);
+ mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
+ sNumVisibleChatBubbles++;
+ new_name = TRUE;
+ }
idleUpdateNameTagPosition(root_pos_last);
idleUpdateNameTagText(new_name);
@@ -2636,6 +2638,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
// Rebuild name tag if state change detected
if (mNameString.empty()
+ || (mNameString.size() == 2 && mNameString[0] == 10 && mNameString[1] == 10) // *TODO : find out why mNameString is sometimes ""
|| new_name
|| (!title && !mTitle.empty())
|| (title && mTitle != title->getString())
@@ -2840,6 +2843,7 @@ void LLVOAvatar::clearNameTag()
mNameText->setLabel("");
mNameText->setString( "" );
}
+ mTimeVisible.reset();
}
//static
@@ -3004,11 +3008,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mUseServerBakes, central_bake_version);
std::string origin_string = bakedTextureOriginInfo();
debug_line += " [" + origin_string + "]";
+ S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion();
+ S32 last_request_cof_version = mLastUpdateRequestCOFVersion;
+ S32 last_received_cof_version = mLastUpdateReceivedCOFVersion;
if (isSelf())
{
- S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion();
- S32 last_request_cof_version = LLAppearanceMgr::instance().getLastUpdateRequestCOFVersion();
- S32 last_received_cof_version = LLAppearanceMgr::instance().getLastAppearanceUpdateCOFVersion();
debug_line += llformat(" - cof: %d req: %d rcv:%d",
curr_cof_version, last_request_cof_version, last_received_cof_version);
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
@@ -3016,6 +3020,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
debug_line += " FORCING ERRS";
}
}
+ else
+ {
+ debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
+ }
addDebugText(debug_line);
}
if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
@@ -6949,7 +6957,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
return;
}
S32 this_update_cof_version = contents.mCOFVersion;
- S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion;
+ S32 last_update_request_cof_version = mLastUpdateRequestCOFVersion;
// Only now that we have result of appearance_version can we decide whether to bail out.
if( isSelf() )
@@ -6958,8 +6966,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
<< " last_update_request_cof_version " << last_update_request_cof_version
<< " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl;
- LLAppearanceMgr::instance().setLastAppearanceUpdateCOFVersion(this_update_cof_version);
-
if (getRegion() && (getRegion()->getCentralBakeVersion()==0))
{
llwarns << avString() << "Received AvatarAppearance message for self in non-server-bake region" << llendl;
@@ -7001,6 +7007,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
return;
}
+ mLastUpdateReceivedCOFVersion = this_update_cof_version;
+
setIsUsingServerBakes(appearance_version > 0);
applyParsedTEMessage(contents.mTEContents);
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 3a4cfa5800..c2adaac18e 100644..100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -962,6 +962,17 @@ protected:
LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
+ //--------------------------------------------------------------------
+ // COF monitoring
+ //--------------------------------------------------------------------
+
+public:
+ // COF version of last viewer-initiated appearance update request. For non-self avs, this will remain at default.
+ S32 mLastUpdateRequestCOFVersion;
+
+ // COF version of last appearance message received for this av.
+ S32 mLastUpdateReceivedCOFVersion;
+
/** Diagnostics
** **
*******************************************************************************/
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 6d12cd2f01..878d4dd23d 100644..100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2570,7 +2570,11 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe
{
if (!isIndexLocalTexture(type)) return;
- if (!covered_by_baked)
+ // Sunshine - ignoring covered_by_baked will force local textures
+ // to always load. Fix for SH-4001 and many related issues. Do
+ // not restore this without some more targetted fix for the local
+ // textures failing to load issue.
+ //if (!covered_by_baked)
{
if (getLocalTextureID(type, index) != IMG_DEFAULT_AVATAR)
{
@@ -2988,7 +2992,10 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch)
gAgentCamera.resetView();
}
- LLAppearanceMgr::instance().updateAppearanceFromCOF();
+ if (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion())
+ {
+ LLAppearanceMgr::instance().requestServerAppearanceUpdate();
+ }
}
}
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index c82fc50812..1940cf541e 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -965,8 +965,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
S32 text_x = x;
S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight());
- //BOOL is_in_window = true;
-
if( x < 0
|| y < 0
|| x >= getRect().getWidth()
@@ -979,7 +977,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
text_x = sTrackingArrowX;
text_y = sTrackingArrowY;
}
- //is_in_window = false;
}
else if (LLTracker::getTrackingStatus() == LLTracker::TRACKING_LOCATION &&
LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING)
diff --git a/indra/newview/skins/default/textures/icons/collapse_to_one_line.png b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png
new file mode 100644
index 0000000000..d57144a645
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/expand_one_liner.png b/indra/newview/skins/default/textures/icons/expand_one_liner.png
new file mode 100644
index 0000000000..58b7d90131
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/expand_one_liner.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 6a520e9388..fcab966dee 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -171,6 +171,8 @@ with the same filename but different name
<texture name="Conv_toolbar_call_log" file_name="icons/Conv_toolbar_call_log.png" preload="false" />
<texture name="Conv_toolbar_close" file_name="icons/Conv_toolbar_close.png" preload="false" />
<texture name="Conv_toolbar_collapse" file_name="icons/Conv_toolbar_collapse.png" preload="false" />
+ <texture name="Conv_collapse_to_one_line" file_name="icons/collapse_to_one_line.png" preload="false" />
+ <texture name="Conv_expand_one_line" file_name="icons/expand_one_liner.png" preload="false" />
<texture name="Conv_toolbar_expand" file_name="icons/Conv_toolbar_expand.png" preload="false" />
<texture name="Conv_toolbar_hang_up" file_name="icons/Conv_toolbar_hang_up.png" preload="false" />
<texture name="Conv_toolbar_open_call" file_name="icons/Conv_toolbar_open_call.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 12c1676127..65f623a47e 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -61,7 +61,7 @@
image_unselected="Toolbar_Middle_Off"
menu_filename="menu_participant_view.xml"
layout="topleft"
- left="10"
+ left="5"
name="sort_btn"
tool_tip="View/sort options"
top="5"
@@ -75,7 +75,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="4"
+ left_pad="2"
name="add_btn"
tool_tip="Start a new conversation"
width="31"/>
@@ -88,7 +88,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="4"
+ left_pad="2"
name="speak_btn"
tool_tip="Speak with people using your microphone"
width="31"/>
@@ -114,7 +114,7 @@
</layout_panel>
</layout_stack>
<panel
- bottom="-5"
+ bottom="-1"
follows="all"
layout="topleft"
name="conversations_list_panel"
@@ -129,7 +129,7 @@
name="messages_layout_panel"
expanded_min_dim="222">
<panel_container
- bottom="-5"
+ bottom="-1"
follows="all"
layout="topleft"
left="0"
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 8f0574177f..e081ea8e74 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -20,6 +20,12 @@
<floater.string name="call_btn_start">Conv_toolbar_open_call</floater.string>
<floater.string name="call_btn_stop">Conv_toolbar_hang_up</floater.string>
<floater.string
+ name="collapseline_icon"
+ value="Conv_collapse_to_one_line"/>
+ <floater.string
+ name="expandline_icon"
+ value="Conv_expand_one_line"/>
+ <floater.string
name="collapse_icon"
value="Conv_toolbar_collapse"/>
<floater.string
@@ -65,14 +71,28 @@
top="0"
left="0"
height="355"
- width="394">
- <panel
+ width="394">
+ <layout_stack
+ animate="false"
+ default_tab_group="2"
+ follows="all"
+ height="355"
+ width="394"
+ layout="topleft"
+ orientation="vertical"
+ name="main_stack"
+ tab_group="1"
+ top="0"
+ left="0">
+
+ <layout_panel
follows="left|top|right"
layout="topleft"
name="toolbar_panel"
top="0"
left="0"
height="35"
+ min_height="35"
width="394">
<menu_button
menu_filename="menu_im_session_showmodes.xml"
@@ -98,7 +118,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="4"
+ left_pad="2"
name="gear_btn"
visible="false"
tool_tip="Actions on selected person"
@@ -113,7 +133,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="4"
+ left_pad="2"
name="add_btn"
tool_tip="Add someone to this conversation"
width="31"/>
@@ -126,7 +146,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="4"
+ left_pad="2"
name="voice_call_btn"
tool_tip="Open voice connection"
width="31"/>
@@ -151,7 +171,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left="283"
+ left="292"
name="close_btn"
tool_tip="End this conversation"
width="31" />
@@ -164,7 +184,7 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="5"
+ left_pad="2"
name="expand_collapse_btn"
tool_tip="Collapse/Expand this pane"
width="31" />
@@ -177,15 +197,22 @@
image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
- left_pad="5"
+ left_pad="2"
name="tear_off_btn"
width="31" />
- </panel>
+ </layout_panel>
+ <layout_panel
+ name="body_panel"
+ follows="all"
+ width="394"
+ height="235"
+ user_resize="false"
+ auto_resize="true">
<layout_stack
animate="true"
default_tab_group="2"
follows="all"
- height="310"
+ height="275"
width="394"
layout="topleft"
orientation="horizontal"
@@ -198,9 +225,9 @@
follows="all"
min_width="115"
width="150"
- height="310"
+ height="275"
user_resize="true"
- auto_resize="true">
+ auto_resize="false">
</layout_panel>
<layout_panel
default_tab_group="3"
@@ -208,7 +235,7 @@
tab_group="2"
follows="all"
top="0"
- height="310"
+ height="275"
width="244"
layout="topleft"
user_resize="true"
@@ -221,13 +248,13 @@
follows="all"
layout="topleft"
visible="true"
- height="275"
+ height="240"
width="244">
<layout_stack
animate="true"
default_tab_group="2"
follows="all"
- height="275"
+ height="240"
width="244"
layout="topleft"
visible="true"
@@ -258,7 +285,7 @@
width="230" />
</layout_panel>
<layout_panel
- height="248"
+ height="233"
width="210"
layout="topleft"
follows="all"
@@ -273,7 +300,7 @@
font="SansSerifSmall"
follows="all"
visible="true"
- height="240"
+ height="225"
name="chat_history"
parse_highlights="true"
parse_urls="true"
@@ -283,26 +310,90 @@
</layout_panel>
</layout_stack>
</panel>
- <chat_editor
+ </layout_panel>
+ </layout_stack>
+ </layout_panel>
+ <layout_panel
+ height="35"
+ layout="topleft"
+ follows="left|right|bottom"
+ left_delta="0"
+ right="0"
+ top_delta="0"
bottom="0"
+ visible="true"
+ user_resize="false"
+ auto_resize="false"
+ name="chat_layout_panel">
+ <layout_stack
+ animate="true"
+ default_tab_group="2"
+ follows="all"
+ height="35"
+ right="0"
+ layout="topleft"
+ orientation="horizontal"
+ name="input_panels"
+ top_pad="0"
+ left="0">
+ <layout_panel
+ height="35"
+ layout="topleft"
+ follows="left|right|bottom"
+ left_delta="0"
+ top_delta="0"
+ bottom="0"
+ visible="true"
+ user_resize="false"
+ auto_resize="true"
+ name="input_editor_layout_panel">
+ <chat_editor
+ top="6"
expand_lines_count="5"
follows="left|right|bottom"
- font="SansSerifSmall"
+ font="SansSerifSmall"
visible="true"
height="20"
is_expandable="true"
label="To"
text_tentative_color="TextFgTentativeColor"
- layout="bottomleft"
+ layout="topleft"
name="chat_editor"
max_length="1023"
spellcheck="true"
tab_group="3"
- width="220"
- left="10"
+ width="160"
+ left="5"
+ right="-5"
wrap="true">
</chat_editor>
- </layout_panel>
+ </layout_panel>
+ <layout_panel
+ height="35"
+ layout="topleft"
+ follows="left|right|bottom"
+ left_delta="0"
+ top_delta="0"
+ bottom="0"
+ width="35"
+ visible="true"
+ user_resize="false"
+ auto_resize="false"
+ name="input_button_layout_panel">
+ <button
+ follows="left|right|bottom"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Conv_expand_one_line"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ layout="topleft"
+ name="minz_btn"
+ tool_tip="Shows/hides message panel"
+ width="28"/>
+ </layout_panel>
+ </layout_stack>
+ </layout_panel>
</layout_stack>
</view>
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index fd5c86b3ca..5a13ef0a59 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -89,7 +89,14 @@
<on_click function="Avatar.DoToSelected" parameter="invite_to_group" />
<on_enable function="Avatar.EnableItem" parameter="can_invite" />
</menu_item_call>
- <menu_item_separator layout="topleft" name="separator_invite_to_group"/>
+ <menu_item_separator layout="topleft" name="separator_invite_to_group"/>
+ <menu_item_call
+ label="Zoom In"
+ layout="topleft"
+ name="zoom_in">
+ <on_click function="Avatar.DoToSelected" parameter="zoom_in" />
+ <on_enable function="Avatar.EnableItem" parameter="can_zoom_in" />
+ </menu_item_call>
<menu_item_call
label="Map"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_im_conversation.xml b/indra/newview/skins/default/xui/en/menu_im_conversation.xml
index 8882d0a7d8..43287c6ec3 100644
--- a/indra/newview/skins/default/xui/en/menu_im_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_im_conversation.xml
@@ -50,6 +50,13 @@
<menu_item_separator
layout="topleft"/>
<menu_item_call
+ label="Zoom In"
+ layout="topleft"
+ name="zoom_in">
+ <on_click function="Avatar.DoToSelected" parameter="zoom_in" />
+ <on_enable function="Avatar.EnableItem" parameter="can_zoom_in" />
+ </menu_item_call>
+ <menu_item_call
label="Map"
layout="topleft"
name="map">
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_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index 60a6c98514..3abb5f7bc8 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<context_menu
layout="topleft"
- name="Avatar Context Menu">
+ name="Nearby People Context Menu">
<menu_item_call
label="View Profile"
layout="topleft"
- name="View Profile">
+ name="view_profile">
<menu_item_call.on_click
function="Avatar.Profile" />
</menu_item_call>
<menu_item_call
label="IM"
layout="topleft"
- name="IM">
+ name="im">
<menu_item_call.on_click
function="Avatar.IM" />
<menu_item_call.on_enable
@@ -21,7 +21,7 @@
</menu_item_call>
<menu_item_call
label="Offer Teleport"
- name="teleport">
+ name="offer_teleport">
<menu_item_call.on_click
function="Avatar.OfferTeleport"/>
<menu_item_call.on_enable
@@ -31,7 +31,7 @@
<menu_item_call
label="Voice call"
layout="topleft"
- name="Call">
+ name="voice_call">
<menu_item_call.on_click
function="Avatar.Call" />
<menu_item_call.on_enable
@@ -42,18 +42,18 @@
<menu_item_call
label="View chat history..."
layout="topleft"
- name="Chat history">
+ 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_separator name="separator_chat_history"/>
<menu_item_call
label="Add Friend"
layout="topleft"
- name="Add Friend">
+ name="add_friend">
<menu_item_call.on_click
function="Avatar.AddFriend" />
<menu_item_call.on_visible
@@ -63,7 +63,7 @@
<menu_item_call
label="Remove Friend"
layout="topleft"
- name="Remove Friend">
+ name="remove_friend">
<menu_item_call.on_click
function="Avatar.RemoveFriend" />
<menu_item_call.on_enable
@@ -73,18 +73,28 @@
<menu_item_call
label="Invite to group..."
layout="topleft"
- name="Invite">
+ name="invite_to_group">
<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_separator name="separator_invite_to_group"/>
+ <menu_item_call
+ label="Zoom In"
+ layout="topleft"
+ name="zoom_in">
+ <menu_item_call.on_click
+ function="Avatar.ZoomIn" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_zoom_in"/>
+ </menu_item_call>
<menu_item_call
label="Map"
layout="topleft"
- name="Map">
+ name="map">
<menu_item_call.on_click
function="Avatar.ShowOnMap" />
<menu_item_call.on_enable
@@ -94,7 +104,7 @@
<menu_item_call
label="Share"
layout="topleft"
- name="Share">
+ name="share">
<menu_item_call.on_click
function="Avatar.Share" />
<menu_item_call.on_enable
@@ -104,7 +114,7 @@
<menu_item_call
label="Pay"
layout="topleft"
- name="Pay">
+ name="pay">
<menu_item_call.on_click
function="Avatar.Pay" />
<menu_item_call.on_enable
@@ -114,7 +124,7 @@
<menu_item_check
label="Block/Unblock"
layout="topleft"
- name="Block/Unblock">
+ name="block_unblock">
<menu_item_check.on_click
function="Avatar.BlockUnblock" />
<menu_item_check.on_check
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
index 5d58a9d289..5f973088fd 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -6,7 +6,7 @@
enabled="false"
label="Add Friends"
layout="topleft"
- name="Add Friends">
+ name="add_friends">
<on_click
function="Avatar.AddFriends" />
<on_enable
@@ -16,7 +16,7 @@
<menu_item_call
label="Remove Friends"
layout="topleft"
- name="Remove Friend">
+ name="remove_friends">
<menu_item_call.on_click
function="Avatar.RemoveFriend" />
<menu_item_call.on_enable
@@ -26,7 +26,7 @@
<menu_item_call
label="IM"
layout="topleft"
- name="IM">
+ name="im">
<on_click
function="Avatar.IM" />
</menu_item_call>
@@ -34,7 +34,7 @@
enabled="false"
label="Call"
layout="topleft"
- name="Call">
+ name="call">
<on_click
function="Avatar.Call" />
<on_enable
@@ -45,7 +45,7 @@
enabled="false"
label="Share"
layout="topleft"
- name="Share">
+ name="share">
<on_click
function="Avatar.Share" />
</menu_item_call>
@@ -53,13 +53,13 @@
enabled="false"
label="Pay"
layout="topleft"
- name="Pay">
+ name="pay">
<on_click
function="Avatar.Pay" />
</menu_item_call>
<menu_item_call
label="Offer Teleport"
- name="teleport">
+ name="offer_teleport">
<menu_item_call.on_click
function="Avatar.OfferTeleport"/>
<menu_item_call.on_enable
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_group.xml b/indra/newview/skins/default/xui/en/menu_url_group.xml
index c5eaf94d22..2cb125ce09 100644
--- a/indra/newview/skins/default/xui/en/menu_url_group.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_group.xml
@@ -7,7 +7,7 @@
layout="topleft"
name="show_group">
<menu_item_call.on_click
- function="Url.Execute" />
+ function="Url.ShowProfile" />
</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
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 88c02fc84e..c681e39002 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -9998,7 +9998,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. Proceed?
+ This will delete the logs of previous conversations, and any backups of that file.
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm before I delete the log of previous conversations."
@@ -10011,7 +10011,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. If you run scripts on your chat transcript files, you may want to proceed with caution. Proceed?
+ This will delete the transcripts for all previous conversations. The list of past conversations will not be affected. All files with the suffixes .txt and txt.backup in the folder [FOLDER] will be deleted.
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm before I delete transcripts."
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 9db3816c92..bd096ebb88 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -429,7 +429,6 @@
</text>
<line_editor
- enabled="false"
control_name="InstantMessageLogPath"
border_style="line"
border_thickness="1"
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index f8923b9868..a331d9aa9e 100644..100755
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -37,30 +37,6 @@
#include "llregionhandle.h"
#include "../llvoavatar.h"
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
-{
- counts.resize(3);
- counts[0] = 0;
- counts[1] = 0;
- counts[2] = 1;
-}
-
-// static
-std::string LLVOAvatar::rezStatusToString(S32 rez_status)
-{
- if (rez_status==0) return "cloud";
- if (rez_status==1) return "gray";
- if (rez_status==2) return "textured";
- return "unknown";
-}
-
-// static
-LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name)
-{
- static LLViewerStats::StatsAccumulator junk;
- return junk;
-}
-
static const char * all_keys[] =
{
"duration",
@@ -123,31 +99,34 @@ is_empty_map(const LLSD & sd)
{
return sd.isMap() && 0 == sd.size();
}
+#endif
+#if 0
static bool
is_single_key_map(const LLSD & sd, const std::string & key)
{
return sd.isMap() && 1 == sd.size() && sd.has(key);
}
+#endif
static bool
is_double_key_map(const LLSD & sd, const std::string & key1, const std::string & key2)
{
return sd.isMap() && 2 == sd.size() && sd.has(key1) && sd.has(key2);
}
-#endif
+#if 0
static bool
is_triple_key_map(const LLSD & sd, const std::string & key1, const std::string & key2, const std::string& key3)
{
return sd.isMap() && 3 == sd.size() && sd.has(key1) && sd.has(key2) && sd.has(key3);
}
-
+#endif
static bool
is_no_stats_map(const LLSD & sd)
{
- return is_triple_key_map(sd, "duration", "regions", "avatar");
+ return is_double_key_map(sd, "duration", "regions");
}
static bool
@@ -258,7 +237,7 @@ namespace tut
// Once the region is set, we will get a response even with no data collection
it->setRegion(region1_handle);
sd_full = it->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd_full, "duration", "regions", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd_full, "duration", "regions"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd_full["regions"], region1_handle));
LLSD sd = sd_full["regions"][0];
@@ -299,7 +278,7 @@ namespace tut
it->setRegion(region1_handle);
LLSD sd = it->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = sd[0];
@@ -324,7 +303,7 @@ namespace tut
LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
LLSD sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = sd["regions"][0];
@@ -364,7 +343,7 @@ namespace tut
LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
ensure("Other collector is empty", is_no_stats_map(sd));
sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = sd["regions"][0];
@@ -414,7 +393,7 @@ namespace tut
// std::cout << sd << std::endl;
- ensure("Correct double-key LLSD map root", is_triple_key_map(sd, "duration", "regions", "avatar"));
+ ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
ensure("Correct double-slot LLSD array regions", is_double_slot_array(sd["regions"], region1_handle, region2_handle));
LLSD sd1 = get_region(sd, region1_handle);
LLSD sd2 = get_region(sd, region2_handle);
@@ -437,7 +416,7 @@ namespace tut
// Reset leaves current region in place
gViewerAssetStatsMain->reset();
sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
sd2 = sd["regions"][0];
@@ -486,7 +465,7 @@ namespace tut
LLSD sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct double-key LLSD map root", is_triple_key_map(sd, "duration", "regions", "avatar"));
+ ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
ensure("Correct double-slot LLSD array regions", is_double_slot_array(sd["regions"], region1_handle, region2_handle));
LLSD sd1 = get_region(sd, region1_handle);
LLSD sd2 = get_region(sd, region2_handle);
@@ -509,7 +488,7 @@ namespace tut
// Reset leaves current region in place
gViewerAssetStatsMain->reset();
sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "duration", "regions", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
sd2 = get_region(sd, region2_handle);
ensure("Region2 is present in results", sd2.isMap());
@@ -555,7 +534,7 @@ namespace tut
LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
ensure("Other collector is empty", is_no_stats_map(sd));
sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = get_region(sd, region1_handle);
ensure("Region1 is present in results", sd.isMap());