diff options
30 files changed, 376 insertions, 217 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index e93d0dfa50..65a2b8b5e6 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -37,11 +37,15 @@  // newview  #include "llcallingcard.h" // for LLAvatarTracker  #include "llcachename.h" +#include "llrecentpeople.h"  #include "llvoiceclient.h"  #include "llviewercontrol.h"	// for gSavedSettings  static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list"); +// Last interaction time update period. +static const F32 LIT_UPDATE_PERIOD = 5; +  // Maximum number of avatars that can be added to a list in one pass.  // Used to limit time spent for avatar list update per frame.  static const unsigned ADD_LIMIT = 50; @@ -74,19 +78,34 @@ static const LLFlatListView::ItemReverseComparator REVERSE_NAME_COMPARATOR(NAME_  LLAvatarList::Params::Params()  : ignore_online_status("ignore_online_status", false) +, show_last_interaction_time("show_last_interaction_time", false)  {  }  LLAvatarList::LLAvatarList(const Params& p)  :	LLFlatListView(p)  , mIgnoreOnlineStatus(p.ignore_online_status) +, mShowLastInteractionTime(p.show_last_interaction_time)  , mContextMenu(NULL)  , mDirty(true) // to force initial update +, mLITUpdateTimer(NULL)  {  	setCommitOnSelectionChange(true);  	// Set default sort order.  	setComparator(&NAME_COMPARATOR); + +	if (mShowLastInteractionTime) +	{ +		mLITUpdateTimer = new LLTimer(); +		mLITUpdateTimer->setTimerExpirySec(0); // zero to force initial update +		mLITUpdateTimer->start(); +	} +} + +LLAvatarList::~LLAvatarList() +{ +	delete mLITUpdateTimer;  }  void LLAvatarList::setShowIcons(std::string param_name) @@ -105,6 +124,12 @@ void LLAvatarList::draw()  	if (mDirty)  		refresh(); + +	if (mShowLastInteractionTime && mLITUpdateTimer->hasExpired()) +	{ +		updateLastInteractionTimes(); +		mLITUpdateTimer->setTimerExpirySec(LIT_UPDATE_PERIOD); // restart the timer +	}  }  void LLAvatarList::setNameFilter(const std::string& filter) @@ -218,12 +243,12 @@ void LLAvatarList::refresh()  void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)  {  	LLAvatarListItem* item = new LLAvatarListItem(); -	item->showStatus(false);  	item->showInfoBtn(true);  	item->showSpeakingIndicator(true);  	item->setName(name);  	item->setAvatarId(id, mIgnoreOnlineStatus);  	item->setOnline(mIgnoreOnlineStatus ? true : is_online); +	item->showLastInteractionTime(mShowLastInteractionTime);  	item->setContextMenu(mContextMenu);  	item->childSetVisible("info_btn", false); @@ -279,6 +304,54 @@ void LLAvatarList::computeDifference(  	vadded.erase(it, vadded.end());  } +static std::string format_secs(S32 secs) +{ +	// *TODO: reinventing the wheel? +	// *TODO: i18n +	static const int LL_AL_MIN		= 60; +	static const int LL_AL_HOUR		= LL_AL_MIN * 60; +	static const int LL_AL_DAY		= LL_AL_HOUR * 24; +	static const int LL_AL_WEEK		= LL_AL_DAY * 7; +	static const int LL_AL_MONTH	= LL_AL_DAY * 31; +	static const int LL_AL_YEAR		= LL_AL_DAY * 365; + +    std::string s; + +    if (secs >= LL_AL_YEAR) +        s = llformat("%dy", secs / LL_AL_YEAR); +    else if (secs >= LL_AL_MONTH) +        s = llformat("%dmon", secs / LL_AL_MONTH); +    else if (secs >= LL_AL_WEEK) +        s = llformat("%dw", secs / LL_AL_WEEK); +    else if (secs >= LL_AL_DAY) +        s = llformat("%dd", secs / LL_AL_DAY); +    else if (secs >= LL_AL_HOUR) +        s = llformat("%dh", secs / LL_AL_HOUR); +    else if (secs >= LL_AL_MIN) +        s = llformat("%dm", secs / LL_AL_MIN); +    else +        s = llformat("%ds", secs); + +    return s; +} + +// Refresh shown time of our last interaction with all listed avatars. +void LLAvatarList::updateLastInteractionTimes() +{ +	S32 now = (S32) LLDate::now().secondsSinceEpoch(); +	std::vector<LLPanel*> items; +	getItems(items); + +	for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++) +	{ +		// *TODO: error handling +		LLAvatarListItem* item = static_cast<LLAvatarListItem*>(*it); +		S32 secs_since = now - (S32) LLRecentPeople::instance().getDate(item->getAvatarId()).secondsSinceEpoch(); +		if (secs_since >= 0) +			item->setLastInteractionTime(format_secs(secs_since)); +	} +} +  bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const  {  	const LLAvatarListItem* avatar_item1 = dynamic_cast<const LLAvatarListItem*>(item1); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index f60f1f00f3..8f2f0249a6 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -37,6 +37,8 @@  #include "llavatarlistitem.h" +class LLTimer; +  /**   * Generic list of avatars.   *  @@ -56,11 +58,12 @@ public:  	struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>   	{  		Optional<bool> ignore_online_status; // show all items as online +		Optional<bool> show_last_interaction_time; // show most recent interaction time. *HACK: move this to a derived class  		Params();  	};  	LLAvatarList(const Params&); -	virtual	~LLAvatarList() {} +	virtual	~LLAvatarList();  	virtual void draw(); // from LLView @@ -85,13 +88,16 @@ protected:  		const std::vector<LLUUID>& vnew,  		std::vector<LLUUID>& vadded,  		std::vector<LLUUID>& vremoved); +	void updateLastInteractionTimes();  private:  	bool mIgnoreOnlineStatus; +	bool mShowLastInteractionTime;  	bool mDirty;  	bool mShowIcons; +	LLTimer*				mLITUpdateTimer; // last interaction time update timer  	std::string				mIconParamName;  	std::string				mNameFilter;  	uuid_vector_t			mIDs; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 4ecb9537ba..8464430501 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -48,7 +48,7 @@ LLAvatarListItem::LLAvatarListItem()  :	LLPanel(),  	mAvatarIcon(NULL),  	mAvatarName(NULL), -	mStatus(NULL), +	mLastInteractionTime(NULL),  	mSpeakingIndicator(NULL),  	mInfoBtn(NULL),  	mProfileBtn(NULL), @@ -74,8 +74,8 @@ BOOL  LLAvatarListItem::postBuild()  {  	mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");  	mAvatarName = getChild<LLTextBox>("avatar_name"); -	mStatus = getChild<LLTextBox>("avatar_status"); - +	mLastInteractionTime = getChild<LLTextBox>("last_interaction"); +	  	mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");  	mInfoBtn = getChild<LLButton>("info_btn");  	mProfileBtn = getChild<LLButton>("profile_btn"); @@ -97,12 +97,6 @@ BOOL  LLAvatarListItem::postBuild()  		rect.setLeftTopAndSize(mName->getRect().mLeft, mName->getRect().mTop, mName->getRect().getWidth() + 30, mName->getRect().getHeight());  		mName->setRect(rect); -		if(mStatus) -		{ -			rect.setLeftTopAndSize(mStatus->getRect().mLeft + 30, mStatus->getRect().mTop, mStatus->getRect().getWidth(), mStatus->getRect().getHeight()); -			mStatus->setRect(rect); -		} -  		if(mLocator)  		{  			rect.setLeftTopAndSize(mLocator->getRect().mLeft + 30, mLocator->getRect().mTop, mLocator->getRect().getWidth(), mLocator->getRect().getHeight()); @@ -137,11 +131,6 @@ void LLAvatarListItem::onMouseLeave(S32 x, S32 y, MASK mask)  	LLPanel::onMouseLeave(x, y, mask);  } -void LLAvatarListItem::setStatus(const std::string& status) -{ -	mStatus->setValue(status); -} -  // virtual, called by LLAvatarTracker  void LLAvatarListItem::changed(U32 mask)  { @@ -195,6 +184,24 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes)  	gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3));  } +void LLAvatarListItem::showLastInteractionTime(bool show) +{ +	if (show) +		return; + +	LLRect	name_rect	= mAvatarName->getRect(); +	LLRect	time_rect	= mLastInteractionTime->getRect(); + +	mLastInteractionTime->setVisible(false); +	name_rect.mRight += (time_rect.mRight - name_rect.mRight); +	mAvatarName->setRect(name_rect); +} + +void LLAvatarListItem::setLastInteractionTime(const std::string& val) +{ +	mLastInteractionTime->setValue(val); +} +  void LLAvatarListItem::setAvatarIconVisible(bool visible)  {  	// Already done? Then do nothing. @@ -240,21 +247,6 @@ void LLAvatarListItem::onProfileBtnClick()  	LLAvatarActions::showProfile(mAvatarId);  } -void LLAvatarListItem::showStatus(bool show_status) -{ -	// *HACK: dirty hack until we can determine correct avatar status (EXT-1076). - -	if (show_status) -		return; - -	LLRect	name_rect	= mAvatarName->getRect(); -	LLRect	status_rect	= mStatus->getRect(); - -	mStatus->setVisible(show_status); -	name_rect.mRight += (status_rect.mRight - name_rect.mRight); -	mAvatarName->setRect(name_rect); -} -  void LLAvatarListItem::setValue( const LLSD& value )  {  	if (!value.isMap()) return;; diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index a8d3919217..10c0b17005 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -60,10 +60,10 @@ public:  	virtual void setValue(const LLSD& value);  	virtual void changed(U32 mask); // from LLFriendObserver -	void setStatus(const std::string& status);  	void setOnline(bool online);  	void setName(const std::string& name);  	void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); +	void setLastInteractionTime(const std::string& val);  	void setAvatarIconVisible(bool visible);  	const LLUUID& getAvatarId() const; @@ -74,7 +74,7 @@ public:  	void showSpeakingIndicator(bool show) { mSpeakingIndicator->setVisible(show); }  	void showInfoBtn(bool show_info_btn) {mInfoBtn->setVisible(show_info_btn); } -	void showStatus(bool show_status); +	void showLastInteractionTime(bool show);  	void setContextMenu(ContextMenu* menu) { mContextMenu = menu; } @@ -90,7 +90,7 @@ private:  	LLAvatarIconCtrl* mAvatarIcon;  	LLTextBox* mAvatarName; -	LLTextBox* mStatus; +	LLTextBox* mLastInteractionTime;  	LLOutputMonitorCtrl* mSpeakingIndicator;  	LLButton* mInfoBtn; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index aaca568320..e561507e69 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -43,6 +43,8 @@  #include "llagentdata.h"  #include "llavataractions.h"  #include "lltrans.h" +#include "llfloaterreg.h" +#include "llmutelist.h"  static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");  static const std::string MESSAGE_USERNAME_DATE_SEPARATOR(" ----- "); @@ -77,6 +79,19 @@ public:  		return LLPanel::handleMouseUp(x,y,mask);  	} +	void onObjectIconContextMenuItemClicked(const LLSD& userdata) +	{ +		std::string level = userdata.asString(); + +		if (level == "profile") +		{ +		} +		else if (level == "block") +		{ +			LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT)); +		} +	} +  	void onAvatarIconContextMenuItemClicked(const LLSD& userdata)  	{  		std::string level = userdata.asString(); @@ -109,11 +124,17 @@ public:  		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;  		registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2)); +		registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));  		LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); -  		mPopupMenuHandleAvatar = menu->getHandle(); +		menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); +		mPopupMenuHandleObject = menu->getHandle(); + +		LLPanel* visible_panel = getChild<LLPanel>("im_header"); +		visible_panel->setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); +  		return LLPanel::postBuild();  	} @@ -145,6 +166,12 @@ public:  		return LLPanel::handleRightMouseDown(x,y,mask);  	} + +	void onHeaderPanelClick(S32 x, S32 y, MASK mask) +	{ +		LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID)); +	} +  	const LLUUID&		getAvatarId () const { return mAvatarID;}  	const std::string&	getFirstName() const { return mFirstName; }  	const std::string&	getLastName	() const { return mLastName; } @@ -163,7 +190,10 @@ public:  		LLTextBox* userName = getChild<LLTextBox>("user_name");  		if(!chat.mFromName.empty()) +		{  			userName->setValue(chat.mFromName); +			mFrom = chat.mFromName; +		}  		else  		{  			std::string SL = LLTrans::getString("SECOND_LIFE"); @@ -206,8 +236,12 @@ protected:  	void showSystemContextMenu(S32 x,S32 y)  	{  	} +	  	void showObjectContextMenu(S32 x,S32 y)  	{ +		LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleObject.get(); +		if(menu) +			LLMenuGL::showPopup(this, menu, x, y);  	}  	void showAvatarContextMenu(S32 x,S32 y) @@ -238,11 +272,13 @@ protected:  protected:  	LLHandle<LLView>	mPopupMenuHandleAvatar; +	LLHandle<LLView>	mPopupMenuHandleObject;  	LLUUID			    mAvatarID;  	EChatSourceType		mSourceType;  	std::string			mFirstName;  	std::string			mLastName; +	std::string			mFrom;  }; diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 61a60a24be..670f8717a2 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -37,7 +37,6 @@  #include "llbottomtray.h"  #include "llgroupactions.h"  #include "lliconctrl.h" -#include "llimpanel.h"				// LLFloaterIMPanel  #include "llimfloater.h"  #include "llimview.h"  #include "llfloaterreg.h" @@ -1398,7 +1397,7 @@ void LLTalkButton::onClick_ShowBtn()  	LLAvatarListItem* item = new LLAvatarListItem(); -	item->showStatus(true); +	item->showLastInteractionTime(false);  	item->showInfoBtn(true);  	item->showSpeakingIndicator(true);  	item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE); diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 86abebe7ce..ed14079ae9 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -182,13 +182,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&  void log_chat_text(const LLChat& chat)  { -		std::string histstr; -		if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) -			histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText; -		else -			histstr = chat.mText; - -		LLLogChat::saveHistory(std::string("chat"),histstr); +	LLLogChat::saveHistory(std::string("chat"), chat.mFromName, chat.mFromID, chat.mText);  }  // static  void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) @@ -476,7 +470,7 @@ void LLFloaterChat::loadHistory()  }  //static -void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string line, void* userdata) +void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , const LLSD& line, void* userdata)  {  	switch (type)  	{ @@ -485,9 +479,10 @@ void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string l  		// *TODO: nice message from XML file here  		break;  	case LLLogChat::LOG_LINE: +	case LLLogChat::LOG_LLSD:  		{  			LLChat chat;					 -			chat.mText = line; +			chat.mText = line["message"].asString();  			get_text_color(chat);  			addChatHistory(chat,  FALSE);  		} diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h index 6ba3165d6a..aed82a6781 100644 --- a/indra/newview/llfloaterchat.h +++ b/indra/newview/llfloaterchat.h @@ -78,7 +78,7 @@ public:  	static void onClickMute(void *data);  	static void onClickToggleShowMute(LLUICtrl* caller, void *data);  	static void onClickToggleActiveSpeakers(void* userdata); -	static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata); +	static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& line, void* userdata);  	static void loadHistory();  	static void* createSpeakersPanel(void* data);  	static void* createChatPanel(void* data); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index b86795f696..f3fec70ac9 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -235,11 +235,6 @@ BOOL LLIMFloater::postBuild()  	setTitle(LLIMModel::instance().getName(mSessionID));  	setDocked(true); -	 -	if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) -	{ -		LLLogChat::loadHistory(getTitle(), &chatFromLogFile, (void *)this); -	}  	mTypingStart = LLTrans::getString("IM_typing_start_string"); @@ -453,9 +448,6 @@ void LLIMFloater::updateMessages()  {  	std::list<LLSD> messages;  	LLIMModel::instance().getMessages(mSessionID, messages, mLastMessageIndex+1); -	std::string agent_name; - -	gCacheName->getFullName(gAgentID, agent_name);  	if (messages.size())  	{ @@ -464,20 +456,17 @@ void LLIMFloater::updateMessages()  		std::ostringstream message;  		std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();  		std::list<LLSD>::const_reverse_iterator iter_end = messages.rend(); -	    for (; iter != iter_end; ++iter) +		for (; iter != iter_end; ++iter)  		{  			LLSD msg = *iter; -			std::string from = msg["from"].asString();  			std::string time = msg["time"].asString();  			LLUUID from_id = msg["from_id"].asUUID(); +			std::string from = from_id != gAgentID ? msg["from"].asString() : LLTrans::getString("You");  			std::string message = msg["message"].asString();  			LLStyle::Params style_params;  			style_params.color(chat_color); -			if (from == agent_name) -				from = LLTrans::getString("You"); -  			LLChat chat(message);  			chat.mFromID = from_id;  			chat.mFromName = from; @@ -657,38 +646,3 @@ void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info)  	}  } -void LLIMFloater::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata) -{ -	if (!userdata) return; - -	LLIMFloater* self = (LLIMFloater*) userdata; -	std::string message = line; -	S32 im_log_option =  gSavedPerAccountSettings.getS32("IMLogOptions"); -	switch (type) -	{ -	case LLLogChat::LOG_EMPTY: -		// add warning log enabled message -		if (im_log_option!=LOG_CHAT) -		{ -			message = LLTrans::getString("IM_logging_string"); -		} -		break; -	case LLLogChat::LOG_END: -		// add log end message -		if (im_log_option!=LOG_CHAT) -		{ -			message = LLTrans::getString("IM_logging_string"); -		} -		break; -	case LLLogChat::LOG_LINE: -		// just add normal lines from file -		break; -	default: -		// nothing -		break; -	} - -	self->mChatHistory->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor"))); -	self->mChatHistory->blockUndo(); -} - diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 3da27ac941..d2aac57ee2 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -106,8 +106,6 @@ private:  	// gets a rect that bounds possible positions for the LLIMFloater on a screen (EXT-1111)  	void getAllowedRect(LLRect& rect); -	static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata); -  	// Add the "User is typing..." indicator.  	void addTypingIndicator(const LLIMInfo* im_info); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 77ee90f681..c4beb666ea 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -181,13 +181,6 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,  	// enable line history support for instant message bar  	mInputEditor->setEnableLineHistory(TRUE); -	if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) -	{ -		LLLogChat::loadHistory(mSessionLabel, -				       &chatFromLogFile, -				       (void *)this); -	} -  	//*TODO we probably need the same "awaiting message" thing in LLIMFloater  	LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionUUID);  	if (!im_session) @@ -977,41 +970,6 @@ void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info)  	}  } -//static -void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata) -{ -	LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata; -	std::string message = line; -	S32 im_log_option =  gSavedPerAccountSettings.getS32("IMLogOptions"); -	switch (type) -	{ -	case LLLogChat::LOG_EMPTY: -		// add warning log enabled message -		if (im_log_option!=LOG_CHAT) -		{ -			message = LLTrans::getString("IM_logging_string"); -		} -		break; -	case LLLogChat::LOG_END: -		// add log end message -		if (im_log_option!=LOG_CHAT) -		{ -			message = LLTrans::getString("IM_logging_string"); -		} -		break; -	case LLLogChat::LOG_LINE: -		// just add normal lines from file -		break; -	default: -		// nothing -		break; -	} - -	//self->addHistoryLine(line, LLColor4::grey, FALSE); -	self->mHistoryEditor->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor"))); -	self->mHistoryEditor->blockUndo(); -} -  //static   void LLFloaterIMPanel::onKickSpeaker(void* user_data)  { diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 39107d9a22..b8f99d45c9 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -127,7 +127,6 @@ public:  	// Handle other participant in the session typing.  	void processIMTyping(const LLIMInfo* im_info, BOOL typing); -	static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);  private:  	// Called by UI methods. diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8a55ab41b9..49fc9d8055 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -135,7 +135,6 @@ LLIMModel::LLIMModel()  	addNewMsgCallback(toast_callback);  } -  LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids)  :	mSessionID(session_id),  	mName(name), @@ -179,6 +178,9 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&  		mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID);  		mOtherParticipantIsAvatar = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionID);  	} + +	if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) +		LLLogChat::loadHistory(mName, &chatFromLogFile, (void *)this);  }  LLIMModel::LLIMSession::~LLIMSession() @@ -220,6 +222,34 @@ void LLIMModel::LLIMSession::sessionInitReplyReceived(const LLUUID& new_session_  	}  } +void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time) +{ +	LLSD message; +	message["from"] = from; +	message["from_id"] = from_id; +	message["message"] = utf8_text; +	message["time"] = time;  +	message["index"] = (LLSD::Integer)mMsgs.size();  + +	mMsgs.push_front(message);  +} + +void LLIMModel::LLIMSession::chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata) +{ +	if (!userdata) return; + +	LLIMSession* self = (LLIMSession*) userdata; + +	if (type == LLLogChat::LOG_LINE) +	{ +		self->addMessage("", LLSD(), msg["message"].asString(), ""); +	} +	else if (type == LLLogChat::LOG_LLSD) +	{ +		self->addMessage(msg["from"].asString(), msg["from_id"].asUUID(), msg["message"].asString(), msg["time"].asString()); +	} +} +  LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const  {  	return get_if_there(LLIMModel::instance().sSessionsMap, session_id, @@ -348,39 +378,25 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,  		return false;  	} -	LLSD message; -	message["from"] = from; -	message["from_id"] = from_id; -	message["message"] = utf8_text; -	message["time"] = LLLogChat::timestamp(false);  //might want to add date separately -	message["index"] = (LLSD::Integer)session->mMsgs.size();  - -	session->mMsgs.push_front(message);  +	session->addMessage(from, from_id, utf8_text, LLLogChat::timestamp(false)); //might want to add date separately  	return true; -  }  //*TODO rewrite chat history persistence using LLSD serialization (IB) -bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const std::string& utf8_text) +bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)  {  	S32 im_log_option =  gSavedPerAccountSettings.getS32("IMLogOptions");  	if (im_log_option != LOG_CHAT)  	{ -		std::string histstr; -		if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) -			histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + from + IM_SEPARATOR + utf8_text; -		else -			histstr = from + IM_SEPARATOR + utf8_text; -  		if(im_log_option == LOG_BOTH_TOGETHER)  		{ -			LLLogChat::saveHistory(std::string("chat"), histstr); +			LLLogChat::saveHistory(std::string("chat"), from, from_id, utf8_text);  			return true;  		}  		else  		{ -			LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), histstr); +			LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), from, from_id, utf8_text);  			return true;  		}  	} @@ -398,7 +414,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co  	}  	addToHistory(session_id, from, from_id, utf8_text); -	if (log2file) logToFile(session_id, from, utf8_text); +	if (log2file) logToFile(session_id, from, from_id, utf8_text);  	session->mNumUnread++; @@ -1360,14 +1376,9 @@ void LLIMMgr::addMessage(  		fixed_session_name = session_name;  	} -	bool new_session = !hasSession(session_id); +	bool new_session = !hasSession(new_session_id);  	if (new_session)  	{ -		// *NOTE dzaporozhan -		// Workaround for critical bug EXT-1918 - -		// *TODO  -		// Investigate cases when session_id == NULL and find solution to handle those cases  		LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id);  	} diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index ae8fd355ea..d0bd594df1 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -40,6 +40,7 @@  #include "llinstantmessage.h"  #include "lluuid.h"  #include "llmultifloater.h" +#include "lllogchat.h"  class LLFloaterChatterBox;  class LLUUID; @@ -57,6 +58,8 @@ public:  		virtual ~LLIMSession();  		void sessionInitReplyReceived(const LLUUID& new_session_id); +		void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time); +		static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata);  		LLUUID mSessionID;  		std::string mName; @@ -193,8 +196,7 @@ private:  	/**  	 * Save an IM message into a file  	 */ -	//*TODO should also save uuid of a sender -	bool logToFile(const LLUUID& session_id, const std::string& from, const std::string& utf8_text); +	bool logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text);  };  class LLIMSessionObserver diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 69214b5cab..a16ffe19c6 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -36,6 +36,8 @@  #include "llappviewer.h"  #include "llfloaterchat.h"  #include "lltrans.h" +#include "llviewercontrol.h" +#include "llsdserialize.h"  const S32 LOG_RECALL_SIZE = 2048; @@ -89,41 +91,53 @@ std::string LLLogChat::timestamp(bool withdate)  //static -void LLLogChat::saveHistory(std::string filename, std::string line) +void LLLogChat::saveHistory(const std::string& filename, +			    const std::string& from, +			    const LLUUID& from_id, +			    const std::string& line)  { +	if (!gSavedPerAccountSettings.getBOOL("LogInstantMessages")) +		return; +  	if(!filename.size())  	{  		llinfos << "Filename is Empty!" << llendl;  		return;  	} -	LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); 		/*Flawfinder: ignore*/ -	if (!fp) +	llofstream file (LLLogChat::makeLogFileName(filename), std::ios_base::app); +	if (!file.is_open())  	{  		llinfos << "Couldn't open chat history log!" << llendl; +		return;  	} -	else -	{ -		fprintf(fp, "%s\n", line.c_str()); -		 -		fclose (fp); -	} + +	LLSD item; + +	if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) +		 item["time"] = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")); + +	item["from"]	= from; +	item["from_id"]	= from_id; +	item["message"]	= line; + +	file << LLSDOStreamer <LLSDNotationFormatter>(item) << std::endl; + +	file.close();  } -void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType,std::string,void*), void* userdata) +void LLLogChat::loadHistory(const std::string& filename, void (*callback)(ELogLineType, const LLSD&, void*), void* userdata)  {  	if(!filename.size())  	{  		llwarns << "Filename is Empty!" << llendl;  		return ;  	} - +          	LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r");		/*Flawfinder: ignore*/  	if (!fptr)  	{ -		//LLUIString message = LLTrans::getString("IM_logging_string"); -		//callback(LOG_EMPTY,"IM_logging_string",userdata); -		callback(LOG_EMPTY,LLStringUtil::null,userdata); +		callback(LOG_EMPTY, LLSD(), userdata);  		return;			//No previous conversation with this name.  	}  	else @@ -143,6 +157,9 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType  			}  		} +		// the parser's destructor is protected so we cannot create in the stack. +		LLPointer<LLSDParser> parser = new LLSDNotationParser(); +  		while ( fgets(buffer, LOG_RECALL_SIZE, fptr)  && !feof(fptr) )   		{  			len = strlen(buffer) - 1;		/*Flawfinder: ignore*/ @@ -150,14 +167,25 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType  			if (!firstline)  			{ -				callback(LOG_LINE,std::string(buffer),userdata); +				LLSD item; +				std::string line(buffer); +				std::istringstream iss(line); +				if (parser->parse(iss, item, line.length()) == LLSDParser::PARSE_FAILURE) +				{ +					item["message"]	= line; +					callback(LOG_LINE, item, userdata); +				} +				else +				{ +					callback(LOG_LLSD, item, userdata); +				}  			}  			else  			{  				firstline = FALSE;  			}  		} -		callback(LOG_END,LLStringUtil::null,userdata); +		callback(LOG_END, LLSD(), userdata);  		fclose(fptr);  	} diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index ad903b66fe..e252cd7d41 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -41,13 +41,18 @@ public:  	enum ELogLineType {  		LOG_EMPTY,  		LOG_LINE, +		LOG_LLSD,  		LOG_END  	};  	static std::string timestamp(bool withdate = false);  	static std::string makeLogFileName(std::string(filename)); -	static void saveHistory(std::string filename, std::string line); -	static void loadHistory(std::string filename,  -		                    void (*callback)(ELogLineType,std::string,void*),  +	static void saveHistory(const std::string& filename, +				const std::string& from, +				const LLUUID& from_id, +				const std::string& line); + +	static void loadHistory(const std::string& filename,  +		                    void (*callback)(ELogLineType, const LLSD&, void*),   							void* userdata);  private:  	static std::string cleanFileName(std::string filename); diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 2b4e35208a..14da35594f 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -280,6 +280,14 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)  	mCurrentMode = mode;  	gAgent.setFlying(MM_FLY == mode); +	// attempts to set avatar flying can not set it real flying in some cases. +	// For ex. when avatar fell down & is standing up. +	// So, no need to continue processing FLY mode. See EXT-1079 +	if (MM_FLY == mode && !gAgent.getFlying()) +	{ +		return; +	} +  	switch (mode)  	{  	case MM_RUN: diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index ff7f08bf97..36cf2c1aa8 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -65,7 +65,6 @@  #include "llworld.h" //for particle system banning  #include "llchat.h"  #include "llfloaterchat.h" -#include "llimpanel.h"  #include "llimview.h"  #include "llnotifications.h"  #include "lluistring.h" diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index c32ef2f22b..9a05812847 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -164,8 +164,6 @@ TODO:  - Load navbar height from saved settings (as it's done for status bar) or think of a better way.  */ -S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK, used in llviewerwindow.cpp -  LLNavigationBar::LLNavigationBar()  :	mTeleportHistoryMenu(NULL),  	mBtnBack(NULL), @@ -545,6 +543,15 @@ void LLNavigationBar::clearHistoryCache()  	mPurgeTPHistoryItems= true;  } +int LLNavigationBar::getDefNavBarHeight() +{ +	return mDefaultNbRect.getHeight(); +} +int LLNavigationBar::getDefFavBarHeight() +{ +	return mDefaultFpRect.getHeight(); +} +  void LLNavigationBar::showNavigationPanel(BOOL visible)  {  	bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"); diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index f1a1b85a86..8b625e7fa6 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -35,8 +35,6 @@  #include "llpanel.h" -extern S32 NAVIGATION_BAR_HEIGHT; -  class LLButton;  class LLLocationInputCtrl;  class LLMenuGL; @@ -63,6 +61,9 @@ public:  	void showNavigationPanel(BOOL visible);  	void showFavoritesPanel(BOOL visible); + +	int getDefNavBarHeight(); +	int getDefFavBarHeight();  private: diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 73dcd1dd92..e4dbcbd219 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -44,7 +44,6 @@  #include "lltrans.h"  #include "lldockablefloater.h" -#include "llimpanel.h"  #include "llsyswellwindow.h"  #include "llimfloater.h" diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index c2cd63900b..c02fd7a5ef 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -32,7 +32,6 @@  #include "llviewerprecompiledheaders.h"  #include "lltoastimpanel.h" -#include "llimpanel.h"  const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT	= 6; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index b71291f834..35226a1632 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -511,13 +511,34 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)  bool toggle_show_navigation_panel(const LLSD& newvalue)  { -	LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean()); +	LLRect floater_view_rect = gFloaterView->getRect(); +	LLRect notify_view_rect = gNotifyBoxView->getRect(); +	LLNavigationBar* navbar = LLNavigationBar::getInstance(); +	 +	//if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher,  +	//and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower. +	int pm=newvalue.asBoolean()?-1:1; +	floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); +	notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); +	gFloaterView->setRect(floater_view_rect); +	floater_view_rect = gFloaterView->getRect(); +	navbar->showNavigationPanel(newvalue.asBoolean());  	return true;  }  bool toggle_show_favorites_panel(const LLSD& newvalue)  { -	LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean()); +	LLRect floater_view_rect = gFloaterView->getRect(); +	LLRect notify_view_rect = gNotifyBoxView->getRect(); +	LLNavigationBar* navbar = LLNavigationBar::getInstance(); +	 +	//if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher,  +	//and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower. +	int pm=newvalue.asBoolean()?-1:1; +	floater_view_rect.mTop += pm*navbar->getDefFavBarHeight(); +	notify_view_rect.mTop += pm*navbar->getDefFavBarHeight(); +	gFloaterView->setRect(floater_view_rect); +	navbar->showFavoritesPanel(newvalue.asBoolean());  	return true;  } diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index b1f14eca7b..9b4e80cae0 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -43,6 +43,9 @@  extern BOOL gHackGodmode;  #endif +bool toggle_show_navigation_panel(const LLSD& newvalue); +bool toggle_show_favorites_panel(const LLSD& newvalue); +  // These functions found in llcontroldef.cpp *TODO: clean this up!  //setting variables are declared in this function  void settings_setup_listeners(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 320f0f83ff..ec6ef92a54 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -88,7 +88,6 @@  #include "llhudeffect.h"  #include "llhudeffecttrail.h"  #include "llhudmanager.h" -#include "llimpanel.h"  #include "llinventorymodel.h"  #include "llfloaterinventory.h"  #include "llmenugl.h" diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 65994dfb30..5c40f2a540 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -44,6 +44,9 @@  #include "llinventory.h"  #include "llinventorybridge.h"  #include "llinventorymodel.h" +#include "lllandmark.h" +#include "lllandmarkactions.h" +#include "lllandmarklist.h"  #include "llmemorystream.h"  #include "llmenugl.h"  #include "llnotecard.h" @@ -64,10 +67,47 @@  #include "llviewertexturelist.h"  #include "llviewerwindow.h" -#include "llappviewer.h" // for gPacificDaylightTime -  static LLDefaultChildRegistry::Register<LLViewerTextEditor> r("text_editor"); +///----------------------------------------------------------------------- +///  Class LLEmbeddedLandmarkCopied +///----------------------------------------------------------------------- +class LLEmbeddedLandmarkCopied: public LLInventoryCallback +{ +public: + +	LLEmbeddedLandmarkCopied(){} +	void fire(const LLUUID& inv_item) +	{ +		showInfo(inv_item); +	} +	static void showInfo(const LLUUID& landmark_inv_id) +	{ +		LLSD key; +		key["type"] = "landmark"; +		key["id"] = landmark_inv_id; +		LLSideTray::getInstance()->showPanel("panel_places", key); +	} +	static void processForeignLandmark(LLLandmark* landmark, +			const LLUUID& object_id, const LLUUID& notecard_inventory_id, +			LLInventoryItem* item) +	{ +		LLVector3d global_pos; +		landmark->getGlobalPos(global_pos); +		LLViewerInventoryItem* agent_lanmark = +				LLLandmarkActions::findLandmarkForGlobalPos(global_pos); + +		if (agent_lanmark) +		{ +			showInfo(agent_lanmark->getUUID()); +		} +		else +		{ +			LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied(); +			copy_inventory_from_notecard(object_id, notecard_inventory_id, item, gInventoryCallbacks.registerCB(cb)); +		} +	} +};  ///----------------------------------------------------------------------------  /// Class LLEmbeddedNotecardOpener  ///---------------------------------------------------------------------------- @@ -1099,14 +1139,12 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc  	if (!item)  		return; -	LLSD key; -	key["type"] = "landmark"; -	key["id"] = item->getUUID(); - -	LLPanelPlaces *panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", key)); -	if (panel) +	LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID(), +			boost::bind(&LLEmbeddedLandmarkCopied::processForeignLandmark, _1, mObjectID, mNotecardInventoryID, item)); +	if (landmark)  	{ -		panel->setItem(item); +		LLEmbeddedLandmarkCopied::processForeignLandmark(landmark, mObjectID, +				mNotecardInventoryID, item);  	}  } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9e1ba3f2ef..3766e14eef 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1546,11 +1546,12 @@ void LLViewerWindow::initWorldUI()  	getRootView()->addChild(gMorphView);  	// Make space for nav bar. +	LLNavigationBar* navbar = LLNavigationBar::getInstance();  	LLRect floater_view_rect = gFloaterView->getRect();  	LLRect notify_view_rect = gNotifyBoxView->getRect(); -	floater_view_rect.mTop -= NAVIGATION_BAR_HEIGHT; +	floater_view_rect.mTop -= navbar->getDefNavBarHeight();  	floater_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight(); -	notify_view_rect.mTop -= NAVIGATION_BAR_HEIGHT; +	notify_view_rect.mTop -= navbar->getDefNavBarHeight();  	notify_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight();  	gFloaterView->setRect(floater_view_rect);  	gNotifyBoxView->setRect(notify_view_rect); @@ -1577,20 +1578,19 @@ void LLViewerWindow::initWorldUI()  	gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );  	// Navigation bar - -	LLNavigationBar* navbar = LLNavigationBar::getInstance();  	navbar->reshape(root_rect.getWidth(), navbar->getRect().getHeight(), TRUE); // *TODO: redundant?  	navbar->translate(0, root_rect.getHeight() - menu_bar_height - navbar->getRect().getHeight()); // FIXME  	navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); +  	if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))  	{ -		navbar->showNavigationPanel(FALSE); +		toggle_show_navigation_panel(LLSD(0));  	}  	if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"))  	{ -		navbar->showFavoritesPanel(FALSE); +		toggle_show_favorites_panel(LLSD(0));  	}  	if (!gSavedSettings.getBOOL("ShowCameraButton")) diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml new file mode 100644 index 0000000000..0c8a2af002 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + height="101" + layout="topleft" + left="100" + mouse_opaque="false" + name="Object Icon Menu" + top="724" + visible="false" + width="128"> +    <menu_item_call +     label="Object Profile..." +     layout="topleft" +     name="Object Profile"> +        <menu_item_call.on_click +         function="ObjectIcon.Action" +         parameter="profile" /> +    </menu_item_call> +    <menu_item_call +     label="Block..." +     layout="topleft" +     name="Block"> +        <menu_item_call.on_click +         function="ObjectIcon.Action" +         parameter="block" /> +    </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index f747c557e2..8aaa462aaf 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -47,17 +47,17 @@       top="6"       use_ellipses="true"       value="Unknown" -     width="166" /> +     width="196" />      <text -     follows="left" +     follows="right"       font="SansSerifSmall"       height="15"       layout="topleft"       left_pad="10" -     name="avatar_status" +     name="last_interaction"       text_color="LtGray_50" -     value="Away" -     width="50" /> +     value="0s" +     width="24" />      <output_monitor       auto_update="true"       follows="right" @@ -75,6 +75,7 @@       image_pressed="Info_Press"       image_hover="Info_Over"       image_unselected="Info_Off" +     layout="topleft"       left_pad="3"       right="-25"       name="info_btn" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 69089e0e26..0db5a41cc5 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -303,6 +303,7 @@ background_visible="true"               left="0"               multi_select="true"               name="avatar_list" +             show_last_interaction_time="true"               top="2"               width="313" />              <panel  | 
