From d60f16540dba5616cd8260046b44ebc2a1047065 Mon Sep 17 00:00:00 2001 From: Josh Bell Date: Thu, 4 Jan 2007 02:04:29 +0000 Subject: 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 --- indra/newview/llpanelclassified.cpp | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpanelclassified.cpp') 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) -- cgit v1.2.3