diff options
| -rwxr-xr-x | indra/newview/llappviewer.cpp | 3 | ||||
| -rwxr-xr-x | indra/newview/lldrawpoolbump.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llpanellandmarks.cpp | 1 | ||||
| -rwxr-xr-x | indra/newview/llpanelteleporthistory.cpp | 62 | ||||
| -rwxr-xr-x | indra/newview/skins/default/textures/textures.xml | 6 | ||||
| -rwxr-xr-x | indra/newview/skins/default/xui/en/panel_teleport_history_item.xml | 15 | 
6 files changed, 81 insertions, 8 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b7a8194b4d..d4fdf8fd49 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3194,7 +3194,8 @@ bool LLAppViewer::initWindow()  #ifdef LL_DARWIN      //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)     if (getOSInfo().mMajorVer == 10 && getOSInfo().mMinorVer < 7) -       gViewerWindow->getWindow()->setOldResize(true); +		if ( getOSInfo().mMinorVer == 6 && getOSInfo().mBuild < 8 ) +       		gViewerWindow->getWindow()->setOldResize(true);  #endif  	if (gSavedSettings.getBOOL("WindowMaximized")) diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 6b4c5cfca1..79a81cedda 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -155,7 +155,7 @@ void LLStandardBumpmap::addstandard()  			LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));	  		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLGLTexture::LOCAL) ;  		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL ); -		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0) ; +		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0, 30.f) ;  		LLStandardBumpmap::sStandardBumpmapCount++;  	} diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index a22d9c06fa..1d3b583192 100755 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -1263,6 +1263,7 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg  		break;  	} +	updateVerbs();  	return true;  } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 9c380f63bd..be9b095644 100755 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -45,6 +45,7 @@  #include "llviewermenu.h"  #include "lllandmarkactions.h"  #include "llclipboard.h" +#include "lltrans.h"  // Maximum number of items that can be added to a list in one pass.  // Used to limit time spent for items list update per frame. @@ -55,7 +56,8 @@ static const std::string COLLAPSED_BY_USER = "collapsed_by_user";  class LLTeleportHistoryFlatItem : public LLPanel  {  public: -	LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl); +	LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, +										 	 LLDate date, const std::string &hl);  	virtual ~LLTeleportHistoryFlatItem();  	virtual BOOL postBuild(); @@ -66,8 +68,11 @@ public:  	void setIndex(S32 index) { mIndex = index; }  	const std::string& getRegionName() { return mRegionName;}  	void setRegionName(const std::string& name); +	void setDate(LLDate date);  	void setHighlightedText(const std::string& text);  	void updateTitle(); +	void updateTimestamp(); +	std::string getTimestamp();  	/*virtual*/ void setValue(const LLSD& value); @@ -84,12 +89,14 @@ private:  	LLButton* mProfileBtn;  	LLTextBox* mTitle; +	LLTextBox* mTimeTextBox;  	LLTeleportHistoryPanel::ContextMenu *mContextMenu;  	S32 mIndex;  	std::string mRegionName;  	std::string mHighlight; +	LLDate 		mDate;  	LLRootHandle<LLTeleportHistoryFlatItem> mItemHandle;  }; @@ -121,11 +128,13 @@ private:  ////////////////////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////////////////// -LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl) +LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, +																LLDate date, const std::string &hl)  :	LLPanel(),  	mIndex(index),  	mContextMenu(context_menu),  	mRegionName(region_name), +	mDate(date),  	mHighlight(hl)  {  	buildFromFile( "panel_teleport_history_item.xml"); @@ -140,11 +149,14 @@ BOOL LLTeleportHistoryFlatItem::postBuild()  {  	mTitle = getChild<LLTextBox>("region"); +	mTimeTextBox = getChild<LLTextBox>("timestamp"); +  	mProfileBtn = getChild<LLButton>("profile_btn");  	mProfileBtn->setClickedCallback(boost::bind(&LLTeleportHistoryFlatItem::onProfileBtnClick, this));  	updateTitle(); +	updateTimestamp();  	return true;  } @@ -179,6 +191,38 @@ void LLTeleportHistoryFlatItem::setRegionName(const std::string& name)  	mRegionName = name;  } +void LLTeleportHistoryFlatItem::setDate(LLDate date) +{ +	mDate = date; +} + +std::string LLTeleportHistoryFlatItem::getTimestamp() +{ +	const LLDate &date = mDate; +	std::string timestamp = ""; + +	LLDate now = LLDate::now(); +	S32 now_year, now_month, now_day, now_hour, now_min, now_sec; +	now.split(&now_year, &now_month, &now_day, &now_hour, &now_min, &now_sec); + +	const S32 seconds_in_day = 24 * 60 * 60; +	S32 seconds_today = now_hour * 60 * 60 + now_min * 60 + now_sec; +	S32 time_diff = (S32) now.secondsSinceEpoch() - (S32) date.secondsSinceEpoch(); + +	// Only show timestamp for today and yesterday +	if(time_diff < seconds_today + seconds_in_day) +	{ +		timestamp = "[" + LLTrans::getString("TimeHour12")+"]:[" +						+ LLTrans::getString("TimeMin")+"] ["+ LLTrans::getString("TimeAMPM")+"]"; +		LLSD substitution; +		substitution["datetime"] = (S32) date.secondsSinceEpoch(); +		LLStringUtil::format(timestamp, substitution); +	} + +	return timestamp; + +} +  void LLTeleportHistoryFlatItem::updateTitle()  {  	static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", LLColor4U(255, 255, 255)); @@ -190,6 +234,17 @@ void LLTeleportHistoryFlatItem::updateTitle()  		mHighlight);  } +void LLTeleportHistoryFlatItem::updateTimestamp() +{ +	static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", LLColor4U(255, 255, 255)); + +	LLTextUtil::textboxSetHighlightedVal( +		mTimeTextBox, +		LLStyle::Params().color(sFgColor), +		getTimestamp(), +		mHighlight); +} +  void LLTeleportHistoryFlatItem::onMouseEnter(S32 x, S32 y, MASK mask)  {  	getChildView("hovered_icon")->setVisible( true); @@ -248,9 +303,11 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem (  		{  			item->setIndex(cur_item_index);  			item->setRegionName(persistent_item.mTitle); +			item->setDate(persistent_item.mDate);  			item->setHighlightedText(hl);  			item->setVisible(TRUE);  			item->updateTitle(); +			item->updateTimestamp();  		}  		else  		{ @@ -264,6 +321,7 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem (  		item = new LLTeleportHistoryFlatItem(cur_item_index,  											 context_menu,  											 persistent_item.mTitle, +											 persistent_item.mDate,  											 hl);  		mItems.push_back(item->getItemHandle());  	} diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 94c187e21a..20686eafd4 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -242,7 +242,7 @@ with the same filename but different name    <texture name="Icon_Dock_Foreground" file_name="windows/Icon_Dock_Foreground.png" preload="true" />    <texture name="Icon_Dock_Press" file_name="windows/Icon_Dock_Press.png" preload="true" /> -  <texture name="Icon_For_Sale" file_name="icons/Icon_For_sale.png" preload="false" /> +  <texture name="Icon_For_Sale" file_name="icons/Icon_For_Sale.png" preload="false" />    <texture name="Icon_Gear_Background" file_name="windows/Icon_Gear_Background.png" preload="false" />    <texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="false" /> @@ -343,8 +343,8 @@ with the same filename but different name    <texture name="ModelImport_Status_Warning" file_name="lag_status_warning.tga" preload="false"/>    <texture name="ModelImport_Status_Error" file_name="red_x.png" preload="false"/> -  <texture name="MouseLook_View_Off" file_name="bottomtray/MouseLook_view_off.png" preload="false" /> -  <texture name="MouseLook_View_On" file_name="bottomtray/MouseLook_view_on.png" preload="false" /> +  <texture name="MouseLook_View_Off" file_name="bottomtray/Mouselook_View_Off.png" preload="false" /> +  <texture name="MouseLook_View_On" file_name="bottomtray/Mouselook_View_On.png" preload="false" />    <texture name="Move_Fly_Off" file_name="bottomtray/Move_Fly_Off.png" preload="false" />    <texture name="Move_Run_Off" file_name="bottomtray/Move_Run_Off.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index c5b0be0616..26cac06648 100755 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -47,7 +47,20 @@       text_color="White"       top="4"       value="..." -     width="330" /> +     width="290" /> +    <text +     follows="right" +     height="20" +     layout="topleft" +     left_pad="5" +     right="-20" +     parse_urls="false" +     use_ellipses="true" +     name="timestamp" +     text_color="White" +     top="4" +     value="..." +     width="45" />      <button       follows="right"       height="20"  | 
