Scott Lawrence avatar Scott Lawrence committed 3a6baa0 Merge

Automated merge with file:///Users/oz/Work/V-D

Comments (0)

Files changed (31)

doc/contributions.txt

 	STORM-679
 	STORM-737
 	STORM-726
+	STORM-812
 	VWR-17801
 	STORM-785
 Kage Pixel

indra/newview/CMakeLists.txt

     llsecapi.cpp
     llsechandler_basic.cpp
     llselectmgr.cpp
+    llshareavatarhandler.cpp
     llsidepanelappearance.cpp
     llsidepanelinventory.cpp
     llsidepanelinventorysubpanel.cpp
     llvoclouds.cpp
     llvograss.cpp
     llvoground.cpp
+    llvoicecallhandler.cpp
     llvoicechannel.cpp
     llvoiceclient.cpp
     llvoicevisualizer.cpp
   endif (LINUX)
 
   if(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
-    if(CMAKE_CFG_INTDIR STREQUAL ".")
+  if(CMAKE_CFG_INTDIR STREQUAL ".")
       set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
-    else(CMAKE_CFG_INTDIR STREQUAL ".")
+  else(CMAKE_CFG_INTDIR STREQUAL ".")
       # set LLBUILD_CONFIG to be a shell variable evaluated at build time
       # reflecting the configuration we are currently building.
       set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR})
-    endif(CMAKE_CFG_INTDIR STREQUAL ".")
-    add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
-      COMMAND "${PYTHON_EXECUTABLE}"
-      ARGS
-        "${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py"
-        "${LLBUILD_CONFIG}"
-        "${VIEWER_DIST_DIR}"
-        "${VIEWER_EXE_GLOBS}"
-        "${VIEWER_LIB_GLOB}"
-        "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/bin/dump_syms"
-        "${VIEWER_SYMBOL_FILE}"
-        DEPENDS generate_breakpad_symbols.py
+  endif(CMAKE_CFG_INTDIR STREQUAL ".")
+  add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
+    COMMAND "${PYTHON_EXECUTABLE}"
+    ARGS
+      "${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py"
+      "${LLBUILD_CONFIG}"
+      "${VIEWER_DIST_DIR}"
+      "${VIEWER_EXE_GLOBS}"
+      "${VIEWER_LIB_GLOB}"
+      "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/bin/dump_syms"
+      "${VIEWER_SYMBOL_FILE}"
+    DEPENDS generate_breakpad_symbols.py
         VERBATIM)
 
-    add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
-    add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
-    add_dependencies(package generate_breakpad_symbols)
+  add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
+  add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
+  add_dependencies(package generate_breakpad_symbols)
   endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
 endif (PACKAGE)
 

indra/newview/app_settings/settings.xml

       <key>Value</key>
       <string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
     </map>
+    <key>WebProfileURL</key>
+    <map>
+      <key>Comment</key>
+      <string>URL for Web Profiles</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string>https://my.secondlife.com/[AGENT_NAME]</string>
+    </map>
     <key>HighResSnapshot</key>
     <map>
       <key>Comment</key>

indra/newview/llagent.cpp

 	mFirstLogin(FALSE),
 	mGenderChosen(FALSE),
 
-	mAppearanceSerialNum(0)
+	mAppearanceSerialNum(0),
+
+	mMouselookModeInSignal(NULL),
+	mMouselookModeOutSignal(NULL)
 {
 	for (U32 i = 0; i < TOTAL_CONTROLS; i++)
 	{
 {
 	cleanup();
 
+	delete mMouselookModeInSignal;
+	delete mMouselookModeOutSignal;
+
 	// *Note: this is where LLViewerCamera::getInstance() used to be deleted.
 }
 
 
 		LLFloaterCamera::onLeavingMouseLook();
 
+		if (mMouselookModeOutSignal)
+		{
+			(*mMouselookModeOutSignal)();
+		}
+
 		// Only pop if we have pushed...
 		if (TRUE == mViewsPushed)
 		{
 
 		mViewsPushed = TRUE;
 
+		if (mMouselookModeInSignal)
+		{
+			(*mMouselookModeInSignal)();
+		}
+
 		// hide all floaters except the mini map
 
 #if 0 // Use this once all floaters are registered
 				}
 			}
 		}
-
 	}
 	else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
 	{
 	gAgentCamera.updateLastCamera();
 }
 
+boost::signals2::connection LLAgent::setMouselookModeInCallback( const camera_signal_t::slot_type& cb )
+{
+	if (!mMouselookModeInSignal) mMouselookModeInSignal = new camera_signal_t();
+	return mMouselookModeInSignal->connect(cb);
+}
+
+boost::signals2::connection LLAgent::setMouselookModeOutCallback( const camera_signal_t::slot_type& cb )
+{
+	if (!mMouselookModeOutSignal) mMouselookModeOutSignal = new camera_signal_t();
+	return mMouselookModeOutSignal->connect(cb);
+}
+
 //-----------------------------------------------------------------------------
 // heardChat()
 //-----------------------------------------------------------------------------

indra/newview/llagent.h

 #include "llvoavatardefines.h"
 #include "llslurl.h"
 
+#include <boost/signals2.hpp>
+
 extern const BOOL 	ANIMATE;
 extern const U8 	AGENT_STATE_TYPING;  // Typing indication
 extern const U8 	AGENT_STATE_EDITING; // Set when agent has objects selected
 	BOOL			getCustomAnim() const { return mCustomAnim; }
 	void			setCustomAnim(BOOL anim) { mCustomAnim = anim; }
 	
+	typedef boost::signals2::signal<void ()> camera_signal_t;
+	boost::signals2::connection setMouselookModeInCallback( const camera_signal_t::slot_type& cb );
+	boost::signals2::connection setMouselookModeOutCallback( const camera_signal_t::slot_type& cb );
+
 private:
+	camera_signal_t* mMouselookModeInSignal;
+	camera_signal_t* mMouselookModeOutSignal;
 	BOOL            mCustomAnim; 		// Current animation is ANIM_AGENT_CUSTOMIZE ?
 	LLAnimPauseRequest mPauseRequest;
 	BOOL			mViewsPushed; 		// Keep track of whether or not we have pushed views

indra/newview/llavataractions.cpp

 #include "llmutelist.h"
 #include "llnotificationsutil.h"	// for LLNotificationsUtil
 #include "llpaneloutfitedit.h"
+#include "llpanelprofile.h"
 #include "llrecentpeople.h"
 #include "llsidetray.h"
 #include "lltrans.h"
+#include "llviewercontrol.h"
 #include "llviewerobjectlist.h"
 #include "llviewermessage.h"	// for handle_lure
 #include "llviewerregion.h"
 		params["id"] = id;
 		params["open_tab_name"] = "panel_profile";
 
