diff options
Diffstat (limited to 'indra')
23 files changed, 192 insertions, 192 deletions
| diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index af39e41fa6..bd42497cb6 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -31,7 +31,6 @@  LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater,  		const LLUIImagePtr& dockTongue, DocAt dockAt, get_allowed_rect_callback_t get_allowed_rect_callback) : -		mDockWidget(dockWidget),  		mDockableFloater(dockableFloater),  		mDockTongue(dockTongue),  		mDockTongueX(0), @@ -39,6 +38,11 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater,  {  	mDockAt = dockAt; +	if (dockWidget != NULL) +	{ +		mDockWidgetHandle = dockWidget->getHandle(); +	} +  	if (dockableFloater->isDocked())  	{  		on(); @@ -62,7 +66,7 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater,  		repositionDockable();  	} -	if (mDockWidget != NULL) +	if (getDock() != NULL)  	{  		mDockWidgetVisible = isDockVisible();  	} @@ -78,14 +82,15 @@ LLDockControl::~LLDockControl()  void LLDockControl::setDock(LLView* dockWidget)  { -	mDockWidget = dockWidget; -	if (mDockWidget != NULL) +	if (dockWidget != NULL)  	{ +		mDockWidgetHandle = dockWidget->getHandle();  		repositionDockable();  		mDockWidgetVisible = isDockVisible();  	}  	else  	{ +		mDockWidgetHandle = LLHandle<LLView>();  		mDockWidgetVisible = false;  	}  } @@ -97,8 +102,8 @@ void LLDockControl::getAllowedRect(LLRect& rect)  void LLDockControl::repositionDockable()  { -	if (!mDockWidget) return; -	LLRect dockRect = mDockWidget->calcScreenRect(); +	if (!getDock()) return; +	LLRect dockRect = getDock()->calcScreenRect();  	LLRect rootRect;  	LLRect floater_rect = mDockableFloater->calcScreenRect();  	mGetAllowedRectCallback(rootRect); @@ -150,13 +155,13 @@ bool LLDockControl::isDockVisible()  {  	bool res = true; -	if (mDockWidget != NULL) +	if (getDock() != NULL)  	{  		//we should check all hierarchy -		res = mDockWidget->isInVisibleChain(); +		res = getDock()->isInVisibleChain();  		if (res)  		{ -			LLRect dockRect = mDockWidget->calcScreenRect(); +			LLRect dockRect = getDock()->calcScreenRect();  			switch (mDockAt)  			{ @@ -169,7 +174,7 @@ bool LLDockControl::isDockVisible()  				// assume that parent for all dockable floaters  				// is the root view  				LLRect dockParentRect = -						mDockWidget->getRootView()->calcScreenRect(); +						getDock()->getRootView()->calcScreenRect();  				if (dockRect.mRight <= dockParentRect.mLeft  						|| dockRect.mLeft >= dockParentRect.mRight)  				{ @@ -189,7 +194,7 @@ bool LLDockControl::isDockVisible()  void LLDockControl::moveDockable()  {  	// calculate new dockable position -	LLRect dockRect = mDockWidget->calcScreenRect(); +	LLRect dockRect = getDock()->calcScreenRect();  	LLRect rootRect;  	mGetAllowedRectCallback(rootRect); @@ -263,7 +268,7 @@ void LLDockControl::moveDockable()  		// calculate dock tongue position -		dockParentRect = mDockWidget->getParent()->calcScreenRect(); +		dockParentRect = getDock()->getParent()->calcScreenRect();  		if (dockRect.getCenterX() < dockParentRect.mLeft)  		{  			mDockTongueX = dockParentRect.mLeft - mDockTongue->getWidth() / 2; @@ -299,7 +304,7 @@ void LLDockControl::moveDockable()  		}  		// calculate dock tongue position -		dockParentRect = mDockWidget->getParent()->calcScreenRect(); +		dockParentRect = getDock()->getParent()->calcScreenRect();  		if (dockRect.getCenterX() < dockParentRect.mLeft)  		{  			mDockTongueX = dockParentRect.mLeft - mDockTongue->getWidth() / 2; diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index c9602011f6..98a9c7236d 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -63,7 +63,7 @@ public:  	void setDock(LLView* dockWidget);  	LLView* getDock()  	{ -		return mDockWidget; +		return mDockWidgetHandle.get();  	}  	void repositionDockable();  	void drawToungue(); @@ -83,7 +83,7 @@ private:  	bool mRecalculateDockablePosition;  	bool mDockWidgetVisible;  	DocAt mDockAt; -	LLView* mDockWidget; +	LLHandle<LLView> mDockWidgetHandle;  	LLRect mPrevDockRect;  	LLRect mRootRect;  	LLRect mFloaterRect; diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index c756ff84e1..8feaf654f0 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1275,20 +1275,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )  		break;  	} -	if (!handled && mParentPanel->hasFocus()) -	{ -		if (key == KEY_BACKSPACE) -		{ -			mSearchTimer.reset(); -			if (mSearchString.size()) -			{ -				mSearchString.erase(mSearchString.size() - 1, 1); -			} -			search(getCurSelectedItem(), mSearchString, FALSE); -			handled = TRUE; -		} -	} -  	return handled;  } @@ -1336,29 +1322,6 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char)  } -BOOL LLFolderView::canDoDelete() const -{ -	if (mSelectedItems.size() == 0) return FALSE; - -	for (selected_items_t::const_iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) -	{ -		if (!(*item_it)->getViewModelItem()->isItemRemovable()) -		{ -			return FALSE; -		} -	} -	return TRUE; -} - -void LLFolderView::doDelete() -{ -	if(mSelectedItems.size() > 0) -	{				 -		removeSelectedItems(); -	} -} - -  BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask )  {  	mKeyboardSelection = FALSE; diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 05b2abb9d3..11fccdace4 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -180,9 +180,6 @@ public:  	virtual BOOL	canPaste() const;  	virtual void	paste(); -	virtual BOOL	canDoDelete() const; -	virtual void	doDelete(); -  	LLFolderViewItem* getNextUnselectedItem();  	// Public rename functionality - can only start the process diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 071046fe6d..b9256dd890 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -872,8 +872,15 @@ void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent)  void LLToolBar::createButtons()  { +	std::set<LLUUID> set_flashing; +  	BOOST_FOREACH(LLToolBarButton* button, mButtons)  	{ +        if (button->getFlashTimer() && button->getFlashTimer()->isFlashingInProgress()) +        { +        	set_flashing.insert(button->getCommandId().uuid()); +        } +  		if (mButtonRemoveSignal)  		{  			(*mButtonRemoveSignal)(button); @@ -896,6 +903,11 @@ void LLToolBar::createButtons()  		{  			(*mButtonAddSignal)(button);  		} + +		if (set_flashing.find(button->getCommandId().uuid()) != set_flashing.end()) +		{ +			button->setFlashing(true); +		}  	}  	mNeedsLayout = true;  } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fb4cc6de62..79376f7467 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4667,17 +4667,6 @@        <key>Value</key>        <integer>1</integer>      </map> -    <key>KeepConversationLogTranscripts</key> -    <map> -      <key>Comment</key> -      <string>Keep a conversation log and transcripts</string> -      <key>Persist</key> -      <integer>1</integer> -      <key>Type</key> -      <string>S32</string> -      <key>Value</key> -      <integer>2</integer> -    </map>      <key>LandBrushSize</key>      <map>        <key>Comment</key> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 6864328339..0b589e2da6 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -281,6 +281,17 @@          <key>Value</key>              <integer>0</integer>          </map> +    <key>KeepConversationLogTranscripts</key> +    	<map> +      	<key>Comment</key> +      		<string>Keep a conversation log and transcripts</string> +      	<key>Persist</key> +      		<integer>1</integer> +      	<key>Type</key> +      		<string>S32</string> +      	<key>Value</key> +      		<integer>2</integer> +    	</map>          <key>ShowFavoritesOnLogin</key>          <map>          <key>Comment</key> diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 04abda1799..82176b3a06 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -190,7 +190,7 @@ LLConversationLog::LLConversationLog() :  	mAvatarNameCacheConnection(),  	mLoggingEnabled(false)  { -	LLControlVariable * keep_log_ctrlp = gSavedSettings.getControl("KeepConversationLogTranscripts").get(); +	LLControlVariable * keep_log_ctrlp = gSavedPerAccountSettings.getControl("KeepConversationLogTranscripts").get();  	S32 log_mode = keep_log_ctrlp->getValue();  	if (log_mode > 0) @@ -369,7 +369,7 @@ void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string  void LLConversationLog::cache()  { -	if (gSavedSettings.getS32("KeepConversationLogTranscripts") > 0) +	if (gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0)  	{  		saveToFile(getFileName());  	} @@ -532,14 +532,8 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD&  {  	if (0 == LLNotificationsUtil::getSelectedOption(notification, response))  	{ -		deleteTranscripts(); +		LLLogChat::deleteTranscripts();  		mConversations.clear();  		notifyObservers();  	}  } - -void LLConversationLog::deleteTranscripts() -{ -	gDirUtilp->deleteFilesInDir(gDirUtilp->getPerAccountChatLogsDir(), "*." + LL_TRANSCRIPT_FILE_EXTENSION); -	LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true); -} diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 5213c9b3ab..d5b6eccb29 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -140,7 +140,6 @@ public:  	void onClearLog();  	void onClearLogResponse(const LLSD& notification, const LLSD& response); -	void deleteTranscripts();  	bool getIsLoggingEnabled() { return mLoggingEnabled; }  	bool isLogEmpty() { return mConversations.empty(); } diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 312f70fe30..05db0e93e6 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1154,7 +1154,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)  	if ("conversation_log" == item)  	{ -		return gSavedSettings.getS32("KeepConversationLogTranscripts") > 0; +		return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;  	}  	//Enable Chat history item for ad-hoc and group conversations @@ -1805,7 +1805,7 @@ void LLFloaterIMContainer::updateSpeakBtnState()  bool LLFloaterIMContainer::isConversationLoggingAllowed()  { -	return gSavedSettings.getS32("KeepConversationLogTranscripts") > 0; +	return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;  }  void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes) diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 345418bffc..430326203f 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -542,7 +542,7 @@ void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLS  	}  	// logging -	if (!args["do_not_log"].asBoolean() && gSavedSettings.getS32("KeepConversationLogTranscripts") > 1) +	if (!args["do_not_log"].asBoolean() && gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 1)  	{  		std::string from_name = chat.mFromName; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 4f86c26a67..da24bb3b8f 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1584,7 +1584,7 @@ void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification,  {  	if (0 == LLNotificationsUtil::getSelectedOption(notification, response))  	{ -		LLConversationLog::instance().deleteTranscripts(); +		LLLogChat::deleteTranscripts();  		updateDeleteTranscriptsButton();  	}  } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1cceb68e2a..2eaef48049 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -107,6 +107,7 @@ void process_dnd_im(const LLSD& notification)  {      LLSD data = notification["substitutions"];      LLUUID sessionID = data["SESSION_ID"].asUUID(); +	LLUUID fromID = data["FROM_ID"].asUUID();      //re-create the IM session if needed       //(when coming out of DND mode upon app restart) @@ -119,14 +120,22 @@ void process_dnd_im(const LLSD& notification)          {              name = av_name.getDisplayName();          } - +		          LLIMModel::getInstance()->newSession(sessionID,               name,               IM_NOTHING_SPECIAL,  -            data["FROM_ID"],  +            fromID,               false,               false); //will need slight refactor to retrieve whether offline message or not (assume online for now) + +		LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); +		 +		if (im_box) +		{ +			im_box->flashConversationItemWidget(sessionID, true); +		} +      }  } @@ -928,7 +937,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,  bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)  { -	if (gSavedSettings.getS32("KeepConversationLogTranscripts") > 1) +	if (gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 1)  	{	  		std::string from_name = from; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 019ba8f5b2..1357b613bb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1365,10 +1365,51 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )  			LLInventoryAction::doToSelected(mInventory, mFolderRoot, "open");  			handled = TRUE;  		} +		break; +	case KEY_DELETE: +	case KEY_BACKSPACE: +		// Delete selected items if delete or backspace key hit on the inventory panel +		// Note: on Mac laptop keyboards, backspace and delete are one and the same +		if (isSelectionRemovable() && (mask == MASK_NONE)) +		{ +			LLInventoryAction::doToSelected(mInventory, mFolderRoot, "delete"); +			handled = TRUE; +		} +		break;  	}  	return handled;  } +bool LLInventoryPanel::isSelectionRemovable() +{ +	bool can_delete = false; +	if (mFolderRoot) +	{ +		std::set<LLFolderViewItem*> selection_set = mFolderRoot->getSelectionList(); +		if (!selection_set.empty())  +		{ +			can_delete = true; +			for (std::set<LLFolderViewItem*>::iterator iter = selection_set.begin(); +				 iter != selection_set.end(); +				 ++iter) +			{ +				LLFolderViewItem *item = *iter; +				const LLFolderViewModelItemInventory *listener = static_cast<const LLFolderViewModelItemInventory*>(item->getViewModelItem()); +				if (!listener) +				{ +					can_delete = false; +				} +				else +				{ +					can_delete &= listener->isItemRemovable(); +					can_delete &= !listener->isItemInTrash(); +				} +			} +		} +	} +	return can_delete; +} +  /************************************************************************/  /* Recent Inventory Panel related class                                 */  /************************************************************************/ diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 6eb85fbad2..00a90325ad 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -162,6 +162,7 @@ public:  	void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);  	void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb);  	void clearSelection(); +	bool isSelectionRemovable();  	LLInventoryFilter& getFilter();  	const LLInventoryFilter& getFilter() const;  	void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT); diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 545b44ef92..17b72c5023 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -33,6 +33,7 @@  #include "llviewercontrol.h"  #include "lldiriterator.h" +#include "llfloaterimsessiontab.h"  #include "llinstantmessage.h"  #include "llsingleton.h" // for LLSingleton @@ -40,6 +41,7 @@  #include <boost/algorithm/string/replace.hpp>  #include <boost/regex.hpp>  #include <boost/regex/v4/match_results.hpp> +#include <boost/foreach.hpp>  #if LL_MSVC  #pragma warning(push)   @@ -62,7 +64,7 @@ const std::string LL_IM_TIME("time");  const std::string LL_IM_TEXT("message");  const std::string LL_IM_FROM("from");  const std::string LL_IM_FROM_ID("from_id"); -const std::string LL_TRANSCRIPT_FILE_EXTENSION("ll.txt"); +const std::string LL_TRANSCRIPT_FILE_EXTENSION("txt");  const static std::string IM_SEPARATOR(": ");  const static std::string NEW_LINE("\n"); @@ -85,6 +87,7 @@ const static std::string MULTI_LINE_PREFIX(" ");   * Note: "You" was used as an avatar names in viewers of previous versions   */  const static boost::regex TIMESTAMP_AND_STUFF("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}\\]\\s+|\\[\\d{1,2}:\\d{2}\\]\\s+)?(.*)$"); +const static boost::regex TIMESTAMP("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}\\]|\\[\\d{1,2}:\\d{2}\\]).*");  /**   *  Regular expression suitable to match names like @@ -328,69 +331,6 @@ void LLLogChat::saveHistory(const std::string& filename,  	}  } -void LLLogChat::loadHistory(const std::string& filename, void (*callback)(ELogLineType, const LLSD&, void*), void* userdata) -{ -	if(!filename.size()) -	{ -		llwarns << "Filename is Empty!" << llendl; -		return ; -	} -		 -	LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r");		/*Flawfinder: ignore*/ -	if (!fptr) -	{ -		callback(LOG_EMPTY, LLSD(), userdata); -		return;			//No previous conversation with this name. -	} -	else -	{ -		char buffer[LOG_RECALL_SIZE];		/*Flawfinder: ignore*/ -		char *bptr; -		S32 len; -		bool firstline=TRUE; - -		if ( fseek(fptr, (LOG_RECALL_SIZE - 1) * -1  , SEEK_END) )		 -		{	//File is smaller than recall size.  Get it all. -			firstline = FALSE; -			if ( fseek(fptr, 0, SEEK_SET) ) -			{ -				fclose(fptr); -				return; -			} -		} - -		while ( fgets(buffer, LOG_RECALL_SIZE, fptr)  && !feof(fptr) )  -		{ -			len = strlen(buffer) - 1;		/*Flawfinder: ignore*/ -			for ( bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--)	*bptr='\0'; -			 -			if (!firstline) -			{ -				LLSD item; -				std::string line(buffer); -				std::istringstream iss(line); -				 -				if (!LLChatLogParser::parse(line, item)) -				{ -					item["message"]	= line; -					callback(LOG_LINE, item, userdata); -				} -				else -				{ -					callback(LOG_LLSD, item, userdata); -				} -			} -			else -			{ -				firstline = FALSE; -			} -		} -		callback(LOG_END, LLSD(), userdata); -		 -		fclose(fptr); -	} -} -  // static  void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params)  { @@ -506,19 +446,46 @@ std::string LLLogChat::oldLogFileName(std::string filename)  void LLLogChat::getListOfTranscriptFiles(std::vector<std::string>& list_of_transcriptions)  {  	// get Users log directory -	std::string directory = gDirUtilp->getPerAccountChatLogsDir(); +	std::string dirname = gDirUtilp->getPerAccountChatLogsDir();  	// add final OS dependent delimiter -	directory += gDirUtilp->getDirDelimiter(); +	dirname += gDirUtilp->getDirDelimiter();  	// create search pattern  	std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION; -	LLDirIterator iter(directory, pattern); -	std::string scanResult; -	while (iter.next(scanResult)) +	LLDirIterator iter(dirname, pattern); +	std::string filename; +	while (iter.next(filename))  	{ -		list_of_transcriptions.push_back(scanResult); +		std::string fullname = gDirUtilp->add(dirname, filename); + +		LLFILE * filep = LLFile::fopen(fullname, "rb"); +		if (NULL != filep) +		{ +			char buffer[LOG_RECALL_SIZE]; + +			fseek(filep, 0, SEEK_END);			// seek to end of file +			S32 bytes_to_read = ftell(filep);	// get current file pointer +			fseek(filep, 0, SEEK_SET);			// seek back to beginning of file + +			// limit the number characters to read from file +			if (bytes_to_read >= LOG_RECALL_SIZE) +			{ +				bytes_to_read = LOG_RECALL_SIZE - 1; +			} + +			if (bytes_to_read > 0 && NULL != fgets(buffer, bytes_to_read, filep)) +			{ +				//matching a timestamp +				boost::match_results<std::string::const_iterator> matches; +				if (boost::regex_match(std::string(buffer), matches, TIMESTAMP)) +				{ +					list_of_transcriptions.push_back(gDirUtilp->add(dirname, filename)); +				} +			} +			LLFile::close(filep); +		}  	}  } @@ -533,6 +500,46 @@ boost::signals2::connection LLLogChat::setSaveHistorySignal(const save_history_s  	return sSaveHistorySignal->connect(cb);  } +//static +void LLLogChat::deleteTranscripts() +{ +	std::vector<std::string> list_of_transcriptions; +	getListOfTranscriptFiles(list_of_transcriptions); + +	BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions) +	{ +		S32 retry_count = 0; +		while (retry_count < 5) +		{ +			if (0 != LLFile::remove(fullpath)) +			{ +				retry_count++; +				S32 result = errno; +				LL_WARNS("LLLogChat::deleteTranscripts") << "Problem removing " << fullpath << " - errorcode: " +					<< result << " attempt " << retry_count << LL_ENDL; + +				if(retry_count >= 5) +				{ +					LL_WARNS("LLLogChat::deleteTranscripts") << "Failed to remove " << fullpath << LL_ENDL; +					return; +				} + +				ms_sleep(100); +			} +			else +			{ +				if (retry_count) +				{ +					LL_WARNS("LLLogChat::deleteTranscripts") << "Successfully removed " << fullpath << LL_ENDL; +				} +				break; +			}			 +		} +	} + +	LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true); +} +  //*TODO mark object's names in a special way so that they will be distinguishable form avatar name   //which are more strict by its nature (only firstname and secondname)  //Example, an object's name can be written like "Object <actual_object's_name>" diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index b35a94b4b3..5fbb4ade96 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -51,16 +51,13 @@ public:  				const std::string& line);  	static void getListOfTranscriptFiles(std::vector<std::string>& list); -	/** @deprecated @see loadChatHistory() */ -	static void loadHistory(const std::string& filename,  -		                    void (*callback)(ELogLineType, const LLSD&, void*),  -							void* userdata); -  	static void loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params = LLSD());  	typedef boost::signals2::signal<void ()> save_history_signal_t;  	static boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb); +	static void deleteTranscripts(); +  private:  	static std::string cleanFileName(std::string filename);  	static save_history_signal_t * sSaveHistorySignal; @@ -123,6 +120,6 @@ extern const std::string LL_IM_TIME; //("time");  extern const std::string LL_IM_TEXT; //("message");  extern const std::string LL_IM_FROM; //("from");  extern const std::string LL_IM_FROM_ID; //("from_id"); -extern const std::string LL_TRANSCRIPT_FILE_EXTENSION; //("ll.txt"); +extern const std::string LL_TRANSCRIPT_FILE_EXTENSION; //("txt");  #endif diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 82b79db60a..d6535c88e9 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1112,27 +1112,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)  	const std::string command_name = userdata.asString();  	if (command_name == "delete")  	{ -		BOOL can_delete = FALSE; -		LLFolderView* root = getActivePanel()->getRootFolder(); -		if (root) -		{ -			can_delete = TRUE; -			std::set<LLFolderViewItem*> selection_set = root->getSelectionList(); -			if (selection_set.empty()) return FALSE; -			for (std::set<LLFolderViewItem*>::iterator iter =    selection_set.begin(); -				 iter != selection_set.end(); -				 ++iter) -			{ -				LLFolderViewItem *item = *iter; -				const LLFolderViewModelItemInventory *listener = static_cast<const LLFolderViewModelItemInventory*>(item->getViewModelItem()); -				llassert(listener); -				if (!listener) return FALSE; -				can_delete &= listener->isItemRemovable(); -				can_delete &= !listener->isItemInTrash(); -			} -			return can_delete; -		} -		return FALSE; +		return getActivePanel()->isSelectionRemovable();  	}  	if (command_name == "save_texture")  	{ diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 30f137bdba..c09d4393c8 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -186,11 +186,8 @@ private:  	// Populate the menu with items like "New Skin", "New Pants", etc.  	static void populateCreateWearableSubmenus(LLMenuGL* menu)  	{ -        // MAINT-2276...these menus are created as dummies because they are not available -        // when this function is called. This prevents their parent from popping up later. -        // -		//LLView* menu_clothes	= gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); -		//LLView* menu_bp			= gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE); +		LLView* menu_clothes	= gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); +		LLView* menu_bp			= gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE);  		for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)  		{ @@ -203,11 +200,7 @@ private:  			p.on_click.function_name = "Wearable.Create";  			p.on_click.parameter = LLSD(type_name); -            //LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp; -            // This is a work-around for MAINT-2276 wherein the parent toggleable menu does not appear -            // It puts everything under one menu, but that menu appears, which is better than not. -            //  -			LLView* parent =  menu; +            LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;  			LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);  		}  	} diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp index 224aaa2146..11c12e6c10 100644 --- a/indra/newview/llpersistentnotificationstorage.cpp +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -75,7 +75,7 @@ void LLPersistentNotificationStorage::saveNotifications()  			continue;  		} -		data.append(notification->asLLSD()); +		data.append(notification->asLLSD(true));  	}  	writeNotifications(output); diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml index 7229292a14..19a4cbc119 100644 --- a/indra/newview/skins/default/xui/en/floater_conversation_log.xml +++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml @@ -3,6 +3,7 @@  <floater   can_resize="true"   positioning="cascading" + help_topic="conversation_log"   height="200"   min_height="100"   min_width="230" diff --git a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml index 6f1ddaaf4f..764b9d8385 100644 --- a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml @@ -3,6 +3,7 @@   legacy_header_height="18"   can_resize="true"   default_tab_group="1" + help_topic="conversation_preview"   height="391"   layout="topleft"   min_height="243" diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml index a6e9a40e31..45cf780557 100644 --- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml @@ -9,5 +9,5 @@      <menu       label="New Body Parts"       layout="topleft" -     name="COF.Geear.New_Body_Parts" /> +     name="COF.Gear.New_Body_Parts" />  </toggleable_menu> | 
