diff options
author | Josh Bell <josh@lindenlab.com> | 2007-01-04 02:04:29 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-01-04 02:04:29 +0000 |
commit | d60f16540dba5616cd8260046b44ebc2a1047065 (patch) | |
tree | ab241efaf58ba4eeb1916763cef337a04bc15d64 /indra/newview/llpanelclassified.cpp | |
parent | 0434d35c160bcd0d78b8f4e795a62155f50a6fb8 (diff) |
svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@56429 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance@56431
This turned up the following "lost" changes:
llapp.cpp (from maintenance r55371) - SIGPIPE fix, possibly
llfontgl.cpp (from maintenance r50207) - whitespace only
inventorybridge.cpp (property - non-executable)
skins/xui/*/* (from maintenance r55380) - XML processing instruction went AWOL
Diffstat (limited to 'indra/newview/llpanelclassified.cpp')
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 7c84d0f6a5..dbd97fc7d1 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -224,6 +224,24 @@ BOOL LLPanelClassified::postBuild() return TRUE; } +BOOL LLPanelClassified::titleIsValid() +{ + // Disallow leading spaces, punctuation, etc. that screw up + // sort order. + const LLString& name = mNameEditor->getText(); + if (name.empty()) + { + gViewerWindow->alertXml("BlankClassifiedName"); + return FALSE; + } + if (!isalnum(name[0])) + { + gViewerWindow->alertXml("ClassifiedMustBeAlphanumeric"); + return FALSE; + } + + return TRUE; +} void LLPanelClassified::apply() { @@ -602,17 +620,10 @@ void LLPanelClassified::onClickUpdate(void* data) // Disallow leading spaces, punctuation, etc. that screw up // sort order. - const LLString& name = self->mNameEditor->getText(); - if (name.empty()) + if ( ! self->titleIsValid() ) { - gViewerWindow->alertXml("BlankClassifiedName"); return; - } - if (!isalnum(name[0])) - { - gViewerWindow->alertXml("ClassifiedMustBeAlphanumeric"); - return; - } + }; // if already paid for, just do the update if (self->mPaidFor) |