+		// PROFILES: open in webkit window
+		std::string full_name;
+		if (gCacheName->getFullName(id,full_name))
+		{
+			std::string agent_name = LLCacheName::buildUsername(full_name);
+			llinfos << "opening web profile for " << agent_name << llendl;		
+			std::string url = getProfileURL(agent_name);
+			LLWeb::loadWebURLInternal(url);
+		}
+		else
+		{
+			llwarns << "no name info for agent id " << id << llendl;
+		}
+#if 0
 		//Show own profile
 		if(gAgent.getID() == id)
 		{
 		{
 			LLSideTray::getInstance()->showPanel("panel_profile_view", params);
 		}
+#endif
 	}
 }
 

indra/newview/llfloaterpreference.cpp

 	mLanguageChanged(false),
 	mDoubleClickActionDirty(false)
 {
+	
 	//Build Floater is now Called from 	LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
 	
 	static bool registered_dialog = false;
 	mCommitCallbackRegistrar.add("Pref.getUIColor",				boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
 	mCommitCallbackRegistrar.add("Pref.MaturitySettings",		boost::bind(&LLFloaterPreference::onChangeMaturity, this));
 	mCommitCallbackRegistrar.add("Pref.BlockList",				boost::bind(&LLFloaterPreference::onClickBlockList, this));
+	
+	sSkin = gSavedSettings.getString("SkinCurrent");
+
 	mCommitCallbackRegistrar.add("Pref.CommitDoubleClickChekbox",	boost::bind(&LLFloaterPreference::onDoubleClickCheckBox, this, _1));
 	mCommitCallbackRegistrar.add("Pref.CommitRadioDoubleClick",	boost::bind(&LLFloaterPreference::onDoubleClickRadio, this));
 
-	sSkin = gSavedSettings.getString("SkinCurrent");
-	
 	gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged,  _2));	
 	gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged,  _2));	
 	gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged,  _2));
+
+	LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
 }
 
+void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType type )
+{
+	if ( APT_PROPERTIES == type )
+	{
+		const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( pData );
+		if( pAvatarData && gAgent.getID() == pAvatarData->avatar_id )
+		{
+			storeAvatarProperties( pAvatarData );
+			processProfileProperties( pAvatarData );
+		}
+	}	
+}
+
+void LLFloaterPreference::storeAvatarProperties( const LLAvatarData* pAvatarData )
+{
+	mAvatarProperties.avatar_id		= gAgent.getID();
+	mAvatarProperties.image_id		= pAvatarData->image_id;
+	mAvatarProperties.fl_image_id   = pAvatarData->fl_image_id;
+	mAvatarProperties.about_text	= pAvatarData->about_text;
+	mAvatarProperties.fl_about_text = pAvatarData->fl_about_text;
+	mAvatarProperties.profile_url   = pAvatarData->profile_url;
+	mAvatarProperties.flags		    = pAvatarData->flags;
+	mAvatarProperties.allow_publish	= pAvatarData->flags & AVATAR_ALLOW_PUBLISH;
+}
+
+void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarData )
+{
+	getChild<LLUICtrl>("online_searchresults")->setValue( (bool)(pAvatarData->flags & AVATAR_ALLOW_PUBLISH) );	
+}
+
+void LLFloaterPreference::saveAvatarProperties( void )
+{
+	mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue();
+	if ( mAvatarProperties.allow_publish )
+	{
+		mAvatarProperties.flags |= AVATAR_ALLOW_PUBLISH;
+	}
+	
+	LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties );
+}
+
+
 BOOL LLFloaterPreference::postBuild()
 {
 	gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));
 
 void LLFloaterPreference::apply()
 {
+	LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
+	
 	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
 	if (sSkin != gSavedSettings.getString("SkinCurrent"))
 	{
 		}
 	}
 
+	saveAvatarProperties();
+
 	if (mDoubleClickActionDirty)
 	{
 		updateDoubleClickSettings();
 
 void LLFloaterPreference::onOpen(const LLSD& key)
 {
+	
 	// this variable and if that follows it are used to properly handle busy mode response message
 	static bool initialized = FALSE;
 	// if user is logged in and we haven't initialized busy_response yet, do it
 		(gAgent.isMature() || gAgent.isGodlike());
 	
 	LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox");
-	
+	LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest( gAgent.getID() );
 	if (can_choose_maturity)
 	{		
 		// if they're not adult or a god, they shouldn't see the adult selection, so delete it

indra/newview/llfloaterpreference.h

 #define LL_LLFLOATERPREFERENCE_H
 
 #include "llfloater.h"
+#include "llavatarpropertiesprocessor.h"
 
 class LLPanelPreference;
 class LLPanelLCD;
 
 
 // Floater to control preferences (display, audio, bandwidth, general.
-class LLFloaterPreference : public LLFloater
+class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver
 {
 public: 
 	LLFloaterPreference(const LLSD& key);
 	// translate user's busy response message according to current locale if message is default, otherwise do nothing
 	static void initBusyResponse();
 
+	void processProperties( void* pData, EAvatarProcessorType type );
+	void processProfileProperties(const LLAvatarData* pAvatarData );
+	void storeAvatarProperties( const LLAvatarData* pAvatarData );
+	void saveAvatarProperties( void );
+
 protected:	
 	void		onBtnOK();
 	void		onBtnCancel();
 	
 	bool mOriginalHideOnlineStatus;
 	std::string mDirectoryVisibility;
+	
+	LLAvatarData mAvatarProperties;
 };
 
 class LLPanelPreference : public LLPanel

indra/newview/llfloaterworldmap.cpp

 #include "llweb.h"
 #include "llslider.h"
 #include "message.h"
-
 #include "llwindow.h"			// copyTextToClipboard()
 
 //---------------------------------------------------------------------------
 {
 public:
 	// requires trusted browser to trigger
-	LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) { }
-
+	LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE ) { }
+	
 	bool handle(const LLSD& params, const LLSD& query_map,
 				LLMediaCtrl* web)
 	{
 			LLFloaterReg::showInstance("world_map", "center");
 			return true;
 		}
-
+		
 		// support the secondlife:///app/worldmap/{LOCATION}/{COORDS} SLapp
 		const std::string region_name = LLURI::unescape(params[0].asString());
 		S32 x = (params.size() > 1) ? params[1].asInteger() : 128;
 		S32 y = (params.size() > 2) ? params[2].asInteger() : 128;
 		S32 z = (params.size() > 3) ? params[3].asInteger() : 0;
-
+		
 		LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z);
 		LLFloaterReg::showInstance("world_map", "center");
-
+		
 		return true;
 	}
 };
 LLWorldMapHandler gWorldMapHandler;
 
+// SocialMap handler secondlife:///app/maptrackavatar/id
+class LLMapTrackAvatarHandler : public LLCommandHandler
+{
+public:
+	// requires trusted browser to trigger
+	LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_THROTTLE) 
+	{ 
+	}
+	
+	bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+	{
+		//Make sure we have some parameters
+		if (params.size() == 0)
+		{
+			return false;
+		}
+		
+		//Get the ID
+		LLUUID id;
+		if (!id.set( params[0], FALSE ))
+		{
+			return false;
+		}
+		
+		LLFloaterWorldMap::getInstance()->avatarTrackFromSlapp( id  ); 
+		LLFloaterReg::showInstance( "world_map", "center" );
+		
+		return true;
+	}
+};	
+LLMapTrackAvatarHandler gMapTrackAvatar;
 
 LLFloaterWorldMap* gFloaterWorldMap = NULL;
 
 	virtual ~LLMapInventoryObserver() {}
 	virtual void changed(U32 mask);
 };
