diff options
Diffstat (limited to 'indra')
63 files changed, 1321 insertions, 427 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 0ed700b9da..0272c55db2 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -775,33 +775,6 @@ void LLMemoryInfo::stream(std::ostream& s) const  #endif  } -S32 LLDisplayInfo::getDisplayWidth() const -{ -#if LL_WINDOWS -	return  ::GetSystemMetrics(SM_CXVIRTUALSCREEN); -#elif LL_DARWIN -	return 1024; //*FIXME -#elif LL_SOLARIS -	return 1024; //*FIXME -#else -	return 1024; //*FIXME -#endif -} - -S32 LLDisplayInfo::getDisplayHeight() const -{ -#if LL_WINDOWS -	return  ::GetSystemMetrics(SM_CYVIRTUALSCREEN); -#elif LL_DARWIN -	return 768; //*FIXME -#elif LL_SOLARIS -	return 768; //*FIXME -#else -	return 768; //*FIXME -#endif -} - -  std::ostream& operator<<(std::ostream& s, const LLOSInfo& info)  {  	info.stream(s); diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index aa3fdd485b..f1dda1b2e2 100644 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -122,22 +122,6 @@ public:  	U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes  }; -//============================================================================= -// -//	CLASS		LLDisplayInfo -class LL_COMMON_API LLDisplayInfo - -/*!	@brief		Class to query the information about some display settings -*/ -{ -public: -	LLDisplayInfo(){}; ///< Default constructor - -	S32 getDisplayWidth() const; ///< display width -	S32 getDisplayHeight() const; ///< display height -	 -}; -  LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info);  LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info);  LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info); diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 98c9217306..c1d512e148 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -160,7 +160,7 @@ LLComboBox::LLComboBox(const LLComboBox::Params& p)  	createLineEditor(p); -	setTopLostCallback(boost::bind(&LLComboBox::hideList, this)); +	mTopLostSignalConnection = setTopLostCallback(boost::bind(&LLComboBox::hideList, this));  }  void LLComboBox::initFromParams(const LLComboBox::Params& p) @@ -187,6 +187,9 @@ BOOL LLComboBox::postBuild()  LLComboBox::~LLComboBox()  {  	// children automatically deleted, including mMenu, mButton + +	// explicitly disconect this signal, since base class destructor might fire top lost +	mTopLostSignalConnection.disconnect();  } @@ -320,15 +323,19 @@ void LLComboBox::setValue(const LLSD& value)  		LLScrollListItem* item = mList->getFirstSelected();  		if (item)  		{ -			setLabel( mList->getSelectedItemLabel() ); +			setLabel(getSelectedItemLabel());  		}  		mLastSelectedIndex = mList->getFirstSelectedIndex();  	} +	else +	{ +		mLastSelectedIndex = -1; +	}  }  const std::string LLComboBox::getSimple() const  { -	const std::string res = mList->getSelectedItemLabel(); +	const std::string res = getSelectedItemLabel();  	if (res.empty() && mAllowTextEntry)  	{  		return mTextEntry->getText(); @@ -407,7 +414,7 @@ BOOL LLComboBox::remove(S32 index)  	if (index < mList->getItemCount())  	{  		mList->deleteSingleItem(index); -		setLabel(mList->getSelectedItemLabel()); +		setLabel(getSelectedItemLabel());  		return TRUE;  	}  	return FALSE; @@ -448,7 +455,7 @@ BOOL LLComboBox::setCurrentByIndex( S32 index )  	BOOL found = mList->selectNthItem( index );  	if (found)  	{ -		setLabel(mList->getSelectedItemLabel()); +		setLabel(getSelectedItemLabel());  		mLastSelectedIndex = index;  	}  	return found; @@ -612,16 +619,14 @@ void LLComboBox::showList()  	mList->setFocus(TRUE); -	// register ourselves as a "top" control -	// effectively putting us into a special draw layer -	// and not affecting the bounding rectangle calculation -	gFocusMgr.setTopCtrl(this); -  	// Show the list and push the button down  	mButton->setToggleState(TRUE);  	mList->setVisible(TRUE); +	LLUI::addPopup(this); +  	setUseBoundingRect(TRUE); +//	updateBoundingRect();  }  void LLComboBox::hideList() @@ -644,10 +649,8 @@ void LLComboBox::hideList()  		mList->mouseOverHighlightNthItem(-1);  		setUseBoundingRect(FALSE); -		if( gFocusMgr.getTopCtrl() == this ) -		{ -			gFocusMgr.setTopCtrl(NULL); -		} +		LLUI::removePopup(this); +//		updateBoundingRect();  	}  } @@ -905,7 +908,7 @@ void LLComboBox::updateSelection()  	}  	else if (mList->selectItemByPrefix(left_wstring, FALSE))  	{ -		LLWString selected_item = utf8str_to_wstring(mList->getSelectedItemLabel()); +		LLWString selected_item = utf8str_to_wstring(getSelectedItemLabel());  		LLWString wtext = left_wstring + selected_item.substr(left_wstring.size(), selected_item.size());  		mTextEntry->setText(wstring_to_utf8str(wtext));  		mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size()); @@ -1007,7 +1010,7 @@ BOOL LLComboBox::setCurrentByID(const LLUUID& id)  	if (found)  	{ -		setLabel(mList->getSelectedItemLabel()); +		setLabel(getSelectedItemLabel());  		mLastSelectedIndex = mList->getFirstSelectedIndex();  	} @@ -1023,7 +1026,7 @@ BOOL LLComboBox::setSelectedByValue(const LLSD& value, BOOL selected)  	BOOL found = mList->setSelectedByValue(value, selected);  	if (found)  	{ -		setLabel(mList->getSelectedItemLabel()); +		setLabel(getSelectedItemLabel());  	}  	return found;  } @@ -1085,10 +1088,19 @@ void LLIconsComboBox::setValue(const LLSD& value)  		LLScrollListItem* item = mList->getFirstSelected();  		if (item)  		{ -			mButton->setImageOverlay(mList->getSelectedItemLabel(mIconColumnIndex), mButton->getImageOverlayHAlign()); - -			setLabel(mList->getSelectedItemLabel(mLabelColumnIndex)); +			setLabel(getSelectedItemLabel());  		}  		mLastSelectedIndex = mList->getFirstSelectedIndex();  	} +	else +	{ +		mLastSelectedIndex = -1; +	} +} + +const std::string LLIconsComboBox::getSelectedItemLabel(S32 column) const +{ +	mButton->setImageOverlay(LLComboBox::getSelectedItemLabel(mIconColumnIndex), mButton->getImageOverlayHAlign()); + +	return LLComboBox::getSelectedItemLabel(mLabelColumnIndex);  } diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index 3cc2a8f5d1..965061ead2 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -150,7 +150,7 @@ public:  	// Get name of current item. Returns an empty string if not found.  	const std::string	getSimple() const;  	// Get contents of column x of selected row -	const std::string getSelectedItemLabel(S32 column = 0) const; +	virtual const std::string getSelectedItemLabel(S32 column = 0) const;  	// Sets the label, which doesn't have to exist in the label.  	// This is probably a UI abuse. @@ -231,6 +231,7 @@ private:  	commit_callback_t	mPrearrangeCallback;  	commit_callback_t	mTextEntryCallback;  	commit_callback_t	mSelectionCallback; +        boost::signals2::connection mTopLostSignalConnection;  };  // A combo box with icons for the list of items. @@ -247,6 +248,7 @@ public:  	};  	/*virtual*/ void setValue(const LLSD& value); +	/*virtual*/ const std::string getSelectedItemLabel(S32 column = 0) const;  private:  	enum EColumnIndex diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index e91d753a39..4cb336f7ea 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -527,10 +527,7 @@ void LLFloater::setVisible( BOOL visible )  	if( !visible )  	{ -		if( gFocusMgr.childIsTopCtrl( this ) ) -		{ -			gFocusMgr.setTopCtrl(NULL); -		} +		LLUI::removePopup(this);  		if( gFocusMgr.childHasMouseCapture( this ) )  		{ @@ -704,10 +701,7 @@ void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)  void LLFloater::releaseFocus()  { -	if( gFocusMgr.childIsTopCtrl( this ) ) -	{ -		gFocusMgr.setTopCtrl(NULL); -	} +	LLUI::removePopup(this);  	setFocus(FALSE); @@ -1360,7 +1354,7 @@ void LLFloater::bringToFront( S32 x, S32 y )  // virtual  void LLFloater::setVisibleAndFrontmost(BOOL take_focus)  { -	gFocusMgr.setTopCtrl(NULL); +	LLUI::clearPopups();  	setVisible(TRUE);  	setFrontmost(take_focus);  } @@ -2508,10 +2502,7 @@ void LLFloaterView::syncFloaterTabOrder()  	if (modal_dialog)  	{  		// If we have a visible modal dialog, make sure that it has focus -		if( gFocusMgr.getTopCtrl() != modal_dialog ) -		{ -			gFocusMgr.setTopCtrl( modal_dialog ); -		} +		LLUI::addPopup(modal_dialog);  		if( !gFocusMgr.childHasKeyboardFocus( modal_dialog ) )  		{ diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 35fbc7b0a8..b3af258456 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -38,8 +38,6 @@  const F32 FOCUS_FADE_TIME = 0.3f; -// NOTE: the LLFocusableElement implementation has been moved here from lluictrl.cpp. -  LLFocusableElement::LLFocusableElement()  :	mFocusLostCallback(NULL),  	mFocusReceivedCallback(NULL), @@ -124,8 +122,7 @@ boost::signals2::connection	LLFocusableElement::setTopLostCallback(const focus_s  LLFocusMgr gFocusMgr;  LLFocusMgr::LLFocusMgr() -	: -	mLockedView( NULL ), +:	mLockedView( NULL ),  	mMouseCaptor( NULL ),  	mKeyboardFocus( NULL ),  	mLastKeyboardFocus( NULL ), @@ -133,16 +130,11 @@ LLFocusMgr::LLFocusMgr()  	mKeystrokesOnly(FALSE),  	mTopCtrl( NULL ),  	mAppHasFocus(TRUE)   // Macs don't seem to notify us that we've gotten focus, so default to true -	#ifdef _DEBUG -		, mMouseCaptorName("none") -		, mKeyboardFocusName("none") -		, mTopCtrlName("none") -	#endif  {  } -void LLFocusMgr::releaseFocusIfNeeded( const LLView* view ) +void LLFocusMgr::releaseFocusIfNeeded( LLView* view )  {  	if( childHasMouseCapture( view ) )  	{ @@ -162,10 +154,7 @@ void LLFocusMgr::releaseFocusIfNeeded( const LLView* view )  		}  	} -	if( childIsTopCtrl( view ) ) -	{ -		setTopCtrl( NULL ); -	} +	LLUI::removePopup(view);  } @@ -248,11 +237,6 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL  			return;  		} -		#ifdef _DEBUG -			LLUICtrl* focus_ctrl = dynamic_cast<LLUICtrl*>(new_focus); -			mKeyboardFocusName = focus_ctrl ? focus_ctrl->getName() : std::string("none"); -		#endif -  		// If we've got a default keyboard focus, and the caller is  		// releasing keyboard focus, move to the default.  		if (mDefaultKeyboardFocus != NULL && mKeyboardFocus == NULL) @@ -334,20 +318,12 @@ void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* f  	if( mKeyboardFocus == focus )  	{  		mKeyboardFocus = NULL; -		#ifdef _DEBUG -			mKeyboardFocusName = std::string("none"); -		#endif  	}  }  void LLFocusMgr::setMouseCapture( LLMouseHandler* new_captor )  { -	//if (mFocusLocked) -	//{ -	//	return; -	//} -  	if( new_captor != mMouseCaptor )  	{  		LLMouseHandler* old_captor = mMouseCaptor; @@ -370,24 +346,14 @@ void LLFocusMgr::setMouseCapture( LLMouseHandler* new_captor )  			old_captor->onMouseCaptureLost();  		} -		#ifdef _DEBUG -			mMouseCaptorName = new_captor ? new_captor->getName() : std::string("none"); -		#endif  	}  }  void LLFocusMgr::removeMouseCaptureWithoutCallback( const LLMouseHandler* captor )  { -	//if (mFocusLocked) -	//{ -	//	return; -	//}  	if( mMouseCaptor == captor )  	{  		mMouseCaptor = NULL; -		#ifdef _DEBUG -			mMouseCaptorName = std::string("none"); -		#endif  	}  } @@ -416,10 +382,6 @@ void LLFocusMgr::setTopCtrl( LLUICtrl* new_top  )  	{  		mTopCtrl = new_top; -		#ifdef _DEBUG -			mTopCtrlName = new_top ? new_top->getName() : std::string("none"); -		#endif -  		if (old_top)  		{  			old_top->onTopLost(); @@ -432,9 +394,6 @@ void LLFocusMgr::removeTopCtrlWithoutCallback( const LLUICtrl* top_view )  	if( mTopCtrl == top_view )  	{  		mTopCtrl = NULL; -		#ifdef _DEBUG -			mTopCtrlName = std::string("none"); -		#endif  	}  } @@ -478,9 +437,9 @@ void LLFocusMgr::setAppHasFocus(BOOL focus)  	}  	// release focus from "top ctrl"s, which generally hides them -	if (!focus && mTopCtrl) +	if (!focus)  	{ -		setTopCtrl(NULL); +		LLUI::clearPopups();  	}  	mAppHasFocus = focus;   } diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 83ecd1d301..86d3ccf111 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -65,10 +65,10 @@ public:  	virtual BOOL	handleKey(KEY key, MASK mask, BOOL called_from_parent);  	virtual BOOL	handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); +	virtual void	onTopLost();	// called when registered as top ctrl and user clicks elsewhere  protected:	  	virtual void	onFocusReceived();  	virtual void	onFocusLost(); -	virtual void	onTopLost();	// called when registered as top ctrl and user clicks elsewhere  	focus_signal_t*  mFocusLostCallback;  	focus_signal_t*  mFocusReceivedCallback;  	focus_signal_t*  mFocusChangedCallback; @@ -119,7 +119,7 @@ public:  	BOOL			childIsTopCtrl( const LLView* parent ) const;  	// All Three -	void			releaseFocusIfNeeded( const LLView* top_view ); +	void			releaseFocusIfNeeded( LLView* top_view );  	void			lockFocus();  	void			unlockFocus();  	BOOL			focusLocked() const { return mLockedView != NULL; } @@ -149,12 +149,6 @@ private:  	typedef std::map<LLHandle<LLView>, LLHandle<LLView> > focus_history_map_t;  	focus_history_map_t mFocusHistory; - -	#ifdef _DEBUG -		std::string		mMouseCaptorName; -		std::string		mKeyboardFocusName; -		std::string		mTopCtrlName; -	#endif  };  extern LLFocusMgr gFocusMgr; diff --git a/indra/llui/llhandle.h b/indra/llui/llhandle.h index 899f6b9326..8ade327044 100644 --- a/indra/llui/llhandle.h +++ b/indra/llui/llhandle.h @@ -67,6 +67,13 @@ public:  		return *this;   	} +	template<typename Subclass> +	LLHandle<T>& operator =(const LLHandle<Subclass>& other)   +	{  +		mTombStone = other.mTombStone; +		return *this;  +	} +  	bool isDead() const   	{   		return mTombStone->getTarget() == NULL;  diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 387af05935..6cff68c20b 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -111,7 +111,7 @@ void LLModalDialog::onOpen(const LLSD& key)  		// This is a modal dialog.  It sucks up all mouse and keyboard operations.  		gFocusMgr.setMouseCapture( this ); -		gFocusMgr.setTopCtrl( this ); +		LLUI::addPopup(this);  		setFocus(TRUE);  		sModalStack.push_front( this ); @@ -153,7 +153,7 @@ void LLModalDialog::setVisible( BOOL visible )  			gFocusMgr.setMouseCapture( this );  			// The dialog view is a root view -			gFocusMgr.setTopCtrl( this ); +			LLUI::addPopup(this);  			setFocus( TRUE );  		}  		else @@ -291,7 +291,7 @@ void LLModalDialog::onAppFocusGained()  		// This is a modal dialog.  It sucks up all mouse and keyboard operations.  		gFocusMgr.setMouseCapture( instance );  		instance->setFocus(TRUE); -		gFocusMgr.setTopCtrl( instance ); +		LLUI::addPopup(instance);  		instance->centerOnScreen();  	} diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index b348ec2d29..5121ef5351 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -86,6 +86,9 @@ std::list<std::string> gUntranslated;  /*static*/ LLHelp*			LLUI::sHelpImpl = NULL;  /*static*/ std::vector<std::string> LLUI::sXUIPaths;  /*static*/ LLFrameTimer		LLUI::sMouseIdleTimer; +/*static*/ LLUI::add_popup_t	LLUI::sAddPopupFunc; +/*static*/ LLUI::remove_popup_t	LLUI::sRemovePopupFunc; +/*static*/ LLUI::clear_popups_t	LLUI::sClearPopupsFunc;  // register filtereditor here  static LLDefaultChildRegistry::Register<LLFilterEditor> register_filter_editor("filter_editor"); @@ -1607,6 +1610,13 @@ void LLUI::cleanupClass()  	sImageProvider->cleanUp();  } +void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& remove_popup,  const clear_popups_t& clear_popups) +{ +	sAddPopupFunc = add_popup; +	sRemovePopupFunc = remove_popup; +	sClearPopupsFunc = clear_popups; +} +  //static  void LLUI::dirtyRect(LLRect rect)  { @@ -1877,6 +1887,34 @@ LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname)  	return *sSettingGroups["config"]; // default group  } +//static  +void LLUI::addPopup(LLView* viewp) +{ +	if (sAddPopupFunc) +	{ +		sAddPopupFunc(viewp); +	} +} + +//static  +void LLUI::removePopup(LLView* viewp) +{ +	if (sRemovePopupFunc) +	{ +		sRemovePopupFunc(viewp); +	} +} + +//static +void LLUI::clearPopups() +{ +	if (sClearPopupsFunc) +	{ +		sClearPopupsFunc(); +	} +} + +  //static  // spawn_x and spawn_y are top left corner of view in screen GL coordinates  void LLUI::positionViewNearMouse(LLView* view, S32 spawn_x, S32 spawn_y) diff --git a/indra/llui/llui.h b/indra/llui/llui.h index af8d4ea03b..30f3623ded 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -160,12 +160,17 @@ public:  	// Methods  	//  	typedef std::map<std::string, LLControlGroup*> settings_map_t; +	typedef boost::function<void(LLView*)> add_popup_t; +	typedef boost::function<void(LLView*)> remove_popup_t; +	typedef boost::function<void(void)> clear_popups_t; +  	static void initClass(const settings_map_t& settings,  						  LLImageProviderInterface* image_provider,  						  LLUIAudioCallback audio_callback = NULL,  						  const LLVector2 *scale_factor = NULL,  						  const std::string& language = LLStringUtil::null);  	static void cleanupClass(); +	static void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& );  	static void pushMatrix();  	static void popMatrix(); @@ -208,6 +213,10 @@ public:  	static void resetMouseIdleTimer() { sMouseIdleTimer.reset(); }  	static LLWindow* getWindow() { return sWindow; } +	static void addPopup(LLView*); +	static void removePopup(LLView*); +	static void clearPopups(); +  	// Ensures view does not overlap mouse cursor, but is inside  	// the view's parent rectangle.  Used for tooltips, inspectors.  	// Optionally override the view's default X/Y, which are relative to the @@ -227,6 +236,9 @@ private:  	static LLImageProviderInterface* sImageProvider;  	static std::vector<std::string> sXUIPaths;  	static LLFrameTimer		sMouseIdleTimer; +	static add_popup_t		sAddPopupFunc; +	static remove_popup_t	sRemovePopupFunc; +	static clear_popups_t	sClearPopupsFunc;  }; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 63e627ceb5..d34083a384 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -73,9 +73,9 @@ S32		LLView::sLastBottomXML = S32_MIN;  std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack; -#if LL_DEBUG +//#if LL_DEBUG  BOOL LLView::sIsDrawing = FALSE; -#endif +//#endif  // Compiler optimization, generate extern template  template class LLView* LLView::getChild<class LLView>( @@ -150,6 +150,10 @@ LLView::~LLView()  {  	dirtyRect();  	//llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; +	if (LLView::sIsDrawing) +	{ +		llwarns << "Deleting view " << mName << " during UI draw() phase" << llendl; +	}  // 	llassert(LLView::sIsDrawing == FALSE);  //	llassert_always(sDepth == 0); // avoid deleting views while drawing! It can subtly break list iterators @@ -592,11 +596,6 @@ void LLView::setVisible(BOOL visible)  {  	if ( mVisible != visible )  	{ -		if( !visible && (gFocusMgr.getTopCtrl() == this) ) -		{ -			gFocusMgr.setTopCtrl( NULL ); -		} -  		mVisible = visible;  		// notify children of visibility change if root, or part of visible hierarchy diff --git a/indra/llui/llview.h b/indra/llui/llview.h index c4d7313743..efae00f0e5 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -171,9 +171,9 @@ private:  	// widgets in general are not copyable  	LLView(const LLView& other) {};  public: -#if LL_DEBUG +//#if LL_DEBUG  	static BOOL sIsDrawing; -#endif +//#endif  	enum ESoundFlags  	{  		SILENT = 0, diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 1c6c9e6e9d..b77deb003f 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -407,3 +407,30 @@ BOOL LLWindowManager::isWindowValid(LLWindow *window)  {  	return sWindowList.find(window) != sWindowList.end();  } + +S32 LLDisplayInfo::getDisplayWidth() const +{ +#if LL_WINDOWS +	return LLWindowWin32::getDisplayWidth(); +#elif LL_DARWIN +	return LLWindowMacOSX::getDisplayWidth(); +#elif LL_SDL +	return LLWindowSDL::getDisplayWidth(); +#else +	return 1024; //*FIXME +#endif +} + +S32 LLDisplayInfo::getDisplayHeight() const +{ +#if LL_WINDOWS +	return LLWindowWin32::getDisplayHeight(); +#elif LL_DARWIN +	return LLWindowMacOSX::getDisplayHeight(); +#elif LL_SDL +	return LLWindowSDL::getDisplayHeight(); +#else +	return 768; //*FIXME +#endif +} + diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 55b221e716..b769f5071b 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -281,4 +281,19 @@ extern const std::string gURLProtocolWhitelistHandler[];  void simpleEscapeString ( std::string& stringIn  ); +//============================================================================= +// +//	CLASS		LLDisplayInfo +class LLDisplayInfo + +/*!	@brief		Class to query the information about some display settings +*/ +{ +public: +	LLDisplayInfo(){}; ///< Default constructor + +	S32 getDisplayWidth() const; ///< display width +	S32 getDisplayHeight() const; ///< display height +}; +  #endif // _LL_window_h_ diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index ed5d7b1e74..ed8c874dcb 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -40,4 +40,5 @@ void setupCocoa();  CursorRef createImageCursor(const char *fullpath, int hotspotX, int hotspotY);  OSErr releaseImageCursor(CursorRef ref);  OSErr setImageCursor(CursorRef ref); - +void getScreenSize(int* width, int* height); +void getVisibleScreen(int *x, int *y, int* width, int* height); diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 59b25e1726..5cab2619fd 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -116,3 +116,22 @@ OSErr setImageCursor(CursorRef ref)  	return noErr;  } +void getScreenSize(int* width, int* height) +{ +	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; +	NSRect screen_rect = [[NSScreen mainScreen] frame]; +	if (width)  *width  = (int)(screen_rect.size.width); +	if (height) *height = (int)(screen_rect.size.height); +	[pool release]; +} + +void getVisibleScreen(int *x, int *y, int* width, int* height) +{ +	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; +	NSRect visible_rect = [[NSScreen mainScreen] visibleFrame]; +	if (width)  *width = (int)(visible_rect.size.width); +	if (height) *height = (int)(visible_rect.size.height); +	if (x) *x = (int)(visible_rect.origin.x); +	if (y) *y = (int)(visible_rect.origin.y); +	[pool release]; +} diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index ad97bc45fc..924acaf148 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1122,7 +1122,33 @@ BOOL LLWindowMacOSX::getMaximized()  BOOL LLWindowMacOSX::maximize()  { -	// TODO +	if (mWindow) +	{ +		// *HACK: Because Mac OSX doesn't have a concept of a "maximized" window, we just +		// stretch it out to the visible screen size. +		Rect win_rect; + +		int visible_x; +		int visible_y; +		int visible_width; +		int visible_height; +		int screen_width; +		int screen_height; + +		getScreenSize(&screen_width, &screen_height); +		getVisibleScreen(&visible_x, &visible_y, &visible_width, &visible_height); + +		int mac_os_menu_bar_height = screen_height - (visible_height + visible_y); +		::SetRect(&win_rect, +				  visible_x, +				  mac_os_menu_bar_height, +				  visible_width + visible_x, +				  visible_height + mac_os_menu_bar_height); + +		::SetWindowBounds(mWindow, kWindowStructureRgn, &win_rect); + +		return TRUE; +	}  	return FALSE;  } @@ -3464,6 +3490,26 @@ MASK LLWindowMacOSX::modifiersToMask(SInt16 modifiers)  	return mask;  }	 +// static +S32 LLWindowMacOSX::getDisplayWidth() +{ +	S32 width = 1024; +	// Need to invoke cocoa before use getScreenSize() +	setupCocoa(); +	getScreenSize(&width, NULL); +	return width; +} + +// static +S32 LLWindowMacOSX::getDisplayHeight() +{ +	S32 height = 768; +	// Need to invoke cocoa before use getScreenSize() +	setupCocoa(); +	getScreenSize(NULL, &height); +	return height; +} +  #if LL_OS_DRAGDROP_ENABLED  OSErr LLWindowMacOSX::dragTrackingHandler(DragTrackingMessage message, WindowRef theWindow, diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 7c6b324029..86036a261c 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -123,6 +123,8 @@ public:  	// Provide native key event data  	/*virtual*/ LLSD getNativeKeyData(); +	static S32 getDisplayWidth(); +	static S32 getDisplayHeight();  protected:  	LLWindowMacOSX(LLWindowCallbacks* callbacks, diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 1f705f9e60..cb4e04511c 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -187,6 +187,47 @@ Display* LLWindowSDL::get_SDL_Display(void)  }  #endif // LL_X11 +// static +S32 LLWindowSDL::getDisplayWidth() +{ +#if LL_GTK +	if (LLWindowSDL::ll_try_gtk_init()) +	{ +		return gdk_screen_width(); +	} +#endif // LL_GTK + +#if LL_X11 +	Display *display = XOpenDisplay(NULL); +	int screen_num = DefaultScreen(display); +	S32 width = DisplayWidth(display, screen_num); +	XCloseDisplay(display); +	return width; +#endif //LL_X11 + +	return 1024; +} + +// static +S32 LLWindowSDL::getDisplayHeight() +{ +#if LL_GTK +	if (LLWindowSDL::ll_try_gtk_init()) +	{ +		return gdk_screen_height(); +	} +#endif // LL_GTK + +#if LL_X11 +	Display *display = XOpenDisplay(NULL); +	int screen_num = DefaultScreen(display); +	S32 height = DisplayHeight(display, screen_num); +	XCloseDisplay(display); +	return height; +#endif //LL_X11 + +	return 768; +}  LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,  			 const std::string& title, S32 x, S32 y, S32 width, @@ -909,7 +950,68 @@ BOOL LLWindowSDL::getMaximized()  	if (mWindow)  	{ -		// TODO +#if LL_X11 +		if (mSDL_Display) +		{ +			maybe_lock_display(); + +			// Return data in the specified format, XA_ATOM. +			U8*	prop; +			// Actual format of the property. +			int format; +			// Actual number of items stored in the prop return data. +			unsigned long nitems; +			// Number of bytes remaining to be read in the property if a partial read was performed. +			unsigned long bytes_after; +			// Atom identifier that defines the actual type of the property. +			Atom type; + +			// Atom used to obtain list of hints describing the window state. +			Atom wm_state = XInternAtom(mSDL_Display, "_NET_WM_STATE", False); + +			// Atoms indicates that the window is vertically/horizontally maximized.  +			Atom max_vert = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_VERT", False); +			Atom max_horz = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); + +			// How many atoms in which we interested are present in list of hints. +			U32 pass = 0; + +			do +			{ +				nitems = 0; +				bytes_after = 0; +				type = None; +				if ( (XGetWindowProperty (mSDL_Display, +										  mSDL_XWindowID, +										  wm_state, +										  0, UINT_MAX, +										  False, XA_ATOM, +										  &type, &format, +										  &nitems, &bytes_after, +										  &prop) == Success) +					 && type != None ) +				{ +					Atom *atoms = (Atom *)prop; +					for (unsigned long i=0; i<nitems; ++i) +					{ +						if (atoms[i] == max_horz) +							++pass; +						else if (atoms[i] == max_vert) +							++pass; +					} +					XFree (atoms); +				} +				else +				{ +					break; +				} +			} while (bytes_after > 0); + +			result = (pass == 2); + +			maybe_unlock_display(); +		} +#endif // LL_X11  	}  	return(result); @@ -917,7 +1019,103 @@ BOOL LLWindowSDL::getMaximized()  BOOL LLWindowSDL::maximize()  { -	// TODO +#if LL_X11 +	if (mSDL_Display && !mFullscreen) +	{ +		maybe_lock_display(); + +		BOOL is_maximize_allowed = FALSE; + +		// Check if maximize is allowed +		{ +			// Return data in the specified format, XA_ATOM. +			U8*	prop; +			// Actual format of the property. +			int format; +			// Actual number of items stored in the prop return data. +			unsigned long nitems; +			// Number of bytes remaining to be read in the property if a partial read was performed. +			unsigned long bytes_after; +			// Atom identifier that defines the actual type of the property. +			Atom type; + +			// Atom used to obtain a list of atoms indicating user operations that the Window Manager supports for this window. +			Atom allowed_act  = XInternAtom(mSDL_Display, "_NET_WM_ALLOWED_ACTIONS", False); + +			// Atoms that indicates that the window may be vertically/horizontally maximized. +			Atom max_vert_act = XInternAtom(mSDL_Display, "_NET_WM_ACTION_MAXIMIZE_HORZ", False); +			Atom max_horz_act = XInternAtom(mSDL_Display, "_NET_WM_ACTION_MAXIMIZE_VERT", False); + +			// How many atoms in which we interested are present in list of hints. +			U32 pass = 0; + +			do +			{ +				nitems = 0; +				bytes_after = 0; +				type = None; +				if ( (XGetWindowProperty (mSDL_Display, +										  mSDL_XWindowID, +										  allowed_act, +										  0, UINT_MAX, +										  False, XA_ATOM, +										  &type, &format, +										  &nitems, &bytes_after, +										  &prop) == Success) +					 && type != None ) +				{ +					Atom *atoms = (Atom *)prop; +					for (unsigned long i=0; i<nitems; ++i) +					{ +						if (atoms[i] == max_vert_act) +							++pass; +						else if (atoms[i] == max_horz_act) +							++pass; +					} +					XFree (atoms); +				} +				else +				{ +					break; +				} +			} while (bytes_after > 0); + +			is_maximize_allowed = (pass == 2); +		} + +		// Send maximize event to X11 system +		if (is_maximize_allowed) +		{ +			XEvent xev; + +			// Atom describing the window state. +			Atom wm_state = XInternAtom(mSDL_Display, "_NET_WM_STATE", False); + +			// Atoms indicates that the window is vertically/horizontally maximized.  +			Atom max_vert = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_VERT", False); +			Atom max_horz = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); + +			memset(&xev, 0, sizeof(xev)); +			xev.type = ClientMessage; +			xev.xclient.window = mSDL_XWindowID; +			xev.xclient.message_type = wm_state; +			xev.xclient.format = 32; +			xev.xclient.data.l[0] = 1;  // add/set property +			xev.xclient.data.l[1] = max_vert; +			xev.xclient.data.l[2] = max_horz; +			xev.xclient.data.l[3] = 0; +			xev.xclient.data.l[4] = 0; + +			XSendEvent(mSDL_Display, +					   DefaultRootWindow(mSDL_Display), +					   False, +					   SubstructureNotifyMask, &xev); +		} + +		maybe_unlock_display(); +		return is_maximize_allowed; +	} +#endif // LL_X11  	return FALSE;  } diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index e6bdd46a77..2311a361fa 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -148,6 +148,9 @@ public:  	static Display* get_SDL_Display(void);  #endif // LL_X11	 +	static S32 getDisplayWidth(); +	static S32 getDisplayHeight(); +  protected:  	LLWindowSDL(LLWindowCallbacks* callbacks,  		const std::string& title, int x, int y, int width, int height, U32 flags, diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index c80392ad45..4be5d06c2b 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -3714,5 +3714,16 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList()  	return std::vector<std::string>();  } +// static +S32 LLWindowWin32::getDisplayWidth() +{ +	return ::GetSystemMetrics(SM_CXVIRTUALSCREEN); +} + +// static +S32 LLWindowWin32::getDisplayHeight() +{ +	return ::GetSystemMetrics(SM_CYVIRTUALSCREEN); +}  #endif // LL_WINDOWS diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 9d57735772..c221ec0192 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -120,6 +120,9 @@ public:  	static std::vector<std::string> getDynamicFallbackFontList(); +	static S32 getDisplayWidth(); +	static S32 getDisplayHeight(); +  protected:  	LLWindowWin32(LLWindowCallbacks* callbacks,  		const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,  diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 14eb75e457..8ad3b2085d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -347,6 +347,7 @@ set(viewer_SOURCE_FILES      llpatchvertexarray.cpp      llplacesinventorybridge.cpp      llplacesinventorypanel.cpp +    llpopupview.cpp      llpolymesh.cpp      llpolymorph.cpp      llpreview.cpp @@ -844,6 +845,7 @@ set(viewer_HEADER_FILES      llplacesinventorypanel.h      llpolymesh.h      llpolymorph.h +    llpopupview.h      llpreview.h      llpreviewanim.h      llpreviewgesture.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ccd58e26fe..bdfe0d9142 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -305,7 +305,7 @@ static std::string gLaunchFileOnQuit;  // Used on Win32 for other apps to identify our window (eg, win_setup)  const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";  static const S32 FIRST_RUN_WINDOW_WIDTH = 1024; -static const S32 FIRST_RUN_WINDOW_HRIGHT = 768; +static const S32 FIRST_RUN_WINDOW_HIGHT = 768;  //----------------------------------------------------------------------------  // List of entries from strings.xml to always replace @@ -703,9 +703,9 @@ bool LLAppViewer::init()  	settings_map["account"] = &gSavedPerAccountSettings;  	LLUI::initClass(settings_map, -					LLUIImageList::getInstance(), -					ui_audio_callback, -					&LLUI::sGLScaleFactor); +		LLUIImageList::getInstance(), +		ui_audio_callback, +		&LLUI::sGLScaleFactor);  	// Setup paths and LLTrans after LLUI::initClass has been called  	LLUI::setupPaths(); @@ -2382,12 +2382,12 @@ bool LLAppViewer::initWindow()  	if (first_run)//for first login   	{  		window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded -		window_height = FIRST_RUN_WINDOW_HRIGHT; +		window_height = FIRST_RUN_WINDOW_HIGHT;  		//if screen resolution is lower then 1024*768 then show maximized  		LLDisplayInfo display_info;  		if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH -			|| display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HRIGHT) +			|| display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HIGHT)  		{  			show_maximized = true;  		} diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 3818ee6f78..362010d65a 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -35,6 +35,7 @@  #include "llscrollcontainer.h"  #include "llwindow.h" +#include "llviewerwindow.h"  static LLDefaultChildRegistry::Register<LLExpandableTextBox> t1("expandable_text"); @@ -382,7 +383,7 @@ void LLExpandableTextBox::expandTextBox()  	setFocus(TRUE);  	// this lets us receive top_lost event(needed to collapse text box)  	// it also draws text box above all other ui elements -	gFocusMgr.setTopCtrl(this); +	gViewerWindow->addPopup(this);  	mExpanded = true;  } @@ -401,10 +402,7 @@ void LLExpandableTextBox::collapseTextBox()  	updateTextBoxRect(); -	if(gFocusMgr.getTopCtrl() == this) -	{ -		gFocusMgr.setTopCtrl(NULL); -	} +	gViewerWindow->removePopup(this);  }  void LLExpandableTextBox::onFocusLost() diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index 58316ddb98..9d4a8aef76 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -144,6 +144,7 @@ public:  	 */  	/*virtual*/ void onTopLost(); +  	/**  	 * Draws text box, collapses text box if its expanded and its parent's position changed  	 */ diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 26c6db9652..7051447409 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -102,6 +102,10 @@ public:  	virtual void changed() { LLFloaterLand::refreshAll(); }  }; +// fills target textbox with maturity info(icon and text) +// names_floater - pointer to floater which contains strings with maturity icons filenames +void FillMaturityTextBox(LLTextBox* target_textbox, LLFloater* names_floater); +  //---------------------------------------------------------------------------  // LLFloaterLand  //--------------------------------------------------------------------------- @@ -554,7 +558,7 @@ void LLPanelLandGeneral::refresh()  		if (regionp)  		{ -			mContentRating->setText(regionp->getSimAccessString()); +			FillMaturityTextBox(mContentRating, gFloaterView->getParentFloater(this));  			mLandType->setText(regionp->getSimProductName());  		} @@ -2858,7 +2862,7 @@ void LLPanelLandCovenant::refresh()  	LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");  	if (region_maturity)  	{ -		region_maturity->setText(region->getSimAccessString()); +		FillMaturityTextBox(region_maturity, gFloaterView->getParentFloater(this));  	}  	LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); @@ -2939,3 +2943,38 @@ void LLPanelLandCovenant::updateEstateOwnerName(const std::string& name)  		if (editor) editor->setText(name);  	}  } + +// fills target textbox with maturity info(icon and text) +// names_floater - pointer to floater which contains strings with maturity icons filenames +void FillMaturityTextBox(LLTextBox* target_textbox, LLFloater* names_floater) +{ +	LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); +	if (!region) +		return; + +	LLStyle::Params style; + +	U8 sim_access = region->getSimAccess(); + +	switch(sim_access) +	{ +	case SIM_ACCESS_PG: +		style.image(LLUI::getUIImage(names_floater->getString("maturity_icon_general"))); +		break; + +	case SIM_ACCESS_ADULT: +		style.image(LLUI::getUIImage(names_floater->getString("maturity_icon_adult"))); +		break; + +	case SIM_ACCESS_MATURE: +		style.image(LLUI::getUIImage(names_floater->getString("maturity_icon_moderate"))); +		break; + +	default: +		break; +	} + +	// any text may be here instead of "icon" except "" +	target_textbox->setText(std::string("icon"),style); +	target_textbox->appendText(LLViewerParcelMgr::getInstance()->getSelectionRegion()->getSimAccessString(), false); +} diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index f7fd7bb472..cc807c2370 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -285,10 +285,7 @@ LLFolderView::~LLFolderView( void )  	LLView::deleteViewByHandle(mPopupMenuHandle); -	if(mRenamer == gFocusMgr.getTopCtrl()) -	{ -		gFocusMgr.setTopCtrl(NULL); -	} +	gViewerWindow->removePopup(mRenamer);  	mAutoOpenItems.removeAllNodes();  	clearSelection(); @@ -972,7 +969,7 @@ void LLFolderView::finishRenamingItem( void )  		mRenameItem->rename( mRenamer->getText() );  	} -	gFocusMgr.setTopCtrl( NULL );	 +	gViewerWindow->removePopup(mRenamer);  	if( mRenameItem )  	{ @@ -989,7 +986,7 @@ void LLFolderView::closeRenamer( void )  	// will commit current name (which could be same as original name)  	mRenamer->setFocus( FALSE );  	mRenamer->setVisible( FALSE ); -	gFocusMgr.setTopCtrl( NULL ); +	gViewerWindow->removePopup(mRenamer);  	if( mRenameItem )  	{ @@ -1421,7 +1418,7 @@ void LLFolderView::startRenamingSelectedItem( void )  		mRenamer->setFocus( TRUE );  		mRenamer->setTopLostCallback(boost::bind(onRenamerLost, _1));  		mRenamer->setFocusLostCallback(boost::bind(onRenamerLost, _1)); -		gFocusMgr.setTopCtrl( mRenamer ); +		gViewerWindow->addPopup(mRenamer);  	}  } @@ -1902,7 +1899,7 @@ void LLFolderView::deleteAllChildren()  {  	if(mRenamer == gFocusMgr.getTopCtrl())  	{ -		gFocusMgr.setTopCtrl(NULL); +		gViewerWindow->removePopup(mRenamer);  	}  	LLView::deleteViewByHandle(mPopupMenuHandle);  	mPopupMenuHandle = LLHandle<LLView>(); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 9f24ddc799..115c7a1aa5 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -114,6 +114,23 @@ public:  };  static LLDispatchClassifiedClickThrough sClassifiedClickThrough; +// Just to debug errors. Can be thrown away later. +class LLClassifiedClickMessageResponder : public LLHTTPClient::Responder +{ +	LOG_CLASS(LLClassifiedClickMessageResponder); + +public: +	// If we get back an error (not found, etc...), handle it here +	virtual void errorWithContent( +		U32 status, +		const std::string& reason, +		const LLSD& content) +	{ +		llwarns << "Sending click message failed (" << status << "): [" << reason << "]" << llendl; +		llwarns << "Content: [" << content << "]" << llendl; +	} +}; +  /* Re-expose this if we need to have classified ad HTML detail     pages.  JC @@ -1237,7 +1254,7 @@ void LLPanelClassifiedInfo::reshape(S32 width, S32 height, BOOL called_from_pare  void LLPanelClassifiedInfo::onOpen(const LLSD& key)  { -	LLUUID avatar_id = key["avatar_id"]; +	LLUUID avatar_id = key["classified_creator_id"];  	if(avatar_id.isNull())  	{  		return; @@ -1255,9 +1272,12 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)  	scrollToTop();  	setClassifiedId(key["classified_id"]); -	setClassifiedName(key["name"]); -	setDescription(key["desc"]); -	setSnapshotId(key["snapshot_id"]); +	setClassifiedName(key["classified_name"]); +	setDescription(key["classified_desc"]); +	setSnapshotId(key["classified_snapshot_id"]); +	setFromSearch(key["from_search"]); + +	llinfos << "Opening classified [" << getClassifiedName() << "] (" << getClassifiedId() << ")" << llendl;  	LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);  	LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); @@ -1274,6 +1294,10 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)  		LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(getClassifiedId()));  	} +	// Update classified click stats. +	// *TODO: Should we do this when opening not from search? +	sendClickMessage("profile"); +  	setInfoLoaded(false);  } @@ -1289,6 +1313,8 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t  			setSnapshotId(c_info->snapshot_id);  			setParcelId(c_info->parcel_id);  			setPosGlobal(c_info->pos_global); +			setSimName(c_info->sim_name); +  			setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global));  			childSetValue("category", LLClassifiedInfo::sCategories[c_info->category]); @@ -1299,6 +1325,8 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t  			bool mature = is_cf_mature(c_info->flags);  			childSetValue("content_type", mature ? mature_str : pg_str); +			getChild<LLIconCtrl>("content_type_moderate")->setVisible(mature); +			getChild<LLIconCtrl>("content_type_general")->setVisible(!mature);  			std::string auto_renew_str = is_cf_auto_renew(c_info->flags) ?   				getString("auto_renew_on") : getString("auto_renew_off"); @@ -1323,7 +1351,19 @@ void LLPanelClassifiedInfo::resetData()  	setClassifiedLocation(LLStringUtil::null);  	setClassifiedId(LLUUID::null);  	setSnapshotId(LLUUID::null); -	mPosGlobal.clearVec(); +	setPosGlobal(LLVector3d::zero); +	setParcelId(LLUUID::null); +	setSimName(LLStringUtil::null); +	setFromSearch(false); + +	// reset click stats +	mTeleportClicksOld	= 0; +	mMapClicksOld		= 0; +	mProfileClicksOld	= 0; +	mTeleportClicksNew	= 0; +	mMapClicksNew		= 0; +	mProfileClicksNew	= 0; +  	childSetText("category", LLStringUtil::null);  	childSetText("content_type", LLStringUtil::null);  	childSetText("click_through_text", LLStringUtil::null); @@ -1331,6 +1371,8 @@ void LLPanelClassifiedInfo::resetData()  	childSetText("auto_renew", LLStringUtil::null);  	childSetText("creation_date", LLStringUtil::null);  	childSetText("click_through_text", LLStringUtil::null); +	getChild<LLIconCtrl>("content_type_moderate")->setVisible(FALSE); +	getChild<LLIconCtrl>("content_type_general")->setVisible(FALSE);  }  void LLPanelClassifiedInfo::resetControls() @@ -1444,6 +1486,13 @@ void LLPanelClassifiedInfo::setClickThrough(  		ct_str.setArg("[PROFILE]",	llformat("%d", self->mProfileClicksNew + self->mProfileClicksOld));  		self->childSetText("click_through_text", ct_str.getString()); +		// *HACK: remove this when there is enough room for click stats in the info panel +		self->childSetToolTip("click_through_text", ct_str.getString());   + +		llinfos << "teleport: " << llformat("%d", self->mTeleportClicksNew + self->mTeleportClicksOld) +				<< ", map: "    << llformat("%d", self->mMapClicksNew + self->mMapClicksOld) +				<< ", profile: " << llformat("%d", self->mProfileClicksNew + self->mProfileClicksOld) +				<< llendl;  	}  } @@ -1532,8 +1581,46 @@ void LLPanelClassifiedInfo::scrollToTop()  		scrollContainer->goToTop();  } +// static +// *TODO: move out of the panel +void LLPanelClassifiedInfo::sendClickMessage( +		const std::string& type, +		bool from_search, +		const LLUUID& classified_id, +		const LLUUID& parcel_id, +		const LLVector3d& global_pos, +		const std::string& sim_name) +{ +	// You're allowed to click on your own ads to reassure yourself +	// that the system is working. +	LLSD body; +	body["type"]			= type; +	body["from_search"]		= from_search; +	body["classified_id"]	= classified_id; +	body["parcel_id"]		= parcel_id; +	body["dest_pos_global"]	= global_pos.getValue(); +	body["region_name"]		= sim_name; + +	std::string url = gAgent.getRegion()->getCapability("SearchStatTracking"); +	llinfos << "Sending click msg via capability (url=" << url << ")" << llendl; +	llinfos << "body: [" << body << "]" << llendl; +	LLHTTPClient::post(url, body, new LLClassifiedClickMessageResponder()); +} + +void LLPanelClassifiedInfo::sendClickMessage(const std::string& type) +{ +	sendClickMessage( +		type, +		fromSearch(), +		getClassifiedId(), +		getParcelId(), +		getPosGlobal(), +		getSimName()); +} +  void LLPanelClassifiedInfo::onMapClick()  { +	sendClickMessage("map");  	LLFloaterWorldMap::getInstance()->trackLocation(getPosGlobal());  	LLFloaterReg::showInstance("world_map", "center");  } @@ -1542,6 +1629,7 @@ void LLPanelClassifiedInfo::onTeleportClick()  {  	if (!getPosGlobal().isExactlyZero())  	{ +		sendClickMessage("teleport");  		gAgent.teleportViaLocation(getPosGlobal());  		LLFloaterWorldMap::getInstance()->trackLocation(getPosGlobal());  	} @@ -1703,7 +1791,7 @@ void LLPanelClassifiedEdit::processProperties(void* data, EAvatarProcessorType t  			bool mature = is_cf_mature(c_info->flags);  			bool auto_renew = is_cf_auto_renew(c_info->flags); -			getChild<LLComboBox>("content_type")->setCurrentByIndex(mature ? CB_ITEM_MATURE : CB_ITEM_PG); +			getChild<LLIconsComboBox>("content_type")->setCurrentByIndex(mature ? CB_ITEM_MATURE : CB_ITEM_PG);  			childSetValue("auto_renew", auto_renew);  			childSetValue("price_for_listing", c_info->price_for_listing);  			childSetEnabled("price_for_listing", isNew()); @@ -1762,7 +1850,7 @@ void LLPanelClassifiedEdit::resetControls()  	LLPanelClassifiedInfo::resetControls();  	getChild<LLComboBox>("category")->setCurrentByIndex(0); -	getChild<LLComboBox>("content_type")->setCurrentByIndex(0); +	getChild<LLIconsComboBox>("content_type")->setCurrentByIndex(0);  	childSetValue("auto_renew", false);  	childSetValue("price_for_listing", MINIMUM_PRICE_FOR_LISTING);  	childSetEnabled("price_for_listing", TRUE); @@ -1826,7 +1914,7 @@ U8 LLPanelClassifiedEdit::getFlags()  {  	bool auto_renew = childGetValue("auto_renew").asBoolean(); -	LLComboBox* content_cb = getChild<LLComboBox>("content_type"); +	LLComboBox* content_cb = getChild<LLIconsComboBox>("content_type");  	bool mature = content_cb->getCurrentIndex() == CB_ITEM_MATURE;  	return pack_classified_flags_request(auto_renew, false, mature, false); diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 78f095a9bb..58e7c9a4b4 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -221,6 +221,7 @@ private:  class LLPanelClassifiedInfo : public LLPanel, public LLAvatarPropertiesObserver  { +	LOG_CLASS(LLPanelClassifiedInfo);  public:  	static LLPanelClassifiedInfo* create(); @@ -263,6 +264,14 @@ public:  	LLUUID getParcelId() { return mParcelId; } +	void setSimName(const std::string& sim_name) { mSimName = sim_name; } + +	std::string getSimName() { return mSimName; } + +	void setFromSearch(bool val) { mFromSearch = val; } + +	bool fromSearch() { return mFromSearch; } +  	bool getInfoLoaded() { return mInfoLoaded; }  	void setInfoLoaded(bool loaded) { mInfoLoaded = loaded; } @@ -274,6 +283,14 @@ public:  		S32 profile,  		bool from_new_table); +	static void sendClickMessage( +			const std::string& type, +			bool from_search, +			const LLUUID& classified_id, +			const LLUUID& parcel_id, +			const LLVector3d& global_pos, +			const std::string& sim_name); +  	void setExitCallback(const commit_callback_t& cb);  	void setEditClassifiedCallback(const commit_callback_t& cb); @@ -296,6 +313,7 @@ protected:  		const LLVector3d& pos_global);  	void stretchSnapshot(); +	void sendClickMessage(const std::string& type);  	LLRect getDefaultSnapshotRect(); @@ -315,6 +333,8 @@ private:  	LLUUID mClassifiedId;  	LLVector3d mPosGlobal;  	LLUUID mParcelId; +	std::string mSimName; +	bool mFromSearch;  	bool mInfoLoaded;  	LLScrollContainer*		mScrollContainer; @@ -337,6 +357,7 @@ private:  class LLPanelClassifiedEdit : public LLPanelClassifiedInfo  { +	LOG_CLASS(LLPanelClassifiedEdit);  public:  	static LLPanelClassifiedEdit* create(); diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index a73c25a979..4f2d6374ca 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -82,6 +82,8 @@ LLPanelNearByMedia::LLPanelNearByMedia()  	  mParcelMediaItem(NULL),  	  mParcelAudioItem(NULL)  { +	mHoverTimer.stop(); +  	mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) &&  							gSavedSettings.getBOOL("MediaTentativeAutoPlay"); @@ -188,33 +190,25 @@ void LLPanelNearByMedia::onMouseLeave(S32 x, S32 y, MASK mask)  }  /*virtual*/  +void LLPanelNearByMedia::onTopLost() +{ +	setVisible(FALSE); +} + + +/*virtual*/   void LLPanelNearByMedia::handleVisibilityChange ( BOOL new_visibility )  {  	if (new_visibility)	  	{  		mHoverTimer.start(); // timer will be stopped when mouse hovers over panel -		//gFocusMgr.setTopCtrl(this);  	}  	else  	{  		mHoverTimer.stop(); -		//if (gFocusMgr.getTopCtrl() == this) -		//{ -		//	gFocusMgr.setTopCtrl(NULL); -		//}  	}  } -/*virtual*/  -void LLPanelNearByMedia::onTopLost () -{ -	//LLUICtrl* new_top = gFocusMgr.getTopCtrl(); -	//if (!new_top || !new_top->hasAncestor(this)) -	//{ -	//	setVisible(FALSE); -	//} -} -  /*virtual*/  void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)  { @@ -234,13 +228,6 @@ const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f;  /*virtual*/  void LLPanelNearByMedia::draw()  { -	//LLUICtrl* new_top = gFocusMgr.getTopCtrl(); -	//if (new_top != this) -	//{ -	//	// reassert top ctrl -	//	gFocusMgr.setTopCtrl(this); -	//} -  	// keep bottom of panel on screen  	LLRect screen_rect = calcScreenRect();  	if (screen_rect.mBottom < 0) diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index 4f864519f5..af4659365f 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -53,8 +53,8 @@ public:  	/*virtual*/ void draw();  	/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);  	/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); +	/*virtual*/ void onTopLost();  	/*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); -	/*virtual*/ void onTopLost ();  	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);  	/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 2ff2597f08..f0860e7027 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -140,10 +140,11 @@ public:  		params["open_tab_name"] = "panel_picks";  		params["show_tab_panel"] = "classified_details";  		params["classified_id"] = c_info->classified_id; -		params["classified_avatar_id"] = c_info->creator_id; +		params["classified_creator_id"] = c_info->creator_id;  		params["classified_snapshot_id"] = c_info->snapshot_id;  		params["classified_name"] = c_info->name;  		params["classified_desc"] = c_info->description; +		params["from_search"] = true;  		LLSideTray::getInstance()->showPanel("panel_profile_view", params);  	} @@ -174,31 +175,6 @@ LLClassifiedHandler gClassifiedHandler;  ////////////////////////////////////////////////////////////////////////// -/** - * Copy&Pasted from old LLPanelClassified. This class does nothing at the moment. - * Subscribing to "classifiedclickthrough" removes a few warnings. - */ -class LLClassifiedClickThrough : public LLDispatchHandler -{ -public: - -	// "classifiedclickthrough" -	// strings[0] = classified_id -	// strings[1] = teleport_clicks -	// strings[2] = map_clicks -	// strings[3] = profile_clicks -	virtual bool operator()( -		const LLDispatcher* dispatcher, -		const std::string& key, -		const LLUUID& invoice, -		const sparam_t& strings) -	{ -		if (strings.size() != 4)  -			return false; - -		return true; -	} -};  //-----------------------------------------------------------------------------  // LLPanelPicks @@ -217,12 +193,9 @@ LLPanelPicks::LLPanelPicks()  	mClassifiedsAccTab(NULL),  	mPanelClassifiedInfo(NULL),  	mPanelClassifiedEdit(NULL), -	mClickThroughDisp(NULL),  	mNoClassifieds(false),  	mNoPicks(false)  { -	mClickThroughDisp = new LLClassifiedClickThrough(); -	gGenericDispatcher.addHandler("classifiedclickthrough", mClickThroughDisp);  }  LLPanelPicks::~LLPanelPicks() @@ -231,8 +204,6 @@ LLPanelPicks::~LLPanelPicks()  	{  		LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);  	} - -	delete mClickThroughDisp;  }  void* LLPanelPicks::create(void* data /* = NULL */) @@ -607,7 +578,11 @@ void LLPanelPicks::onClickTeleport()  	if(pick_item)  		pos = pick_item->getPosGlobal();  	else if(c_item) +	{  		pos = c_item->getPosGlobal(); +		LLPanelClassifiedInfo::sendClickMessage("teleport", false, +			c_item->getClassifiedId(), LLUUID::null, pos, LLStringUtil::null); +	}  	if (!pos.isExactlyZero())  	{ @@ -626,7 +601,11 @@ void LLPanelPicks::onClickMap()  	if (pick_item)  		pos = pick_item->getPosGlobal();  	else if(c_item) +	{ +		LLPanelClassifiedInfo::sendClickMessage("map", false, +			c_item->getClassifiedId(), LLUUID::null, pos, LLStringUtil::null);  		pos = c_item->getPosGlobal(); +	}  	LLFloaterWorldMap::getInstance()->trackLocation(pos);  	LLFloaterReg::showInstance("world_map", "center"); @@ -756,26 +735,20 @@ void LLPanelPicks::openClassifiedInfo()  	if (selected_value.isUndefined()) return;  	LLClassifiedItem* c_item = getSelectedClassifiedItem(); +	LLSD params; +	params["classified_id"] = c_item->getClassifiedId(); +	params["classified_creator_id"] = c_item->getAvatarId(); +	params["classified_snapshot_id"] = c_item->getSnapshotId(); +	params["classified_name"] = c_item->getClassifiedName(); +	params["classified_desc"] = c_item->getDescription(); +	params["from_search"] = false; -	openClassifiedInfo(c_item->getClassifiedId(), c_item->getAvatarId(), -					   c_item->getSnapshotId(), c_item->getClassifiedName(), -					   c_item->getDescription()); +	openClassifiedInfo(params);  } -void LLPanelPicks::openClassifiedInfo(const LLUUID &classified_id,  -									  const LLUUID &avatar_id, -									  const LLUUID &snapshot_id, -									  const std::string &name, const std::string &desc) +void LLPanelPicks::openClassifiedInfo(const LLSD ¶ms)  {  	createClassifiedInfoPanel(); - -	LLSD params; -	params["classified_id"] = classified_id; -	params["avatar_id"] = avatar_id; -	params["snapshot_id"] = snapshot_id; -	params["name"] = name; -	params["desc"] = desc; -  	getProfilePanel()->openPanel(mPanelClassifiedInfo, params);  } diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 3f757e482e..11e811275b 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -55,7 +55,6 @@ class LLPanelPickEdit;  class LLToggleableMenu;  class LLPanelClassifiedInfo;  class LLPanelClassifiedEdit; -class LLClassifiedClickThrough;  // *TODO  // Panel Picks has been consolidated with Classifieds (EXT-2095), give LLPanelPicks @@ -120,9 +119,7 @@ private:  	void openPickInfo();  	void openClassifiedInfo(); -	void openClassifiedInfo(const LLUUID &classified_id, const LLUUID &avatar_id, -							const LLUUID &snapshot_id, const std::string &name, -							const std::string &desc); +	void openClassifiedInfo(const LLSD& params);  	friend class LLPanelProfile;  	void showAccordion(const std::string& name, bool show); @@ -159,8 +156,6 @@ private:  	LLAccordionCtrlTab* mPicksAccTab;  	LLAccordionCtrlTab* mClassifiedsAccTab; -	LLClassifiedClickThrough* mClickThroughDisp; -	  	//true if picks list is empty after processing picks  	bool mNoPicks;  	//true if classifieds list is empty after processing classifieds diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index b5d85dfd4b..18da8dd48c 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -171,15 +171,13 @@ void LLPanelProfile::onOpen(const LLSD& key)  		}  		else if (panel == "classified_details")  		{ -			LLUUID classified_id = key["classified_id"].asUUID(); -			LLUUID avatar_id     = key["classified_avatar_id"].asUUID(); -			LLUUID snapshot_id   = key["classified_snapshot_id"].asUUID(); -			std::string name     = key["classified_name"].asString(); -			std::string desc     = key["classified_desc"].asString();  			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);  			if (picks)  			{ -				picks->openClassifiedInfo(classified_id, avatar_id, snapshot_id, name, desc); +				LLSD params = key; +				params.erase("show_tab_panel"); +				params.erase("open_tab_name"); +				picks->openClassifiedInfo(params);  			}  		}  	} diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index 559997254e..ae52bd3703 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -56,6 +56,8 @@  // Default constructor  LLPanelVolumePulldown::LLPanelVolumePulldown()  { +	mHoverTimer.stop(); +      mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2));  	mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2));  	LLUICtrlFactory::instance().buildPanel(this, "panel_volume_pulldown.xml"); @@ -77,6 +79,11 @@ void LLPanelVolumePulldown::onMouseEnter(S32 x, S32 y, MASK mask)  	LLPanel::onMouseEnter(x,y,mask);  } +/*virtual*/ +void LLPanelVolumePulldown::onTopLost() +{ +	setVisible(FALSE); +}  /*virtual*/  void LLPanelVolumePulldown::onMouseLeave(S32 x, S32 y, MASK mask) @@ -95,13 +102,8 @@ void LLPanelVolumePulldown::handleVisibilityChange ( BOOL new_visibility )  	else  	{  		mHoverTimer.stop(); -	} -} -/*virtual*/  -void LLPanelVolumePulldown::onTopLost() -{ -	setVisible(FALSE); +	}  }  void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data) diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h index 9f20caa1a8..7fb025f329 100644 --- a/indra/newview/llpanelvolumepulldown.h +++ b/indra/newview/llpanelvolumepulldown.h @@ -47,8 +47,8 @@ class LLPanelVolumePulldown : public LLPanel  	/*virtual*/ void draw();  	/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);  	/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); -	/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );  	/*virtual*/ void onTopLost(); +	/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );  	/*virtual*/ BOOL postBuild();   private: diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp new file mode 100644 index 0000000000..1668a91eed --- /dev/null +++ b/indra/newview/llpopupview.cpp @@ -0,0 +1,250 @@ +/**  + * @file llpopupview.cpp + * @brief Holds transient popups + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + *  + * Copyright (c) 2001-2010, Linden Research, Inc. + *  + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab.  Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + *  + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + *  + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + *  + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llpopupview.h" + +static LLRegisterPanelClassWrapper<LLPopupView> r("popup_holder"); + +bool view_visible_and_enabled(LLView* viewp) +{ +	return viewp->getVisible() && viewp->getEnabled(); +} + +bool view_visible(LLView* viewp) +{ +	return viewp->getVisible(); +} + + +LLPopupView::LLPopupView() +{ +	// register ourself as handler of UI popups +	LLUI::setPopupFuncs(boost::bind(&LLPopupView::addPopup, this, _1), boost::bind(&LLPopupView::removePopup, this, _1), boost::bind(&LLPopupView::clearPopups, this)); +} + +LLPopupView::~LLPopupView() +{ +	// set empty callback function so we can't handle popups anymore +	LLUI::setPopupFuncs(LLUI::add_popup_t(), LLUI::remove_popup_t(), LLUI::clear_popups_t()); +} + +void LLPopupView::draw() +{ +	S32 screen_x, screen_y; + +	// remove dead popups +	for (popup_list_t::iterator popup_it = mPopups.begin(); +		popup_it != mPopups.end();) +	{ +		if (!popup_it->get()) +		{ +			mPopups.erase(popup_it++); +		} +		else +		{ +			popup_it++; +		} +	} + +	// draw in reverse order (most recent is on top) +	for (popup_list_t::reverse_iterator popup_it = mPopups.rbegin(); +		popup_it != mPopups.rend();) +	{ +		LLView* popup = popup_it->get(); + +		if (popup->getVisible()) +		{ +			popup->localPointToScreen(0, 0, &screen_x, &screen_y); + +			LLUI::pushMatrix(); +			{ +				LLUI::translate( (F32) screen_x, (F32) screen_y, 0.f); +				popup->draw(); +			} +			LLUI::popMatrix(); +		} +		++popup_it; +	} + +	LLPanel::draw(); +} + +BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func,  +								   boost::function<bool(LLView*)> predicate,  +								   S32 x, S32 y, +								   bool close_popups) +{ +	for (popup_list_t::iterator popup_it = mPopups.begin(); +		popup_it != mPopups.end();) +	{ +		LLView* popup = popup_it->get(); +		if (!popup  +			|| !predicate(popup)) +		{ +			++popup_it; +			continue; +		} + +		S32 popup_x, popup_y; +		if (localPointToOtherView(x, y, &popup_x, &popup_y, popup)  +			&& popup->pointInView(popup_x, popup_y)) +		{ +			if (func(popup, popup_x, popup_y)) +			{ +				return TRUE; +			} +		} + +		if (close_popups) +		{ +			popup_list_t::iterator cur_popup_it = popup_it++; +			mPopups.erase(cur_popup_it); +			popup->onTopLost(); +		} +		else +		{ +			++popup_it; +		} +	} + +	return FALSE; +} + + +BOOL LLPopupView::handleMouseDown(S32 x, S32 y, MASK mask) +{ +	if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true)) +	{ +		return FALSE; +	} +	return TRUE; +} + +BOOL LLPopupView::handleMouseUp(S32 x, S32 y, MASK mask) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false); +} + +BOOL LLPopupView::handleMiddleMouseDown(S32 x, S32 y, MASK mask) +{ +	if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true)) +	{ +		return FALSE; +	} +	return TRUE; +} + +BOOL LLPopupView::handleMiddleMouseUp(S32 x, S32 y, MASK mask) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false); +} + +BOOL LLPopupView::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ +	if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true)) +	{ +		return FALSE; +	} +	return TRUE; +} + +BOOL LLPopupView::handleRightMouseUp(S32 x, S32 y, MASK mask) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false); +} + +BOOL LLPopupView::handleDoubleClick(S32 x, S32 y, MASK mask) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false); +} + +BOOL LLPopupView::handleHover(S32 x, S32 y, MASK mask) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false); +} + +BOOL LLPopupView::handleScrollWheel(S32 x, S32 y, S32 clicks) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false); +} + +BOOL LLPopupView::handleToolTip(S32 x, S32 y, MASK mask) +{ +	return handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false); +} + +void LLPopupView::addPopup(LLView* popup) +{ +	if (popup) +	{ +		popup_list_t::iterator iter = std::find(mPopups.begin(), mPopups.end(), popup->getHandle()); +		if(iter != mPopups.end()) +		{ +			mPopups.erase(iter); +		} +		mPopups.push_front(popup->getHandle()); +	} +} + +void LLPopupView::removePopup(LLView* popup) +{ +	if (popup) +	{ +		if (gFocusMgr.childHasKeyboardFocus(popup)) +		{ +			gFocusMgr.setKeyboardFocus(NULL); +		} +		popup_list_t::iterator iter = std::find(mPopups.begin(), mPopups.end(), popup->getHandle()); +		if(iter != mPopups.end()) +		{ +			mPopups.erase(iter); +		} +		popup->onTopLost(); +	} +} + +void LLPopupView::clearPopups() +{ +	for (popup_list_t::iterator popup_it = mPopups.begin(); +		popup_it != mPopups.end();) +	{ +		LLView* popup = popup_it->get(); + +		popup_list_t::iterator cur_popup_it = popup_it; +		++popup_it; + +		mPopups.erase(cur_popup_it); +		popup->onTopLost(); +	} +} + diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h new file mode 100644 index 0000000000..1ec61d5450 --- /dev/null +++ b/indra/newview/llpopupview.h @@ -0,0 +1,67 @@ +/**  + * @file llpopupview.h + * @brief Holds transient popups + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + *  + * Copyright (c) 2001-2009, Linden Research, Inc. + *  + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab.  Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + *  + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + *  + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + *  + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLPOPUPVIEW_H +#define LL_LLPOPUPVIEW_H + +#include "llpanel.h" + +class LLPopupView : public LLPanel +{ +public: +	LLPopupView(); +	~LLPopupView(); + +	/*virtual*/ void draw(); +	/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); +	/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); +	/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); + +	void addPopup(LLView* popup); +	void removePopup(LLView* popup); +	void clearPopups(); + +	typedef std::list<LLHandle<LLView> > popup_list_t; +	popup_list_t getCurrentPopups() { return mPopups; } + +private: +	BOOL handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups); +	popup_list_t mPopups; +}; +#endif //LL_LLROOTVIEW_H diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 0476e785a5..120b584cd9 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -128,11 +128,13 @@ void LLProgressView::setVisible(BOOL visible)  {  	if (getVisible() && !visible)  	{ +  		mFadeTimer.start();  	}  	else if (!getVisible() && visible)  	{ -		gFocusMgr.setTopCtrl(this); +		gViewerWindow->addPopup(this); +  		setFocus(TRUE);  		mFadeTimer.stop();  		mProgressTimer.start(); @@ -187,6 +189,8 @@ void LLProgressView::draw()  			// Fade is complete, release focus  			gFocusMgr.releaseFocusIfNeeded( this );  			LLPanel::setVisible(FALSE); +			gViewerWindow->removePopup(this); +  			gStartTexture = NULL;  		}  		return; diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp index ffd9bc7624..e5323db466 100644 --- a/indra/newview/llsplitbutton.cpp +++ b/indra/newview/llsplitbutton.cpp @@ -165,7 +165,7 @@ void LLSplitButton::showButtons()  	// register ourselves as a "top" control  	// effectively putting us into a special draw layer -	gFocusMgr.setTopCtrl(this); +	gViewerWindow->addPopup(this);  	mItemsPanel->setFocus(TRUE); @@ -182,10 +182,7 @@ void LLSplitButton::hideButtons()  	mArrowBtn->setToggleState(FALSE);  	setUseBoundingRect(FALSE); -	if(gFocusMgr.getTopCtrl() == this) -	{ -		gFocusMgr.setTopCtrl(NULL); -	} +	gViewerWindow->removePopup(this);  } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 9fb496c214..9206b4a43a 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -239,20 +239,16 @@ BOOL LLStatusBar::postBuild()  	childSetActionTextbox("stat_btn", onClickStatGraph); -	LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder"); -  	mPanelVolumePulldown = new LLPanelVolumePulldown(); -	popup_holder->addChild(mPanelVolumePulldown); +	addChild(mPanelVolumePulldown); +	mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); +	mPanelVolumePulldown->setVisible(FALSE);  	mPanelNearByMedia = new LLPanelNearByMedia(); -	popup_holder->addChild(mPanelNearByMedia); -	gViewerWindow->getRootView()->addMouseDownCallback(boost::bind(&LLStatusBar::onClickScreen, this, _1, _2)); +	addChild(mPanelNearByMedia);  	mPanelNearByMedia->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);  	mPanelNearByMedia->setVisible(FALSE); -	mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); -	mPanelVolumePulldown->setVisible(FALSE); -  	return TRUE;  } @@ -528,11 +524,11 @@ static void onClickScriptDebug(void*)  void LLStatusBar::onMouseEnterVolume()  {  	LLButton* volbtn =  getChild<LLButton>( "volume_btn" ); -	LLRect vol_btn_screen_rect = volbtn->calcScreenRect(); +	LLRect vol_btn_rect = volbtn->getRect();  	LLRect volume_pulldown_rect = mPanelVolumePulldown->getRect(); -	volume_pulldown_rect.setLeftTopAndSize(vol_btn_screen_rect.mLeft - -	     (volume_pulldown_rect.getWidth() - vol_btn_screen_rect.getWidth())/2, -			       vol_btn_screen_rect.mBottom, +	volume_pulldown_rect.setLeftTopAndSize(vol_btn_rect.mLeft - +	     (volume_pulldown_rect.getWidth() - vol_btn_rect.getWidth())/2, +			       vol_btn_rect.mBottom,  			       volume_pulldown_rect.getWidth(),  			       volume_pulldown_rect.getHeight()); @@ -540,8 +536,10 @@ void LLStatusBar::onMouseEnterVolume()  	// show the master volume pull-down -	mPanelVolumePulldown->setVisible(TRUE); +	LLUI::clearPopups(); +	LLUI::addPopup(mPanelVolumePulldown);  	mPanelNearByMedia->setVisible(FALSE); +	mPanelVolumePulldown->setVisible(TRUE);  }  void LLStatusBar::onMouseEnterNearbyMedia() @@ -549,7 +547,7 @@ void LLStatusBar::onMouseEnterNearbyMedia()  	LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder");  	LLRect nearby_media_rect = mPanelNearByMedia->getRect();  	LLButton* nearby_media_btn =  getChild<LLButton>( "media_toggle_btn" ); -	LLRect nearby_media_btn_rect = nearby_media_btn->calcScreenRect(); +	LLRect nearby_media_btn_rect = nearby_media_btn->getRect();  	nearby_media_rect.setLeftTopAndSize(nearby_media_btn_rect.mLeft -   										(nearby_media_rect.getWidth() - nearby_media_btn_rect.getWidth())/2,  										nearby_media_btn_rect.mBottom, @@ -560,8 +558,11 @@ void LLStatusBar::onMouseEnterNearbyMedia()  	// show the master volume pull-down  	mPanelNearByMedia->setShape(nearby_media_rect); -	mPanelNearByMedia->setVisible(TRUE); +	LLUI::clearPopups(); +	LLUI::addPopup(mPanelNearByMedia); +  	mPanelVolumePulldown->setVisible(FALSE); +	mPanelNearByMedia->setVisible(TRUE);  } @@ -650,18 +651,6 @@ void LLStatusBar::onClickStatGraph(void* data)  	LLFloaterReg::showInstance("lagmeter");  } -void LLStatusBar::onClickScreen(S32 x, S32 y) -{ -	if (mPanelNearByMedia->getVisible()) -	{ -		LLRect screen_rect = mPanelNearByMedia->calcScreenRect(); -		if (!screen_rect.pointInRect(x, y)) -		{ -			mPanelNearByMedia->setVisible(FALSE); -		} -	} -} -  BOOL can_afford_transaction(S32 cost)  {  	return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost))); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 3116c8feb0..4649b9cbef 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -751,6 +751,7 @@ LLTextureCache::LLTextureCache(bool threaded)  LLTextureCache::~LLTextureCache()  {  	clearDeleteList() ; +	writeUpdatedEntries() ;  }  ////////////////////////////////////////////////////////////////////////////// @@ -758,6 +759,9 @@ LLTextureCache::~LLTextureCache()  //virtual  S32 LLTextureCache::update(U32 max_time_ms)  { +	static LLFrameTimer timer ; +	static const F32 MAX_TIME_INTERVAL = 300.f ; //seconds. +  	S32 res;  	res = LLWorkerThread::update(max_time_ms); @@ -793,6 +797,12 @@ S32 LLTextureCache::update(U32 max_time_ms)  		responder->completed(success);  	} +	if(!res && timer.getElapsedTimeF32() > MAX_TIME_INTERVAL) +	{ +		timer.reset() ; +		writeUpdatedEntries() ; +	} +  	return res;  } @@ -1083,6 +1093,8 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create  				entry.init(id, time(NULL));  				// Update Header  				writeEntriesHeader(); +				 +				//the new entry, write immediately.  				// Write Entry  				S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry);  				LLAPRFile* aprfile = openHeaderEntriesFile(false, offset); @@ -1098,12 +1110,20 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create  		// Remove this entry from the LRU if it exists  		mLRU.erase(id);  		// Read the entry -		S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); -		LLAPRFile* aprfile = openHeaderEntriesFile(true, offset); -		S32 bytes_read = aprfile->read((void*)&entry, (S32)sizeof(Entry)); -		llassert_always(bytes_read == sizeof(Entry)); +		idx_entry_map_t::iterator iter = mUpdatedEntryMap.find(idx) ; +		if(iter != mUpdatedEntryMap.end()) +		{ +			entry = iter->second ; +		} +		else +		{ +			S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); +			LLAPRFile* aprfile = openHeaderEntriesFile(true, offset); +			S32 bytes_read = aprfile->read((void*)&entry, (S32)sizeof(Entry)); +			llassert_always(bytes_read == sizeof(Entry));			 +			closeHeaderEntriesFile(); +		}  		llassert_always(entry.mImageSize == 0 || entry.mImageSize == -1 || entry.mImageSize > entry.mBodySize); -		closeHeaderEntriesFile();  	}  	return idx;  } @@ -1121,12 +1141,8 @@ void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry)  				mTexturesSizeMap[entry.mID] = entry.mBodySize;  			}  // 			llinfos << "Updating TE: " << idx << ": " << id << " Size: " << entry.mBodySize << " Time: " << entry.mTime << llendl; -			S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); -			LLAPRFile* aprfile = openHeaderEntriesFile(false, offset); -			S32 bytes_written = aprfile->write((void*)&entry, (S32)sizeof(Entry)); -			llassert_always(bytes_written == sizeof(Entry));  			mHeaderEntriesMaxWriteIdx = llmax(mHeaderEntriesMaxWriteIdx, idx); -			closeHeaderEntriesFile(); +			mUpdatedEntryMap[idx] = entry ;  		}  	}  } @@ -1141,6 +1157,7 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries)  	mTexturesSizeTotal = 0;  	LLAPRFile* aprfile = openHeaderEntriesFile(false, (S32)sizeof(EntriesInfo)); +	updatedHeaderEntriesFile() ;  	for (U32 idx=0; idx<num_entries; idx++)  	{  		Entry entry; @@ -1191,6 +1208,47 @@ void LLTextureCache::writeEntriesAndClose(const std::vector<Entry>& entries)  	}  } +void LLTextureCache::writeUpdatedEntries() +{ +	lockHeaders() ; +	if (!mReadOnly && !mUpdatedEntryMap.empty()) +	{ +		openHeaderEntriesFile(false, 0); +		updatedHeaderEntriesFile() ; +		closeHeaderEntriesFile(); +	} +	unlockHeaders() ; +} + +//mHeaderMutex is locked and mHeaderAPRFile is created before calling this. +void LLTextureCache::updatedHeaderEntriesFile() +{ +	if (!mReadOnly && !mUpdatedEntryMap.empty() && mHeaderAPRFile) +	{ +		//entriesInfo +		mHeaderAPRFile->seek(APR_SET, 0); +		S32 bytes_written = mHeaderAPRFile->write((U8*)&mHeaderEntriesInfo, sizeof(EntriesInfo)) ; +		llassert_always(bytes_written == sizeof(EntriesInfo)); +		 +		//write each updated entry +		S32 entry_size = (S32)sizeof(Entry) ; +		S32 prev_idx = -1 ; +		S32 delta_idx ; +		for (idx_entry_map_t::iterator iter = mUpdatedEntryMap.begin(); iter != mUpdatedEntryMap.end(); ++iter) +		{ +			delta_idx = iter->first - prev_idx - 1; +			prev_idx = iter->first ; +			if(delta_idx) +			{ +				mHeaderAPRFile->seek(APR_CUR, delta_idx * entry_size); +			} +			 +			bytes_written = mHeaderAPRFile->write((void*)(&iter->second), entry_size); +			llassert_always(bytes_written == entry_size); +		} +		mUpdatedEntryMap.clear() ; +	} +}  //----------------------------------------------------------------------------  // Called from either the main thread or the worker thread diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 64ec881fc3..b840619c1f 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -68,6 +68,7 @@ private:  		Entry(const LLUUID& id, S32 imagesize, S32 bodysize, U32 time) :  			mID(id), mImageSize(imagesize), mBodySize(bodysize), mTime(time) {}  		void init(const LLUUID& id, U32 time) { mID = id, mImageSize = 0; mBodySize = 0; mTime = time; } +		Entry& operator=(const Entry& entry) {mID = entry.mID, mImageSize = entry.mImageSize; mBodySize = entry.mBodySize; mTime = entry.mTime; return *this;}  		LLUUID mID; // 16 bytes  		S32 mImageSize; // total size of image if known  		S32 mBodySize; // size of body file in body cache @@ -166,6 +167,8 @@ private:  	S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize);  	S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize);  	bool removeHeaderCacheEntry(const LLUUID& id); +	void writeUpdatedEntries() ; +	void updatedHeaderEntriesFile() ;  	void lockHeaders() { mHeaderMutex.lock(); }  	void unlockHeaders() { mHeaderMutex.unlock(); } @@ -204,6 +207,9 @@ private:  	S64 mTexturesSizeTotal;  	LLAtomic32<BOOL> mDoPurge; +	typedef std::map<S32, Entry> idx_entry_map_t; +	idx_entry_map_t mUpdatedEntryMap; +  	// Statics  	static F32 sHeaderCacheVersion;  	static U32 sCacheMaxEntries; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 98731f90f4..a4ca33f10f 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -665,12 +665,18 @@ void LLTextureView::draw()  // 		LLViewerObject *objectp;  // 		S32 te; +//#if LL_DEBUG +		BOOL drawing = LLView::sIsDrawing; +		LLView::sIsDrawing = FALSE; +//#endif  		for_each(mTextureBars.begin(), mTextureBars.end(), DeletePointer());  		mTextureBars.clear(); -	 -		delete mGLTexMemBar; +			 +		delete mGLTexMemBar;		  		mGLTexMemBar = 0; -	 +//#if LL_DEBUG +		LLView::sIsDrawing = drawing ; +//#endif	  		typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;  		display_list_t display_image_list; @@ -683,6 +689,10 @@ void LLTextureView::draw()  			 iter != gTextureList.mImageList.end(); )  		{  			LLPointer<LLViewerFetchedTexture> imagep = *iter++; +			if(!imagep->hasFetcher()) +			{ +				continue ; +			}  			S32 cur_discard = imagep->getDiscardLevel();  			S32 desired_discard = imagep->mDesiredDiscardLevel; diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp index 577b5952e5..22c7d670f8 100644 --- a/indra/newview/lluploaddialog.cpp +++ b/indra/newview/lluploaddialog.cpp @@ -91,7 +91,7 @@ LLUploadDialog::LLUploadDialog( const std::string& msg)  	setMessage(msg);  	// The dialog view is a root view -	gFocusMgr.setTopCtrl( this ); +	gViewerWindow->addPopup(this);  }  void LLUploadDialog::setMessage( const std::string& msg) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 84377198eb..6dc18085e0 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -455,6 +455,7 @@ public:  	F32         getElapsedLastReferencedSavedRawImageTime() const ;  	BOOL		isFullyLoaded() const; +	BOOL        hasFetcher() const { return mHasFetcher;}  protected:  	/*virtual*/ void switchToCachedImage();  	S32 getCurrentDiscardLevelForFetching() ; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 30f2d2c41b..d0a1a31ebd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -131,6 +131,7 @@  #include "llmorphview.h"  #include "llmoveview.h"  #include "llnavigationbar.h" +#include "llpopupview.h"  #include "llpreviewtexture.h"  #include "llprogressview.h"  #include "llresmgr.h" @@ -690,23 +691,23 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window,  LLCoordGL pos, MASK  	}  	// Topmost view gets a chance before the hierarchy -	LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); -	if (top_ctrl) -	{ -		S32 local_x, local_y; -		top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); -		if (top_ctrl->pointInView(local_x, local_y)) -		{ -			return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down)	; -		} -		else -		{ -			if (down) -			{ -				gFocusMgr.setTopCtrl(NULL); -			} -		} -	} +	//LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); +	//if (top_ctrl) +	//{ +	//	S32 local_x, local_y; +	//	top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); +	//		if (top_ctrl->pointInView(local_x, local_y)) +	//		{ +	//			return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down)	; +	//		} +	//		else +	//		{ +	//		if (down) +	//		{ +	//			gFocusMgr.setTopCtrl(NULL); +	//		} +	//	} +	//}  	// Give the UI views a chance to process the click  	if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) @@ -1552,11 +1553,13 @@ void LLViewerWindow::initBase()  	mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle();  	mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle();  	mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle(); +	mPopupView = main_view->getChild<LLPopupView>("popup_holder");  	// Constrain floaters to inside the menu and status bar regions.  	gFloaterView = main_view->getChild<LLFloaterView>("Floater View");  	gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View"); +  	// Console  	llassert( !gConsole );  	LLConsole::Params cp; @@ -2018,9 +2021,9 @@ void LLViewerWindow::drawDebugText()  void LLViewerWindow::draw()  { -#if LL_DEBUG +//#if LL_DEBUG  	LLView::sIsDrawing = TRUE; -#endif +//#endif  	stop_glerror();  	LLUI::setLineWidth(1.f); @@ -2132,9 +2135,9 @@ void LLViewerWindow::draw()  	LLUI::popMatrix();  	gGL.popMatrix(); -#if LL_DEBUG +//#if LL_DEBUG  	LLView::sIsDrawing = FALSE; -#endif +//#endif  }  // Takes a single keydown event, usually when UI is visible @@ -2426,6 +2429,30 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)  	return;  } +void LLViewerWindow::addPopup(LLView* popup) +{ +	if (mPopupView) +	{ +		mPopupView->addPopup(popup); +	} +} + +void LLViewerWindow::removePopup(LLView* popup) +{ +	if (mPopupView) +	{ +		mPopupView->removePopup(popup); +	} +} + +void LLViewerWindow::clearPopups() +{ +	if (mPopupView) +	{ +		mPopupView->clearPopups(); +	} +} +  void LLViewerWindow::moveCursorToCenter()  {  	if (! gSavedSettings.getBOOL("DisableMouseWarp")) @@ -2554,6 +2581,33 @@ void LLViewerWindow::updateUI()  	}  	// aggregate visible views that contain mouse cursor in display order +	LLPopupView::popup_list_t popups = mPopupView->getCurrentPopups(); + +	for(LLPopupView::popup_list_t::iterator popup_it = popups.begin(); popup_it != popups.end(); ++popup_it) +	{ +		LLView* popup = popup_it->get(); +		if (popup && popup->calcScreenBoundingRect().pointInRect(x, y)) +		{ +			// iterator over contents of top_ctrl, and throw into mouse_hover_set +			for (LLView::tree_iterator_t it = popup->beginTreeDFS(); +				it != popup->endTreeDFS(); +				++it) +			{ +				LLView* viewp = *it; +				if (viewp->getVisible() +					&& viewp->calcScreenBoundingRect().pointInRect(x, y)) +				{ +					// we have a view that contains the mouse, add it to the set +					mouse_hover_set.insert(viewp->getHandle()); +				} +				else +				{ +					// skip this view and all of its children +					it.skipDescendants(); +				} +			} +		} +	}  	// while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events  	if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y)) diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index bfce65f2ba..410445d97f 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -69,6 +69,7 @@ class LLHUDIcon;  class LLWindow;  class LLRootView;  class LLViewerWindowListener; +class LLPopupView;  #define PICK_HALF_WIDTH 5  #define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1) @@ -300,6 +301,11 @@ public:  	BOOL			handleKey(KEY key, MASK mask);  	void			handleScrollWheel	(S32 clicks); +	// add and remove views from "popup" layer +	void			addPopup(LLView* popup); +	void			removePopup(LLView* popup); +	void			clearPopups(); +  	// Hide normal UI when a logon fails, re-show everything when logon is attempted again  	void			setNormalControlsVisible( BOOL visible );  	void			setMenuBackgroundColor(bool god_mode = false, bool dev_grid = false); @@ -458,6 +464,7 @@ protected:  	LLHandle<LLView> mWorldViewPlaceholder;	// widget that spans the portion of screen dedicated to rendering the 3d world  	LLHandle<LLView> mNonSideTrayView;		// parent of world view + bottom bar, etc...everything but the side tray  	LLHandle<LLView> mFloaterViewHolder;	// container for floater_view +	LLPopupView*	mPopupView;			// container for transient popups  	class LLDebugText* mDebugText; // Internal class for debug text @@ -477,7 +484,7 @@ protected:  private:  	// Object temporarily hovered over while dragging  	LLPointer<LLViewerObject>	mDragHoveredObject; -};	 +};  void toggle_flying(void*);  void toggle_first_person(); diff --git a/indra/newview/skins/default/xui/de/floater_buy_currency.xml b/indra/newview/skins/default/xui/de/floater_buy_currency.xml index 4bf4692e36..d0d3628448 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_currency.xml @@ -18,13 +18,13 @@  	<text name="balance_amount">  		[AMT] L$  	</text> -	<text name="currency_action" width="90"> +	<text name="currency_action">  		Ich möchte kaufen  	</text>  	<text name="currency_label">  		L$  	</text> -	<line_editor label="L$" left_delta="55" name="currency_amt"> +	<line_editor label="L$" name="currency_amt">  		1234  	</line_editor>  	<text name="buying_label"> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 29c6ae8009..2b0cb66f61 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -9,6 +9,18 @@   title="ABOUT LAND"   width="490">      <floater.string +      name="maturity_icon_general"> +      "Parcel_PG_Dark" +    </floater.string> +    <floater.string +      name="maturity_icon_moderate"> +      "Parcel_M_Dark" +    </floater.string> +    <floater.string +      name="maturity_icon_adult"> +      "Parcel_R_Dark" +    </floater.string> +    <floater.string       name="Minutes">          [MINUTES] minutes      </floater.string> @@ -395,7 +407,7 @@ Leyla Linden               </text>               name="Cancel Land Sale"               left_pad="5"               top_pad="-25" -             width="145" /> +             width="155" />              <text               type="string"               length="1" @@ -1504,7 +1516,7 @@ Only large parcels can be listed in search.               name="Clear"               tool_tip="Clear the landing point"               right="-10" -             width="50" /> +             width="55" />              <text               type="string"               length="1" diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index fd10938539..6f2b0fc3ea 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -307,7 +307,7 @@               label_selected="Save"               layout="topleft"               name="Save" -             right="190" +             right="186"               top="477"               width="82" />              <button @@ -319,7 +319,7 @@               name="Save As"               top="477"               right="304" -             width="110" /> +             width="115" />          </panel>          <panel           border="false" @@ -489,7 +489,7 @@               height="23"               layout="topleft"               name="Item Action Label" -             right="132" +             right="90"               width="100">                  Skin:              </text> @@ -548,7 +548,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -561,7 +561,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -739,7 +739,7 @@               height="23"               layout="topleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Hair:              </text> @@ -771,7 +771,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -784,7 +784,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -924,7 +924,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Eyes:              </text> @@ -955,7 +955,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -968,7 +968,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -1069,7 +1069,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -1082,7 +1082,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -1193,7 +1193,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Shirt:              </text> @@ -1272,7 +1272,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -1285,7 +1285,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -1396,7 +1396,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Pants:              </text> @@ -1538,7 +1538,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Shoes:              </text> @@ -1579,7 +1579,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -1592,7 +1592,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -1741,7 +1741,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Socks:              </text> @@ -1782,7 +1782,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -1795,7 +1795,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -1944,7 +1944,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Jacket:              </text> @@ -1996,7 +1996,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -2009,7 +2009,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -2158,7 +2158,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Gloves:              </text> @@ -2199,7 +2199,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -2212,7 +2212,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -2361,7 +2361,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Undershirt:              </text> @@ -2402,7 +2402,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -2415,7 +2415,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -2564,7 +2564,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Underpants:              </text> @@ -2605,7 +2605,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -2618,7 +2618,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -2767,7 +2767,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Skirt:              </text> @@ -2808,7 +2808,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -2821,7 +2821,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -2970,7 +2970,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Tattoo:              </text> @@ -3024,7 +3024,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -3037,7 +3037,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" @@ -3186,7 +3186,7 @@               height="23"               layout="bottomleft"               name="Item Action Label" -             right="132" +             right="90"                width="100">                  Alpha:              </text> @@ -3305,7 +3305,7 @@               label="Save"               label_selected="Save"               layout="topleft" -             right="218" +             right="186"               name="Save"               top="477"               width="82" /> @@ -3318,7 +3318,7 @@               right="304"               name="Save As"               top="477" -             width="82" /> +             width="115" />              <button               follows="right|bottom"               height="23" diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml index 990be55847..1f192f9b28 100644 --- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml @@ -45,9 +45,9 @@       layout="topleft"       name="Reset"       left="10" -     width="61" /> +     width="85" />      <check_box -    left_delta="71" +    left_delta="90"      top_delta="3"       enabled="false"       follows="left|bottom" @@ -57,9 +57,9 @@       label="Running"       layout="topleft"       name="running" -     width="100" /> +     width="205" />      <check_box -    left_delta="75" +    left_delta="140"       enabled="true"       follows="left|bottom"       font="SansSerif" diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 01548dd820..dda14f02ff 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -45,7 +45,7 @@      </radio_group>    <ui_ctrl       height="90" -    width="90" +    width="125"      layout="topleft"      name="thumbnail_placeholder"      top_pad="6" @@ -149,7 +149,7 @@       left="10"       name="type_label2"       top_pad="5" -     width="120"> +     width="127">          Size      </text>      <text @@ -199,7 +199,7 @@       left_delta="0"       name="texture_size_combo"       top_delta="0" -     width="120"> +     width="127">          <combo_box.item           label="Current Window"           name="CurrentWindow" @@ -228,7 +228,7 @@       left_delta="0"       name="local_size_combo"       top_delta="0" -     width="120"> +     width="127">          <combo_box.item           label="Current Window"           name="CurrentWindow" diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 7b6081d7be..85853f39bb 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -156,18 +156,19 @@                     name="notify_container"                     tab_group="-2"                     width="1024"/> -  <menu_holder top="0" -               follows="all" -               height="768" -               mouse_opaque="false" -               name="Menu Holder" -               width="1024"/>    <panel top="0"           follows="all"           height="768"           mouse_opaque="false"           name="popup_holder" +         class="popup_holder"           width="1024"/> +  <menu_holder top="0" +               follows="all" +               height="768" +               mouse_opaque="false" +               name="Menu Holder" +               width="1024"/>    <snapshot_floater_view enabled="false"                           follows="all"                           height="768" diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 1535ce2978..e3b331799c 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -24,7 +24,7 @@   </panel.string>   <panel.string    name="click_through_text_fmt"> -    [TELEPORT] teleport, [MAP] map, [MAP] profile +    [TELEPORT] teleport, [MAP] map, [PROFILE] profile   </panel.string>   <panel.string    name="date_fmt"> @@ -156,6 +156,24 @@           top_pad="10"           value="Content Type:"           width="140" /> +        <icon +         follows="top|left" +         height="16" +         image_name="Parcel_M_Light" +         layout="topleft" +         left_pad="0" +         name="content_type_moderate" +         top_pad="-11" +         width="18" /> +        <icon +         follows="top|left" +         height="16" +         image_name="Parcel_PG_Light" +         layout="topleft" +         left_delta="0" +         name="content_type_general" +         top_delta="0" +         width="18" />          <text_editor           allow_scroll="false"           bg_visible="false" @@ -163,11 +181,11 @@           h_pad="0"           height="18"           layout="topleft" -         left_pad="0" +         left_pad="2"           name="content_type"           read_only="true" -         width="150" -         top_pad="-10" +         width="130" +         top_delta="1"           v_pad="0"           value="[content type]" />          <text diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml index c1b352031f..74d63ab328 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml @@ -217,25 +217,41 @@           top_pad="15"           value="Content type:"           width="250" /> -        <combo_box  -         allow_text_entry="false"  -         follows="left|top"  -         height="23"  +        <icons_combo_box +         follows="left|top" +         height="23" +         label="General Content" +         layout="topleft"           left="10" -         name="content_type"  +         name="content_type"           top_pad="5"           width="156"> -         <combo_item  -          name="mature_ci"  -          value="Mature"> -           Moderate Content -         </combo_item> -         <combo_item  -          name="pg_ci"  -          value="PG"> -           General Content -         </combo_item> -        </combo_box> +            <icons_combo_box.drop_down_button +             image_overlay="Parcel_PG_Light" +             image_overlay_alignment="left" +             imgoverlay_label_space="3" +             pad_left="3"/> +            <icons_combo_box.item +             label="Moderate Content" +             name="mature_ci" +             value="Mature"> +                <item.columns +                 halign="center" +                 type="icon" +                 value="Parcel_M_Light" +                 width="20"/> +            </icons_combo_box.item> +            <icons_combo_box.item +             label="General Content" +             name="pg_ci" +             value="PG"> +                <item.columns +                 halign="center" +                 type="icon" +                 value="Parcel_PG_Light" +                 width="20"/> +            </icons_combo_box.item> +        </icons_combo_box>          <text           follows="left|top"           font.style="BOLD" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 01a27a08c7..1e7c51259c 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -325,6 +325,7 @@               top_pad="10"               width="313">                  <accordion_tab +                 height="170"                   layout="topleft"                   name="parcel_characteristics_tab"                   title="Parcel"> @@ -537,6 +538,7 @@                  </accordion_tab>                  <accordion_tab                   expanded="false" +                 height="150"                   layout="topleft"                   name="region_information_tab"                   title="Region"> @@ -664,6 +666,7 @@                  </accordion_tab>                  <accordion_tab                   expanded="false" +                 height="190"                   layout="topleft"                   name="estate_information_tab"                   title="Estate"> @@ -753,6 +756,7 @@                  </accordion_tab>                  <accordion_tab                   expanded="false" +                 height="320"                   layout="topleft"                   name="sales_tab"                   title="For Sale"> diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 4acfa42c23..ca9579284b 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -187,6 +187,7 @@           pad_left="3"/>          <icons_combo_box.item           label="Adult" +         name="Adult"           value="42">              <item.columns               halign="center" @@ -196,6 +197,7 @@            </icons_combo_box.item>          <icons_combo_box.item           label="Moderate" +         name="Mature"           value="21">              <item.columns               halign="center" @@ -205,6 +207,7 @@          </icons_combo_box.item>          <icons_combo_box.item           label="General" +         name="PG"           value="13">              <item.columns               halign="center" diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index d14355b9f4..d444420550 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -178,5 +178,5 @@       top_pad="-35"       right="487"       name="Save_btn" -     width="61" /> +     width="81" />  </panel> diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml index e7e2d8a0ee..d0e96583f0 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -109,7 +109,7 @@  			<text name="Selling with no objects in parcel.">  				Objets non inclus dans la vente  			</text> -			<button label="Annuler la vente du terrain" label_selected="Annuler la vente du terrain" left="275" name="Cancel Land Sale" width="165"/> +			<button label="Annuler la vente du terrain" label_selected="Annuler la vente du terrain" name="Cancel Land Sale"/>  			<text name="Claimed:">  				Acquis :  			</text> @@ -312,17 +312,17 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche.  			</text>  			<check_box label="Modifier le terrain" name="edit land check" tool_tip="Si cette option est cochée, n'importe qui peut terraformer votre terrain. Il vaut mieux ne pas cocher cette option pour toujours pouvoir modifer votre propre terrain."/>  			<check_box label="Voler" name="check fly" tool_tip="Si cette option est cochée, les résidents peuvent voler sur votre terrain. Si elle n'est pas cochée, ils ne pourront voler que lorsqu'ils arrivent et passent au dessus de votre terrain."/> -			<text left="152" name="allow_label2"> +			<text name="allow_label2">  				Construire :  			</text>  			<check_box label="Tous" left="285" name="edit objects check"/>  			<check_box label="Groupe" left="395" name="edit group objects check"/> -			<text left="152" name="allow_label3" width="150"> +			<text name="allow_label3">  				Laisser entrer des objets :  			</text>  			<check_box label="Tous" left="285" name="all object entry check"/>  			<check_box label="Groupe" left="395" name="group object entry check"/> -			<text left="152" name="allow_label4"> +			<text name="allow_label4">  				Exécuter des scripts :  			</text>  			<check_box label="Tous" left="285" name="check other scripts"/> @@ -367,11 +367,11 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche.  				Photo :  			</text>  			<texture_picker bottom="-319" label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image"/> -			<text bottom="-323" name="landing_point"> +			<text name="landing_point">  				Lieu d'arrivée : [LANDING]  			</text> -			<button bottom="-323" label="Définir" label_selected="Définir" name="Set" tool_tip="Définit le point d'arrivée des visiteurs. Définit l'emplacement de votre avatar sur ce terrain."/> -			<button bottom="-323" label="Annuler" label_selected="Annuler" name="Clear" tool_tip="Effacer le lieu d'arrivée"/> +			<button label="Définir" label_selected="Définir" name="Set" tool_tip="Définit le point d'arrivée des visiteurs. Définit l'emplacement de votre avatar sur ce terrain."/> +			<button label="Annuler" label_selected="Annuler" name="Clear" tool_tip="Effacer le lieu d'arrivée"/>  			<text bottom="-343" name="Teleport Routing: ">  				Règles de téléportation :  			</text> @@ -380,7 +380,7 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche.  				<combo_box.item label="Lieu d'arrivée fixe" name="LandingPoint"/>  				<combo_box.item label="Lieu d'arrivée libre" name="Anywhere"/>  			</combo_box> -		</panel> +		</panel>	  		<panel label="MÉDIA" name="land_media_panel">  			<text name="with media:" width="85">  				Type : diff --git a/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml index feb2fe1027..7647452e91 100644 --- a/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml @@ -9,7 +9,7 @@  	<floater.string name="Title">  		SCRIPT : [NAME]  	</floater.string> -	<button label="Réinitialiser" label_selected="Réinitialiser" left="390" name="Reset" width="100"/> -	<check_box initial_value="true" label="Exécution en cours" left="4" name="running"/> -	<check_box initial_value="true" label="Mono" left_delta="160" name="mono"/> +	<button label="Réinitialiser" label_selected="Réinitialiser" name="Reset"/> +	<check_box initial_value="true" label="Exécution en cours" name="running"/> +	<check_box initial_value="true" label="Mono" name="mono"/>  </floater>  | 
