Reverted online status stuff to LL 1.x trunk, cleaned up unused code and settings

Mon, 27 Feb 2012 23:28:58 -0800

author
Kadah_Coba <kadah.coba@gmail.com>
date
Mon, 27 Feb 2012 23:28:58 -0800
changeset 1623
f1619d9f0ce0
parent 1622
5ea066cea04d
child 1624
693177f51f33

Reverted online status stuff to LL 1.x trunk, cleaned up unused code and settings

indra/newview/app_settings/settings.xml file | annotate | diff | revisions
indra/newview/llfloaterfriends.cpp file | annotate | diff | revisions
indra/newview/llfloaterfriends.h file | annotate | diff | revisions
indra/newview/llpanelavatar.cpp file | annotate | diff | revisions
indra/newview/llpanelavatar.h file | annotate | diff | revisions
indra/newview/skins/default/xui/en-us/panel_friends.xml file | annotate | diff | revisions
indra/newview/skins/default/xui/en-us/panel_preferences_phoenix.xml file | annotate | diff | revisions
indra/newview/skins/default/xui/nl/panel_preferences_phoenix.xml file | annotate | diff | revisions
     1.1 --- a/indra/newview/app_settings/settings.xml	Mon Feb 27 13:46:13 2012 -0800
     1.2 +++ b/indra/newview/app_settings/settings.xml	Mon Feb 27 23:28:58 2012 -0800
     1.3 @@ -10265,17 +10265,6 @@
     1.4  			<key>Value</key>
     1.5  			<integer>0</integer>
     1.6  		</map>
     1.7 -		<key>PhoenixUseBridgeOnline</key>
     1.8 -		<map>
     1.9 -			<key>Comment</key>
    1.10 -			<string>whether or not to use the lsl bridge to boost online info</string>
    1.11 -			<key>Persist</key>
    1.12 -			<integer>1</integer>
    1.13 -			<key>Type</key>
    1.14 -			<string>Boolean</string>
    1.15 -			<key>Value</key>
    1.16 -			<integer>1</integer>
    1.17 -		</map>
    1.18  		<key>PhoenixUseBridgeRadar</key>
    1.19  		<map>
    1.20  			<key>Comment</key>
     2.1 --- a/indra/newview/llfloaterfriends.cpp	Mon Feb 27 13:46:13 2012 -0800
     2.2 +++ b/indra/newview/llfloaterfriends.cpp	Mon Feb 27 23:28:58 2012 -0800
     2.3 @@ -302,14 +302,6 @@
     2.4  	edit_my_object_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS);
     2.5  
     2.6  	{
     2.7 -		LLSD& lol_column = element["columns"][LIST_VISIBLE_ONLINE_THEIRS];
     2.8 -		lol_column["column"] = "icon_visible_online_theirs";
     2.9 -		lol_column["type"] = "checkbox";
    2.10 -		lol_column["enabled"] = "";
    2.11 -		lol_column["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_ONLINE_STATUS);
    2.12 -	}
    2.13 -
    2.14 -	{
    2.15  		LLSD& lol_column = element["columns"][LIST_VISIBLE_MAP_THEIRS];
    2.16  		lol_column["column"] = "icon_visible_map_theirs";
    2.17  		lol_column["type"] = "checkbox";
    2.18 @@ -317,13 +309,11 @@
    2.19  		lol_column["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION);
    2.20  	}
    2.21  
    2.22 -	{
    2.23 -		LLSD& lol_column = element["columns"][LIST_EDIT_THEIRS];
    2.24 -		lol_column["column"] = "icon_edit_theirs";
    2.25 -		lol_column["type"] = "checkbox";
    2.26 -		lol_column["enabled"] = "";
    2.27 -		lol_column["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS);
    2.28 -	}
    2.29 +	LLSD& edit_their_object_column = element["columns"][LIST_EDIT_THEIRS];
    2.30 +	edit_their_object_column["column"] = "icon_edit_theirs";
    2.31 +	edit_their_object_column["type"] = "checkbox";
    2.32 +	edit_their_object_column["enabled"] = "";
    2.33 +	edit_their_object_column["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS);
    2.34  
    2.35  	LLSD& update_gen_column = element["columns"][LIST_FRIEND_UPDATE_GEN];
    2.36  	update_gen_column["column"] = "friend_last_update_generation";
    2.37 @@ -386,7 +376,6 @@
    2.38  	itemp->getColumn(LIST_VISIBLE_MAP)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION));
    2.39  	itemp->getColumn(LIST_EDIT_MINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS));
    2.40  
    2.41 -	itemp->getColumn(LIST_VISIBLE_ONLINE_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_ONLINE_STATUS));
    2.42  	//unreliable? broken?
    2.43  	itemp->getColumn(LIST_VISIBLE_MAP_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION));
    2.44  	itemp->getColumn(LIST_EDIT_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS));
     3.1 --- a/indra/newview/llfloaterfriends.h	Mon Feb 27 13:46:13 2012 -0800
     3.2 +++ b/indra/newview/llfloaterfriends.h	Mon Feb 27 23:28:58 2012 -0800
     3.3 @@ -93,7 +93,6 @@
     3.4  		LIST_VISIBLE_ONLINE,
     3.5  		LIST_VISIBLE_MAP,
     3.6  		LIST_EDIT_MINE,
     3.7 -		LIST_VISIBLE_ONLINE_THEIRS,
     3.8  		LIST_VISIBLE_MAP_THEIRS,
     3.9  		LIST_EDIT_THEIRS,
    3.10  		LIST_FRIEND_UPDATE_GEN
     4.1 --- a/indra/newview/llpanelavatar.cpp	Mon Feb 27 13:46:13 2012 -0800
     4.2 +++ b/indra/newview/llpanelavatar.cpp	Mon Feb 27 23:28:58 2012 -0800
     4.3 @@ -83,7 +83,6 @@
     4.4  #include "lluictrlfactory.h"
     4.5  #include "llpreviewtexture.h"
     4.6  
     4.7 -#include "jc_lslviewerbridge.h"
     4.8  #include "a_phoenixviewerlink.h"
     4.9  
    4.10  #include "llfloatergroups.h"
    4.11 @@ -1311,6 +1310,7 @@
    4.12  									boost::bind(&LLPanelAvatarPicks::callbackDelete, self, _1, _2));
    4.13  }
    4.14  
    4.15 +
    4.16  // static
    4.17  bool LLPanelAvatarPicks::callbackDelete(const LLSD& notification, const LLSD& response)
    4.18  {
    4.19 @@ -1464,8 +1464,6 @@
    4.20  		name.assign("");
    4.21  	}
    4.22  
    4.23 -
    4.24 -
    4.25  	// If we have an avatar pointer, they must be online.
    4.26  	setAvatarID(avatarp->getID(), name, ONLINE_STATUS_YES);
    4.27  }
    4.28 @@ -1475,24 +1473,18 @@
    4.29  {
    4.30  	// Online status NO could be because they are hidden
    4.31  	// If they are a friend, we may know the truth!
    4.32 -	if (ONLINE_STATUS_YES != online_status)
    4.33 +	if ((ONLINE_STATUS_YES != online_status)
    4.34 +		&& mIsFriend
    4.35 +		&& (LLAvatarTracker::instance().isBuddyOnline( mAvatarID )))
    4.36  	{
    4.37 -		if(mIsFriend && LLAvatarTracker::instance().isBuddyOnline(mAvatarID) )
    4.38 -		{
    4.39 -			online_status = ONLINE_STATUS_YES;
    4.40 -		}
    4.41 +		online_status = ONLINE_STATUS_YES;
    4.42  	}
    4.43 +
    4.44 +	mPanelSecondLife->childSetVisible("online_yes", (online_status == ONLINE_STATUS_YES));
    4.45 +
    4.46  	if(online_status == ONLINE_STATUS_YES)
    4.47  	{
    4.48 -		mPanelSecondLife->childSetVisible("online_yes", TRUE);
    4.49  		mPanelSecondLife->childSetColor("online_yes",LLColor4::green);
    4.50 -		mPanelSecondLife->childSetValue("online_yes","Currently Online");
    4.51 -	}
    4.52 -	else
    4.53 -	{
    4.54 -		mPanelSecondLife->childSetVisible("online_yes", TRUE);
    4.55 -		mPanelSecondLife->childSetColor("online_yes",LLColor4::red);
    4.56 -		mPanelSecondLife->childSetValue("online_yes","Currently Offline");
    4.57  	}
    4.58  
    4.59  	// Since setOnlineStatus gets called after setAvatarID
    4.60 @@ -1559,7 +1551,7 @@
    4.61  	mIsFriend = is_agent_friend(mAvatarID); 
    4.62  
    4.63  	// setOnlineStatus uses mIsFriend
    4.64 -	if(mIsFriend)setOnlineStatus(online_status);
    4.65 +	setOnlineStatus(online_status);
    4.66  	
    4.67  	BOOL own_avatar = (mAvatarID == gAgent.getID() );
    4.68  	BOOL avatar_is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
    4.69 @@ -1740,7 +1732,6 @@
    4.70  	{
    4.71  		return;
    4.72  	}
    4.73 -
    4.74  		
    4.75  	if (mPanelSecondLife)
    4.76  	{
    4.77 @@ -1979,55 +1970,8 @@
    4.78  	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
    4.79  	msg->addUUIDFast(   _PREHASH_AvatarID, mAvatarID);
    4.80  	gAgent.sendReliableMessage();
    4.81 -	
    4.82 -	sendAvatarRatingsRequest();
    4.83  }
    4.84  
    4.85 -// NOTE: This is here as a sort of load indicator if we decide to reimplement the long gone
    4.86 -// Ratings feature. Should remove before release.
    4.87 -// We hash the key to pacify paranoid people.
    4.88 -// We also use POST so that the logs show nothing.
    4.89 -// (if you think we're going to log every single profile view, even if we wanted to, you're insane.
    4.90 -// 85k users * how many profiles a day?)
    4.91 -
    4.92 -// (Disabled now anyway)
    4.93 -#if 0
    4.94 -void LLPanelAvatar::sendAvatarRatingsRequest()
    4.95 -{
    4.96 -	LLMD5 hashed_key = LLMD5((unsigned char*)mAvatarID.asString().c_str());
    4.97 -	// Have to take this slightly obtuse approach because LLHTTPClient::postRaw will delete the data when it's finished.
    4.98 -	char *hex_cstr;
    4.99 -	hex_cstr = new char[MD5HEX_STR_SIZE];
   4.100 -	hashed_key.hex_digest(hex_cstr);
   4.101 -	LLHTTPClient::postRaw("http://phoenixratings.appspot.com/profile", (U8*)hex_cstr, MD5HEX_STR_SIZE - 1, new LLPanelAvatarRatingsDownloader(this));
   4.102 -	hex_cstr = NULL;
   4.103 -}
   4.104 -
   4.105 -LLPanelAvatarRatingsDownloader::LLPanelAvatarRatingsDownloader(LLPanelAvatar *panel) : mPanelAvatar(panel)
   4.106 -{
   4.107 -	
   4.108 -}
   4.109 -
   4.110 -void LLPanelAvatarRatingsDownloader::error(U32 status, const std::string &reason)
   4.111 -{
   4.112 -	LL_WARNS("NewRatings") << "Rating lookup failed (error " << status << "): " << reason << LL_ENDL;
   4.113 -}
   4.114 -
   4.115 -void LLPanelAvatarRatingsDownloader::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer)
   4.116 -{
   4.117 -	LLBufferStream istr(channels, buffer.get());
   4.118 -	LLSD stuff = LLSDSerialize::fromBinary(istr, LLSDSerialize::SIZE_UNLIMITED);
   4.119 -	std::ostringstream pretty;
   4.120 -	LLSDSerialize::toPrettyXML(stuff, pretty);
   4.121 -	LL_INFOS("NewRatings") << "Got some ratings!\n\n" << pretty.str() << LL_ENDL;
   4.122 -}
   4.123 -#else
   4.124 -void LLPanelAvatar::sendAvatarRatingsRequest() { }
   4.125 -LLPanelAvatarRatingsDownloader::LLPanelAvatarRatingsDownloader(LLPanelAvatar *panel) { }
   4.126 -void LLPanelAvatarRatingsDownloader::error(U32, const std::string&) { }
   4.127 -void LLPanelAvatarRatingsDownloader::completedRaw(U32, const std::string&, const LLChannelDescriptors&, const LLIOPipe::buffer_ptr_t&) { }
   4.128 -#endif
   4.129 -
   4.130  void LLPanelAvatar::sendAvatarNotesUpdate()
   4.131  {
   4.132  	std::string notes = mPanelNotes->childGetValue("notes edit").asString();
     5.1 --- a/indra/newview/llpanelavatar.h	Mon Feb 27 13:46:13 2012 -0800
     5.2 +++ b/indra/newview/llpanelavatar.h	Mon Feb 27 23:28:58 2012 -0800
     5.3 @@ -312,8 +312,6 @@
     5.4  	void sendAvatarNotesUpdate();
     5.5  
     5.6  	void sendAvatarPicksRequest();
     5.7 -	
     5.8 -	void sendAvatarRatingsRequest();
     5.9  
    5.10  	void selectTab(S32 tabnum);
    5.11  	void selectTabByName(std::string tab_name);
    5.12 @@ -391,17 +389,6 @@
    5.13  	BOOL						mAllowEdit;
    5.14  };
    5.15  
    5.16 -class LLPanelAvatarRatingsDownloader : public LLHTTPClient::Responder
    5.17 -{
    5.18 -public:
    5.19 -	LLPanelAvatarRatingsDownloader(LLPanelAvatar *panel);
    5.20 -	void error(U32 status, const std::string& reason);
    5.21 -	void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer);
    5.22 -	
    5.23 -private:
    5.24 -	LLPanelAvatar *mPanelAvatar;
    5.25 -};
    5.26 -
    5.27  // helper funcs
    5.28  void add_left_label(LLPanel *panel, const std::string& name, S32 y);
    5.29  
     6.1 --- a/indra/newview/skins/default/xui/en-us/panel_friends.xml	Mon Feb 27 13:46:13 2012 -0800
     6.2 +++ b/indra/newview/skins/default/xui/en-us/panel_friends.xml	Mon Feb 27 23:28:58 2012 -0800
     6.3 @@ -17,11 +17,9 @@
     6.4  		     tool_tip="Friend can locate you on the map" width="20" />
     6.5  		<column image="ff_edit_mine_button.tga" name="icon_edit_mine"
     6.6  		     tool_tip="Friend can edit, delete or take objects" width="20" />
     6.7 -    <column image="ff_visible_online_button_theirs.tga" name="icon_visible_online_theirs"
     6.8 -		     tool_tip="You can see when they are online (only updates on login)" width="20" />
     6.9      <column image="ff_visible_map_button_theirs.tga" name="icon_visible_map_theirs"
    6.10  		     tool_tip="You can locate them on the map" width="20" />
    6.11 -    <column image="ff_edit_theirs_button.tga" name="icon_edit_theirs"
    6.12 +		<column image="ff_edit_theirs_button.tga" name="icon_edit_theirs"
    6.13  		     tool_tip="You can edit this friend&apos;s objects" width="20" />
    6.14  		<column name="friend_last_update_generation" width="0" />
    6.15  	</scroll_list>
     7.1 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_phoenix.xml	Mon Feb 27 13:46:13 2012 -0800
     7.2 +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_phoenix.xml	Mon Feb 27 23:28:58 2012 -0800
     7.3 @@ -158,7 +158,6 @@
     7.4          <view_border bevel_style="none" border_thickness="1" bottom="-120" follows="top|left" height="80" left="280" name="EmDivisorBridge" width="200"/>
     7.5          <check_box bottom_delta="60" enabled="true" follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="Enable LSL-Client Bridge" left_delta="0" mouse_opaque="true" name="PhoenixBuildBridge" radio_style="false" width="270" control_name="PhoenixBuildBridge"/>
     7.6          <check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="Radar uses bridge" left_delta="10" mouse_opaque="true" name="PhoenixUseBridgeRadar" radio_style="false" width="270" control_name="PhoenixUseBridgeRadar"/>
     7.7 -        <check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="True online status in profiles" left_delta="0" mouse_opaque="true" name="PhoenixUseBridgeOnline" radio_style="false" width="270" control_name="PhoenixUseBridgeOnline"/>
     7.8          <check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="Use llMoveToTarget TP" left_delta="0" mouse_opaque="true" name="PhoenixUseBridgeMoveToTarget" radio_style="false" width="270" control_name="PhoenixUseBridgeMoveToTarget"/>
     7.9        </panel>
    7.10  	  
     8.1 --- a/indra/newview/skins/default/xui/nl/panel_preferences_phoenix.xml	Mon Feb 27 13:46:13 2012 -0800
     8.2 +++ b/indra/newview/skins/default/xui/nl/panel_preferences_phoenix.xml	Mon Feb 27 23:28:58 2012 -0800
     8.3 @@ -138,7 +138,6 @@
     8.4          <view_border name="EmDivisorBridge" />
     8.5          <check_box label="LSL-Client Bridge inschakelen" name="PhoenixBuildBridge" />
     8.6          <check_box label="Radar gebruikt bridge" left_delta="10" name="PhoenixUseBridgeRadar" />
     8.7 -        <check_box label="Echte online status in profielen" name="PhoenixUseBridgeOnline" />
     8.8          <check_box label="Gebruik llMoveToTarget TP" name="PhoenixUseBridgeMoveToTarget" />
     8.9        </panel>
    8.10  

mercurial