diff options
| -rw-r--r-- | indra/llcommon/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | indra/llcommon/llsys.cpp | 62 | ||||
| -rw-r--r-- | indra/llmessage/llcurl.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llbottomtray.cpp | 62 | ||||
| -rw-r--r-- | indra/newview/llbottomtray.h | 42 | ||||
| -rw-r--r-- | indra/newview/skins/minimal/xui/en/panel_bottomtray.xml | 8 | 
6 files changed, 131 insertions, 57 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 22e0705036..d3dca73db4 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -287,6 +287,12 @@ target_link_libraries(      ${GOOGLE_PERFTOOLS_LIBRARIES}      ) +if (DARWIN) +  include(CMakeFindFrameworks) +  find_library(CARBON_LIBRARY Carbon) +  target_link_libraries(llcommon ${CARBON_LIBRARY}) +endif (DARWIN) +  add_dependencies(llcommon stage_third_party_libs)  if (LL_TESTS) diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 10cdc7087b..ca2d3f9181 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -46,6 +46,7 @@  #	include <sys/sysctl.h>  #	include <sys/utsname.h>  #	include <stdint.h> +#	include <Carbon/Carbon.h>  #elif LL_LINUX  #	include <errno.h>  #	include <sys/utsname.h> @@ -318,7 +319,58 @@ LLOSInfo::LLOSInfo() :  	}  	mOSString += compatibility_mode; +#elif LL_DARWIN +	 +	// Initialize mOSStringSimple to something like: +	// "Mac OS X 10.6.7" +	{ +		const char * DARWIN_PRODUCT_NAME = "Mac OS X"; +		 +		SInt32 major_version, minor_version, bugfix_version; +		OSErr r1 = Gestalt(gestaltSystemVersionMajor, &major_version); +		OSErr r2 = Gestalt(gestaltSystemVersionMinor, &minor_version); +		OSErr r3 = Gestalt(gestaltSystemVersionBugFix, &bugfix_version); + +		if((r1 == noErr) && (r2 == noErr) && (r3 == noErr)) +		{ +			mMajorVer = major_version; +			mMinorVer = minor_version; +			mBuild = bugfix_version; + +			std::stringstream os_version_string; +			os_version_string << DARWIN_PRODUCT_NAME << " " << mMajorVer << "." << mMinorVer << "." << mBuild; +			 +			// Put it in the OS string we are compiling +			mOSStringSimple.append(os_version_string.str()); +		} +		else +		{ +			mOSStringSimple.append("Unable to collect OS info"); +		} +	} +	 +	// Initialize mOSString to something like: +	// "Mac OS X 10.6.7 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386" +	struct utsname un; +	if(uname(&un) != -1) +	{		 +		mOSString = mOSStringSimple; +		mOSString.append(" "); +		mOSString.append(un.sysname); +		mOSString.append(" "); +		mOSString.append(un.release); +		mOSString.append(" "); +		mOSString.append(un.version); +		mOSString.append(" "); +		mOSString.append(un.machine); +	} +	else +	{ +		mOSString = mOSStringSimple; +	} +	  #else +	  	struct utsname un;  	if(uname(&un) != -1)  	{ @@ -334,15 +386,7 @@ LLOSInfo::LLOSInfo() :  		// Simplify 'Simple'  		std::string ostype = mOSStringSimple.substr(0, mOSStringSimple.find_first_of(" ", 0)); -		if (ostype == "Darwin") -		{ -			// Only care about major Darwin versions, truncate at first '.' -			S32 idx1 = mOSStringSimple.find_first_of(".", 0); -			std::string simple = mOSStringSimple.substr(0, idx1); -			if (simple.length() > 0) -				mOSStringSimple = simple; -		} -		else if (ostype == "Linux") +		if (ostype == "Linux")  		{  			// Only care about major and minor Linux versions, truncate at second '.'  			std::string::size_type idx1 = mOSStringSimple.find_first_of(".", 0); diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index a485fa0160..9b3b24c312 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -674,15 +674,7 @@ void LLCurl::Multi::removeEasy(Easy* easy)  //static  std::string LLCurl::strerror(CURLcode errorcode)  { -#if LL_DARWIN -	// curl_easy_strerror was added in libcurl 7.12.0.  Unfortunately, the version in the Mac OS X 10.3.9 SDK is 7.10.2... -	// There's a problem with the custom curl headers in our build that keeps me from #ifdefing this on the libcurl version number -	// (the correct check would be #if LIBCURL_VERSION_NUM >= 0x070c00).  We'll fix the header problem soon, but for now -	// just punt and print the numeric error code on the Mac. -	return llformat("%d", errorcode); -#else // LL_DARWIN  	return std::string(curl_easy_strerror(errorcode)); -#endif // LL_DARWIN  }  //////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index a29f157cdf..189175566e 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -218,7 +218,7 @@ LLBottomTray::LLBottomTray(const LLSD&)  	mLandingTab(NULL),  	mCheckForDrag(false)  { -	// Firstly add ourself to IMSession observers, so we catch session events +	// Firstly add our self to IMSession observers, so we catch session events  	// before chiclets do that.  	LLIMMgr::getInstance()->addSessionObserver(this); @@ -1523,21 +1523,35 @@ void LLBottomTray::initResizeStateContainers()  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_DESTINATIONS, getChild<LLPanel>("destinations_panel"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_AVATARS, getChild<LLPanel>("avatar_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel")));  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild<LLPanel>("mini_map_btn_panel"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_1, getChild<LLPanel>("splitter_panel_1"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PEOPLE, getChild<LLPanel>("people_panel"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PROFILE, getChild<LLPanel>("profile_panel"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_2, getChild<LLPanel>("splitter_panel_2"))); +	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_HOWTO, getChild<LLPanel>("howto_panel")));  	// init an order of processed buttons  	mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES);  	mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);  	mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); +	mButtonsProcessOrder.push_back(RS_BUTTON_DESTINATIONS); +	mButtonsProcessOrder.push_back(RS_BUTTON_AVATARS);  	mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);  	mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);  	mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);  	mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);  	mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP); +	mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_1); +	mButtonsProcessOrder.push_back(RS_BUTTON_PEOPLE); +	mButtonsProcessOrder.push_back(RS_BUTTON_PROFILE); +	mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_2); +	mButtonsProcessOrder.push_back(RS_BUTTON_HOWTO);  	mButtonsOrder.push_back(RS_BUTTON_SPEAK);  	mButtonsOrder.insert(mButtonsOrder.end(), mButtonsProcessOrder.begin(), mButtonsProcessOrder.end()); @@ -1870,26 +1884,36 @@ S32 LLBottomTray::getChicletPanelShrinkHeadroom() const  // static  std::string LLBottomTray::resizeStateToString(EResizeState state)  { +	const char *rs_string = "UNKNOWN_BUTTON"; +	  	switch (state)  	{ -	case RS_NORESIZE:				return "RS_NORESIZE"; -	case RS_CHICLET_PANEL:			return "RS_CHICLET_PANEL"; -	case RS_CHATBAR_INPUT:			return "RS_CHATBAR_INPUT"; -	case RS_BUTTON_SNAPSHOT:		return "RS_BUTTON_SNAPSHOT"; -	case RS_BUTTON_CAMERA:			return "RS_BUTTON_CAMERA"; -	case RS_BUTTON_MOVEMENT:		return "RS_BUTTON_MOVEMENT"; -	case RS_BUTTON_GESTURES:		return "RS_BUTTON_GESTURES"; -	case RS_BUTTON_SPEAK:			return "RS_BUTTON_SPEAK"; -	case RS_IM_WELL:				return "RS_IM_WELL"; -	case RS_NOTIFICATION_WELL:		return "RS_NOTIFICATION_WELL"; -	case RS_BUTTON_BUILD:			return "RS_BUTTON_BUILD"; -	case RS_BUTTON_SEARCH:			return "RS_BUTTON_SEARCH"; -	case RS_BUTTON_WORLD_MAP:		return "RS_BUTTON_WORLD_MAP"; -	case RS_BUTTON_MINI_MAP:		return "RS_BUTTON_MINI_MAP"; -	case RS_BUTTONS_CAN_BE_HIDDEN:	return "RS_BUTTONS_CAN_BE_HIDDEN"; -	// No default to track additions. -	} -	return "UNKNOWN_BUTTON"; +		case RS_NORESIZE:               rs_string = "RS_NORESIZE";              break; +		case RS_CHICLET_PANEL:          rs_string = "RS_CHICLET_PANEL";         break; +		case RS_CHATBAR_INPUT:          rs_string = "RS_CHATBAR_INPUT";         break; +		case RS_BUTTON_SNAPSHOT:        rs_string = "RS_BUTTON_SNAPSHOT";       break; +		case RS_BUTTON_CAMERA:          rs_string = "RS_BUTTON_CAMERA";         break; +		case RS_BUTTON_MOVEMENT:        rs_string = "RS_BUTTON_MOVEMENT";       break; +		case RS_BUTTON_GESTURES:        rs_string = "RS_BUTTON_GESTURES";       break; +		case RS_BUTTON_SPEAK:           rs_string = "RS_BUTTON_SPEAK";          break; +		case RS_IM_WELL:                rs_string = "RS_IM_WELL";               break; +		case RS_NOTIFICATION_WELL:      rs_string = "RS_NOTIFICATION_WELL";     break; +		case RS_BUTTON_BUILD:           rs_string = "RS_BUTTON_BUILD";          break; +		case RS_BUTTON_SEARCH:          rs_string = "RS_BUTTON_SEARCH";         break; +		case RS_BUTTON_WORLD_MAP:       rs_string = "RS_BUTTON_WORLD_MAP";      break; +		case RS_BUTTON_MINI_MAP:        rs_string = "RS_BUTTON_MINI_MAP";       break; +		case RS_BUTTON_DESTINATIONS:    rs_string = "RS_BUTTON_DESTINATIONS";   break; +		case RS_BUTTON_AVATARS:         rs_string = "RS_BUTTON_AVATARS";        break; +		case RS_BUTTON_PEOPLE:          rs_string = "RS_BUTTON_PEOPLE";         break; +		case RS_BUTTON_PROFILE:         rs_string = "RS_BUTTON_PROFILE";        break; +		case RS_BUTTON_HOWTO:           rs_string = "RS_BUTTON_HOWTO";          break; +		case RS_BUTTON_SPLITTER_1:      rs_string = "RS_BUTTON_SPLITTER_1";     break; +		case RS_BUTTON_SPLITTER_2:      rs_string = "RS_BUTTON_SPLITTER_2";     break; +		case RS_BUTTONS_CAN_BE_HIDDEN:  rs_string = "RS_BUTTONS_CAN_BE_HIDDEN"; break; +		// No default to track additions. +	} + +	return rs_string;  }  // static diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 52bcd2ddac..d9c95d82e5 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -140,22 +140,29 @@ public:  private: -	typedef enum e_resize_status_type +	typedef enum e_resize_state  	{ -		  RS_NORESIZE			= 0x0000 -		, RS_CHICLET_PANEL		= 0x0001 -		, RS_CHATBAR_INPUT		= 0x0002 -		, RS_BUTTON_SNAPSHOT	= 0x0004 -		, RS_BUTTON_CAMERA		= 0x0008 -		, RS_BUTTON_MOVEMENT	= 0x0010 -		, RS_BUTTON_GESTURES	= 0x0020 -		, RS_BUTTON_SPEAK		= 0x0040 -		, RS_IM_WELL			= 0x0080 -		, RS_NOTIFICATION_WELL	= 0x0100 -		, RS_BUTTON_BUILD		= 0x0200 -		, RS_BUTTON_SEARCH		= 0x0400 -		, RS_BUTTON_WORLD_MAP	= 0x0800 -		, RS_BUTTON_MINI_MAP	= 0x1000 +		RS_NORESIZE				= 0x0000, +		RS_CHICLET_PANEL		= 0x0001, +		RS_CHATBAR_INPUT		= 0x0002, +		RS_BUTTON_SNAPSHOT		= 0x0004, +		RS_BUTTON_CAMERA		= 0x0008, +		RS_BUTTON_MOVEMENT		= 0x0010, +		RS_BUTTON_GESTURES		= 0x0020, +		RS_BUTTON_SPEAK			= 0x0040, +		RS_IM_WELL				= 0x0080, +		RS_NOTIFICATION_WELL	= 0x0100, +		RS_BUTTON_BUILD			= 0x0200, +		RS_BUTTON_SEARCH		= 0x0400, +		RS_BUTTON_WORLD_MAP		= 0x0800, +		RS_BUTTON_MINI_MAP		= 0x1000, +		RS_BUTTON_DESTINATIONS	= 0x2000, +		RS_BUTTON_AVATARS		= 0x4000, +		RS_BUTTON_PEOPLE		= 0x8000, +		RS_BUTTON_PROFILE		= 0x10000, +		RS_BUTTON_HOWTO			= 0x20000, +		RS_BUTTON_SPLITTER_1	= 0x40000, +		RS_BUTTON_SPLITTER_2	= 0x80000,  		/*  		Once new button that can be hidden on resize is added don't forget to update related places: @@ -166,10 +173,11 @@ private:  		/**  		 * Specifies buttons which can be hidden when bottom tray is shrunk.  		 * They are: Gestures, Movement (Move), Camera (View), Snapshot -		 *		new: Build, Search, Map, World Map, Mini-Map. +		 *		new: Build, Search, Map, World Map, Mini-Map, destinations, avatars  		 */ -		, RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES +		RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES  									| RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP +									| RS_BUTTON_DESTINATIONS | RS_BUTTON_AVATARS  	}EResizeState;  	// Below are three methods that were introduced to handle drag'n'drop diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index 1756f9db90..9c14edb306 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -202,7 +202,7 @@           height="28"           layout="topleft"           min_width="17" -         name="splitter_panel" +         name="splitter_panel_1"           user_resize="false"           width="17">  			<icon @@ -222,7 +222,7 @@  		  min_height="28"  		  min_width="83"  		  mouse_opaque="false" -		  name="avatar_and_destinations_panel" +		  name="destinations_panel"  		  user_resize="false"  		  width="103">  			<bottomtray_button @@ -253,7 +253,7 @@  		  min_height="28"  		  min_width="73"  		  mouse_opaque="false" -		  name="avatar_and_destinations_panel" +		  name="avatar_panel"  		  user_resize="false"  		  width="103">  			<bottomtray_button @@ -282,7 +282,7 @@  		  height="28"  		  layout="topleft"  		  min_width="17" -		  name="splitter_panel" +		  name="splitter_panel_2"  		  user_resize="false"  		  width="17">  			<icon  | 
