aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpaneldirclassified.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpaneldirclassified.cpp')
-rw-r--r--linden/indra/newview/llpaneldirclassified.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/linden/indra/newview/llpaneldirclassified.cpp b/linden/indra/newview/llpaneldirclassified.cpp
index 8b4a49d..276b608 100644
--- a/linden/indra/newview/llpaneldirclassified.cpp
+++ b/linden/indra/newview/llpaneldirclassified.cpp
@@ -55,6 +55,7 @@
55#include "llpaneldirbrowser.h" 55#include "llpaneldirbrowser.h"
56#include "lltextbox.h" 56#include "lltextbox.h"
57#include "llviewermessage.h" 57#include "llviewermessage.h"
58#include "llvieweruictrlfactory.h"
58#include "llworldmap.h" 59#include "llworldmap.h"
59 60
60// 61//
@@ -85,7 +86,8 @@ BOOL LLPanelDirClassified::postBuild()
85 childSetKeystrokeCallback("name", onKeystrokeNameClassified, this); 86 childSetKeystrokeCallback("name", onKeystrokeNameClassified, this);
86 87
87 childSetAction("Search", onClickSearchCore, this); 88 childSetAction("Search", onClickSearchCore, this);
88 setDefaultBtn( "Search" ); 89 childSetAction("Browse", onClickSearchCore, this);
90 setDefaultBtn( "Browse" );
89 91
90 childSetAction("Place an Ad...", onClickCreateNewClassified, this); 92 childSetAction("Place an Ad...", onClickCreateNewClassified, this);
91 93
@@ -186,6 +188,7 @@ void LLPanelDirClassified::performQuery()
186void LLPanelDirClassified::onKeystrokeNameClassified(LLLineEditor* line, void* data) 188void LLPanelDirClassified::onKeystrokeNameClassified(LLLineEditor* line, void* data)
187{ 189{
188 LLPanelDirClassified *self = (LLPanelDirClassified*)data; 190 LLPanelDirClassified *self = (LLPanelDirClassified*)data;
191
189 S32 len = line->getLength(); 192 S32 len = line->getLength();
190 if (len == 0 193 if (len == 0
191 || len >= 3) 194 || len >= 3)
@@ -199,4 +202,17 @@ void LLPanelDirClassified::onKeystrokeNameClassified(LLLineEditor* line, void* d
199 self->setDefaultBtn(); 202 self->setDefaultBtn();
200 self->childDisable("Search"); 203 self->childDisable("Search");
201 } 204 }
205
206 // Change the Browse to Search or vice versa
207 if (len > 0)
208 {
209 self->childSetVisible("Search", TRUE);
210 self->childSetVisible("Browse", FALSE);
211 }
212 else
213 {
214 self->setDefaultBtn( "Browse" );
215 self->childSetVisible("Search", FALSE);
216 self->childSetVisible("Browse", TRUE);
217 }
202} 218}