-  
+
 void LLMapInventoryObserver::changed(U32 mask)
 {
 	// if there's a change we're interested in.
 
 LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
 :	LLFloater(key),
-	mInventory(NULL),
-	mInventoryObserver(NULL),
-	mFriendObserver(NULL),
-	mCompletingRegionName(),
-	mCompletingRegionPos(),
-	mWaitingForTracker(FALSE),
-	mIsClosing(FALSE),
-	mSetToUserPosition(TRUE),
-	mTrackedLocation(0,0,0),
-	mTrackedStatus(LLTracker::TRACKING_NOTHING)
+mInventory(NULL),
+mInventoryObserver(NULL),
+mFriendObserver(NULL),
+mCompletingRegionName(),
+mCompletingRegionPos(),
+mWaitingForTracker(FALSE),
+mIsClosing(FALSE),
+mSetToUserPosition(TRUE),
+mTrackedLocation(0,0,0),
+mTrackedStatus(LLTracker::TRACKING_NOTHING)
 {
 	gFloaterWorldMap = this;
 	
 	mCommitCallbackRegistrar.add("WMap.ShowAgent",		boost::bind(&LLFloaterWorldMap::onShowAgentBtn, this));		
 	mCommitCallbackRegistrar.add("WMap.Clear",			boost::bind(&LLFloaterWorldMap::onClearBtn, this));		
 	mCommitCallbackRegistrar.add("WMap.CopySLURL",		boost::bind(&LLFloaterWorldMap::onCopySLURL, this));
-
+	
 	gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterWorldMap::onChangeMaturity, this));
 }
 
 BOOL LLFloaterWorldMap::postBuild()
 {
 	mPanel = getChild<LLPanel>("objects_mapview");
-
+	
 	LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
 	avatar_combo->selectFirstItem();
 	avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
 	avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
-
+	
 	LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
 	location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
 	location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
 	
 	getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
-
+	
 	LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
 	landmark_combo->selectFirstItem();
 	landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
 	landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
-
+	
 	mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
 	getChild<LLUICtrl>("zoom slider")->setValue(LLWorldMapView::sMapScale);
-
+	
 	setDefaultBtn(NULL);
-
+	
 	mZoomTimer.stop();
-
+	
 	onChangeMaturity();
-
+	
 	return TRUE;
 }
 
 {
 	// All cleaned up by LLView destructor
 	mPanel = NULL;
-
+	
 	// Inventory deletes all observers on shutdown
 	mInventory = NULL;
 	mInventoryObserver = NULL;
-
+	
 	// avatar tracker will delete this for us.
 	mFriendObserver = NULL;
 	
 void LLFloaterWorldMap::onOpen(const LLSD& key)
 {
 	bool center_on_target = (key.asString() == "center");
-
+	
 	mIsClosing = FALSE;
-
+	
 	LLWorldMapView* map_panel;
 	map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
 	map_panel->clearLastClick();
-
+	
 	{
 		// reset pan on show, so it centers on you again
 		if (!center_on_target)
 			LLWorldMapView::setPan(0, 0, TRUE);
 		}
 		map_panel->updateVisibleBlocks();
-
+		
 		// Reload items as they may have changed
 		LLWorldMap::getInstance()->reloadItems();
-
+		
 		// We may already have a bounding box for the regions of the world,
 		// so use that to adjust the view.
 		adjustZoomSliderBounds();
-
+		
 		// Could be first show
 		//LLFirstUse::useMap();
-
+		
 		// Start speculative download of landmarks
 		const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
 		LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id);
-
+		
 		getChild<LLUICtrl>("location")->setFocus( TRUE);
 		gFocusMgr.triggerFocusFlash();
-
+		
 		buildAvatarIDList();
 		buildLandmarkIDLists();
-
+		
 		// If nothing is being tracked, set flag so the user position will be found
 		mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
 	}
 			return TRUE;
 		}
 	}
-
+	
 	return LLFloater::handleScrollWheel(x, y, clicks);
 }
 
 	bool agent_on_prelude = (regionp && regionp->isPrelude());
 	bool enable_go_home = gAgent.isGodlike() || !agent_on_prelude;
 	getChildView("Go Home")->setEnabled(enable_go_home);
-
+	
 	updateLocation();
 	
 	LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); 
 	{
 		getChild<LLUICtrl>("avatar_icon")->setColor( map_track_disabled_color);
 	}
-
+	
 	if (LLTracker::TRACKING_LANDMARK == tracking_status)
 	{
 		getChild<LLUICtrl>("landmark_icon")->setColor( map_track_color);
 	{
 		getChild<LLUICtrl>("landmark_icon")->setColor( map_track_disabled_color);
 	}
-
+	
 	if (LLTracker::TRACKING_LOCATION == tracking_status)
 	{
 		getChild<LLUICtrl>("location_icon")->setColor( map_track_color);
 			getChild<LLUICtrl>("location_icon")->setColor( map_track_disabled_color);
 		}
 	}
-
+	
 	// check for completion of tracking data
 	if (mWaitingForTracker)
 	{
 		centerOnTarget(TRUE);
 	}
-
+	
 	getChildView("Teleport")->setEnabled((BOOL)tracking_status);
-//	getChildView("Clear")->setEnabled((BOOL)tracking_status);
+	//	getChildView("Clear")->setEnabled((BOOL)tracking_status);
 	getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
 	getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
-
+	
 	setMouseOpaque(TRUE);
 	getDragHandle()->setMouseOpaque(TRUE);
