UI cleanup.
-Added ui-local transformation matrix. -Gutted legacy commitcallbacks throughout ui widget ctors. -Created filter_editor ui widget which issues commit on keypress -search_editor commits on focus loss/enter press -search_editor and filter_editor now have a built in 'x' button to clear text. -LLComboBox::setPrearrangeCallback now uses boost::function -LLComboBox::setTextEntryCallback now uses boost::function -LLLineEditor::setKeystrokeCallback now uses boost::function -LLLineEditor::setPrevalidate now uses boost::function -LLPanel::childSetKeystrokeCallback removed -LLPanel::childSetPrevalidate removed -LLPanel::childSetActionTextbox now uses boost::function -LLTextBox::setClickedCallback now uses boost::function -LLTextEditor::setKeystrokeCallback added. -Cleaned up JCFloaterAreaSearch
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
#include "llpreviewlandmark.h"
|
||||
#include "llregionhandle.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llsearcheditor.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltracker.h"
|
||||
#include "lltrans.h"
|
||||
@@ -211,23 +212,22 @@ BOOL LLFloaterWorldMap::postBuild()
|
||||
|
||||
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
|
||||
avatar_combo->selectFirstItem();
|
||||
avatar_combo->setPrearrangeCallback( onAvatarComboPrearrange );
|
||||
avatar_combo->setTextEntryCallback( onComboTextEntry );
|
||||
avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange,this) );
|
||||
avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry,this) );
|
||||
mListFriendCombo = dynamic_cast<LLCtrlListInterface *>(avatar_combo);
|
||||
|
||||
LLLineEditor *location_editor = getChild<LLLineEditor>("location");
|
||||
LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
|
||||
location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
|
||||
location_editor->setKeystrokeCallback( onSearchTextEntry );
|
||||
location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
|
||||
|
||||
LLScrollListCtrl* search_results = getChild<LLScrollListCtrl>("search_results");
|
||||
search_results->setDoubleClickCallback(boost::bind(&LLFloaterWorldMap::onClickTeleportBtn,this));
|
||||
mListSearchResults = dynamic_cast<LLCtrlListInterface *>(search_results);
|
||||
|
||||
LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
|
||||
|
||||
landmark_combo->selectFirstItem();
|
||||
landmark_combo->setPrearrangeCallback( onLandmarkComboPrearrange );
|
||||
landmark_combo->setTextEntryCallback( onComboTextEntry );
|
||||
landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
|
||||
landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
|
||||
mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);
|
||||
|
||||
avatar_combo->setCommitCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboCommit,this) );
|
||||
@@ -1082,22 +1082,20 @@ void LLFloaterWorldMap::onGoHome()
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdata )
|
||||
void LLFloaterWorldMap::onLandmarkComboPrearrange( )
|
||||
{
|
||||
LLFloaterWorldMap* self = gFloaterWorldMap;
|
||||
if( !self || self->mIsClosing )
|
||||
if( mIsClosing )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLCtrlListInterface *list = self->childGetListInterface("landmark combo");
|
||||
|
||||
LLCtrlListInterface *list = mListLandmarkCombo;
|
||||
if (!list) return;
|
||||
|
||||
|
||||
LLUUID current_choice = list->getCurrentID();
|
||||
|
||||
gFloaterWorldMap->buildLandmarkIDLists();
|
||||
|
||||
|
||||
buildLandmarkIDLists();
|
||||
|
||||
if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
@@ -1105,7 +1103,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdat
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata )
|
||||
void LLFloaterWorldMap::onComboTextEntry()
|
||||
{
|
||||
// Reset the tracking whenever we start typing into any of the search fields,
|
||||
// so that hitting <enter> does an auto-complete versus teleporting us to the
|
||||
@@ -1113,11 +1111,10 @@ void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata )
|
||||
LLTracker::stopTracking(NULL);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl, void* userdata )
|
||||
void LLFloaterWorldMap::onSearchTextEntry( )
|
||||
{
|
||||
onComboTextEntry(ctrl, userdata);
|
||||
gFloaterWorldMap->updateSearchEnabled();
|
||||
onComboTextEntry();
|
||||
updateSearchEnabled();
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1168,26 +1165,25 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterWorldMap::onAvatarComboPrearrange( LLUICtrl* ctrl, void* userdata )
|
||||
void LLFloaterWorldMap::onAvatarComboPrearrange( )
|
||||
{
|
||||
LLFloaterWorldMap* self = gFloaterWorldMap;
|
||||
if( !self || self->mIsClosing )
|
||||
if( mIsClosing )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLCtrlListInterface *list = self->childGetListInterface("friend combo");
|
||||
|
||||
LLCtrlListInterface *list = mListFriendCombo;
|
||||
if (!list) return;
|
||||
|
||||
|
||||
LLUUID current_choice;
|
||||
|
||||
|
||||
if( LLAvatarTracker::instance().haveTrackingInfo() )
|
||||
{
|
||||
current_choice = LLAvatarTracker::instance().getAvatarID();
|
||||
}
|
||||
|
||||
self->buildAvatarIDList();
|
||||
|
||||
|
||||
buildAvatarIDList();
|
||||
|
||||
if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
|
||||
Reference in New Issue
Block a user