diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llimage/llpngwrapper.cpp | 18 | ||||
| -rw-r--r-- | indra/llimage/llpngwrapper.h | 3 | ||||
| -rw-r--r-- | indra/newview/lllogininstance.cpp | 94 | ||||
| -rw-r--r-- | indra/newview/lllogininstance.h | 7 | ||||
| -rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 20 | ||||
| -rw-r--r-- | indra/newview/llstartup.cpp | 1 | 
6 files changed, 52 insertions, 91 deletions
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index fe737e2072..2cc7d3c460 100644 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -50,8 +50,6 @@ LLPngWrapper::LLPngWrapper()  	  mCompressionType( 0 ),  	  mFilterMethod( 0 ),  	  mFinalSize( 0 ), -	  mHasBKGD(false), -	  mBackgroundColor(),  	  mGamma(0.f)  {  } @@ -111,9 +109,9 @@ void LLPngWrapper::writeFlush(png_structp png_ptr)  }  // Read the PNG file using the libpng.  The low-level interface is used here -// because we want to do various transformations (including setting the -// matte background if any, and applying gama) which can't be done with -// the high-level interface. The scanline also begins at the bottom of +// because we want to do various transformations (including applying gama) +// which can't be done with the high-level interface. +// The scanline also begins at the bottom of  // the image (per SecondLife conventions) instead of at the top, so we  // must assign row-pointers in "reverse" order.  BOOL LLPngWrapper::readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop) @@ -201,8 +199,7 @@ void LLPngWrapper::normalizeImage()  	//		2. Convert grayscales to RGB  	//		3. Create alpha layer from transparency  	//		4. Ensure 8-bpp for all images -	//		5. Apply background matte if any -	//		6. Set (or guess) gamma +	//		5. Set (or guess) gamma  	if (mColorType == PNG_COLOR_TYPE_PALETTE)  	{ @@ -229,12 +226,6 @@ void LLPngWrapper::normalizeImage()  	{  		png_set_strip_16(mReadPngPtr);  	} -	mHasBKGD = png_get_bKGD(mReadPngPtr, mReadInfoPtr, &mBackgroundColor); -	if (mHasBKGD) -	{ -		png_set_background(mReadPngPtr, mBackgroundColor, -			PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); -	}  #if LL_DARWIN  	const F64 SCREEN_GAMMA = 1.8; @@ -261,7 +252,6 @@ void LLPngWrapper::updateMetaData()      mBitDepth = png_get_bit_depth(mReadPngPtr, mReadInfoPtr);      mColorType = png_get_color_type(mReadPngPtr, mReadInfoPtr);  	mChannels = png_get_channels(mReadPngPtr, mReadInfoPtr); -	mHasBKGD = png_get_bKGD(mReadPngPtr, mReadInfoPtr, &mBackgroundColor);  }  // Method to write raw image into PNG at dest. The raw scanline begins diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h index 47a4207d66..739f435996 100644 --- a/indra/llimage/llpngwrapper.h +++ b/indra/llimage/llpngwrapper.h @@ -88,9 +88,6 @@ private:  	U32 mFinalSize; -	bool mHasBKGD; -	png_color_16p mBackgroundColor; -  	F64 mGamma;  	std::string mErrorMessage; diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index d866db1829..f93bfb61d3 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -468,7 +468,6 @@ LLLoginInstance::LLLoginInstance() :  	mLoginModule(new LLLogin()),  	mNotifications(NULL),  	mLoginState("offline"), -	mUserInteraction(true),  	mSkipOptionalUpdate(false),  	mAttemptComplete(false),  	mTransferRate(0.0f), @@ -637,64 +636,57 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)  	LLSD response = event["data"];  	std::string reason_response = response["reason"].asString();  	std::string message_response = response["message"].asString(); -	if(mUserInteraction) +	// For the cases of critical message or TOS agreement, +	// start the TOS dialog. The dialog response will be handled +	// by the LLLoginInstance::handleTOSResponse() callback. +	// The callback intiates the login attempt next step, either  +	// to reconnect or to end the attempt in failure. +	if(reason_response == "tos")  	{ -		// For the cases of critical message or TOS agreement, -		// start the TOS dialog. The dialog response will be handled -		// by the LLLoginInstance::handleTOSResponse() callback. -		// The callback intiates the login attempt next step, either  -		// to reconnect or to end the attempt in failure. -		if(reason_response == "tos") -		{ -			LLSD data(LLSD::emptyMap()); -			data["message"] = message_response; -			data["reply_pump"] = TOS_REPLY_PUMP; -			gViewerWindow->setShowProgress(FALSE); -			LLFloaterReg::showInstance("message_tos", data); -			LLEventPumps::instance().obtain(TOS_REPLY_PUMP) -				.listen(TOS_LISTENER_NAME, -						boost::bind(&LLLoginInstance::handleTOSResponse,  -									this, _1, "agree_to_tos")); -		} -		else if(reason_response == "critical") -		{ -			LLSD data(LLSD::emptyMap()); -			data["message"] = message_response; -			data["reply_pump"] = TOS_REPLY_PUMP; -			if(response.has("error_code")) -			{ -				data["error_code"] = response["error_code"]; -			} -			if(response.has("certificate")) -			{ -				data["certificate"] = response["certificate"]; -			} -			 -			gViewerWindow->setShowProgress(FALSE); -			LLFloaterReg::showInstance("message_critical", data); -			LLEventPumps::instance().obtain(TOS_REPLY_PUMP) -				.listen(TOS_LISTENER_NAME, -						boost::bind(&LLLoginInstance::handleTOSResponse,  -									this, _1, "read_critical")); -		} -		else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate")) +		LLSD data(LLSD::emptyMap()); +		data["message"] = message_response; +		data["reply_pump"] = TOS_REPLY_PUMP; +		gViewerWindow->setShowProgress(FALSE); +		LLFloaterReg::showInstance("message_tos", data); +		LLEventPumps::instance().obtain(TOS_REPLY_PUMP) +			.listen(TOS_LISTENER_NAME, +					boost::bind(&LLLoginInstance::handleTOSResponse,  +								this, _1, "agree_to_tos")); +	} +	else if(reason_response == "critical") +	{ +		LLSD data(LLSD::emptyMap()); +		data["message"] = message_response; +		data["reply_pump"] = TOS_REPLY_PUMP; +		if(response.has("error_code"))  		{ -			gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE); -			updateApp(true, message_response); +			data["error_code"] = response["error_code"];  		} -		else if(reason_response == "optional") +		if(response.has("certificate"))  		{ -			updateApp(false, message_response); +			data["certificate"] = response["certificate"];  		} -		else -		{	 -			attemptComplete(); -		}	 +		 +		gViewerWindow->setShowProgress(FALSE); +		LLFloaterReg::showInstance("message_critical", data); +		LLEventPumps::instance().obtain(TOS_REPLY_PUMP) +			.listen(TOS_LISTENER_NAME, +					boost::bind(&LLLoginInstance::handleTOSResponse,  +								this, _1, "read_critical"));  	} -	else // no user interaction +	else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))  	{ -		attemptComplete(); +		gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE); +		updateApp(true, message_response); +	} +	else if(reason_response == "optional") +	{ +		updateApp(false, message_response);  	} +	else +	{	 +		attemptComplete(); +	}	  }  void LLLoginInstance::handleLoginSuccess(const LLSD& event) diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index b872d7d1b1..8b53431219 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -61,12 +61,6 @@ public:  	// Only valid when authSuccess == true.  	const F64 getLastTransferRateBPS() { return mTransferRate; } -		// Set whether this class will drive user interaction. -	// If not, login failures like 'need tos agreement' will  -	// end the login attempt. -	void setUserInteraction(bool state) { mUserInteraction = state; }  -	bool getUserInteraction() { return mUserInteraction; } -  	// Whether to tell login to skip optional update request.  	// False by default.  	void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; } @@ -100,7 +94,6 @@ private:  	std::string mLoginState;  	LLSD mRequestData;  	LLSD mResponseData; -	bool mUserInteraction;   	bool mSkipOptionalUpdate;  	bool mAttemptComplete;  	F64 mTransferRate; diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 211b9cf4b1..0b6267c9e6 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -766,22 +766,12 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const  		LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());  		if(object)  		{ -			const LLInventoryItem *inv = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID)); -			if (inv) +			const LLInventoryObject* cat = object->getInventoryObject(mUUID); +			if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, FALSE)) )  			{ -				const LLPermissions& perm = inv->getPermissions(); -				bool can_copy = gAgent.allowOperation(PERM_COPY, perm, -														GP_OBJECT_MANIPULATE); -				if((can_copy && perm.allowTransferTo(gAgent.getID())) -				   || object->permYouOwner()) -//				   || gAgent.isGodlike()) - -				{ -					*type = LLViewerAssetType::lookupDragAndDropType(inv->getType()); - -					*id = inv->getUUID(); -					return TRUE; -				} +				*type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); +				*id = mUUID; +				return TRUE;  			}  		}  	} diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5617eea4c3..0eac7d5e2a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -981,7 +981,6 @@ bool idle_startup()  			login->setSkipOptionalUpdate(true);  		} -		login->setUserInteraction(show_connect_box);  		login->setSerialNumber(LLAppViewer::instance()->getSerialNumber());  		login->setLastExecEvent(gLastExecEvent);  		login->setUpdaterLauncher(boost::bind(&LLAppViewer::launchUpdater, LLAppViewer::instance()));  | 
