diff options
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llcombobox.cpp | 8 | ||||
| -rw-r--r-- | indra/llui/llcombobox.h | 1 | ||||
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 5 | ||||
| -rw-r--r-- | indra/llui/lllineeditor.h | 2 | ||||
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llurlentry.cpp | 5 | ||||
| -rw-r--r-- | indra/llui/llurlentry.h | 1 | ||||
| -rw-r--r-- | indra/llui/llviewereventrecorder.cpp | 4 | 
8 files changed, 24 insertions, 6 deletions
| diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 559895da1a..00a933a0bb 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -845,6 +845,14 @@ void LLComboBox::setTextEntry(const LLStringExplicit& text)  	}  } +void LLComboBox::setKeystrokeOnEsc(BOOL enable) +{ +	if (mTextEntry) +	{ +		mTextEntry->setKeystrokeOnEsc(enable); +	} +} +  void LLComboBox::onTextEntry(LLLineEditor* line_editor)  {  	if (mTextEntryCallback != NULL) diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index c9b1212b70..7d38c051a5 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -126,6 +126,7 @@ public:  	virtual LLSD	getValue() const;  	void			setTextEntry(const LLStringExplicit& text); +	void			setKeystrokeOnEsc(BOOL enable);  	LLScrollListItem*	add(const std::string& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);	// add item "name" to menu  	LLScrollListItem*	add(const std::string& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index bd6b00d38b..cfab6b7fc8 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -125,6 +125,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)  	mTextLeftEdge(0),		// computed in updateTextPadding() below  	mTextRightEdge(0),		// computed in updateTextPadding() below  	mCommitOnFocusLost( p.commit_on_focus_lost ), +	mKeystrokeOnEsc(FALSE),  	mRevertOnEsc( p.revert_on_esc ),  	mKeystrokeCallback( p.keystroke_callback() ),  	mIsSelecting( FALSE ), @@ -1494,6 +1495,10 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)  		{  			setText(mPrevText);  			// Note, don't set handled, still want to loose focus (won't commit becase text is now unchanged) +			if (mKeystrokeOnEsc) +			{ +				onKeystroke(); +			}  		}  		break; diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 88468503df..287837a15c 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -214,6 +214,7 @@ public:  	void			setCommitOnFocusLost( BOOL b )	{ mCommitOnFocusLost = b; }  	void			setRevertOnEsc( BOOL b )		{ mRevertOnEsc = b; } +	void			setKeystrokeOnEsc(BOOL b)		{ mKeystrokeOnEsc = b; }  	void setCursorColor(const LLColor4& c)			{ mCursorColor = c; }  	const LLColor4& getCursorColor() const			{ return mCursorColor.get(); } @@ -338,6 +339,7 @@ protected:  	BOOL		mCommitOnFocusLost;  	BOOL		mRevertOnEsc; +	BOOL		mKeystrokeOnEsc;  	keystroke_callback_t mKeystrokeCallback; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 1a49b94c23..134b76c720 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2493,11 +2493,11 @@ void LLTextEditor::updateLinkSegments()  					}  				}  			} - +			  			// if the link's label (what the user can edit) is a valid Url,  			// then update the link's HREF to be the same as the label text.  			// This lets users edit Urls in-place. -			if (LLUrlRegistry::instance().hasUrl(url_label)) +			if (acceptsTextInput() && LLUrlRegistry::instance().hasUrl(url_label))  			{  				std::string new_url = wstring_to_utf8str(url_label);  				LLStringUtil::trim(new_url); diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index a4dc5bcde1..cd9b52d164 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -298,7 +298,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const  LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()  	: LLUrlEntryBase()  { -	mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?", +	mPattern = boost::regex("(https?://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",  									boost::regex::perl|boost::regex::icase);  	mMenuName = "menu_url_http.xml";  	mTooltip = LLTrans::getString("TooltipHttpUrl"); @@ -385,8 +385,9 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const  LLUrlEntrySLURL::LLUrlEntrySLURL()  {  	// see http://slurl.com/about.php for details on the SLURL format -	mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?", +	mPattern = boost::regex("https?://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",  							boost::regex::perl|boost::regex::icase); +	mIcon = "Hand";  	mMenuName = "menu_url_slurl.xml";  	mTooltip = LLTrans::getString("TooltipSLURL");  } diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 28e9931718..78c149d9fd 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -175,6 +175,7 @@ class LLUrlEntrySLURL : public LLUrlEntryBase  {  public:  	LLUrlEntrySLURL(); +	/*virtual*/ bool isTrusted() const { return true; }  	/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);  	/*virtual*/ std::string getLocation(const std::string &url) const;  }; diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp index 9fe6a542b4..8754cfebbb 100644 --- a/indra/llui/llviewereventrecorder.cpp +++ b/indra/llui/llviewereventrecorder.cpp @@ -34,11 +34,11 @@ LLViewerEventRecorder::LLViewerEventRecorder() {    logEvents = false;    // Remove any previous event log file    std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.old"); -  LLFile::remove(old_log_ui_events_to_llsd_file); +  LLFile::remove(old_log_ui_events_to_llsd_file, ENOENT);    mLogFilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.llsd"); -  LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file); +  LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file, ENOENT);  } | 