-
+	
 	//RN: snaps to zoom value because interpolation caused jitter in the text rendering
 	if (!mZoomTimer.getStarted() && mCurZoomVal != (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal())
 	{
 	mCurZoomVal = lerp(mCurZoomVal, (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal(), interp);
 	F32 map_scale = 256.f*pow(2.f, mCurZoomVal);
 	LLWorldMapView::setScale( map_scale );
-
+	
 	// Enable/disable checkboxes depending on the zoom level
 	// If above threshold level (i.e. low res) -> Disable all checkboxes
 	// If under threshold level (i.e. high res) -> Enable all checkboxes
 {
 	LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo");
 	if (!iface) return;
-
+	
 	buildAvatarIDList();
 	if(iface->setCurrentByID(avatar_id) || gAgent.isGodlike())
 	{
 {
 	LLCtrlSelectionInterface *iface = childGetSelectionInterface("landmark combo");
 	if (!iface) return;
-
+	
 	buildLandmarkIDLists();
 	BOOL found = FALSE;
 	S32 idx;
 			break;
 		}
 	}
-
+	
 	if (found && iface->setCurrentByID( landmark_item_id ) ) 
 	{
 		LLUUID asset_id = mLandmarkAssetIDList.get( idx );
 		if (combo) name = combo->getSimple();
 		mTrackedStatus = LLTracker::TRACKING_LANDMARK;
 		LLTracker::trackLandmark(mLandmarkAssetIDList.get( idx ),	// assetID
-								mLandmarkItemIDList.get( idx ), // itemID
-								name);			// name
-
+								 mLandmarkItemIDList.get( idx ), // itemID
+								 name);			// name
+		
 		if( asset_id != sHomeID )
 		{
 			// start the download process
 			gLandmarkList.getAsset( asset_id);
 		}
-
+		
 		// We have to download both region info and landmark data, so set busy. JC
-//		getWindow()->incBusyCount();
+		//		getWindow()->incBusyCount();
 	}
 	else
 	{
 		S32 world_y = S32(pos_global.mdV[1] / 256);
 		LLWorldMapMessage::getInstance()->sendMapBlockRequest(world_x, world_y, world_x, world_y, true);
 		setDefaultBtn("");
-
+		
 		// clicked on a non-region - turn off coord display
 		enableTeleportCoordsDisplay( false );
-
+		
 		return;
 	}
 	if (sim_info->isDown())
 		LLWorldMap::getInstance()->setTrackingInvalid();
 		LLTracker::stopTracking(NULL);
 		setDefaultBtn("");
-
+		
 		// clicked on a down region - turn off coord display
 		enableTeleportCoordsDisplay( false );
-
+		
 		return;
 	}
-
+	
 	std::string sim_name = sim_info->getName();
 	F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
 	F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
 	std::string full_name = llformat("%s (%d, %d, %d)", 
-								  sim_name.c_str(), 
-								  llround(region_x), 
-								  llround(region_y),
-								  llround((F32)pos_global.mdV[VZ]));
-
+									 sim_name.c_str(), 
+									 llround(region_x), 
+									 llround(region_y),
+									 llround((F32)pos_global.mdV[VZ]));
+	
 	std::string tooltip("");
 	mTrackedStatus = LLTracker::TRACKING_LOCATION;
 	LLTracker::trackLocation(pos_global, full_name, tooltip);
 	LLWorldMap::getInstance()->cancelTracking();		// The floater is taking over the tracking
-
+	
 	LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
 	updateTeleportCoordsDisplay( coord_pos );
-
+	
 	// we have a valid region - turn on coord display
 	enableTeleportCoordsDisplay( true );
-
+	
 	setDefaultBtn("Teleport");
 }
 
 {
 	// if we're going to update their value, we should also enable them
 	enableTeleportCoordsDisplay( true );
-
+	
 	// convert global specified position to a local one
 	F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
 	F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
 void LLFloaterWorldMap::updateLocation()
 {
 	bool gotSimName;
-
+	
 	LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus();
-
+	
 	// These values may get updated by a message, so need to check them every frame
 	// The fields may be changed by the user, so only update them if the data changes
 	LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
 	if (pos_global.isExactlyZero())
 	{
 		LLVector3d agentPos = gAgent.getPositionGlobal();
-
+		
 		// Set to avatar's current postion if nothing is selected
 		if ( status == LLTracker::TRACKING_NOTHING && mSetToUserPosition )
 		{
 			if ( gotSimName )
 			{
 				mSetToUserPosition = FALSE;
-
+				
 				// Fill out the location field
 				getChild<LLUICtrl>("location")->setValue(agent_sim_name);
-
+				
 				// update the coordinate display with location of avatar in region
 				updateTeleportCoordsDisplay( agentPos );
-
+				
 				// Figure out where user is
 				// Set the current SLURL
 				mSLURL = LLSLURL(agent_sim_name, gAgent.getPositionGlobal());
 			}
 		}
-
+		
 		return; // invalid location
 	}
 	std::string sim_name;
 				pos_global[2] = 200;
 			}
 		}
-
+		
 		getChild<LLUICtrl>("location")->setValue(sim_name);
-
+		
 		// refresh coordinate display to reflect where user clicked.
 		LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
 		updateTeleportCoordsDisplay( coord_pos );
-
+		
 		// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
 		if ( gotSimName )
 		{
-		  mSLURL = LLSLURL(sim_name, pos_global);
+			mSLURL = LLSLURL(sim_name, pos_global);
 		}
 		else
 		{	// Empty SLURL will disable the "Copy SLURL to clipboard" button
 	{
 		// fill in UI based on URL
 		gFloaterWorldMap->getChild<LLUICtrl>("location")->setValue(region_name);
-
+		
 		// Save local coords to highlight position after region global
 		// position is returned.
 		gFloaterWorldMap->mCompletingRegionPos.set(
-			(F32)x_coord, (F32)y_coord, (F32)z_coord);
-
+												   (F32)x_coord, (F32)y_coord, (F32)z_coord);
+		
 		// pass sim name to combo box
 		gFloaterWorldMap->mCompletingRegionName = region_name;
 		LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name);
 {
 	LLCtrlListInterface *list = childGetListInterface("friend combo");
 	if (!list) return;
-
+	
     // Delete all but the "None" entry
 	S32 list_size = list->getItemCount();
 	if (list_size > 1)
 		list->selectItemRange(1, -1);
 		list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
 	}
-
+	
 	// Get all of the calling cards for avatar that are currently online
 	LLCollectMappableBuddies collector;
 	LLAvatarTracker::instance().applyFunctor(collector);
 	{
 		list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
 	}
-
+	
 	list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
 	list->selectFirstItem();
 }
 {
 	LLCtrlListInterface *list = childGetListInterface("landmark combo");
 	if (!list) return;
-
+	
     // Delete all but the "None" entry
 	S32 list_size = list->getItemCount();
 	if (list_size > 1)
 		list->selectItemRange(1, -1);
 		list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
 	}
-
+	
 	mLandmarkItemIDList.reset();
 	mLandmarkAssetIDList.reset();
-
+	
 	// Get all of the current landmarks
 	mLandmarkAssetIDList.put( LLUUID::null );
 	mLandmarkItemIDList.put( LLUUID::null );
-
+	
 	mLandmarkAssetIDList.put( sHomeID );
 	mLandmarkItemIDList.put( sHomeID );
-
+	
 	LLInventoryModel::cat_array_t cats;
 	LLInventoryModel::item_array_t items;
 	LLIsType is_landmark(LLAssetType::AT_LANDMARK);
 									items,
 									LLInventoryModel::EXCLUDE_TRASH,
 									is_landmark);
-
+	
 	std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
 	
 	S32 count = items.count();
 	for(S32 i = 0; i < count; ++i)
 	{
 		LLInventoryItem* item = items.get(i);
-
+		
 		list->addSimpleElement(item->getName(), ADD_BOTTOM, item->getUUID());
-
+		
 		mLandmarkAssetIDList.put( item->getAssetUUID() );
 		mLandmarkItemIDList.put( item->getUUID() );
 	}
-
+	
 	list->selectFirstItem();
 }
 
 	// Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window.
 	S32 world_width_regions	 = MAX_VISIBLE_REGIONS;
 	S32 world_height_regions = MAX_VISIBLE_REGIONS;
