Housekeeping...
parent
4f2cafc163
commit
fc971a2c8f
|
|
@ -39,7 +39,7 @@
|
|||
#include "utilitybar.h"
|
||||
|
||||
FloaterAO::FloaterAO(const LLSD& key)
|
||||
: LLTransientDockableFloater(NULL,true,key),LLEventTimer(10.f),
|
||||
: LLTransientDockableFloater(NULL, true, key), LLEventTimer(10.f),
|
||||
mSetList(0),
|
||||
mSelectedSet(0),
|
||||
mSelectedState(0),
|
||||
|
|
@ -57,10 +57,14 @@ FloaterAO::~FloaterAO()
|
|||
|
||||
void FloaterAO::reloading(BOOL yes)
|
||||
{
|
||||
if(yes)
|
||||
if (yes)
|
||||
{
|
||||
mEventTimer.start();
|
||||
}
|
||||
else
|
||||
{
|
||||
mEventTimer.stop();
|
||||
}
|
||||
|
||||
mReloadCoverPanel->setVisible(yes);
|
||||
enableSetControls(!yes);
|
||||
|
|
@ -81,7 +85,7 @@ void FloaterAO::updateSetParameters()
|
|||
mOverrideSitsCheckBoxSmall->setValue(mSelectedSet->getSitOverride());
|
||||
mSmartCheckBox->setValue(mSelectedSet->getSmart());
|
||||
mDisableMouselookCheckBox->setValue(mSelectedSet->getMouselookDisable());
|
||||
BOOL isDefault=(mSelectedSet==AOEngine::instance().getDefaultSet()) ? TRUE : FALSE;
|
||||
BOOL isDefault = (mSelectedSet == AOEngine::instance().getDefaultSet()) ? TRUE : FALSE;
|
||||
mDefaultCheckBox->setValue(isDefault);
|
||||
mDefaultCheckBox->setEnabled(!isDefault);
|
||||
updateSmart();
|
||||
|
|
@ -89,31 +93,35 @@ void FloaterAO::updateSetParameters()
|
|||
|
||||
void FloaterAO::updateAnimationList()
|
||||
{
|
||||
S32 currentStateSelected=mStateSelector->getCurrentIndex();
|
||||
S32 currentStateSelected = mStateSelector->getCurrentIndex();
|
||||
|
||||
mStateSelector->removeall();
|
||||
onChangeAnimationSelection();
|
||||
|
||||
if(!mSelectedSet)
|
||||
if (!mSelectedSet)
|
||||
{
|
||||
mStateSelector->setEnabled(FALSE);
|
||||
mStateSelector->add(getString("ao_no_animations_loaded"));
|
||||
return;
|
||||
}
|
||||
|
||||
for(U32 index=0;index<mSelectedSet->mStateNames.size();index++)
|
||||
for (U32 index = 0; index < mSelectedSet->mStateNames.size(); ++index)
|
||||
{
|
||||
std::string stateName=mSelectedSet->mStateNames[index];
|
||||
AOSet::AOState* state=mSelectedSet->getStateByName(stateName);
|
||||
mStateSelector->add(stateName,state,ADD_BOTTOM,TRUE);
|
||||
std::string stateName = mSelectedSet->mStateNames[index];
|
||||
AOSet::AOState* state = mSelectedSet->getStateByName(stateName);
|
||||
mStateSelector->add(stateName, state, ADD_BOTTOM, TRUE);
|
||||
}
|
||||
|
||||
enableStateControls(TRUE);
|
||||
|
||||
if(currentStateSelected==-1)
|
||||
if (currentStateSelected == -1)
|
||||
{
|
||||
mStateSelector->selectFirstItem();
|
||||
}
|
||||
else
|
||||
{
|
||||
mStateSelector->selectNthItem(currentStateSelected);
|
||||
}
|
||||
|
||||
onSelectState();
|
||||
}
|
||||
|
|
@ -121,11 +129,13 @@ void FloaterAO::updateAnimationList()
|
|||
void FloaterAO::updateList()
|
||||
{
|
||||
mReloadButton->setEnabled(TRUE);
|
||||
mImportRunning=FALSE;
|
||||
mImportRunning = FALSE;
|
||||
|
||||
std::string currentSetName=mSetSelector->getSelectedItemLabel();
|
||||
if(currentSetName.empty())
|
||||
currentSetName=AOEngine::instance().getCurrentSetName();
|
||||
std::string currentSetName = mSetSelector->getSelectedItemLabel();
|
||||
if (currentSetName.empty())
|
||||
{
|
||||
currentSetName = AOEngine::instance().getCurrentSetName();
|
||||
}
|
||||
|
||||
mSetList=AOEngine::instance().getSetList();
|
||||
mSetSelector->removeall();
|
||||
|
|
@ -134,10 +144,10 @@ void FloaterAO::updateList()
|
|||
mSetSelectorSmall->clear();
|
||||
|
||||
mAnimationList->deleteAllItems();
|
||||
mCurrentBoldItem=NULL;
|
||||
mCurrentBoldItem = NULL;
|
||||
reloading(FALSE);
|
||||
|
||||
if(mSetList.empty())
|
||||
if (mSetList.empty())
|
||||
{
|
||||
LL_DEBUGS("AOEngine") << "empty set list" << LL_ENDL;
|
||||
mSetSelector->add(getString("ao_no_sets_loaded"));
|
||||
|
|
@ -148,14 +158,14 @@ void FloaterAO::updateList()
|
|||
return;
|
||||
}
|
||||
|
||||
for(U32 index=0;index<mSetList.size();index++)
|
||||
for (U32 index = 0; index < mSetList.size(); ++index)
|
||||
{
|
||||
std::string setName=mSetList[index]->getName();
|
||||
mSetSelector->add(setName,&mSetList[index],ADD_BOTTOM,TRUE);
|
||||
mSetSelectorSmall->add(setName,&mSetList[index],ADD_BOTTOM,TRUE);
|
||||
if(setName.compare(currentSetName)==0)
|
||||
std::string setName = mSetList[index]->getName();
|
||||
mSetSelector->add(setName, &mSetList[index], ADD_BOTTOM, TRUE);
|
||||
mSetSelectorSmall->add(setName, &mSetList[index], ADD_BOTTOM, TRUE);
|
||||
if (setName.compare(currentSetName) == 0)
|
||||
{
|
||||
mSelectedSet=AOEngine::instance().selectSetByName(currentSetName);
|
||||
mSelectedSet = AOEngine::instance().selectSetByName(currentSetName);
|
||||
mSetSelector->selectNthItem(index);
|
||||
mSetSelectorSmall->selectNthItem(index);
|
||||
updateSetParameters();
|
||||
|
|
@ -167,76 +177,76 @@ void FloaterAO::updateList()
|
|||
|
||||
BOOL FloaterAO::postBuild()
|
||||
{
|
||||
LLPanel* aoPanel=getChild<LLPanel>("animation_overrider_outer_panel");
|
||||
mMainInterfacePanel=aoPanel->getChild<LLPanel>("animation_overrider_panel");
|
||||
mSmallInterfacePanel=aoPanel->getChild<LLPanel>("animation_overrider_panel_small");
|
||||
mReloadCoverPanel=aoPanel->getChild<LLPanel>("ao_reload_cover");
|
||||
LLPanel* aoPanel = getChild<LLPanel>("animation_overrider_outer_panel");
|
||||
mMainInterfacePanel = aoPanel->getChild<LLPanel>("animation_overrider_panel");
|
||||
mSmallInterfacePanel = aoPanel->getChild<LLPanel>("animation_overrider_panel_small");
|
||||
mReloadCoverPanel = aoPanel->getChild<LLPanel>("ao_reload_cover");
|
||||
|
||||
mSetSelector=mMainInterfacePanel->getChild<LLComboBox>("ao_set_selection_combo");
|
||||
mActivateSetButton=mMainInterfacePanel->getChild<LLButton>("ao_activate");
|
||||
mAddButton=mMainInterfacePanel->getChild<LLButton>("ao_add");
|
||||
mRemoveButton=mMainInterfacePanel->getChild<LLButton>("ao_remove");
|
||||
mDefaultCheckBox=mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_default");
|
||||
mOverrideSitsCheckBox=mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_sit_override");
|
||||
mSmartCheckBox=mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_smart");
|
||||
mDisableMouselookCheckBox=mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_disable_stands_in_mouselook");
|
||||
mSetSelector = mMainInterfacePanel->getChild<LLComboBox>("ao_set_selection_combo");
|
||||
mActivateSetButton = mMainInterfacePanel->getChild<LLButton>("ao_activate");
|
||||
mAddButton = mMainInterfacePanel->getChild<LLButton>("ao_add");
|
||||
mRemoveButton = mMainInterfacePanel->getChild<LLButton>("ao_remove");
|
||||
mDefaultCheckBox = mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_default");
|
||||
mOverrideSitsCheckBox = mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_sit_override");
|
||||
mSmartCheckBox = mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_smart");
|
||||
mDisableMouselookCheckBox = mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_disable_stands_in_mouselook");
|
||||
|
||||
mStateSelector=mMainInterfacePanel->getChild<LLComboBox>("ao_state_selection_combo");
|
||||
mAnimationList=mMainInterfacePanel->getChild<LLScrollListCtrl>("ao_state_animation_list");
|
||||
mMoveUpButton=mMainInterfacePanel->getChild<LLButton>("ao_move_up");
|
||||
mMoveDownButton=mMainInterfacePanel->getChild<LLButton>("ao_move_down");
|
||||
mTrashButton=mMainInterfacePanel->getChild<LLButton>("ao_trash");
|
||||
mCycleCheckBox=mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_cycle");
|
||||
mRandomizeCheckBox=mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_randomize");
|
||||
mCycleTimeTextLabel=mMainInterfacePanel->getChild<LLTextBox>("ao_cycle_time_seconds_label");
|
||||
mCycleTimeSpinner=mMainInterfacePanel->getChild<LLSpinCtrl>("ao_cycle_time");
|
||||
mStateSelector = mMainInterfacePanel->getChild<LLComboBox>("ao_state_selection_combo");
|
||||
mAnimationList = mMainInterfacePanel->getChild<LLScrollListCtrl>("ao_state_animation_list");
|
||||
mMoveUpButton = mMainInterfacePanel->getChild<LLButton>("ao_move_up");
|
||||
mMoveDownButton = mMainInterfacePanel->getChild<LLButton>("ao_move_down");
|
||||
mTrashButton = mMainInterfacePanel->getChild<LLButton>("ao_trash");
|
||||
mCycleCheckBox = mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_cycle");
|
||||
mRandomizeCheckBox = mMainInterfacePanel->getChild<LLCheckBoxCtrl>("ao_randomize");
|
||||
mCycleTimeTextLabel = mMainInterfacePanel->getChild<LLTextBox>("ao_cycle_time_seconds_label");
|
||||
mCycleTimeSpinner = mMainInterfacePanel->getChild<LLSpinCtrl>("ao_cycle_time");
|
||||
|
||||
mReloadButton=mMainInterfacePanel->getChild<LLButton>("ao_reload");
|
||||
mPreviousButton=mMainInterfacePanel->getChild<LLButton>("ao_previous");
|
||||
mNextButton=mMainInterfacePanel->getChild<LLButton>("ao_next");
|
||||
mLessButton=mMainInterfacePanel->getChild<LLButton>("ao_less");
|
||||
mReloadButton = mMainInterfacePanel->getChild<LLButton>("ao_reload");
|
||||
mPreviousButton = mMainInterfacePanel->getChild<LLButton>("ao_previous");
|
||||
mNextButton = mMainInterfacePanel->getChild<LLButton>("ao_next");
|
||||
mLessButton = mMainInterfacePanel->getChild<LLButton>("ao_less");
|
||||
|
||||
mSetSelectorSmall=mSmallInterfacePanel->getChild<LLComboBox>("ao_set_selection_combo_small");
|
||||
mMoreButton=mSmallInterfacePanel->getChild<LLButton>("ao_more");
|
||||
mPreviousButtonSmall=mSmallInterfacePanel->getChild<LLButton>("ao_previous_small");
|
||||
mNextButtonSmall=mSmallInterfacePanel->getChild<LLButton>("ao_next_small");
|
||||
mOverrideSitsCheckBoxSmall=mSmallInterfacePanel->getChild<LLCheckBoxCtrl>("ao_sit_override_small");
|
||||
mSetSelectorSmall = mSmallInterfacePanel->getChild<LLComboBox>("ao_set_selection_combo_small");
|
||||
mMoreButton = mSmallInterfacePanel->getChild<LLButton>("ao_more");
|
||||
mPreviousButtonSmall = mSmallInterfacePanel->getChild<LLButton>("ao_previous_small");
|
||||
mNextButtonSmall = mSmallInterfacePanel->getChild<LLButton>("ao_next_small");
|
||||
mOverrideSitsCheckBoxSmall = mSmallInterfacePanel->getChild<LLCheckBoxCtrl>("ao_sit_override_small");
|
||||
|
||||
mSetSelector->setCommitCallback(boost::bind(&FloaterAO::onSelectSet,this));
|
||||
mActivateSetButton->setCommitCallback(boost::bind(&FloaterAO::onClickActivate,this));
|
||||
mAddButton->setCommitCallback(boost::bind(&FloaterAO::onClickAdd,this));
|
||||
mRemoveButton->setCommitCallback(boost::bind(&FloaterAO::onClickRemove,this));
|
||||
mDefaultCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckDefault,this));
|
||||
mOverrideSitsCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckOverrideSits,this));
|
||||
mSmartCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckSmart,this));
|
||||
mDisableMouselookCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckDisableStands,this));
|
||||
mSetSelector->setCommitCallback(boost::bind(&FloaterAO::onSelectSet, this));
|
||||
mActivateSetButton->setCommitCallback(boost::bind(&FloaterAO::onClickActivate, this));
|
||||
mAddButton->setCommitCallback(boost::bind(&FloaterAO::onClickAdd, this));
|
||||
mRemoveButton->setCommitCallback(boost::bind(&FloaterAO::onClickRemove, this));
|
||||
mDefaultCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckDefault, this));
|
||||
mOverrideSitsCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckOverrideSits, this));
|
||||
mSmartCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckSmart, this));
|
||||
mDisableMouselookCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckDisableStands, this));
|
||||
|
||||
mAnimationList->setCommitOnSelectionChange(TRUE);
|
||||
|
||||
mStateSelector->setCommitCallback(boost::bind(&FloaterAO::onSelectState,this));
|
||||
mAnimationList->setCommitCallback(boost::bind(&FloaterAO::onChangeAnimationSelection,this));
|
||||
mMoveUpButton->setCommitCallback(boost::bind(&FloaterAO::onClickMoveUp,this));
|
||||
mMoveDownButton->setCommitCallback(boost::bind(&FloaterAO::onClickMoveDown,this));
|
||||
mTrashButton->setCommitCallback(boost::bind(&FloaterAO::onClickTrash,this));
|
||||
mCycleCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckCycle,this));
|
||||
mRandomizeCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckRandomize,this));
|
||||
mCycleTimeSpinner->setCommitCallback(boost::bind(&FloaterAO::onChangeCycleTime,this));
|
||||
mStateSelector->setCommitCallback(boost::bind(&FloaterAO::onSelectState, this));
|
||||
mAnimationList->setCommitCallback(boost::bind(&FloaterAO::onChangeAnimationSelection, this));
|
||||
mMoveUpButton->setCommitCallback(boost::bind(&FloaterAO::onClickMoveUp, this));
|
||||
mMoveDownButton->setCommitCallback(boost::bind(&FloaterAO::onClickMoveDown, this));
|
||||
mTrashButton->setCommitCallback(boost::bind(&FloaterAO::onClickTrash, this));
|
||||
mCycleCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckCycle, this));
|
||||
mRandomizeCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckRandomize, this));
|
||||
mCycleTimeSpinner->setCommitCallback(boost::bind(&FloaterAO::onChangeCycleTime, this));
|
||||
|
||||
mReloadButton->setCommitCallback(boost::bind(&FloaterAO::onClickReload,this));
|
||||
mPreviousButton->setCommitCallback(boost::bind(&FloaterAO::onClickPrevious,this));
|
||||
mNextButton->setCommitCallback(boost::bind(&FloaterAO::onClickNext,this));
|
||||
mLessButton->setCommitCallback(boost::bind(&FloaterAO::onClickLess,this));
|
||||
mOverrideSitsCheckBoxSmall->setCommitCallback(boost::bind(&FloaterAO::onCheckOverrideSitsSmall,this));
|
||||
mReloadButton->setCommitCallback(boost::bind(&FloaterAO::onClickReload, this));
|
||||
mPreviousButton->setCommitCallback(boost::bind(&FloaterAO::onClickPrevious, this));
|
||||
mNextButton->setCommitCallback(boost::bind(&FloaterAO::onClickNext, this));
|
||||
mLessButton->setCommitCallback(boost::bind(&FloaterAO::onClickLess, this));
|
||||
mOverrideSitsCheckBoxSmall->setCommitCallback(boost::bind(&FloaterAO::onCheckOverrideSitsSmall, this));
|
||||
|
||||
mSetSelectorSmall->setCommitCallback(boost::bind(&FloaterAO::onSelectSetSmall,this));
|
||||
mMoreButton->setCommitCallback(boost::bind(&FloaterAO::onClickMore,this));
|
||||
mPreviousButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickPrevious,this));
|
||||
mNextButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickNext,this));
|
||||
mSetSelectorSmall->setCommitCallback(boost::bind(&FloaterAO::onSelectSetSmall, this));
|
||||
mMoreButton->setCommitCallback(boost::bind(&FloaterAO::onClickMore, this));
|
||||
mPreviousButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickPrevious, this));
|
||||
mNextButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickNext, this));
|
||||
|
||||
updateSmart();
|
||||
|
||||
AOEngine::instance().setReloadCallback(boost::bind(&FloaterAO::updateList,this));
|
||||
AOEngine::instance().setAnimationChangedCallback(boost::bind(&FloaterAO::onAnimationChanged,this,_1));
|
||||
AOEngine::instance().setReloadCallback(boost::bind(&FloaterAO::updateList, this));
|
||||
AOEngine::instance().setAnimationChangedCallback(boost::bind(&FloaterAO::onAnimationChanged, this, _1));
|
||||
|
||||
onChangeAnimationSelection();
|
||||
mMainInterfacePanel->setVisible(TRUE);
|
||||
|
|
@ -245,10 +255,14 @@ BOOL FloaterAO::postBuild()
|
|||
|
||||
updateList();
|
||||
|
||||
if(gSavedPerAccountSettings.getBOOL("UseFullAOInterface"))
|
||||
if (gSavedPerAccountSettings.getBOOL("UseFullAOInterface"))
|
||||
{
|
||||
onClickMore();
|
||||
}
|
||||
else
|
||||
{
|
||||
onClickLess();
|
||||
}
|
||||
|
||||
return LLDockableFloater::postBuild();
|
||||
}
|
||||
|
|
@ -263,8 +277,11 @@ void FloaterAO::enableSetControls(BOOL yes)
|
|||
mOverrideSitsCheckBox->setEnabled(yes);
|
||||
mOverrideSitsCheckBoxSmall->setEnabled(yes);
|
||||
mDisableMouselookCheckBox->setEnabled(yes);
|
||||
if(!yes)
|
||||
|
||||
if (!yes)
|
||||
{
|
||||
enableStateControls(yes);
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::enableStateControls(BOOL yes)
|
||||
|
|
@ -272,8 +289,10 @@ void FloaterAO::enableStateControls(BOOL yes)
|
|||
mStateSelector->setEnabled(yes);
|
||||
mAnimationList->setEnabled(yes);
|
||||
mCycleCheckBox->setEnabled(yes);
|
||||
if(yes)
|
||||
if (yes)
|
||||
{
|
||||
updateCycleParameters();
|
||||
}
|
||||
else
|
||||
{
|
||||
mRandomizeCheckBox->setEnabled(yes);
|
||||
|
|
@ -284,7 +303,7 @@ void FloaterAO::enableStateControls(BOOL yes)
|
|||
mPreviousButtonSmall->setEnabled(yes);
|
||||
mNextButton->setEnabled(yes);
|
||||
mNextButtonSmall->setEnabled(yes);
|
||||
mCanDragAndDrop=yes;
|
||||
mCanDragAndDrop = yes;
|
||||
}
|
||||
|
||||
void FloaterAO::onOpen(const LLSD& key)
|
||||
|
|
@ -302,8 +321,8 @@ void FloaterAO::onClose(bool app_quitting)
|
|||
|
||||
void FloaterAO::onSelectSet()
|
||||
{
|
||||
AOSet* set=AOEngine::instance().getSetByName(mSetSelector->getSelectedItemLabel());
|
||||
if(!set)
|
||||
AOSet* set = AOEngine::instance().getSetByName(mSetSelector->getSelectedItemLabel());
|
||||
if (!set)
|
||||
{
|
||||
onRenameSet();
|
||||
return;
|
||||
|
|
@ -320,8 +339,8 @@ void FloaterAO::onSelectSetSmall()
|
|||
// sync main set selector with small set selector
|
||||
mSetSelector->selectNthItem(mSetSelectorSmall->getCurrentIndex());
|
||||
|
||||
mSelectedSet=AOEngine::instance().getSetByName(mSetSelectorSmall->getSelectedItemLabel());
|
||||
if(mSelectedSet)
|
||||
mSelectedSet = AOEngine::instance().getSetByName(mSetSelectorSmall->getSelectedItemLabel());
|
||||
if (mSelectedSet)
|
||||
{
|
||||
updateSetParameters();
|
||||
updateAnimationList();
|
||||
|
|
@ -333,24 +352,24 @@ void FloaterAO::onSelectSetSmall()
|
|||
|
||||
void FloaterAO::onRenameSet()
|
||||
{
|
||||
if(!mSelectedSet)
|
||||
if (!mSelectedSet)
|
||||
{
|
||||
LL_WARNS("AOEngine") << "Rename AO set without set selected." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
std::string name=mSetSelector->getSimple();
|
||||
std::string name = mSetSelector->getSimple();
|
||||
LLStringUtil::trim(name);
|
||||
|
||||
LLUIString new_set_name=name;
|
||||
LLUIString new_set_name = name;
|
||||
|
||||
if(!name.empty())
|
||||
if (!name.empty())
|
||||
{
|
||||
if(
|
||||
if (
|
||||
LLTextValidate::validateASCIIPrintableNoPipe(new_set_name.getWString()) && // only allow ASCII
|
||||
name.find_first_of(":|")==std::string::npos) // don't allow : or |
|
||||
name.find_first_of(":|") == std::string::npos) // don't allow : or |
|
||||
{
|
||||
if(AOEngine::instance().renameSet(mSelectedSet,name))
|
||||
if (AOEngine::instance().renameSet(mSelectedSet, name))
|
||||
{
|
||||
reloading(TRUE);
|
||||
return;
|
||||
|
|
@ -359,8 +378,8 @@ void FloaterAO::onRenameSet()
|
|||
else
|
||||
{
|
||||
LLSD args;
|
||||
args["AO_SET_NAME"]=name;
|
||||
LLNotificationsUtil::add("RenameAOMustBeASCII",args);
|
||||
args["AO_SET_NAME"] = name;
|
||||
LLNotificationsUtil::add("RenameAOMustBeASCII", args);
|
||||
}
|
||||
}
|
||||
mSetSelector->setSimple(mSelectedSet->getName());
|
||||
|
|
@ -378,13 +397,13 @@ void FloaterAO::onClickActivate()
|
|||
LLScrollListItem* FloaterAO::addAnimation(const std::string& name)
|
||||
{
|
||||
LLSD row;
|
||||
row["columns"][0]["column"]="icon";
|
||||
row["columns"][0]["type"]="icon";
|
||||
row["columns"][0]["value"]="Inv_Animation";
|
||||
row["columns"][0]["column"] = "icon";
|
||||
row["columns"][0]["type"] = "icon";
|
||||
row["columns"][0]["value"] = "Inv_Animation";
|
||||
|
||||
row["columns"][1]["column"]="animation_name";
|
||||
row["columns"][1]["type"]="text";
|
||||
row["columns"][1]["value"]=name;
|
||||
row["columns"][1]["column"] = "animation_name";
|
||||
row["columns"][1]["type"] = "text";
|
||||
row["columns"][1]["value"] = name;
|
||||
|
||||
return mAnimationList->addElement(row);
|
||||
}
|
||||
|
|
@ -392,27 +411,33 @@ LLScrollListItem* FloaterAO::addAnimation(const std::string& name)
|
|||
void FloaterAO::onSelectState()
|
||||
{
|
||||
mAnimationList->deleteAllItems();
|
||||
mCurrentBoldItem=NULL;
|
||||
mCurrentBoldItem = NULL;
|
||||
mAnimationList->setCommentText(getString("ao_no_animations_loaded"));
|
||||
mAnimationList->setEnabled(FALSE);
|
||||
|
||||
onChangeAnimationSelection();
|
||||
|
||||
if(!mSelectedSet)
|
||||
return;
|
||||
|
||||
mSelectedState=mSelectedSet->getStateByName(mStateSelector->getSelectedItemLabel());
|
||||
if(!mSelectedState)
|
||||
return;
|
||||
|
||||
mSelectedState=(AOSet::AOState*) mStateSelector->getCurrentUserdata();
|
||||
if(mSelectedState->mAnimations.size())
|
||||
if (!mSelectedSet)
|
||||
{
|
||||
for(U32 index=0;index<mSelectedState->mAnimations.size();index++)
|
||||
return;
|
||||
}
|
||||
|
||||
mSelectedState = mSelectedSet->getStateByName(mStateSelector->getSelectedItemLabel());
|
||||
if (!mSelectedState)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mSelectedState = (AOSet::AOState*)mStateSelector->getCurrentUserdata();
|
||||
if (mSelectedState->mAnimations.size())
|
||||
{
|
||||
for (U32 index = 0; index < mSelectedState->mAnimations.size(); ++index)
|
||||
{
|
||||
LLScrollListItem* item=addAnimation(mSelectedState->mAnimations[index].mName);
|
||||
if(item)
|
||||
LLScrollListItem* item = addAnimation(mSelectedState->mAnimations[index].mName);
|
||||
if (item)
|
||||
{
|
||||
item->setUserdata(&mSelectedState->mAnimations[index].mInventoryUUID);
|
||||
}
|
||||
}
|
||||
|
||||
mAnimationList->setCommentText("");
|
||||
|
|
@ -430,8 +455,8 @@ void FloaterAO::onClickReload()
|
|||
{
|
||||
reloading(TRUE);
|
||||
|
||||
mSelectedSet=0;
|
||||
mSelectedState=0;
|
||||
mSelectedSet = 0;
|
||||
mSelectedState = 0;
|
||||
|
||||
AOEngine::instance().reload(false);
|
||||
updateList();
|
||||
|
|
@ -439,35 +464,35 @@ void FloaterAO::onClickReload()
|
|||
|
||||
void FloaterAO::onClickAdd()
|
||||
{
|
||||
LLNotificationsUtil::add("NewAOSet",LLSD(),LLSD(),boost::bind(&FloaterAO::newSetCallback,this,_1,_2));
|
||||
LLNotificationsUtil::add("NewAOSet", LLSD(), LLSD(), boost::bind(&FloaterAO::newSetCallback, this, _1, _2));
|
||||
}
|
||||
|
||||
BOOL FloaterAO::newSetCallback(const LLSD& notification,const LLSD& response)
|
||||
BOOL FloaterAO::newSetCallback(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
std::string newSetName=response["message"].asString();
|
||||
S32 option=LLNotificationsUtil::getSelectedOption(notification,response);
|
||||
std::string newSetName = response["message"].asString();
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
LLStringUtil::trim(newSetName);
|
||||
|
||||
LLUIString new_set_name=newSetName;
|
||||
LLUIString new_set_name = newSetName;
|
||||
|
||||
if(newSetName.empty())
|
||||
if (newSetName.empty())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else if(
|
||||
else if (
|
||||
!LLTextValidate::validateASCIIPrintableNoPipe(new_set_name.getWString()) || // only allow ASCII
|
||||
newSetName.find_first_of(":|")!=std::string::npos) // don't allow : or |
|
||||
newSetName.find_first_of(":|") != std::string::npos) // don't allow : or |
|
||||
{
|
||||
LLSD args;
|
||||
args["AO_SET_NAME"]=newSetName;
|
||||
LLNotificationsUtil::add("NewAOCantContainNonASCII",args);
|
||||
args["AO_SET_NAME"] = newSetName;
|
||||
LLNotificationsUtil::add("NewAOCantContainNonASCII", args);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(option==0)
|
||||
if (option == 0)
|
||||
{
|
||||
if(AOEngine::instance().addSet(newSetName).notNull())
|
||||
if (AOEngine::instance().addSet(newSetName).notNull())
|
||||
{
|
||||
reloading(TRUE);
|
||||
return TRUE;
|
||||
|
|
@ -478,22 +503,24 @@ BOOL FloaterAO::newSetCallback(const LLSD& notification,const LLSD& response)
|
|||
|
||||
void FloaterAO::onClickRemove()
|
||||
{
|
||||
if(!mSelectedSet)
|
||||
if (!mSelectedSet)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
args["AO_SET_NAME"]=mSelectedSet->getName();
|
||||
LLNotificationsUtil::add("RemoveAOSet",args,LLSD(),boost::bind(&FloaterAO::removeSetCallback,this,_1,_2));
|
||||
args["AO_SET_NAME"] = mSelectedSet->getName();
|
||||
LLNotificationsUtil::add("RemoveAOSet", args, LLSD(), boost::bind(&FloaterAO::removeSetCallback, this, _1, _2));
|
||||
}
|
||||
|
||||
BOOL FloaterAO::removeSetCallback(const LLSD& notification,const LLSD& response)
|
||||
BOOL FloaterAO::removeSetCallback(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
std::string newSetName=response["message"].asString();
|
||||
S32 option=LLNotificationsUtil::getSelectedOption(notification,response);
|
||||
std::string newSetName = response["message"].asString();
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
if(option==0)
|
||||
if (option ==0 )
|
||||
{
|
||||
if(AOEngine::instance().removeSet(mSelectedSet))
|
||||
if (AOEngine::instance().removeSet(mSelectedSet))
|
||||
{
|
||||
reloading(TRUE);
|
||||
// to prevent snapping back to deleted set
|
||||
|
|
@ -503,7 +530,7 @@ BOOL FloaterAO::removeSetCallback(const LLSD& notification,const LLSD& response)
|
|||
mSetSelector->clear();
|
||||
mSetSelectorSmall->clear();
|
||||
mAnimationList->deleteAllItems();
|
||||
mCurrentBoldItem=NULL;
|
||||
mCurrentBoldItem = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -512,15 +539,19 @@ BOOL FloaterAO::removeSetCallback(const LLSD& notification,const LLSD& response)
|
|||
|
||||
void FloaterAO::onCheckDefault()
|
||||
{
|
||||
if(mSelectedSet)
|
||||
if (mSelectedSet)
|
||||
{
|
||||
AOEngine::instance().setDefaultSet(mSelectedSet);
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onCheckOverrideSits()
|
||||
{
|
||||
mOverrideSitsCheckBoxSmall->setValue(mOverrideSitsCheckBox->getValue());
|
||||
if(mSelectedSet)
|
||||
AOEngine::instance().setOverrideSits(mSelectedSet,mOverrideSitsCheckBox->getValue().asBoolean());
|
||||
if (mSelectedSet)
|
||||
{
|
||||
AOEngine::instance().setOverrideSits(mSelectedSet, mOverrideSitsCheckBox->getValue().asBoolean());
|
||||
}
|
||||
updateSmart();
|
||||
}
|
||||
|
||||
|
|
@ -537,37 +568,43 @@ void FloaterAO::updateSmart()
|
|||
|
||||
void FloaterAO::onCheckSmart()
|
||||
{
|
||||
if(mSelectedSet)
|
||||
AOEngine::instance().setSmart(mSelectedSet,mSmartCheckBox->getValue().asBoolean());
|
||||
if (mSelectedSet)
|
||||
{
|
||||
AOEngine::instance().setSmart(mSelectedSet, mSmartCheckBox->getValue().asBoolean());
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onCheckDisableStands()
|
||||
{
|
||||
if(mSelectedSet)
|
||||
AOEngine::instance().setDisableStands(mSelectedSet,mDisableMouselookCheckBox->getValue().asBoolean());
|
||||
if (mSelectedSet)
|
||||
{
|
||||
AOEngine::instance().setDisableStands(mSelectedSet, mDisableMouselookCheckBox->getValue().asBoolean());
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onChangeAnimationSelection()
|
||||
{
|
||||
std::vector<LLScrollListItem*> list=mAnimationList->getAllSelected();
|
||||
std::vector<LLScrollListItem*> list = mAnimationList->getAllSelected();
|
||||
LL_DEBUGS("AOEngine") << "Selection count: " << list.size() << LL_ENDL;
|
||||
|
||||
BOOL resortEnable=FALSE;
|
||||
BOOL trashEnable=FALSE;
|
||||
BOOL resortEnable = FALSE;
|
||||
BOOL trashEnable = FALSE;
|
||||
|
||||
// Linden Lab bug: scroll lists still select the first item when you click on them, even when they are disabled.
|
||||
// The control does not memorize it's enabled/disabled state, so mAnimationList->mEnabled() doesn't seem to work.
|
||||
// So we need to safeguard against it.
|
||||
if(!mCanDragAndDrop)
|
||||
if (!mCanDragAndDrop)
|
||||
{
|
||||
mAnimationList->deselectAllItems();
|
||||
LL_DEBUGS("AOEngine") << "Selection count now: " << list.size() << LL_ENDL;
|
||||
}
|
||||
else if(list.size()>0)
|
||||
else if (list.size() > 0)
|
||||
{
|
||||
if(list.size()==1)
|
||||
resortEnable=TRUE;
|
||||
trashEnable=TRUE;
|
||||
if (list.size() == 1)
|
||||
{
|
||||
resortEnable = TRUE;
|
||||
}
|
||||
trashEnable = TRUE;
|
||||
}
|
||||
|
||||
mMoveDownButton->setEnabled(resortEnable);
|
||||
|
|
@ -577,57 +614,79 @@ void FloaterAO::onChangeAnimationSelection()
|
|||
|
||||
void FloaterAO::onClickMoveUp()
|
||||
{
|
||||
if(!mSelectedState)
|
||||
if (!mSelectedState)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<LLScrollListItem*> list=mAnimationList->getAllSelected();
|
||||
if(list.size()!=1)
|
||||
std::vector<LLScrollListItem*> list = mAnimationList->getAllSelected();
|
||||
if (list.size() != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
S32 currentIndex=mAnimationList->getFirstSelectedIndex();
|
||||
if(currentIndex==-1)
|
||||
S32 currentIndex = mAnimationList->getFirstSelectedIndex();
|
||||
if (currentIndex == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(AOEngine::instance().swapWithPrevious(mSelectedState,currentIndex))
|
||||
if (AOEngine::instance().swapWithPrevious(mSelectedState, currentIndex))
|
||||
{
|
||||
mAnimationList->swapWithPrevious(currentIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onClickMoveDown()
|
||||
{
|
||||
if(!mSelectedState)
|
||||
if (!mSelectedState)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<LLScrollListItem*> list=mAnimationList->getAllSelected();
|
||||
if(list.size()!=1)
|
||||
std::vector<LLScrollListItem*> list = mAnimationList->getAllSelected();
|
||||
if (list.size() != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
S32 currentIndex=mAnimationList->getFirstSelectedIndex();
|
||||
if(currentIndex>=(mAnimationList->getItemCount()-1))
|
||||
S32 currentIndex = mAnimationList->getFirstSelectedIndex();
|
||||
if (currentIndex >= (mAnimationList->getItemCount() - 1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(AOEngine::instance().swapWithNext(mSelectedState,currentIndex))
|
||||
if (AOEngine::instance().swapWithNext(mSelectedState, currentIndex))
|
||||
{
|
||||
mAnimationList->swapWithNext(currentIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onClickTrash()
|
||||
{
|
||||
if(!mSelectedState)
|
||||
if (!mSelectedState)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<LLScrollListItem*> list=mAnimationList->getAllSelected();
|
||||
if(list.size()==0)
|
||||
std::vector<LLScrollListItem*> list = mAnimationList->getAllSelected();
|
||||
if (list.size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(S32 index=list.size()-1;index!=-1;index--)
|
||||
AOEngine::instance().removeAnimation(mSelectedSet,mSelectedState,mAnimationList->getItemIndex(list[index]));
|
||||
for (S32 index = list.size() - 1; index != -1; --index)
|
||||
{
|
||||
AOEngine::instance().removeAnimation(mSelectedSet, mSelectedState, mAnimationList->getItemIndex(list[index]));
|
||||
}
|
||||
|
||||
mAnimationList->deleteSelectedItems();
|
||||
mCurrentBoldItem=NULL;
|
||||
mCurrentBoldItem = NULL;
|
||||
}
|
||||
|
||||
void FloaterAO::updateCycleParameters()
|
||||
{
|
||||
BOOL yes=mCycleCheckBox->getValue().asBoolean();
|
||||
BOOL yes = mCycleCheckBox->getValue().asBoolean();
|
||||
mRandomizeCheckBox->setEnabled(yes);
|
||||
mCycleTimeTextLabel->setEnabled(yes);
|
||||
mCycleTimeSpinner->setEnabled(yes);
|
||||
|
|
@ -635,24 +694,28 @@ void FloaterAO::updateCycleParameters()
|
|||
|
||||
void FloaterAO::onCheckCycle()
|
||||
{
|
||||
if(mSelectedState)
|
||||
if (mSelectedState)
|
||||
{
|
||||
BOOL yes=mCycleCheckBox->getValue().asBoolean();
|
||||
AOEngine::instance().setCycle(mSelectedState,yes);
|
||||
BOOL yes = mCycleCheckBox->getValue().asBoolean();
|
||||
AOEngine::instance().setCycle(mSelectedState, yes);
|
||||
updateCycleParameters();
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onCheckRandomize()
|
||||
{
|
||||
if(mSelectedState)
|
||||
AOEngine::instance().setRandomize(mSelectedState,mRandomizeCheckBox->getValue().asBoolean());
|
||||
if (mSelectedState)
|
||||
{
|
||||
AOEngine::instance().setRandomize(mSelectedState, mRandomizeCheckBox->getValue().asBoolean());
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onChangeCycleTime()
|
||||
{
|
||||
if(mSelectedState)
|
||||
AOEngine::instance().setCycleTime(mSelectedState,mCycleTimeSpinner->getValueF32());
|
||||
if (mSelectedState)
|
||||
{
|
||||
AOEngine::instance().setCycleTime(mSelectedState, mCycleTimeSpinner->getValueF32());
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterAO::onClickPrevious()
|
||||
|
|
@ -667,78 +730,82 @@ void FloaterAO::onClickNext()
|
|||
|
||||
void FloaterAO::onClickMore()
|
||||
{
|
||||
LLRect fullSize=gSavedPerAccountSettings.getRect("floater_rect_animation_overrider_full");
|
||||
LLRect smallSize=getRect();
|
||||
LLRect fullSize = gSavedPerAccountSettings.getRect("floater_rect_animation_overrider_full");
|
||||
LLRect smallSize = getRect();
|
||||
|
||||
if(fullSize.getHeight()<getMinHeight())
|
||||
fullSize.setOriginAndSize(fullSize.mLeft,fullSize.mBottom,fullSize.getWidth(),getRect().getHeight());
|
||||
if (fullSize.getHeight() < getMinHeight())
|
||||
{
|
||||
fullSize.setOriginAndSize(fullSize.mLeft, fullSize.mBottom, fullSize.getWidth(), getRect().getHeight());
|
||||
}
|
||||
|
||||
if(fullSize.getWidth()<getMinWidth())
|
||||
fullSize.setOriginAndSize(fullSize.mLeft,fullSize.mBottom,getRect().getWidth(),fullSize.getHeight());
|
||||
if (fullSize.getWidth() < getMinWidth())
|
||||
{
|
||||
fullSize.setOriginAndSize(fullSize.mLeft, fullSize.mBottom, getRect().getWidth(), fullSize.getHeight());
|
||||
}
|
||||
|
||||
mMore=TRUE;
|
||||
mMore = TRUE;
|
||||
|
||||
mSmallInterfacePanel->setVisible(FALSE);
|
||||
mMainInterfacePanel->setVisible(TRUE);
|
||||
setCanResize(TRUE);
|
||||
|
||||
gSavedPerAccountSettings.setBOOL("UseFullAOInterface",TRUE);
|
||||
gSavedPerAccountSettings.setBOOL("UseFullAOInterface", TRUE);
|
||||
|
||||
reshape(getRect().getWidth(),fullSize.getHeight());
|
||||
reshape(getRect().getWidth(), fullSize.getHeight());
|
||||
}
|
||||
|
||||
void FloaterAO::onClickLess()
|
||||
{
|
||||
LLRect fullSize=getRect();
|
||||
LLRect smallSize=mSmallInterfacePanel->getRect();
|
||||
smallSize.setLeftTopAndSize(0,0,smallSize.getWidth(),smallSize.getHeight()+getHeaderHeight());
|
||||
LLRect fullSize = getRect();
|
||||
LLRect smallSize = mSmallInterfacePanel->getRect();
|
||||
smallSize.setLeftTopAndSize(0, 0, smallSize.getWidth(), smallSize.getHeight() + getHeaderHeight());
|
||||
|
||||
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider_full",fullSize);
|
||||
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider_full", fullSize);
|
||||
|
||||
mMore=FALSE;
|
||||
mMore = FALSE;
|
||||
|
||||
mSmallInterfacePanel->setVisible(TRUE);
|
||||
mMainInterfacePanel->setVisible(FALSE);
|
||||
setCanResize(FALSE);
|
||||
|
||||
gSavedPerAccountSettings.setBOOL("UseFullAOInterface",FALSE);
|
||||
gSavedPerAccountSettings.setBOOL("UseFullAOInterface", FALSE);
|
||||
|
||||
reshape(getRect().getWidth(),smallSize.getHeight());
|
||||
reshape(getRect().getWidth(), smallSize.getHeight());
|
||||
|
||||
// save current size and position
|
||||
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider_full",fullSize);
|
||||
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider_full", fullSize);
|
||||
}
|
||||
|
||||
void FloaterAO::onAnimationChanged(const LLUUID& animation)
|
||||
{
|
||||
LL_DEBUGS("AOEngine") << "Received animation change to " << animation << LL_ENDL;
|
||||
|
||||
if(mCurrentBoldItem)
|
||||
if (mCurrentBoldItem)
|
||||
{
|
||||
LLScrollListText* column=(LLScrollListText*) mCurrentBoldItem->getColumn(1);
|
||||
LLScrollListText* column = (LLScrollListText*)mCurrentBoldItem->getColumn(1);
|
||||
column->setFontStyle(LLFontGL::NORMAL);
|
||||
|
||||
mCurrentBoldItem=NULL;
|
||||
mCurrentBoldItem = NULL;
|
||||
}
|
||||
|
||||
if(animation.isNull())
|
||||
if (animation.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// why do we have no LLScrollListCtrl::getItemByUserdata() ? -Zi
|
||||
std::vector<LLScrollListItem*> item_list=mAnimationList->getAllData();
|
||||
std::vector<LLScrollListItem*> item_list = mAnimationList->getAllData();
|
||||
std::vector<LLScrollListItem*>::const_iterator iter;
|
||||
for(iter=item_list.begin();iter!=item_list.end();iter++)
|
||||
for (iter = item_list.begin(); iter != item_list.end(); ++iter)
|
||||
{
|
||||
LLScrollListItem* item=*iter;
|
||||
LLUUID* id=(LLUUID*) item->getUserdata();
|
||||
LLScrollListItem* item = *iter;
|
||||
LLUUID* id = (LLUUID*)item->getUserdata();
|
||||
|
||||
if(id==&animation)
|
||||
if (id == &animation)
|
||||
{
|
||||
mCurrentBoldItem=item;
|
||||
mCurrentBoldItem = item;
|
||||
|
||||
LLScrollListText* column=(LLScrollListText*) mCurrentBoldItem->getColumn(1);
|
||||
LLScrollListText* column = (LLScrollListText*)mCurrentBoldItem->getColumn(1);
|
||||
column->setFontStyle(LLFontGL::BOLD);
|
||||
|
||||
return;
|
||||
|
|
@ -747,48 +814,48 @@ void FloaterAO::onAnimationChanged(const LLUUID& animation)
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL FloaterAO::handleDragAndDrop(S32 x,S32 y,MASK mask,BOOL drop,EDragAndDropType type,void* data,
|
||||
EAcceptance* accept,std::string& tooltipMsg)
|
||||
BOOL FloaterAO::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType type, void* data,
|
||||
EAcceptance* accept, std::string& tooltipMsg)
|
||||
{
|
||||
// no drag & drop on small interface
|
||||
if(!mMore)
|
||||
if (!mMore)
|
||||
{
|
||||
tooltipMsg=getString("ao_dnd_only_on_full_interface");
|
||||
*accept=ACCEPT_NO;
|
||||
tooltipMsg = getString("ao_dnd_only_on_full_interface");
|
||||
*accept = ACCEPT_NO;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLInventoryItem* item=(LLInventoryItem*) data;
|
||||
LLInventoryItem* item = (LLInventoryItem*)data;
|
||||
|
||||
if(type==DAD_NOTECARD)
|
||||
if (type == DAD_NOTECARD)
|
||||
{
|
||||
if(mImportRunning)
|
||||
if (mImportRunning)
|
||||
{
|
||||
*accept=ACCEPT_NO;
|
||||
*accept = ACCEPT_NO;
|
||||
return TRUE;
|
||||
}
|
||||
*accept=ACCEPT_YES_SINGLE;
|
||||
if(item && drop)
|
||||
*accept = ACCEPT_YES_SINGLE;
|
||||
if (item && drop)
|
||||
{
|
||||
if(AOEngine::instance().importNotecard(item))
|
||||
if (AOEngine::instance().importNotecard(item))
|
||||
{
|
||||
reloading(TRUE);
|
||||
mReloadButton->setEnabled(FALSE);
|
||||
mImportRunning=TRUE;
|
||||
mImportRunning = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type==DAD_ANIMATION)
|
||||
else if (type == DAD_ANIMATION)
|
||||
{
|
||||
if(!drop && (!mSelectedSet || !mSelectedState || !mCanDragAndDrop))
|
||||
if (!drop && (!mSelectedSet || !mSelectedState || !mCanDragAndDrop))
|
||||
{
|
||||
*accept=ACCEPT_NO;
|
||||
*accept = ACCEPT_NO;
|
||||
return TRUE;
|
||||
}
|
||||
*accept=ACCEPT_YES_MULTI;
|
||||
if(item && drop)
|
||||
*accept = ACCEPT_YES_MULTI;
|
||||
if (item && drop)
|
||||
{
|
||||
if(AOEngine::instance().addAnimation(mSelectedSet,mSelectedState,item))
|
||||
if (AOEngine::instance().addAnimation(mSelectedSet, mSelectedState, item))
|
||||
{
|
||||
addAnimation(item->getName());
|
||||
|
||||
|
|
@ -799,7 +866,9 @@ BOOL FloaterAO::handleDragAndDrop(S32 x,S32 y,MASK mask,BOOL drop,EDragAndDropTy
|
|||
}
|
||||
}
|
||||
else
|
||||
*accept=ACCEPT_NO;
|
||||
{
|
||||
*accept = ACCEPT_NO;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ class FloaterAO
|
|||
void updateSetParameters();
|
||||
void updateAnimationList();
|
||||
|
||||
BOOL handleDragAndDrop(S32 x,S32 y,MASK mask,BOOL drop,EDragAndDropType cargo_type,void* cargo_data,
|
||||
EAcceptance* accept,std::string& tooltip_msg);
|
||||
BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data,
|
||||
EAcceptance* accept, std::string& tooltip_msg);
|
||||
|
||||
protected:
|
||||
LLScrollListItem* addAnimation(const std::string& name);
|
||||
|
|
@ -100,8 +100,8 @@ class FloaterAO
|
|||
void enableSetControls(BOOL yes);
|
||||
void enableStateControls(BOOL yes);
|
||||
|
||||
BOOL newSetCallback(const LLSD& notification,const LLSD& response);
|
||||
BOOL removeSetCallback(const LLSD& notification,const LLSD& response);
|
||||
BOOL newSetCallback(const LLSD& notification, const LLSD& response);
|
||||
BOOL removeSetCallback(const LLSD& notification, const LLSD& response);
|
||||
|
||||
virtual BOOL tick();
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -102,7 +102,7 @@ class AOEngine
|
|||
};
|
||||
|
||||
void enable(BOOL yes);
|
||||
const LLUUID override(const LLUUID& motion,BOOL start);
|
||||
const LLUUID override(const LLUUID& motion, BOOL start);
|
||||
void tick();
|
||||
void update();
|
||||
void reload(bool);
|
||||
|
|
@ -111,19 +111,19 @@ class AOEngine
|
|||
|
||||
const LLUUID& getAOFolder() const;
|
||||
|
||||
LLUUID addSet(const std::string& name,BOOL reload=TRUE);
|
||||
LLUUID addSet(const std::string& name, BOOL reload = TRUE);
|
||||
BOOL removeSet(AOSet* set);
|
||||
|
||||
BOOL addAnimation(const AOSet* set,AOSet::AOState* state,const LLInventoryItem* item,BOOL reload=TRUE);
|
||||
BOOL removeAnimation(const AOSet* set,AOSet::AOState* state,S32 index);
|
||||
BOOL addAnimation(const AOSet* set, AOSet::AOState* state, const LLInventoryItem* item, BOOL reload = TRUE);
|
||||
BOOL removeAnimation(const AOSet* set, AOSet::AOState* state, S32 index);
|
||||
void checkSitCancel();
|
||||
void checkBelowWater(BOOL yes);
|
||||
|
||||
BOOL importNotecard(const LLInventoryItem* item);
|
||||
void processImport( bool );
|
||||
void processImport(bool);
|
||||
|
||||
BOOL swapWithPrevious(AOSet::AOState* state,S32 index);
|
||||
BOOL swapWithNext(AOSet::AOState* state,S32 index);
|
||||
BOOL swapWithPrevious(AOSet::AOState* state, S32 index);
|
||||
BOOL swapWithNext(AOSet::AOState* state, S32 index);
|
||||
|
||||
void cycleTimeout(const AOSet* set);
|
||||
void cycle(eCycleMode cycleMode);
|
||||
|
|
@ -139,15 +139,15 @@ class AOEngine
|
|||
const std::vector<AOSet*> getSetList() const;
|
||||
const std::string getCurrentSetName() const;
|
||||
const AOSet* getDefaultSet() const;
|
||||
BOOL renameSet(AOSet* set,const std::string& name);
|
||||
BOOL renameSet(AOSet* set, const std::string& name);
|
||||
|
||||
void setDefaultSet(AOSet* set);
|
||||
void setOverrideSits(AOSet* set,BOOL yes);
|
||||
void setSmart(AOSet* set,BOOL yes);
|
||||
void setDisableStands(AOSet* set,BOOL yes);
|
||||
void setCycle(AOSet::AOState* set,BOOL yes);
|
||||
void setRandomize(AOSet::AOState* state,BOOL yes);
|
||||
void setCycleTime(AOSet::AOState* state,F32 time);
|
||||
void setOverrideSits(AOSet* set, BOOL yes);
|
||||
void setSmart(AOSet* set, BOOL yes);
|
||||
void setDisableStands(AOSet* set, BOOL yes);
|
||||
void setCycle(AOSet::AOState* set, BOOL yes);
|
||||
void setRandomize(AOSet::AOState* state, BOOL yes);
|
||||
void setCycleTime(AOSet::AOState* state, F32 time);
|
||||
|
||||
void saveSettings();
|
||||
|
||||
|
|
@ -180,15 +180,15 @@ class AOEngine
|
|||
void saveSet(const AOSet* set);
|
||||
void saveState(const AOSet::AOState* state);
|
||||
|
||||
BOOL createAnimationLink(const AOSet* set,AOSet::AOState* state,const LLInventoryItem* item);
|
||||
BOOL createAnimationLink(const AOSet* set, AOSet::AOState* state, const LLInventoryItem* item);
|
||||
BOOL findForeignItems(const LLUUID& uuid) const;
|
||||
void purgeFolder(const LLUUID& uuid) const;
|
||||
|
||||
void onRegionChange();
|
||||
|
||||
void onToggleAOControl();
|
||||
static void onNotecardLoadComplete( LLVFS* vfs,const LLUUID& assetUUID,LLAssetType::EType type,
|
||||
void* userdata,S32 status,LLExtStat extStatus);
|
||||
static void onNotecardLoadComplete(LLVFS* vfs, const LLUUID& assetUUID, LLAssetType::EType type,
|
||||
void* userdata, S32 status, LLExtStat extStatus);
|
||||
void parseNotecard(const char* buffer);
|
||||
|
||||
updated_signal_t mUpdatedSignal;
|
||||
|
|
|
|||
|
|
@ -102,21 +102,21 @@ AOSet::AOSet(const LLUUID inventoryID)
|
|||
ANIM_AGENT_HOVER_DOWN // needs special treatment
|
||||
};
|
||||
|
||||
for(S32 index=0;index<AOSTATES_MAX;index++)
|
||||
for (S32 index = 0; index < AOSTATES_MAX; ++index)
|
||||
{
|
||||
std::vector<std::string> stateNameList;
|
||||
LLStringUtil::getTokens(stateNames[index],stateNameList,"|");
|
||||
LLStringUtil::getTokens(stateNames[index], stateNameList, "|");
|
||||
|
||||
mStates[index].mName=stateNameList[0]; // for quick reference
|
||||
mStates[index].mAlternateNames=stateNameList; // to get all possible names, including mName
|
||||
mStates[index].mRemapID=stateUUIDs[index];
|
||||
mStates[index].mInventoryUUID=LLUUID::null;
|
||||
mStates[index].mCurrentAnimation=0;
|
||||
mStates[index].mCurrentAnimationID=LLUUID::null;
|
||||
mStates[index].mCycle=FALSE;
|
||||
mStates[index].mRandom=FALSE;
|
||||
mStates[index].mCycleTime=0.0f;
|
||||
mStates[index].mDirty=FALSE;
|
||||
mStates[index].mName = stateNameList[0]; // for quick reference
|
||||
mStates[index].mAlternateNames = stateNameList; // to get all possible names, including mName
|
||||
mStates[index].mRemapID = stateUUIDs[index];
|
||||
mStates[index].mInventoryUUID = LLUUID::null;
|
||||
mStates[index].mCurrentAnimation = 0;
|
||||
mStates[index].mCurrentAnimationID = LLUUID::null;
|
||||
mStates[index].mCycle = FALSE;
|
||||
mStates[index].mRandom = FALSE;
|
||||
mStates[index].mCycleTime = 0.0f;
|
||||
mStates[index].mDirty = FALSE;
|
||||
mStateNames.push_back(stateNameList[0]);
|
||||
}
|
||||
stopTimer();
|
||||
|
|
@ -134,12 +134,12 @@ AOSet::AOState* AOSet::getState(S32 eName)
|
|||
|
||||
AOSet::AOState* AOSet::getStateByName(const std::string& name)
|
||||
{
|
||||
for(S32 index=0;index<AOSTATES_MAX;index++)
|
||||
for (S32 index = 0; index < AOSTATES_MAX; ++index)
|
||||
{
|
||||
AOState* state=&mStates[index];
|
||||
for(U32 names=0;names<state->mAlternateNames.size();names++)
|
||||
AOState* state = &mStates[index];
|
||||
for (U32 names = 0; names < state->mAlternateNames.size(); ++names)
|
||||
{
|
||||
if(state->mAlternateNames[names].compare(name)==0)
|
||||
if (state->mAlternateNames[names].compare(name) == 0)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
|
@ -150,15 +150,15 @@ AOSet::AOState* AOSet::getStateByName(const std::string& name)
|
|||
|
||||
AOSet::AOState* AOSet::getStateByRemapID(const LLUUID& id)
|
||||
{
|
||||
LLUUID remap_id=id;
|
||||
if(remap_id==ANIM_AGENT_SIT_GROUND)
|
||||
LLUUID remap_id = id;
|
||||
if (remap_id == ANIM_AGENT_SIT_GROUND)
|
||||
{
|
||||
remap_id=ANIM_AGENT_SIT_GROUND_CONSTRAINED;
|
||||
remap_id = ANIM_AGENT_SIT_GROUND_CONSTRAINED;
|
||||
}
|
||||
|
||||
for(S32 index=0;index<AOSTATES_MAX;index++)
|
||||
for (S32 index = 0; index < AOSTATES_MAX; ++index)
|
||||
{
|
||||
if(mStates[index].mRemapID==remap_id)
|
||||
if (mStates[index].mRemapID == remap_id)
|
||||
{
|
||||
return &mStates[index];
|
||||
}
|
||||
|
|
@ -168,30 +168,34 @@ AOSet::AOState* AOSet::getStateByRemapID(const LLUUID& id)
|
|||
|
||||
const LLUUID& AOSet::getAnimationForState(AOState* state) const
|
||||
{
|
||||
if(state)
|
||||
if (state)
|
||||
{
|
||||
S32 numOfAnimations=state->mAnimations.size();
|
||||
if(numOfAnimations)
|
||||
S32 numOfAnimations = state->mAnimations.size();
|
||||
if (numOfAnimations)
|
||||
{
|
||||
if(state->mCycle)
|
||||
if (state->mCycle)
|
||||
{
|
||||
if(state->mRandom)
|
||||
if (state->mRandom)
|
||||
{
|
||||
state->mCurrentAnimation=ll_frand()*numOfAnimations;
|
||||
state->mCurrentAnimation = ll_frand() * numOfAnimations;
|
||||
LL_DEBUGS("AOEngine") << "randomly chosen " << state->mCurrentAnimation << " of " << numOfAnimations << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->mCurrentAnimation++;
|
||||
if(state->mCurrentAnimation>=state->mAnimations.size())
|
||||
state->mCurrentAnimation=0;
|
||||
if (state->mCurrentAnimation >= state->mAnimations.size())
|
||||
{
|
||||
state->mCurrentAnimation = 0;
|
||||
}
|
||||
LL_DEBUGS("AOEngine") << "cycle " << state->mCurrentAnimation << " of " << numOfAnimations << LL_ENDL;
|
||||
}
|
||||
}
|
||||
return state->mAnimations[state->mCurrentAnimation].mAssetUUID;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AOEngine") << "animation state has no animations assigned" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
|
@ -199,7 +203,7 @@ const LLUUID& AOSet::getAnimationForState(AOState* state) const
|
|||
void AOSet::startTimer(F32 timeout)
|
||||
{
|
||||
mEventTimer.stop();
|
||||
mPeriod=timeout;
|
||||
mPeriod = timeout;
|
||||
mEventTimer.start();
|
||||
LL_DEBUGS("AOEngine") << "Starting state timer for " << getName() << " at " << timeout << LL_ENDL;
|
||||
}
|
||||
|
|
@ -223,7 +227,7 @@ const LLUUID& AOSet::getInventoryUUID() const
|
|||
|
||||
void AOSet::setInventoryUUID(const LLUUID& inventoryID)
|
||||
{
|
||||
mInventoryID=inventoryID;
|
||||
mInventoryID = inventoryID;
|
||||
}
|
||||
|
||||
const std::string& AOSet::getName() const
|
||||
|
|
@ -243,7 +247,7 @@ BOOL AOSet::getSitOverride() const
|
|||
|
||||
void AOSet::setSitOverride(BOOL yes)
|
||||
{
|
||||
mSitOverride=yes;
|
||||
mSitOverride = yes;
|
||||
}
|
||||
|
||||
BOOL AOSet::getSmart() const
|
||||
|
|
@ -253,7 +257,7 @@ BOOL AOSet::getSmart() const
|
|||
|
||||
void AOSet::setSmart(BOOL yes)
|
||||
{
|
||||
mSmart=yes;
|
||||
mSmart = yes;
|
||||
}
|
||||
|
||||
BOOL AOSet::getMouselookDisable() const
|
||||
|
|
@ -263,7 +267,7 @@ BOOL AOSet::getMouselookDisable() const
|
|||
|
||||
void AOSet::setMouselookDisable(BOOL yes)
|
||||
{
|
||||
mMouselookDisable=yes;
|
||||
mMouselookDisable = yes;
|
||||
}
|
||||
|
||||
BOOL AOSet::getComplete() const
|
||||
|
|
@ -273,7 +277,7 @@ BOOL AOSet::getComplete() const
|
|||
|
||||
void AOSet::setComplete(BOOL yes)
|
||||
{
|
||||
mComplete=yes;
|
||||
mComplete = yes;
|
||||
}
|
||||
|
||||
BOOL AOSet::getDirty() const
|
||||
|
|
@ -283,12 +287,12 @@ BOOL AOSet::getDirty() const
|
|||
|
||||
void AOSet::setDirty(BOOL yes)
|
||||
{
|
||||
mDirty=yes;
|
||||
mDirty = yes;
|
||||
}
|
||||
|
||||
void AOSet::setMotion(const LLUUID& motion)
|
||||
{
|
||||
mCurrentMotion=motion;
|
||||
mCurrentMotion = motion;
|
||||
}
|
||||
|
||||
const LLUUID& AOSet::getMotion() const
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ class AOSet
|
|||
// keep number and order in sync with list of names in the constructor
|
||||
enum
|
||||
{
|
||||
Start=0, // convenience, so we don't have to know the name of the first state
|
||||
Standing=0,
|
||||
Start = 0, // convenience, so we don't have to know the name of the first state
|
||||
Standing = 0,
|
||||
Walking,
|
||||
Running,
|
||||
Sitting,
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@ void DialogStack::pop(const LLUUID& uuid)
|
|||
|
||||
const LLUUID& DialogStack::flip(const LLUUID& uuid)
|
||||
{
|
||||
for (std::list<LLUUID>::iterator it=notificationIDs.begin();it!=notificationIDs.end();++it)
|
||||
for (std::list<LLUUID>::iterator it = notificationIDs.begin(); it != notificationIDs.end(); ++it)
|
||||
{
|
||||
if(*it==uuid)
|
||||
if (*it == uuid)
|
||||
{
|
||||
if(it==notificationIDs.begin())
|
||||
if (it == notificationIDs.begin())
|
||||
{
|
||||
return notificationIDs.back();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* http://www.firestormviewer.org
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
|
@ -30,55 +31,48 @@
|
|||
|
||||
#include "fsfloaterim.h"
|
||||
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "fschathistory.h"
|
||||
#include "fscommon.h"
|
||||
#include "fsdata.h"
|
||||
#include "fsfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container
|
||||
#include "fsfloaternearbychat.h"
|
||||
#include "fspanelimcontrolpanel.h"
|
||||
#include "llagent.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llbutton.h"
|
||||
#include "llchannelmanager.h"
|
||||
#include "llchatentry.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llchiclet.h"
|
||||
#include "llchicletbar.h"
|
||||
#include "llfloaterabout.h" // for sysinfo button -Zi
|
||||
#include "llfloaterreg.h"
|
||||
#include "fsfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container
|
||||
#include "llgroupactions.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "lllayoutstack.h"
|
||||
#include "llchatentry.h"
|
||||
#include "lllogchat.h"
|
||||
#include "fspanelimcontrolpanel.h"
|
||||
#include "llscreenchannel.h"
|
||||
#include "llsyswellwindow.h"
|
||||
#include "lltrans.h"
|
||||
#include "fschathistory.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llnotificationtemplate.h" // <FS:Zi> Viewer version popup
|
||||
#include "llrootview.h"
|
||||
#include "llscreenchannel.h"
|
||||
#include "llspeakers.h"
|
||||
#include "llsyswellwindow.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltrans.h"
|
||||
#include "lltransientfloatermgr.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "llviewerchat.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoicechannel.h"
|
||||
#include "lltransientfloatermgr.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llrootview.h"
|
||||
#include "llspeakers.h"
|
||||
#include "llviewerchat.h"
|
||||
#include "llautoreplace.h"
|
||||
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvactions.h" // <FS:CR> CHUI merge
|
||||
// [/RLVa:KB]
|
||||
|
||||
//AO: For moving callbacks from control panel into this class
|
||||
#include "llavataractions.h"
|
||||
#include "llgroupactions.h"
|
||||
//TL: for support group chat prefix
|
||||
#include "fsdata.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
|
||||
#include "llnotificationtemplate.h" // <FS:Zi> Viewer version popup
|
||||
#include "fscommon.h"
|
||||
#include "fsfloaternearbychat.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "lltextbox.h"
|
||||
|
||||
const F32 ME_TYPING_TIMEOUT = 4.0f;
|
||||
const F32 OTHER_TYPING_TIMEOUT = 9.0f;
|
||||
|
|
@ -100,7 +94,6 @@ FSFloaterIM::FSFloaterIM(const LLUUID& session_id)
|
|||
mOtherTyping(false),
|
||||
mTypingTimer(),
|
||||
mTypingTimeoutTimer(),
|
||||
// mPositioned(false), // dead code -Zi
|
||||
mSessionInitialized(false),
|
||||
mChatLayoutPanel(NULL),
|
||||
mInputPanels(NULL),
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* http://www.firestormviewer.org
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
|
@ -34,17 +35,18 @@
|
|||
#include "lltooldraganddrop.h"
|
||||
#include "lltransientdockablefloater.h"
|
||||
#include "llvoicechannel.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
class FSChatHistory;
|
||||
class FSPanelChatControlPanel;
|
||||
class LLAvatarName;
|
||||
class LLButton; // support sysinfo button -Zi
|
||||
class LLChatEntry;
|
||||
class LLInventoryCategory;
|
||||
class LLInventoryItem;
|
||||
class LLLayoutPanel;
|
||||
class LLLayoutStack;
|
||||
class LLTextBox;
|
||||
class LLTextEditor;
|
||||
class FSPanelChatControlPanel;
|
||||
class FSChatHistory;
|
||||
class LLInventoryItem;
|
||||
class LLInventoryCategory;
|
||||
|
||||
typedef boost::signals2::signal<void(const LLUUID& session_id)> floater_showed_signal_t;
|
||||
|
||||
|
|
@ -105,9 +107,6 @@ public:
|
|||
// ## Zi: overridden to fix the IM focus bug - FIRE-3989 etc.
|
||||
BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE );
|
||||
|
||||
// called when docked floater's position has been set by chiclet
|
||||
// void setPositioned(bool b) { mPositioned = b; }; // dead code -Zi
|
||||
|
||||
void onVisibilityChange(BOOL new_visibility);
|
||||
void processIMTyping(const LLIMInfo* im_info, BOOL typing);
|
||||
void processAgentListUpdates(const LLSD& body);
|
||||
|
|
@ -250,5 +249,4 @@ private:
|
|||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
|
||||
#endif // FS_FLOATERIM_H
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* http://www.firestormviewer.org
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
|
@ -94,9 +95,8 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
|
|||
FSFloaterNearbyChat::FSFloaterNearbyChat(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
,mChatHistory(NULL)
|
||||
,mInputEditor(NULL)
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
,mChatHistoryMuted(NULL)
|
||||
,mInputEditor(NULL)
|
||||
,mChatLayoutPanel(NULL)
|
||||
,mInputPanels(NULL)
|
||||
,mChatLayoutPanelHeight(0)
|
||||
|
|
@ -174,8 +174,6 @@ BOOL FSFloaterNearbyChat::postBuild()
|
|||
onChatTypeChanged();
|
||||
|
||||
mChatHistory = getChild<FSChatHistory>("chat_history");
|
||||
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
mChatHistoryMuted = getChild<FSChatHistory>("chat_history_muted");
|
||||
|
||||
mUnreadMessagesNotificationPanel = getChild<LLLayoutPanel>("unread_messages_holder");
|
||||
|
|
@ -223,22 +221,14 @@ void FSFloaterNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
tmp_chat.mFromName = chat.mFromName;
|
||||
LLSD chat_args = args;
|
||||
chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history;
|
||||
chat_args["show_time"] = show_timestamps_nearby_chat;
|
||||
chat_args["is_local"] = true;
|
||||
mChatHistoryMuted->appendMessage(chat, chat_args);
|
||||
// </FS:Ansariel> Optional muted chat history
|
||||
if (!chat.mMuted)
|
||||
{
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
//tmp_chat.mFromName = chat.mFromName;
|
||||
//LLSD chat_args = args;
|
||||
//chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history;
|
||||
//chat_args["show_timestamps_nearby_chat"] = show_timestamps_nearby_chat;
|
||||
// <(FS:Ansariel> Optional muted chat history
|
||||
mChatHistory->appendMessage(chat, chat_args);
|
||||
}
|
||||
|
||||
|
|
@ -251,10 +241,7 @@ void FSFloaterNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
//if (args["do_not_log"].asBoolean())
|
||||
if (args["do_not_log"].asBoolean() || chat.mMuted)
|
||||
// </FS:Ansariel> Optional muted chat history
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -479,7 +466,6 @@ void FSFloaterNearbyChat::onOpen(const LLSD& key )
|
|||
void FSFloaterNearbyChat::clearChatHistory()
|
||||
{
|
||||
mChatHistory->clear();
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
mChatHistoryMuted->clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* http://www.firestormviewer.org
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
|
@ -30,16 +31,17 @@
|
|||
#ifndef FS_FLOATERNEARBYCHAT_H
|
||||
#define FS_FLOATERNEARBYCHAT_H
|
||||
|
||||
#include "lldockablefloater.h"
|
||||
#include "llscrollbar.h"
|
||||
#include "llfloater.h"
|
||||
#include "llviewerchat.h"
|
||||
|
||||
class LLResizeBar;
|
||||
class LLComboBox;
|
||||
class FSChatHistory;
|
||||
class LLChatEntry;
|
||||
class LLComboBox;
|
||||
class LLLayoutStack;
|
||||
class LLLayoutPanel;
|
||||
class LLResizeBar;
|
||||
class LLTextBox;
|
||||
#include "llchatentry.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
|
||||
class FSFloaterNearbyChat: public LLFloater
|
||||
{
|
||||
|
|
@ -50,7 +52,7 @@ public:
|
|||
BOOL postBuild ();
|
||||
|
||||
/** @param archive true - to save a message to the chat history log */
|
||||
void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD());
|
||||
void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD());
|
||||
void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
|
||||
bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
|
||||
|
||||
|
|
@ -116,12 +118,11 @@ protected:
|
|||
static S32 sLastSpecialChatChannel;
|
||||
|
||||
private:
|
||||
void onNearbySpeakers ();
|
||||
void onNearbySpeakers();
|
||||
|
||||
private:
|
||||
LLHandle<LLView> mPopupMenuHandle;
|
||||
FSChatHistory* mChatHistory;
|
||||
// <FS:Ansariel> Optional muted chat history
|
||||
FSChatHistory* mChatHistoryMuted;
|
||||
LLChatEntry* mInputEditor;
|
||||
|
||||
|
|
|
|||
|
|
@ -113,16 +113,16 @@ FSPanelProfileTab::~FSPanelProfileTab()
|
|||
|
||||
void FSPanelProfileTab::setAvatarId(const LLUUID& id)
|
||||
{
|
||||
if(id.notNull())
|
||||
if (id.notNull())
|
||||
{
|
||||
if(getAvatarId().notNull())
|
||||
if (getAvatarId().notNull())
|
||||
{
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId,this);
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this);
|
||||
}
|
||||
mAvatarId = id;
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(),this);
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
|
||||
|
||||
mSelfProfile = (getAvatarId() == gAgent.getID());
|
||||
mSelfProfile = (getAvatarId() == gAgentID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -254,12 +254,12 @@ BOOL FSPanelProfileSecondLife::postBuild()
|
|||
LLButton* copy_uri_button=findChild<LLButton>("copy_uri_button");
|
||||
LLButton* copy_name_button=findChild<LLButton>("copy_name_button");
|
||||
|
||||
if(copy_uri_button)
|
||||
if (copy_uri_button)
|
||||
{
|
||||
copy_uri_button->setCommitCallback(boost::bind(&FSPanelProfileSecondLife::onCopyURI, this));
|
||||
}
|
||||
|
||||
if(copy_name_button)
|
||||
if (copy_name_button)
|
||||
{
|
||||
copy_name_button->setCommitCallback(boost::bind(&FSPanelProfileSecondLife::onCopyToClipboard, this));
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ void FSPanelProfileSecondLife::updateData()
|
|||
|
||||
void FSPanelProfileSecondLife::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_PROPERTIES == type)
|
||||
if (APT_PROPERTIES == type)
|
||||
{
|
||||
const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
|
||||
if(avatar_data && getAvatarId() == avatar_data->avatar_id)
|
||||
|
|
@ -358,7 +358,7 @@ void FSPanelProfileSecondLife::processProperties(void* data, EAvatarProcessorTyp
|
|||
enableControls();
|
||||
}
|
||||
}
|
||||
else if(APT_GROUPS == type)
|
||||
else if (APT_GROUPS == type)
|
||||
{
|
||||
LLAvatarGroups* avatar_groups = static_cast<LLAvatarGroups*>(data);
|
||||
if(avatar_groups && getAvatarId() == avatar_groups->avatar_id)
|
||||
|
|
@ -408,7 +408,9 @@ void FSPanelProfileSecondLife::processGroupProperties(const LLAvatarGroups* avat
|
|||
{
|
||||
//KC: the group_list ctrl can handle all this for us on our own profile
|
||||
if (getSelfProfile() && !getEmbedded())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// *NOTE dzaporozhan
|
||||
// Group properties may arrive in two callbacks, we need to save them across
|
||||
|
|
@ -417,7 +419,7 @@ void FSPanelProfileSecondLife::processGroupProperties(const LLAvatarGroups* avat
|
|||
LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
|
||||
const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
|
||||
|
||||
for(; it_end != it; ++it)
|
||||
for (; it_end != it; ++it)
|
||||
{
|
||||
LLAvatarGroups::LLGroupData group_data = *it;
|
||||
mGroups[group_data.group_name] = group_data.group_id;
|
||||
|
|
@ -450,7 +452,7 @@ void FSPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
|
|||
}
|
||||
|
||||
args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now());
|
||||
args["[AGEDAYS]"] = LLSD((S32) (LLDate::now().secondsSinceEpoch()-avatar_data->born_on.secondsSinceEpoch())/86400).asString();
|
||||
args["[AGEDAYS]"] = LLSD((S32) (LLDate::now().secondsSinceEpoch() - avatar_data->born_on.secondsSinceEpoch()) / 86400).asString();
|
||||
std::string register_date = getString("RegisterDateFormat", args);
|
||||
getChild<LLUICtrl>("register_date")->setValue(register_date );
|
||||
mDescriptionEdit->setValue(avatar_data->about_text);
|
||||
|
|
@ -654,9 +656,9 @@ void FSPanelProfileSecondLife::onChange(EStatusType status, const std::string &c
|
|||
|
||||
void FSPanelProfileSecondLife::setAvatarId(const LLUUID& id)
|
||||
{
|
||||
if(id.notNull())
|
||||
if (id.notNull())
|
||||
{
|
||||
if(getAvatarId().notNull())
|
||||
if (getAvatarId().notNull())
|
||||
{
|
||||
LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
|
||||
}
|
||||
|
|
@ -758,9 +760,7 @@ void FSPanelProfileSecondLife::updateButtons()
|
|||
|
||||
void FSPanelProfileSecondLife::onClickSetName()
|
||||
{
|
||||
LLAvatarNameCache::get(getAvatarId(),
|
||||
boost::bind(&FSPanelProfileSecondLife::onAvatarNameCacheSetName,
|
||||
this, _1, _2));
|
||||
LLAvatarNameCache::get(getAvatarId(), boost::bind(&FSPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2));
|
||||
|
||||
LLFirstUse::setDisplayName(false);
|
||||
}
|
||||
|
|
@ -844,10 +844,10 @@ BOOL FSPanelProfileWeb::postBuild()
|
|||
|
||||
void FSPanelProfileWeb::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_PROPERTIES == type)
|
||||
if (APT_PROPERTIES == type)
|
||||
{
|
||||
const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
|
||||
if(avatar_data && getAvatarId() == avatar_data->avatar_id)
|
||||
if (avatar_data && getAvatarId() == avatar_data->avatar_id)
|
||||
{
|
||||
mURLHome = avatar_data->profile_url;
|
||||
mUrlEdit->setValue(mURLHome);
|
||||
|
|
@ -880,7 +880,7 @@ void FSPanelProfileWeb::updateData()
|
|||
{
|
||||
mWebBrowser->setVisible(TRUE);
|
||||
mPerformanceTimer.start();
|
||||
mWebBrowser->navigateTo( mURLWebProfile, "text/html" );
|
||||
mWebBrowser->navigateTo(mURLWebProfile, "text/html");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -918,7 +918,9 @@ void FSPanelProfileWeb::onAvatarNameCache(const LLUUID& agent_id, const LLAvatar
|
|||
mWebProfileButton->setEnabled(TRUE);
|
||||
|
||||
if (getIsLoading()) //if the tab was opened before name was resolved, load the panel now
|
||||
{
|
||||
updateData();
|
||||
}
|
||||
}
|
||||
|
||||
void FSPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl)
|
||||
|
|
@ -1049,13 +1051,13 @@ BOOL FSPanelProfileInterests::postBuild()
|
|||
mSkillsEditor = getChild<LLLineEditor>("skills_edit");
|
||||
mLanguagesEditor = getChild<LLLineEditor>("languages_edit");
|
||||
|
||||
for (S32 i=0; i < WANT_CHECKS; ++i)
|
||||
for (S32 i = 0; i < WANT_CHECKS; ++i)
|
||||
{
|
||||
std::string check_name = llformat("chk%d", i);
|
||||
mWantChecks[i] = getChild<LLCheckBoxCtrl>(check_name);
|
||||
}
|
||||
|
||||
for (S32 i=0; i < SKILL_CHECKS; ++i)
|
||||
for (S32 i = 0; i < SKILL_CHECKS; ++i)
|
||||
{
|
||||
std::string check_name = llformat("schk%d", i);
|
||||
mSkillChecks[i] = getChild<LLCheckBoxCtrl>(check_name);
|
||||
|
|
@ -1063,9 +1065,9 @@ BOOL FSPanelProfileInterests::postBuild()
|
|||
|
||||
//FS:KC - Due to a bug with LLLineEditor, it cannot be disabled from XUI
|
||||
// It won't properly enable from code if it is.
|
||||
mWantToEditor->setEnabled( FALSE );
|
||||
mSkillsEditor->setEnabled( FALSE );
|
||||
mLanguagesEditor->setEnabled( FALSE );
|
||||
mWantToEditor->setEnabled(FALSE);
|
||||
mSkillsEditor->setEnabled(FALSE);
|
||||
mLanguagesEditor->setEnabled(FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1073,12 +1075,12 @@ BOOL FSPanelProfileInterests::postBuild()
|
|||
|
||||
void FSPanelProfileInterests::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_INTERESTS_INFO == type)
|
||||
if (APT_INTERESTS_INFO == type)
|
||||
{
|
||||
const FSInterestsData* interests_data = static_cast<const FSInterestsData*>(data);
|
||||
if (interests_data && getAvatarId() == interests_data->avatar_id)
|
||||
{
|
||||
for (S32 i=0; i < WANT_CHECKS; i++)
|
||||
for (S32 i = 0; i < WANT_CHECKS; ++i)
|
||||
{
|
||||
if (interests_data->want_to_mask & (1<<i))
|
||||
{
|
||||
|
|
@ -1090,7 +1092,7 @@ void FSPanelProfileInterests::processProperties(void* data, EAvatarProcessorType
|
|||
}
|
||||
}
|
||||
|
||||
for (S32 i=0; i < SKILL_CHECKS; i++)
|
||||
for (S32 i = 0; i < SKILL_CHECKS; ++i)
|
||||
{
|
||||
if (interests_data->skills_mask & (1<<i))
|
||||
{
|
||||
|
|
@ -1117,12 +1119,12 @@ void FSPanelProfileInterests::resetData()
|
|||
mSkillsEditor->setValue(LLStringUtil::null);
|
||||
mLanguagesEditor->setValue(LLStringUtil::null);
|
||||
|
||||
for (S32 i=0; i < WANT_CHECKS; i++)
|
||||
for (S32 i = 0; i < WANT_CHECKS; ++i)
|
||||
{
|
||||
mWantChecks[i]->setValue(FALSE);
|
||||
}
|
||||
|
||||
for (S32 i=0; i < SKILL_CHECKS; i++)
|
||||
for (S32 i = 0; i < SKILL_CHECKS; ++i)
|
||||
{
|
||||
mSkillChecks[i]->setValue(FALSE);
|
||||
}
|
||||
|
|
@ -1135,7 +1137,7 @@ void FSPanelProfileInterests::apply()
|
|||
FSInterestsData interests_data = FSInterestsData();
|
||||
|
||||
interests_data.want_to_mask = 0;
|
||||
for (S32 i=0; i < WANT_CHECKS; i++)
|
||||
for (S32 i = 0; i < WANT_CHECKS; ++i)
|
||||
{
|
||||
if (mWantChecks[i]->getValue().asBoolean())
|
||||
{
|
||||
|
|
@ -1219,14 +1221,14 @@ FSPanelPick::~FSPanelPick()
|
|||
|
||||
void FSPanelPick::setAvatarId(const LLUUID& avatar_id)
|
||||
{
|
||||
if(avatar_id.isNull())
|
||||
if (avatar_id.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
FSPanelProfileTab::setAvatarId(avatar_id);
|
||||
|
||||
// creating new Pick
|
||||
if(getPickId().isNull())
|
||||
if (getPickId().isNull())
|
||||
{
|
||||
mNewPick = true;
|
||||
|
||||
|
|
@ -1236,7 +1238,7 @@ void FSPanelPick::setAvatarId(const LLUUID& avatar_id)
|
|||
std::string pick_name, pick_desc, region_name;
|
||||
|
||||
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||
if(parcel)
|
||||
if (parcel)
|
||||
{
|
||||
parcel_id = parcel->getID();
|
||||
pick_name = parcel->getName();
|
||||
|
|
@ -1245,7 +1247,7 @@ void FSPanelPick::setAvatarId(const LLUUID& avatar_id)
|
|||
}
|
||||
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if(region)
|
||||
if (region)
|
||||
{
|
||||
region_name = region->getName();
|
||||
}
|
||||
|
|
@ -1318,12 +1320,12 @@ void FSPanelPick::onDescriptionFocusReceived()
|
|||
|
||||
void FSPanelPick::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_PICK_INFO != type)
|
||||
if (APT_PICK_INFO != type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLPickData* pick_info = static_cast<LLPickData*>(data);
|
||||
if(!pick_info
|
||||
if (!pick_info
|
||||
|| pick_info->creator_id != getAvatarId()
|
||||
|| pick_info->pick_id != getPickId())
|
||||
{
|
||||
|
|
@ -1423,7 +1425,7 @@ void FSPanelPick::resetDirty()
|
|||
|
||||
BOOL FSPanelPick::isDirty() const
|
||||
{
|
||||
if( mNewPick
|
||||
if (mNewPick
|
||||
|| LLPanel::isDirty()
|
||||
|| mLocationChanged
|
||||
|| mSnapshotCtrl->isDirty()
|
||||
|
|
@ -1450,7 +1452,7 @@ void FSPanelPick::onClickSetLocation()
|
|||
}
|
||||
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if(region)
|
||||
if (region)
|
||||
{
|
||||
region_name = region->getName();
|
||||
}
|
||||
|
|
@ -1680,10 +1682,10 @@ bool FSPanelProfilePicks::callbackDeletePick(const LLSD& notification, const LLS
|
|||
|
||||
void FSPanelProfilePicks::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_PICKS == type)
|
||||
if (APT_PICKS == type)
|
||||
{
|
||||
LLAvatarPicks* avatar_picks = static_cast<LLAvatarPicks*>(data);
|
||||
if(avatar_picks && getAvatarId() == avatar_picks->target_id)
|
||||
if (avatar_picks && getAvatarId() == avatar_picks->target_id)
|
||||
{
|
||||
|
||||
LLUUID selected_id = LLUUID::null;
|
||||
|
|
@ -1699,7 +1701,7 @@ void FSPanelProfilePicks::processProperties(void* data, EAvatarProcessorType typ
|
|||
mTabContainer->deleteAllTabs();
|
||||
|
||||
LLAvatarPicks::picks_list_t::const_iterator it = avatar_picks->picks_list.begin();
|
||||
for(; avatar_picks->picks_list.end() != it; ++it)
|
||||
for (; avatar_picks->picks_list.end() != it; ++it)
|
||||
{
|
||||
LLUUID pick_id = it->first;
|
||||
std::string pick_name = it->second;
|
||||
|
|
@ -1814,10 +1816,10 @@ void FSPanelProfileFirstLife::onOpen(const LLSD& key)
|
|||
|
||||
void FSPanelProfileFirstLife::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_PROPERTIES == type)
|
||||
if (APT_PROPERTIES == type)
|
||||
{
|
||||
const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
|
||||
if(avatar_data && getAvatarId() == avatar_data->avatar_id)
|
||||
if (avatar_data && getAvatarId() == avatar_data->avatar_id)
|
||||
{
|
||||
mDescriptionEdit->setValue(avatar_data->fl_about_text);
|
||||
mPicture->setValue(avatar_data->fl_image_id);
|
||||
|
|
@ -1978,12 +1980,18 @@ void FSPanelAvatarNotes::onCommitRights()
|
|||
|
||||
S32 rights = 0;
|
||||
|
||||
if(mOnlineStatus->getValue().asBoolean())
|
||||
if (mOnlineStatus->getValue().asBoolean())
|
||||
{
|
||||
rights |= LLRelationship::GRANT_ONLINE_STATUS;
|
||||
if(mMapRights->getValue().asBoolean())
|
||||
}
|
||||
if (mMapRights->getValue().asBoolean())
|
||||
{
|
||||
rights |= LLRelationship::GRANT_MAP_LOCATION;
|
||||
if(mEditObjectRights->getValue().asBoolean())
|
||||
}
|
||||
if (mEditObjectRights->getValue().asBoolean())
|
||||
{
|
||||
rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
|
||||
}
|
||||
|
||||
bool allow_modify_objects = mEditObjectRights->getValue().asBoolean();
|
||||
|
||||
|
|
@ -2003,10 +2011,10 @@ void FSPanelAvatarNotes::onCommitRights()
|
|||
|
||||
void FSPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_NOTES == type)
|
||||
if (APT_NOTES == type)
|
||||
{
|
||||
LLAvatarNotes* avatar_notes = static_cast<LLAvatarNotes*>(data);
|
||||
if(avatar_notes && getAvatarId() == avatar_notes->target_id)
|
||||
if (avatar_notes && getAvatarId() == avatar_notes->target_id)
|
||||
{
|
||||
mNotesEditor->setValue(avatar_notes->notes);
|
||||
mNotesEditor->setEnabled(TRUE);
|
||||
|
|
@ -2035,7 +2043,7 @@ void FSPanelAvatarNotes::enableCheckboxes(bool enable)
|
|||
|
||||
FSPanelAvatarNotes::~FSPanelAvatarNotes()
|
||||
{
|
||||
if(getAvatarId().notNull())
|
||||
if (getAvatarId().notNull())
|
||||
{
|
||||
LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
|
||||
}
|
||||
|
|
@ -2050,9 +2058,9 @@ void FSPanelAvatarNotes::changed(U32 mask)
|
|||
|
||||
void FSPanelAvatarNotes::setAvatarId(const LLUUID& id)
|
||||
{
|
||||
if(id.notNull())
|
||||
if (id.notNull())
|
||||
{
|
||||
if(getAvatarId().notNull())
|
||||
if (getAvatarId().notNull())
|
||||
{
|
||||
LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
|
||||
}
|
||||
|
|
@ -2083,7 +2091,9 @@ void FSPanelProfile::processProperties(void* data, EAvatarProcessorType type)
|
|||
{
|
||||
mTabContainer = getChild<LLTabContainer>("panel_profile_tabs");
|
||||
if (mTabContainer)
|
||||
{
|
||||
mTabContainer->setCommitCallback(boost::bind(&FSPanelProfile::onTabChange, this));
|
||||
}
|
||||
|
||||
// Load data on currently opened tab as well
|
||||
onTabChange();
|
||||
|
|
@ -2180,7 +2190,7 @@ void FSPanelProfile::apply()
|
|||
//KC - Avatar data is spread over 3 different panels
|
||||
// collect data from the last 2 and give to the first to save
|
||||
LLAvatarData data = LLAvatarData();
|
||||
data.avatar_id = gAgent.getID();
|
||||
data.avatar_id = gAgentID;
|
||||
mPanelFirstlife->apply(&data);
|
||||
mPanelWeb->apply(&data);
|
||||
mPanelSecondlife->apply(&data);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ FSPanelClassifieds::FSPanelClassifieds()
|
|||
|
||||
FSPanelClassifieds::~FSPanelClassifieds()
|
||||
{
|
||||
if(getAvatarId().notNull())
|
||||
if (getAvatarId().notNull())
|
||||
{
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ void* FSPanelClassifieds::create(void* data /* = NULL */)
|
|||
void FSPanelClassifieds::updateData()
|
||||
{
|
||||
// Send Picks request only when we need to, not on every onOpen(during tab switch).
|
||||
if(isDirty())
|
||||
if (isDirty())
|
||||
{
|
||||
mNoClassifieds = false;
|
||||
|
||||
|
|
@ -114,16 +114,16 @@ void FSPanelClassifieds::updateData()
|
|||
|
||||
void FSPanelClassifieds::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_CLASSIFIEDS == type)
|
||||
if (APT_CLASSIFIEDS == type)
|
||||
{
|
||||
LLAvatarClassifieds* c_info = static_cast<LLAvatarClassifieds*>(data);
|
||||
if(c_info && getAvatarId() == c_info->target_id)
|
||||
if (c_info && getAvatarId() == c_info->target_id)
|
||||
{
|
||||
// do not clear classified list in case we will receive two or more data packets.
|
||||
// list has been cleared in updateData(). (fix for EXT-6436)
|
||||
|
||||
LLAvatarClassifieds::classifieds_list_t::const_iterator it = c_info->classifieds_list.begin();
|
||||
for(; c_info->classifieds_list.end() != it; ++it)
|
||||
for (; c_info->classifieds_list.end() != it; ++it)
|
||||
{
|
||||
LLAvatarClassifieds::classified_data c_data = *it;
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ void FSPanelClassifieds::processProperties(void* data, EAvatarProcessorType type
|
|||
mNoItemsLabel->setVisible(no_data);
|
||||
if (no_data)
|
||||
{
|
||||
if(getAvatarId() == gAgentID)
|
||||
if (getAvatarId() == gAgentID)
|
||||
{
|
||||
mNoItemsLabel->setValue(LLTrans::getString("NoClassifiedsText"));
|
||||
}
|
||||
|
|
@ -213,10 +213,10 @@ BOOL FSPanelClassifieds::postBuild()
|
|||
|
||||
bool FSPanelClassifieds::isClassifiedPublished(FSClassifiedItem* c_item)
|
||||
{
|
||||
if(c_item)
|
||||
if (c_item)
|
||||
{
|
||||
FSPanelClassifiedEdit* panel = mEditClassifiedPanels[c_item->getClassifiedId()];
|
||||
if(panel)
|
||||
if (panel)
|
||||
{
|
||||
return !panel->isNewWithErrors();
|
||||
}
|
||||
|
|
@ -230,21 +230,21 @@ bool FSPanelClassifieds::isClassifiedPublished(FSClassifiedItem* c_item)
|
|||
void FSPanelClassifieds::onOpen(const LLSD& key)
|
||||
{
|
||||
const LLUUID id(key.asUUID());
|
||||
BOOL self = (gAgent.getID() == id);
|
||||
BOOL self = (gAgentID == id);
|
||||
|
||||
// only agent can edit her picks
|
||||
getChildView("edit_panel")->setEnabled(self);
|
||||
getChildView("edit_panel")->setVisible( self);
|
||||
|
||||
// Disable buttons when viewing profile for first time
|
||||
if(getAvatarId() != id)
|
||||
if (getAvatarId() != id)
|
||||
{
|
||||
getChildView(XML_BTN_INFO)->setEnabled(FALSE);
|
||||
getChildView(XML_BTN_TELEPORT)->setEnabled(FALSE);
|
||||
getChildView(XML_BTN_SHOW_ON_MAP)->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
if(getAvatarId() != id)
|
||||
if (getAvatarId() != id)
|
||||
{
|
||||
mClassifiedsList->goToTop();
|
||||
// Set dummy value to make panel dirty and make it reload picks
|
||||
|
|
@ -267,7 +267,6 @@ void FSPanelClassifieds::onClosePanel()
|
|||
|
||||
void FSPanelClassifieds::onListCommit(const LLFlatListView* f_list)
|
||||
{
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +274,7 @@ void FSPanelClassifieds::onListCommit(const LLFlatListView* f_list)
|
|||
void FSPanelClassifieds::onClickDelete()
|
||||
{
|
||||
LLSD value = mClassifiedsList->getSelectedValue();
|
||||
if(value.isDefined())
|
||||
if (value.isDefined())
|
||||
{
|
||||
LLSD args;
|
||||
args["NAME"] = value[CLASSIFIED_NAME];
|
||||
|
|
@ -315,7 +314,7 @@ void FSPanelClassifieds::onClickTeleport()
|
|||
FSClassifiedItem* c_item = getSelectedClassifiedItem();
|
||||
|
||||
LLVector3d pos;
|
||||
if(c_item)
|
||||
if (c_item)
|
||||
{
|
||||
pos = c_item->getPosGlobal();
|
||||
FSPanelClassifiedInfo::sendClickMessage("teleport", false,
|
||||
|
|
@ -335,7 +334,7 @@ void FSPanelClassifieds::onClickMap()
|
|||
FSClassifiedItem* c_item = getSelectedClassifiedItem();
|
||||
|
||||
LLVector3d pos;
|
||||
if(c_item)
|
||||
if (c_item)
|
||||
{
|
||||
FSPanelClassifiedInfo::sendClickMessage("map", false,
|
||||
c_item->getClassifiedId(), LLUUID::null, pos, LLStringUtil::null);
|
||||
|
|
@ -384,7 +383,7 @@ void FSPanelClassifieds::updateButtons()
|
|||
getChildView(XML_BTN_SHOW_ON_MAP)->setEnabled(has_selected);
|
||||
|
||||
FSClassifiedItem* c_item = dynamic_cast<FSClassifiedItem*>(mClassifiedsList->getSelectedItem());
|
||||
if(c_item)
|
||||
if (c_item)
|
||||
{
|
||||
getChildView(XML_BTN_INFO)->setEnabled(isClassifiedPublished(c_item));
|
||||
}
|
||||
|
|
@ -401,7 +400,7 @@ void FSPanelClassifieds::createNewClassified()
|
|||
|
||||
void FSPanelClassifieds::onClickInfo()
|
||||
{
|
||||
if(mClassifiedsList->numSelected() > 0)
|
||||
if (mClassifiedsList->numSelected() > 0)
|
||||
{
|
||||
openClassifiedInfo();
|
||||
}
|
||||
|
|
@ -410,7 +409,10 @@ void FSPanelClassifieds::onClickInfo()
|
|||
void FSPanelClassifieds::openClassifiedInfo()
|
||||
{
|
||||
LLSD selected_value = mClassifiedsList->getSelectedValue();
|
||||
if (selected_value.isUndefined()) return;
|
||||
if (selected_value.isUndefined())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FSClassifiedItem* c_item = getSelectedClassifiedItem();
|
||||
LLSD params;
|
||||
|
|
@ -444,12 +446,12 @@ void FSPanelClassifieds::onPanelPickClose(LLPanel* panel)
|
|||
|
||||
void FSPanelClassifieds::onPanelClassifiedSave(FSPanelClassifiedEdit* panel)
|
||||
{
|
||||
if(!panel->canClose())
|
||||
if (!panel->canClose())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(panel->isNew())
|
||||
if (panel->isNew())
|
||||
{
|
||||
mEditClassifiedPanels[panel->getClassifiedId()] = panel;
|
||||
|
||||
|
|
@ -466,7 +468,7 @@ void FSPanelClassifieds::onPanelClassifiedSave(FSPanelClassifiedEdit* panel)
|
|||
c_item->setMouseUpCallback(boost::bind(&FSPanelClassifieds::updateButtons, this));
|
||||
c_item->childSetAction("info_chevron", boost::bind(&FSPanelClassifieds::onClickInfo, this));
|
||||
}
|
||||
else if(panel->isNewWithErrors())
|
||||
else if (panel->isNewWithErrors())
|
||||
{
|
||||
FSClassifiedItem* c_item = dynamic_cast<FSClassifiedItem*>(mClassifiedsList->getSelectedItem());
|
||||
llassert(c_item);
|
||||
|
|
@ -487,17 +489,16 @@ void FSPanelClassifieds::onPanelClassifiedSave(FSPanelClassifiedEdit* panel)
|
|||
|
||||
void FSPanelClassifieds::onPanelClassifiedClose(FSPanelClassifiedInfo* panel)
|
||||
{
|
||||
if(panel->getInfoLoaded() && !panel->isDirty())
|
||||
if (panel->getInfoLoaded() && !panel->isDirty())
|
||||
{
|
||||
std::vector<LLSD> values;
|
||||
mClassifiedsList->getValues(values);
|
||||
for(size_t n = 0; n < values.size(); ++n)
|
||||
for (size_t n = 0; n < values.size(); ++n)
|
||||
{
|
||||
LLUUID c_id = values[n][CLASSIFIED_ID].asUUID();
|
||||
if(panel->getClassifiedId() == c_id)
|
||||
if (panel->getClassifiedId() == c_id)
|
||||
{
|
||||
FSClassifiedItem* c_item = dynamic_cast<FSClassifiedItem*>(
|
||||
mClassifiedsList->getItemByValue(values[n]));
|
||||
FSClassifiedItem* c_item = dynamic_cast<FSClassifiedItem*>(mClassifiedsList->getItemByValue(values[n]));
|
||||
llassert(c_item);
|
||||
if (c_item)
|
||||
{
|
||||
|
|
@ -523,7 +524,7 @@ void FSPanelClassifieds::createClassifiedInfoPanel()
|
|||
|
||||
void FSPanelClassifieds::createClassifiedEditPanel(FSPanelClassifiedEdit** panel)
|
||||
{
|
||||
if(panel)
|
||||
if (panel)
|
||||
{
|
||||
FSPanelClassifiedEdit* new_panel = FSPanelClassifiedEdit::create();
|
||||
new_panel->setExitCallback(boost::bind(&FSPanelClassifieds::onPanelClassifiedClose, this, new_panel));
|
||||
|
|
@ -557,7 +558,7 @@ FSClassifiedItem *FSPanelClassifieds::findClassifiedById(const LLUUID& classifie
|
|||
std::vector<LLPanel*> items;
|
||||
mClassifiedsList->getItems(items);
|
||||
FSClassifiedItem* c_item = NULL;
|
||||
for(std::vector<LLPanel*>::iterator it = items.begin(); it != items.end(); ++it)
|
||||
for (std::vector<LLPanel*>::iterator it = items.begin(); it != items.end(); ++it)
|
||||
{
|
||||
FSClassifiedItem *test_item = dynamic_cast<FSClassifiedItem*>(*it);
|
||||
if (test_item && test_item->getClassifiedId() == classified_id)
|
||||
|
|
@ -591,7 +592,7 @@ void FSPanelClassifieds::editClassified(const LLUUID& classified_id)
|
|||
params["location_text"] = c_item->getLocationText();
|
||||
|
||||
FSPanelClassifiedEdit* panel = mEditClassifiedPanels[c_item->getClassifiedId()];
|
||||
if(!panel)
|
||||
if (!panel)
|
||||
{
|
||||
createClassifiedEditPanel(&panel);
|
||||
mEditClassifiedPanels[c_item->getClassifiedId()] = panel;
|
||||
|
|
@ -602,7 +603,7 @@ void FSPanelClassifieds::editClassified(const LLUUID& classified_id)
|
|||
|
||||
void FSPanelClassifieds::onClickMenuEdit()
|
||||
{
|
||||
if(getSelectedClassifiedItem())
|
||||
if (getSelectedClassifiedItem())
|
||||
{
|
||||
onPanelClassifiedEdit();
|
||||
}
|
||||
|
|
@ -613,7 +614,7 @@ bool FSPanelClassifieds::onEnableMenuItem(const LLSD& user_data)
|
|||
std::string param = user_data.asString();
|
||||
|
||||
FSClassifiedItem* c_item = dynamic_cast<FSClassifiedItem*>(mClassifiedsList->getSelectedItem());
|
||||
if(c_item && "info" == param)
|
||||
if (c_item && "info" == param)
|
||||
{
|
||||
// dont show Info panel if classified was not created
|
||||
return isClassifiedPublished(c_item);
|
||||
|
|
@ -698,13 +699,13 @@ FSClassifiedItem::~FSClassifiedItem()
|
|||
|
||||
void FSClassifiedItem::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(APT_CLASSIFIED_INFO != type)
|
||||
if (APT_CLASSIFIED_INFO != type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
|
||||
if( !c_info || c_info->classified_id != getClassifiedId() )
|
||||
if (!c_info || c_info->classified_id != getClassifiedId())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -731,14 +732,20 @@ BOOL FSClassifiedItem::postBuild()
|
|||
|
||||
void FSClassifiedItem::setValue(const LLSD& value)
|
||||
{
|
||||
if (!value.isMap()) return;;
|
||||
if (!value.has("selected")) return;
|
||||
if (!value.isMap())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!value.has("selected"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
getChildView("selected_icon")->setVisible( value["selected"]);
|
||||
}
|
||||
|
||||
void FSClassifiedItem::fillIn(FSPanelClassifiedEdit* panel)
|
||||
{
|
||||
if(!panel)
|
||||
if (!panel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("secondary_inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
|
||||
LLFloaterReg::add("script_recover", "floater_script_recover.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptRecover>);
|
||||
LLFloaterReg::add("sound_explorer", "floater_NACL_explore_sounds.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<NACLFloaterExploreSounds>);
|
||||
LLFloaterReg::add( "vram_usage", "floater_fs_vram_usage.xml", static_cast<LLFloaterBuildFunc>( &LLFloaterReg::build< FSFloaterVRAMUsage >) );
|
||||
LLFloaterReg::add("vram_usage", "floater_fs_vram_usage.xml", static_cast<LLFloaterBuildFunc>( &LLFloaterReg::build< FSFloaterVRAMUsage >) );
|
||||
LLFloaterReg::add("ws_asset_blacklist", "floater_asset_blacklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterWSAssetBlacklist>);
|
||||
|
||||
LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving
|
||||
|
|
|
|||
Loading…
Reference in New Issue