diff options
author | Jacek Antonelli | 2009-06-08 00:41:31 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-06-08 00:41:31 -0500 |
commit | 0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa (patch) | |
tree | 2c93d38e210832e737d09cff7561373d8d5453b2 /linden/indra/newview/llfloaterpostcard.cpp | |
parent | Imprudence 1.1.0 released. (diff) | |
parent | Updated Imprudence to be based on SL 1.22.11. (ChangeLog Entry) (diff) | |
download | meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.zip meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.gz meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.bz2 meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.xz |
Merge branch 'sl-base-1.22' into next
Conflicts:
linden/indra/newview/English.lproj/InfoPlist.strings
linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
Diffstat (limited to 'linden/indra/newview/llfloaterpostcard.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterpostcard.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index b4bcdb7..0eb150b 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2004&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2004&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2004-2008, Linden Research, Inc. | 7 | * Copyright (c) 2004-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -63,6 +63,8 @@ | |||
63 | 63 | ||
64 | #include "llassetuploadresponders.h" | 64 | #include "llassetuploadresponders.h" |
65 | 65 | ||
66 | #include <boost/regex.hpp> //boost.regex lib | ||
67 | |||
66 | ///---------------------------------------------------------------------------- | 68 | ///---------------------------------------------------------------------------- |
67 | /// Local function declarations, constants, enums, and typedefs | 69 | /// Local function declarations, constants, enums, and typedefs |
68 | ///---------------------------------------------------------------------------- | 70 | ///---------------------------------------------------------------------------- |
@@ -180,7 +182,7 @@ void LLFloaterPostcard::draw() | |||
180 | rect.mBottom = (S32)((F32)rect.mTop - ((F32)rect.getWidth() / ratio)); | 182 | rect.mBottom = (S32)((F32)rect.mTop - ((F32)rect.getWidth() / ratio)); |
181 | } | 183 | } |
182 | { | 184 | { |
183 | LLGLSNoTexture gls_no_texture; | 185 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
184 | gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f)); | 186 | gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f)); |
185 | rect.stretch(-1); | 187 | rect.stretch(-1); |
186 | } | 188 | } |
@@ -242,14 +244,16 @@ void LLFloaterPostcard::onClickSend(void* data) | |||
242 | 244 | ||
243 | std::string from(self->childGetValue("from_form").asString()); | 245 | std::string from(self->childGetValue("from_form").asString()); |
244 | std::string to(self->childGetValue("to_form").asString()); | 246 | std::string to(self->childGetValue("to_form").asString()); |
245 | 247 | ||
246 | if (to.empty() || to.find('@') == std::string::npos) | 248 | boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*"); |
249 | |||
250 | if (to.empty() || !boost::regex_match(to, emailFormat)) | ||
247 | { | 251 | { |
248 | gViewerWindow->alertXml("PromptRecipientEmail"); | 252 | gViewerWindow->alertXml("PromptRecipientEmail"); |
249 | return; | 253 | return; |
250 | } | 254 | } |
251 | 255 | ||
252 | if (from.empty() || from.find('@') == std::string::npos) | 256 | if (from.empty() || !boost::regex_match(from, emailFormat)) |
253 | { | 257 | { |
254 | gViewerWindow->alertXml("PromptSelfEmail"); | 258 | gViewerWindow->alertXml("PromptSelfEmail"); |
255 | return; | 259 | return; |