-
+	
 	// Find how much space we have to display the world
 	LLWorldMapView* map_panel;
 	map_panel = (LLWorldMapView*)mPanel;
 	LLRect view_rect = map_panel->getRect();
-
+	
 	// View size in pixels
 	S32 view_width = view_rect.getWidth();
 	S32 view_height = view_rect.getHeight();
-
+	
 	// Pixels per region to display entire width/height
 	F32 width_pixels_per_region = (F32) view_width / (F32) world_width_regions;
 	F32 height_pixels_per_region = (F32) view_height / (F32) world_height_regions;
-
+	
 	F32 pixels_per_region = llmin(width_pixels_per_region,
 								  height_pixels_per_region);
-
+	
 	// Round pixels per region to an even number of slider increments
 	S32 slider_units = llfloor(pixels_per_region / 0.2f);
 	pixels_per_region = slider_units * 0.2f;
-
+	
 	// Make sure the zoom slider can be moved at least a little bit.
 	// Likewise, less than the increment pixels per region is just silly.
 	pixels_per_region = llclamp(pixels_per_region, 1.f, ZOOM_MAX);
-
+	
 	F32 min_power = log(pixels_per_region/256.f)/log(2.f);
 	
 	getChild<LLSlider>("zoom slider")->setMinValue(min_power);
 	{
 		return;
 	}
-
+	
 	LLCtrlListInterface *list = childGetListInterface("landmark combo");
 	if (!list) return;
-
+	
 	LLUUID current_choice = list->getCurrentID();
-
+	
 	buildLandmarkIDLists();
-
+	
 	if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
 	{
 		LLTracker::stopTracking(NULL);
 	}
-
+	
 }
 
 void LLFloaterWorldMap::onComboTextEntry()
 	{
 		return;
 	}
-
+	
 	LLCtrlListInterface *list = childGetListInterface("landmark combo");
 	if (!list) return;
-
+	
 	LLUUID asset_id;
 	LLUUID item_id = list->getCurrentID();
-
+	
 	LLTracker::stopTracking(NULL);
-
+	
 	//RN: stopTracking() clears current combobox selection, need to reassert it here
 	list->setCurrentByID(item_id);
-
+	
 	if( item_id.isNull() )
 	{
 	}
 	
 	trackLandmark( item_id);
 	onShowTargetBtn();
-
+	
 	// Reset to user postion if nothing is tracked
 	mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
 }
 	{
 		return;
 	}
-
+	
 	LLCtrlListInterface *list = childGetListInterface("friend combo");
 	if (!list) return;
-
+	
 	LLUUID current_choice;
-
+	
 	if( LLAvatarTracker::instance().haveTrackingInfo() )
 	{
 		current_choice = LLAvatarTracker::instance().getAvatarID();
 	}
-
+	
 	buildAvatarIDList();
-
+	
 	if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
 	{
 		LLTracker::stopTracking(NULL);
 	{
 		return;
 	}
-
+	
 	LLCtrlListInterface *list = childGetListInterface("friend combo");
 	if (!list) return;
-
+	
 	const LLUUID& new_avatar_id = list->getCurrentID();
 	if (new_avatar_id.notNull())
 	{
 	}
 }
 
+void LLFloaterWorldMap::avatarTrackFromSlapp( const LLUUID& id ) 
+{
+	trackAvatar( id, "av" );		
+	onShowTargetBtn();
+}
+
 void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus )
 {
 	updateSearchEnabled();
 	{
 		return;
 	}
-
+	
 	clearLocationSelection(FALSE);
 	mCompletingRegionName = "";
 	mLastRegionName = "";
-
+	
 	std::string str = getChild<LLUICtrl>("location")->getValue().asString();
-
+	
 	// Trim any leading and trailing spaces in the search target
 	std::string saved_str = str;
 	LLStringUtil::trim( str );
 	{	// Set the value in the UI if any spaces were removed
 		getChild<LLUICtrl>("location")->setValue(str);
 	}
-
+	
 	LLStringUtil::toLower(str);
 	mCompletingRegionName = str;
 	LLWorldMap::getInstance()->setTrackingCommit();
 	{
 		return;
 	}
-
+	
 	S32 x_coord = (S32)childGetValue("teleport_coordinate_x").asReal();
 	S32 y_coord = (S32)childGetValue("teleport_coordinate_y").asReal();
 	S32 z_coord = (S32)childGetValue("teleport_coordinate_z").asReal();
-
+	
 	const std::string region_name = childGetValue("location").asString();
-
+	
 	trackURL( region_name, x_coord, y_coord, z_coord );
 }
 
 	
 	LLSD args;
 	args["SLURL"] = mSLURL.getSLURLString();
-
+	
 	LLNotificationsUtil::add("CopySLURL", args);
 }
 
 		else
 		{
 			// We've got the position finally, so we're no longer busy. JC
-//			getWindow()->decBusyCount();
+			//			getWindow()->decBusyCount();
 			pos_global = LLTracker::getTrackedPositionGlobal() - gAgentCamera.getCameraPositionGlobal();
 		}
 	}
 	else if(LLWorldMap::getInstance()->isTracking())
 	{
 		pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal() - gAgentCamera.getCameraPositionGlobal();;
-
-
-
+		
+		
+		
 	}
 	else
 	{
 		// default behavior = center on agent
 		pos_global.clearVec();
 	}
-
+	
 	LLWorldMapView::setPan( -llfloor((F32)(pos_global.mdV[VX] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)), 
-							-llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
-							!animate);
+						   -llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
+						   !animate);
 	mWaitingForTracker = FALSE;
 }
 
 void LLFloaterWorldMap::fly()
 {
 	LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
-
+	
 	// Start the autopilot and close the floater, 
 	// so we can see where we're flying
 	if (!pos_global.isExactlyZero())
 	BOOL teleport_home = FALSE;
 	LLVector3d pos_global;
 	LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
-
+	
 	LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
 	if (LLTracker::TRACKING_AVATAR == tracking_status
 		&& av_tracker.haveTrackingInfo() )
 			   && landmark->getRegionID(region_id))
 			{
 				LLLandmark::requestRegionHandle(
-					gMessageSystem,
-					gAgent.getRegionHost(),
-					region_id,
-					NULL);
+												gMessageSystem,
+												gAgent.getRegionHost(),
+												region_id,
+												NULL);
 			}
 		}
 	}
 	{
 		make_ui_sound("UISndInvalidOp");
 	}
-
+	
 	// Do the teleport, which will also close the floater
 	if (teleport_home)
 	{
 {
 	BOOL has_destination = FALSE;
 	LLUUID destination_id; // Null means "home"
-
+	
 	if( LLTracker::getTrackedLandmarkAssetID() == sHomeID )
 	{
 		has_destination = TRUE;
 			if(landmark->getRegionID(region_id))
 			{
 				LLLandmark::requestRegionHandle(
-					gMessageSystem,
-					gAgent.getRegionHost(),
-					region_id,
-					NULL);
+												gMessageSystem,
+												gAgent.getRegionHost(),
+												region_id,
+												NULL);
 			}
 		}
 	}
