00001
00032 #include "llviewerprecompiledheaders.h"
00033
00034 #include "llpaneldirpeople.h"
00035
00036
00037 #include "message.h"
00038
00039
00040 #include "llqueryflags.h"
00041
00042 LLPanelDirPeople::LLPanelDirPeople(const std::string& name, LLFloaterDirectory* floater)
00043 : LLPanelDirBrowser(name, floater)
00044 {
00045 mMinSearchChars = 3;
00046 }
00047
00048 BOOL LLPanelDirPeople::postBuild()
00049 {
00050 LLPanelDirBrowser::postBuild();
00051
00052 childSetKeystrokeCallback("name", &LLPanelDirBrowser::onKeystrokeName, this);
00053
00054 childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
00055 childDisable("Search");
00056 setDefaultBtn( "Search" );
00057
00058 return TRUE;
00059 }
00060
00061 LLPanelDirPeople::~LLPanelDirPeople()
00062 {
00063
00064 }
00065
00066
00067
00068 void LLPanelDirPeople::performQuery()
00069 {
00070 if (childGetValue("name").asString().length() < mMinSearchChars)
00071 {
00072 return;
00073 }
00074
00075 setupNewSearch();
00076
00077 U32 scope = DFQ_PEOPLE;
00078
00079
00080 sendDirFindQuery(
00081 gMessageSystem,
00082 mSearchID,
00083 childGetValue("name").asString(),
00084 scope,
00085 mSearchStart);
00086 }