-
+	
 	if( has_destination )
 	{
 		gAgent.teleportViaLandmark( destination_id );
 	{
 		return;
 	}
-
+	
 	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("search_results");
 	list->operateOnAll(LLCtrlListInterface::OP_DELETE);
-
+	
 	S32 name_length = mCompletingRegionName.length();
-
+	
 	LLSD match;
 	
 	S32 num_results = 0;
 		LLSimInfo* info = it->second;
 		std::string sim_name_lower = info->getName();
 		LLStringUtil::toLower(sim_name_lower);
-
+		
 		if (sim_name_lower.substr(0, name_length) == mCompletingRegionName)
 		{
 			if (sim_name_lower == mCompletingRegionName)
 			num_results++;
 		}
 	}
-
+	
 	if (found_null_sim)
 	{
 		mCompletingRegionName = "";
 	}
-
+	
 	// if match found, highlight it and go
 	if (!match.isUndefined())
 	{
 		getChild<LLUICtrl>("search_results")->setFocus(TRUE);
 		onCommitSearchResult();
 	}
-
+	
 	// if we found nothing, say "none"
 	if (num_results == 0)
 	{
 {
 	LLCtrlListInterface *list = childGetListInterface("search_results");
 	if (!list) return;
-
+	
 	LLSD selected_value = list->getSelectedValue();
 	std::string sim_name = selected_value.asString();
 	if (sim_name.empty())
 		return;
 	}
 	LLStringUtil::toLower(sim_name);
-
+	
 	std::map<U64, LLSimInfo*>::const_iterator it;
 	for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it)
 	{
 		LLSimInfo* info = it->second;
-
+		
 		if (info->isName(sim_name))
 		{
 			LLVector3d pos_global = info->getGlobalOrigin();
-
+			
 			const F64 SIM_COORD_DEFAULT = 128.0;
 			LLVector3 pos_local(SIM_COORD_DEFAULT, SIM_COORD_DEFAULT, 0.0f);
-
+			
 			// Did this value come from a trackURL() request?
 			if (!mCompletingRegionPos.isExactlyZero())
 			{
 			pos_global.mdV[VX] += (F64)pos_local.mV[VX];
 			pos_global.mdV[VY] += (F64)pos_local.mV[VY];
 			pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];
-
+			
 			getChild<LLUICtrl>("location")->setValue(sim_name);
 			trackLocation(pos_global);
 			setDefaultBtn("Teleport");
 			break;
 		}
 	}
-
+	
 	onShowTargetBtn();
 }
 
 {
 	bool can_access_mature = gAgent.canAccessMature();
 	bool can_access_adult = gAgent.canAccessAdult();
-
+	
 	getChildView("events_mature_icon")->setVisible( can_access_mature);
 	getChildView("events_mature_label")->setVisible( can_access_mature);
 	getChildView("events_mature_chk")->setVisible( can_access_mature);
-
+	
 	getChildView("events_adult_icon")->setVisible( can_access_adult);
 	getChildView("events_adult_label")->setVisible( can_access_adult);
 	getChildView("events_adult_chk")->setVisible( can_access_adult);
-
+	
 	// disable mature / adult events.
 	if (!can_access_mature)
 	{

indra/newview/llfloaterworldmap.h

 	// teleport to the tracked item, if there is one
 	void			teleport();
 	void			onChangeMaturity();
+	
+	
+	//Slapp instigated avatar tracking
+	void			avatarTrackFromSlapp( const LLUUID& id ); 
+
 protected:	
 	void			onGoHome();
 

indra/newview/llinventorypanel.cpp

 {
 	S32 z_min = S32_MAX;
 	LLInventoryPanel* res = NULL;
+	LLFloater* active_inv_floaterp = NULL;
+
 	// A. If the inventory side panel is open, use that preferably.
 	if (is_inventorysp_active())
 	{
 		{
 			res = inventorySP->getActivePanel();
 			z_min = gFloaterView->getZOrder(inv_floater);
+			active_inv_floaterp = inv_floater;
 		}
 		else
 		{
 			{
 				res = iv->getPanel();
 				z_min = z_order;
+				active_inv_floaterp = iv;
 			}
 		}
 	}
-	if (res) return res;
+
+	if (res)
+	{
+		// Make sure the floater is not minimized (STORM-438).
+		if (active_inv_floaterp && active_inv_floaterp->isMinimized())
+			active_inv_floaterp->setMinimized(FALSE);
+
+		return res;
+	}
 		
 	// C. If no panels are open and we don't want to force open a panel, then just abort out.
 	if (!auto_open) return NULL;

indra/newview/llpanelavatar.cpp

 
 BOOL LLPanelAvatarProfile::postBuild()
 {
+	childSetCommitCallback("see_profile_btn",(boost::bind(&LLPanelAvatarProfile::onSeeProfileBtnClick,this)),NULL);
 	childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
 	childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
 	childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
 	getChild<LLUICtrl>("sl_groups")->setValue(groups);
 }
 
+void LLPanelAvatarProfile::got_full_name_callback( const LLUUID& id, const std::string& full_name, bool is_group )
+{
+	LLStringUtil::format_map_t args;
+
+	std::string name;
+	if (LLAvatarNameCache::useDisplayNames())
+	{
+		name = LLCacheName::buildUsername(full_name);
+	}
+	else
+	{
+		name = full_name;
+	}
+
+	args["[NAME]"] = name;
+
+	std::string linden_name = getString("name_text_args", args);
+	getChild<LLUICtrl>("name_descr_text")->setValue(linden_name);
+}
+
+void LLPanelAvatarProfile::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
+{
+	LLStringUtil::format_map_t args;
+	args["[DISPLAY_NAME]"] = av_name.mDisplayName;
+
+	std::string display_name = getString("display_name_text_args", args);
+	getChild<LLUICtrl>("display_name_descr_text")->setValue(display_name);
+}
+
 void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)
 {
 	//remove avatar id from cache to get fresh info
 		LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) avatar_data->born_on.secondsSinceEpoch()));
 		args["[REG_DATE]"] = birth_date;
 	}
+
+	// ask (asynchronously) for the avatar name
+	std::string full_name;
+	if (gCacheName->getFullName(avatar_data->agent_id, full_name))
+	{
+		// name in cache, call callback directly
+		got_full_name_callback( avatar_data->agent_id, full_name, false );
+	}
+	else
+	{
+		// not in cache, lookup name 
+		gCacheName->get(avatar_data->agent_id, false, boost::bind( &LLPanelAvatarProfile::got_full_name_callback, this, _1, _2, _3 ));
+	}
+
+	// get display name
+	LLAvatarNameCache::get(avatar_data->avatar_id,
+		boost::bind(&LLPanelAvatarProfile::onNameCache, this, _1, _2));
+
 	args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now());
 	std::string register_date = getString("RegisterDateFormat", args);
 	getChild<LLUICtrl>("register_date")->setValue(register_date );
 	LLAvatarActions::requestFriendshipDialog(getAvatarId());
 }
 
+void LLPanelAvatarProfile::onSeeProfileBtnClick()
+{
+	LLAvatarActions::showProfile(getAvatarId());
+}
+
 void LLPanelAvatarProfile::onIMButtonClick()
 {
 	LLAvatarActions::startIM(getAvatarId());

indra/newview/llpanelavatar.h

-/** 
- * @file llpanelavatar.h
- * @brief LLPanelAvatar and related class definitions
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLPANELAVATAR_H
-#define LL_LLPANELAVATAR_H
-
-#include "llpanel.h"
-#include "llavatarpropertiesprocessor.h"
-#include "llcallingcard.h"
-#include "llvoiceclient.h"
-
-class LLComboBox;
-class LLLineEditor;
-
-enum EOnlineStatus
-{
-	ONLINE_STATUS_NO      = 0,
-	ONLINE_STATUS_YES     = 1
-};
-
-/**
-* Base class for any Profile View or My Profile Panel.
-*/
-class LLPanelProfileTab
-	: public LLPanel
-	, public LLAvatarPropertiesObserver
-{
-public:
-
-	/**
-	 * Sets avatar ID, sets panel as observer of avatar related info replies from server.
-	 */
-	virtual void setAvatarId(const LLUUID& id);
-
-	/**
-	 * Returns avatar ID.
-	 */
-	virtual const LLUUID& getAvatarId() { return mAvatarId; }
-
-	/**
-	 * Sends update data request to server.
-	 */
-	virtual void updateData() = 0;
-
-	/**
-	 * Clears panel data if viewing avatar info for first time and sends update data request.
-	 */
-	virtual void onOpen(const LLSD& key);
-
-	/**
-	 * Profile tabs should close any opened panels here.
-	 *
-	 * Called from LLPanelProfile::onOpen() before opening new profile.
-	 * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel
-	 * before new profile is displayed, otherwise new profile will 
-	 * be hidden behind picture info panel.
-	 */
-	virtual void onClosePanel() {}
-
-	/**
-	 * Resets controls visibility, state, etc.
-	 */
-	virtual void resetControls(){};
-
-	/**
-	 * Clears all data received from server.
-	 */
-	virtual void resetData(){};
-
-	/*virtual*/ ~LLPanelProfileTab();
-
-protected:
-
-	LLPanelProfileTab();
-
-	/**
-	 * Scrolls panel to top when viewing avatar info for first time.
-	 */
-	void scrollToTop();
-
-	virtual void onMapButtonClick();
-
-	virtual void updateButtons();
-
-private:
-
-	LLUUID mAvatarId;
-};
-
-/**
-* Panel for displaying Avatar's first and second life related info.
-*/
-class LLPanelAvatarProfile
-	: public LLPanelProfileTab
-	, public LLFriendObserver
-	, public LLVoiceClientStatusObserver
-{
-public:
-	LLPanelAvatarProfile();
-	/*virtual*/ ~LLPanelAvatarProfile();
-
-	/*virtual*/ void onOpen(const LLSD& key);
-
-	/**
-	 * LLFriendObserver trigger
-	 */
-	virtual void changed(U32 mask);
-
-	// Implements LLVoiceClientStatusObserver::onChange() to enable the call
-	// button when voice is available
-	/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
-	/*virtual*/ void setAvatarId(const LLUUID& id);
-
-	/**
-	 * Processes data received from server.
-	 */
-	/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
-
-	/*virtual*/ BOOL postBuild();
-
-	/*virtual*/ void updateData();
-
-	/*virtual*/ void resetControls();
-
-	/*virtual*/ void resetData();
-
-protected:
-
-	/**
-	 * Process profile related data received from server.
-	 */
-	virtual void processProfileProperties(const LLAvatarData* avatar_data);
-
-	/**
-	 * Processes group related data received from server.
-	 */
-	virtual void processGroupProperties(const LLAvatarGroups* avatar_groups);
-
-	/**
-	 * Fills common for Avatar profile and My Profile fields.
-	 */
-	virtual void fillCommonData(const LLAvatarData* avatar_data);
-
-	/**
-	 * Fills partner data.
-	 */
-	virtual void fillPartnerData(const LLAvatarData* avatar_data);
-
-	/**
-	 * Fills account status.
-	 */
-	virtual void fillAccountStatus(const LLAvatarData* avatar_data);
-
-	/**
-	 * Opens "Pay Resident" dialog.
-	 */
-	void pay();
-
-	/**
-	 * opens inventory and IM for sharing items
-	 */
-	void share();
-
-	/**
-	 * Add/remove resident to/from your block list.
-	 */
-	void toggleBlock();
-
-	void kick();
-	void freeze();
-	void unfreeze();
-	void csr();
-	
-	bool enableShowOnMap();
-	bool enableBlock();
-	bool enableUnblock();
-	bool enableGod();
-
-
-	void onAddFriendButtonClick();
-	void onIMButtonClick();
-	void onCallButtonClick();
-	void onTeleportButtonClick();
-	void onShareButtonClick();
-
-private:
-
-	typedef std::map< std::string,LLUUID>	group_map_t;
-	group_map_t 			mGroups;
-};
-
-/**
- * Panel for displaying own first and second life related info.
- */
-class LLPanelMyProfile
-	: public LLPanelAvatarProfile
-{
-public:
-	LLPanelMyProfile();
-
-	/*virtual*/ BOOL postBuild();
-
-protected:
-
-	/*virtual*/ void onOpen(const LLSD& key);
-
-	/*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
-
-	/*virtual*/ void resetControls();
-
-protected:
-	void onStatusMessageChanged();
-};
-
-/**
- * Panel for displaying Avatar's notes and modifying friend's rights.
- */
-class LLPanelAvatarNotes 
-	: public LLPanelProfileTab
-	, public LLFriendObserver
-	, public LLVoiceClientStatusObserver
-{
-public:
-	LLPanelAvatarNotes();
-	/*virtual*/ ~LLPanelAvatarNotes();
-
-	virtual void setAvatarId(const LLUUID& id);
-
-	/** 
-	 * LLFriendObserver trigger
-	 */
-	virtual void changed(U32 mask);
-
-	// Implements LLVoiceClientStatusObserver::onChange() to enable the call
-	// button when voice is available
-	/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
-	/*virtual*/ void onOpen(const LLSD& key);
-
-	/*virtual*/ BOOL postBuild();
-
-	/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
-
-	/*virtual*/ void updateData();
-
-protected:
-
-	/*virtual*/ void resetControls();
-
-	/*virtual*/ void resetData();
-
-	/**
-	 * Fills rights data for friends.
-	 */
-	void fillRightsData();
-
-	void rightsConfirmationCallback(const LLSD& notification,
-			const LLSD& response, S32 rights);
-	void confirmModifyRights(bool grant, S32 rights);
-	void onCommitRights();
-	void onCommitNotes();
-
-	void onAddFriendButtonClick();
-	void onIMButtonClick();
-	void onCallButtonClick();
-	void onTeleportButtonClick();
-	void onShareButtonClick();
-	void enableCheckboxes(bool enable);
-};
-
-#endif // LL_LLPANELAVATAR_H
+/** 
+ * @file llpanelavatar.h
+ * @brief LLPanelAvatar and related class definitions
+ *
+ * $LicenseInfo:firstyear=2004&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELAVATAR_H
+#define LL_LLPANELAVATAR_H
+
+#include "llpanel.h"
+#include "llavatarpropertiesprocessor.h"
+#include "llcallingcard.h"
+#include "llvoiceclient.h"
+#include "llavatarnamecache.h"
+
+class LLComboBox;
+class LLLineEditor;
+
+enum EOnlineStatus
+{
+	ONLINE_STATUS_NO      = 0,
+	ONLINE_STATUS_YES     = 1
+};
+
+/**
+* Base class for any Profile View or My Profile Panel.
+*/
+class LLPanelProfileTab
+	: public LLPanel
+	, public LLAvatarPropertiesObserver
+{
+public:
+
+	/**
+	 * Sets avatar ID, sets panel as observer of avatar related info replies from server.
+	 */
+	virtual void setAvatarId(const LLUUID& id);
+
+	/**
+	 * Returns avatar ID.
+	 */
+	virtual const LLUUID& getAvatarId() { return mAvatarId; }
+
+	/**
+	 * Sends update data request to server.
+	 */
+	virtual void updateData() = 0;
+
+	/**
+	 * Clears panel data if viewing avatar info for first time and sends update data request.
+	 */
+	virtual void onOpen(const LLSD& key);
+
+	/**
+	 * Profile tabs should close any opened panels here.
+	 *
+	 * Called from LLPanelProfile::onOpen() before opening new profile.
+	 * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel
+	 * before new profile is displayed, otherwise new profile will 
+	 * be hidden behind picture info panel.
+	 */
+	virtual void onClosePanel() {}
+
+	/**
+	 * Resets controls visibility, state, etc.
+	 */
+	virtual void resetControls(){};
+
+	/**
+	 * Clears all data received from server.
+	 */
+	virtual void resetData(){};
+
+	/*virtual*/ ~LLPanelProfileTab();
+
+protected:
+
+	LLPanelProfileTab();
+
+	/**
+	 * Scrolls panel to top when viewing avatar info for first time.
+	 */
+	void scrollToTop();
+
+	virtual void onMapButtonClick();
+
+	virtual void updateButtons();
+
+private:
+
+	LLUUID mAvatarId;
+};
+
+/**
+* Panel for displaying Avatar's first and second life related info.
+*/
+class LLPanelAvatarProfile
+	: public LLPanelProfileTab
+	, public LLFriendObserver
+	, public LLVoiceClientStatusObserver
+{
+public:
+	LLPanelAvatarProfile();
+	/*virtual*/ ~LLPanelAvatarProfile();
+
+	/*virtual*/ void onOpen(const LLSD& key);
+
+	/**
+	 * LLFriendObserver trigger
+	 */
+	virtual void changed(U32 mask);
+
+	// Implements LLVoiceClientStatusObserver::onChange() to enable the call
+	// button when voice is available
+	/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+
+	/*virtual*/ void setAvatarId(const LLUUID& id);
+
+	/**
+	 * Processes data received from server.
+	 */
+	/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+	/*virtual*/ BOOL postBuild();
+
+	/*virtual*/ void updateData();
+
+	/*virtual*/ void resetControls();
+
+	/*virtual*/ void resetData();
+
+protected:
+
+	/**
+	 * Process profile related data received from server.
+	 */
+	virtual void processProfileProperties(const LLAvatarData* avatar_data);
+
+	/**
+	 * Processes group related data received from server.
+	 */
+	virtual void processGroupProperties(const LLAvatarGroups* avatar_groups);
+
+	/**
+	 * Fills common for Avatar profile and My Profile fields.
+	 */
+	virtual void fillCommonData(const LLAvatarData* avatar_data);
+
+	/**
+	 * Fills partner data.
+	 */
+	virtual void fillPartnerData(const LLAvatarData* avatar_data);
+
+	/**
+	 * Fills account status.
+	 */
+	virtual void fillAccountStatus(const LLAvatarData* avatar_data);
+
+	/**
+	 * Opens "Pay Resident" dialog.
+	 */
+	void pay();
+
+	/**
+	 * opens inventory and IM for sharing items
+	 */
+	void share();
+
+	/**
+	 * Add/remove resident to/from your block list.
+	 */
+	void toggleBlock();
+
+	void kick();
+	void freeze();
+	void unfreeze();
+	void csr();
+	
+	bool enableShowOnMap();
+	bool enableBlock();
+	bool enableUnblock();
+	bool enableGod();
+
+	void onSeeProfileBtnClick();
+	void onAddFriendButtonClick();
+	void onIMButtonClick();
+	void onCallButtonClick();
+	void onTeleportButtonClick();
+	void onShareButtonClick();
+
+private:
+	void got_full_name_callback( const LLUUID& id, const std::string& full_name, bool is_group );
+	void onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
+
+	typedef std::map< std::string,LLUUID>	group_map_t;
+	group_map_t 			mGroups;
+};
+
+/**
+ * Panel for displaying own first and second life related info.
+ */
+class LLPanelMyProfile
+	: public LLPanelAvatarProfile
+{
+public:
+	LLPanelMyProfile();
+
+	/*virtual*/ BOOL postBuild();
+
+protected:
+
+	/*virtual*/ void onOpen(const LLSD& key);
+
+	/*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
+
+	/*virtual*/ void resetControls();
+
+protected:
+	void onStatusMessageChanged();
+};
+
+/**
+ * Panel for displaying Avatar's notes and modifying friend's rights.
+ */
+class LLPanelAvatarNotes 
+	: public LLPanelProfileTab
+	, public LLFriendObserver
+	, public LLVoiceClientStatusObserver
+{
+public:
+	LLPanelAvatarNotes();
+	/*virtual*/ ~LLPanelAvatarNotes();
+
+	virtual void setAvatarId(const LLUUID& id);
+
+	/** 
+	 * LLFriendObserver trigger
+	 */
+	virtual void changed(U32 mask);
+
+	// Implements LLVoiceClientStatusObserver::onChange() to enable the call
+	// button when voice is available
+	/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+
+	/*virtual*/ void onOpen(const LLSD& key);
+
+	/*virtual*/ BOOL postBuild();
+
+	/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+	/*virtual*/ void updateData();
+
+protected:
+
+	/*virtual*/ void resetControls();
+
+	/*virtual*/ void resetData();
+
+	/**
+	 * Fills rights data for friends.
+	 */
+	void fillRightsData();
+
+	void rightsConfirmationCallback(const LLSD& notification,
+			const LLSD& response, S32 rights);
+	void confirmModifyRights(bool grant, S32 rights);
+	void onCommitRights();
+	void onCommitNotes();
+
+	void onAddFriendButtonClick();
+	void onIMButtonClick();
+	void onCallButtonClick();