Modernized lluictrl. Added LLViewModel. Fixed focus callbacks being called excessively. Updated LLButton, and implemented boost::signals2 to replace old callback handling.
This commit is contained in:
@@ -65,6 +65,11 @@ class HippoFloaterXmlImpl : public LLFloater
|
||||
private:
|
||||
std::string mName;
|
||||
bool mIsNotifyOnClose;
|
||||
//Must retain handles to unregister notices.
|
||||
typedef boost::signals2::scoped_connection notice_connection_t;
|
||||
typedef boost::shared_ptr<notice_connection_t> notice_ptr_t;
|
||||
|
||||
std::map<LLUICtrl*, notice_ptr_t > mNotices;
|
||||
};
|
||||
|
||||
|
||||
@@ -260,7 +265,7 @@ void HippoFloaterXml::execute(const std::string &cmds)
|
||||
// ********************************************************************
|
||||
// generic notification callbacks
|
||||
|
||||
static void notify(LLUICtrl *ctrl, void *data)
|
||||
static void notifyCallback(LLUICtrl *ctrl)
|
||||
{
|
||||
std::string msg = "NOTIFY:";
|
||||
msg += ctrl->getName();
|
||||
@@ -269,11 +274,6 @@ static void notify(LLUICtrl *ctrl, void *data)
|
||||
send_chat_from_viewer(msg, CHAT_TYPE_WHISPER, CHANNEL);
|
||||
}
|
||||
|
||||
static void notify(void *data)
|
||||
{
|
||||
notify(static_cast<LLUICtrl*>(data), 0);
|
||||
}
|
||||
|
||||
void HippoFloaterXmlImpl::onClose(bool quitting)
|
||||
{
|
||||
if (mIsNotifyOnClose)
|
||||
@@ -324,16 +324,19 @@ bool HippoFloaterXmlImpl::execute(LLUICtrl *ctrl,
|
||||
bool set = (value != "0");
|
||||
if (HippoFloaterXmlImpl *floater = dynamic_cast<HippoFloaterXmlImpl*>(ctrl)) {
|
||||
floater->mIsNotifyOnClose = set;
|
||||
} else if (LLButton *button = dynamic_cast<LLButton*>(ctrl)) {
|
||||
} else if (LLButton *button = dynamic_cast<LLButton*>(ctrl))
|
||||
{
|
||||
if (set)
|
||||
button->setClickedCallback(notify, ctrl);
|
||||
floater->mNotices[button] = notice_ptr_t(new notice_connection_t(button->setClickedCallback(boost::bind(¬ifyCallback, ctrl))));
|
||||
else
|
||||
button->setClickedCallback(0, 0);
|
||||
} else {
|
||||
floater->mNotices.erase(button);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (set)
|
||||
ctrl->setCommitCallback(notify);
|
||||
floater->mNotices[ctrl] = notice_ptr_t(new notice_connection_t(ctrl->setCommitCallback(boost::bind(¬ifyCallback, ctrl))));
|
||||
else
|
||||
ctrl->setCommitCallback(0);
|
||||
floater->mNotices.erase(ctrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,12 +267,13 @@ BOOL LLFloaterAnimPreview::postBuild()
|
||||
{
|
||||
mPlayButton = new LLButton(std::string("play_btn"), LLRect(0,0,0,0));
|
||||
}
|
||||
mPlayButton->setClickedCallback(onBtnPlay);
|
||||
mPlayButton->setCallbackUserData(this);
|
||||
mPlayButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnPlay,this));
|
||||
|
||||
mPlayButton->setImages(std::string("button_anim_play.tga"),
|
||||
std::string("button_anim_play_selected.tga"));
|
||||
mPlayButton->setDisabledImages(LLStringUtil::null,LLStringUtil::null);
|
||||
|
||||
mPlayButton->setImageDisabled(NULL);
|
||||
mPlayButton->setImageDisabledSelected(NULL);
|
||||
|
||||
mPlayButton->setScaleImage(TRUE);
|
||||
|
||||
@@ -281,12 +282,13 @@ BOOL LLFloaterAnimPreview::postBuild()
|
||||
{
|
||||
mStopButton = new LLButton(std::string("stop_btn"), LLRect(0,0,0,0));
|
||||
}
|
||||
mStopButton->setClickedCallback(onBtnStop);
|
||||
mStopButton->setCallbackUserData(this);
|
||||
mStopButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnStop, this));
|
||||
|
||||
mStopButton->setImages(std::string("button_anim_stop.tga"),
|
||||
std::string("button_anim_stop_selected.tga"));
|
||||
mStopButton->setDisabledImages(LLStringUtil::null,LLStringUtil::null);
|
||||
|
||||
mStopButton->setImageDisabled(NULL);
|
||||
mStopButton->setImageDisabledSelected(NULL);
|
||||
|
||||
mStopButton->setScaleImage(TRUE);
|
||||
|
||||
|
||||
@@ -224,20 +224,17 @@ LLFloaterColorPicker::
|
||||
postBuild()
|
||||
{
|
||||
mCancelBtn = getChild<LLButton>( "cancel_btn" );
|
||||
mCancelBtn->setClickedCallback ( onClickCancel );
|
||||
mCancelBtn->setCallbackUserData ( this );
|
||||
mCancelBtn->setClickedCallback ( boost::bind(&LLFloaterColorPicker::onClickCancel,this) );
|
||||
|
||||
mSelectBtn = getChild<LLButton>( "select_btn");
|
||||
mSelectBtn->setClickedCallback ( onClickSelect );
|
||||
mSelectBtn->setCallbackUserData ( this );
|
||||
mSelectBtn->setClickedCallback ( boost::bind(&LLFloaterColorPicker::onClickSelect,this) );
|
||||
mSelectBtn->setFocus ( TRUE );
|
||||
|
||||
mPipetteBtn = getChild<LLButton>("color_pipette" );
|
||||
|
||||
mPipetteBtn->setImages(std::string("eye_button_inactive.tga"), std::string("eye_button_active.tga"));
|
||||
|
||||
mPipetteBtn->setClickedCallback( onClickPipette );
|
||||
mPipetteBtn->setCallbackUserData ( this );
|
||||
mPipetteBtn->setClickedCallback( boost::bind(&LLFloaterColorPicker::onClickPipette,this) );
|
||||
|
||||
mApplyImmediateCheck = getChild<LLCheckBoxCtrl>("apply_immediate");
|
||||
mApplyImmediateCheck->set(gSavedSettings.getBOOL("ApplyColorImmediately"));
|
||||
|
||||
@@ -1419,15 +1419,15 @@ LLScrollingPanelParam::LLScrollingPanelParam( const std::string& name,
|
||||
childSetValue("min param text", min_name);
|
||||
childSetValue("max param text", max_name);
|
||||
mLess = getChild<LLButton>("less");
|
||||
mLess->setMouseDownCallback( LLScrollingPanelParam::onHintMinMouseDown );
|
||||
mLess->setMouseUpCallback( LLScrollingPanelParam::onHintMinMouseUp );
|
||||
mLess->setHeldDownCallback( LLScrollingPanelParam::onHintMinHeldDown );
|
||||
mLess->setMouseDownCallback( boost::bind(&LLScrollingPanelParam::onHintMinMouseDown, this) );
|
||||
mLess->setMouseUpCallback( boost::bind(LLScrollingPanelParam::onHintMinMouseUp, this) );
|
||||
mLess->setHeldDownCallback( boost::bind(LLScrollingPanelParam::onHintMinHeldDown, this) );
|
||||
mLess->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD );
|
||||
|
||||
mMore = getChild<LLButton>("more");
|
||||
mMore->setMouseDownCallback( LLScrollingPanelParam::onHintMaxMouseDown );
|
||||
mMore->setMouseUpCallback( LLScrollingPanelParam::onHintMaxMouseUp );
|
||||
mMore->setHeldDownCallback( LLScrollingPanelParam::onHintMaxHeldDown );
|
||||
mMore->setMouseDownCallback( boost::bind(LLScrollingPanelParam::onHintMaxMouseDown, this) );
|
||||
mMore->setMouseUpCallback( boost::bind(LLScrollingPanelParam::onHintMaxMouseUp, this) );
|
||||
mMore->setHeldDownCallback( boost::bind(LLScrollingPanelParam::onHintMaxHeldDown, this) );
|
||||
mMore->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -147,25 +147,25 @@ void LLFloaterLagMeter::determineClient()
|
||||
|
||||
if (!gFocusMgr.getAppHasFocus())
|
||||
{
|
||||
mClientButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) );
|
||||
mClientCause->setText( LLStringUtil::null );
|
||||
}
|
||||
else if(client_frame_time >= mClientFrameTimeCritical)
|
||||
{
|
||||
mClientButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else if(client_frame_time >= mClientFrameTimeWarning)
|
||||
{
|
||||
mClientButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mClientButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) );
|
||||
mClientCause->setText( LLStringUtil::null );
|
||||
}
|
||||
@@ -206,13 +206,13 @@ void LLFloaterLagMeter::determineNetwork()
|
||||
|
||||
if(packet_loss >= mNetworkPacketLossCritical)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) );
|
||||
find_cause_loss = true;
|
||||
}
|
||||
else if(ping_time >= mNetworkPingCritical)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
if (client_frame_time_ms < mNetworkPingCritical)
|
||||
{
|
||||
mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) );
|
||||
@@ -221,13 +221,13 @@ void LLFloaterLagMeter::determineNetwork()
|
||||
}
|
||||
else if(packet_loss >= mNetworkPacketLossWarning)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) );
|
||||
find_cause_loss = true;
|
||||
}
|
||||
else if(ping_time >= mNetworkPingWarning)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
if (client_frame_time_ms < mNetworkPingWarning)
|
||||
{
|
||||
mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) );
|
||||
@@ -236,7 +236,7 @@ void LLFloaterLagMeter::determineNetwork()
|
||||
}
|
||||
else
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) );
|
||||
}
|
||||
|
||||
@@ -261,19 +261,19 @@ void LLFloaterLagMeter::determineServer()
|
||||
|
||||
if(sim_frame_time >= mServerFrameTimeCritical)
|
||||
{
|
||||
mServerButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
|
||||
mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else if(sim_frame_time >= mServerFrameTimeWarning)
|
||||
{
|
||||
mServerButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
|
||||
mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mServerButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
|
||||
mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) );
|
||||
mServerCause->setText( LLStringUtil::null );
|
||||
}
|
||||
|
||||
@@ -180,8 +180,41 @@ void* LLFloaterTools::createPanelLandInfo(void* data)
|
||||
return floater->mPanelLandInfo;
|
||||
}
|
||||
|
||||
static const std::string toolNames[]={
|
||||
"ToolCube",
|
||||
"ToolPrism",
|
||||
"ToolPyramid",
|
||||
"ToolTetrahedron",
|
||||
"ToolCylinder",
|
||||
"ToolHemiCylinder",
|
||||
"ToolCone",
|
||||
"ToolHemiCone",
|
||||
"ToolSphere",
|
||||
"ToolHemiSphere",
|
||||
"ToolTorus",
|
||||
"ToolTube",
|
||||
"ToolRing",
|
||||
"ToolTree",
|
||||
"ToolGrass"};
|
||||
LLPCode toolData[]={
|
||||
LL_PCODE_CUBE,
|
||||
LL_PCODE_PRISM,
|
||||
LL_PCODE_PYRAMID,
|
||||
LL_PCODE_TETRAHEDRON,
|
||||
LL_PCODE_CYLINDER,
|
||||
LL_PCODE_CYLINDER_HEMI,
|
||||
LL_PCODE_CONE,
|
||||
LL_PCODE_CONE_HEMI,
|
||||
LL_PCODE_SPHERE,
|
||||
LL_PCODE_SPHERE_HEMI,
|
||||
LL_PCODE_TORUS,
|
||||
LLViewerObject::LL_VO_SQUARE_TORUS,
|
||||
LLViewerObject::LL_VO_TRIANGLE_TORUS,
|
||||
LL_PCODE_LEGACY_TREE,
|
||||
LL_PCODE_LEGACY_GRASS};
|
||||
|
||||
BOOL LLFloaterTools::postBuild()
|
||||
{
|
||||
{
|
||||
|
||||
// Hide until tool selected
|
||||
setVisible(FALSE);
|
||||
@@ -250,44 +283,12 @@ BOOL LLFloaterTools::postBuild()
|
||||
// Create Buttons
|
||||
//
|
||||
|
||||
static const std::string toolNames[]={
|
||||
"ToolCube",
|
||||
"ToolPrism",
|
||||
"ToolPyramid",
|
||||
"ToolTetrahedron",
|
||||
"ToolCylinder",
|
||||
"ToolHemiCylinder",
|
||||
"ToolCone",
|
||||
"ToolHemiCone",
|
||||
"ToolSphere",
|
||||
"ToolHemiSphere",
|
||||
"ToolTorus",
|
||||
"ToolTube",
|
||||
"ToolRing",
|
||||
"ToolTree",
|
||||
"ToolGrass"};
|
||||
void* toolData[]={
|
||||
&LLToolPlacerPanel::sCube,
|
||||
&LLToolPlacerPanel::sPrism,
|
||||
&LLToolPlacerPanel::sPyramid,
|
||||
&LLToolPlacerPanel::sTetrahedron,
|
||||
&LLToolPlacerPanel::sCylinder,
|
||||
&LLToolPlacerPanel::sCylinderHemi,
|
||||
&LLToolPlacerPanel::sCone,
|
||||
&LLToolPlacerPanel::sConeHemi,
|
||||
&LLToolPlacerPanel::sSphere,
|
||||
&LLToolPlacerPanel::sSphereHemi,
|
||||
&LLToolPlacerPanel::sTorus,
|
||||
&LLToolPlacerPanel::sSquareTorus,
|
||||
&LLToolPlacerPanel::sTriangleTorus,
|
||||
&LLToolPlacerPanel::sTree,
|
||||
&LLToolPlacerPanel::sGrass};
|
||||
for(size_t t=0; t<LL_ARRAY_SIZE(toolNames); ++t)
|
||||
{
|
||||
LLButton *found = getChild<LLButton>(toolNames[t]);
|
||||
if(found)
|
||||
{
|
||||
found->setClickedCallback(setObjectType,toolData[t]);
|
||||
found->setClickedCallback(boost::bind(&LLFloaterTools::setObjectType, toolData[t]));
|
||||
mButtons.push_back( found );
|
||||
}
|
||||
else
|
||||
@@ -737,15 +738,13 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
|
||||
else
|
||||
{
|
||||
// Highlight the correct placer button
|
||||
for( std::vector<LLButton*>::size_type i = 0; i < mButtons.size(); i++ )
|
||||
for( S32 t = 0; t < (S32)mButtons.size(); t++ )
|
||||
{
|
||||
LLPCode pcode = LLToolPlacer::getObjectType();
|
||||
void *userdata = mButtons[i]->getCallbackUserData();
|
||||
LLPCode *cur = (LLPCode*) userdata;
|
||||
|
||||
BOOL state = (pcode == *cur);
|
||||
mButtons[i]->setToggleState( state );
|
||||
mButtons[i]->setVisible( create_visible );
|
||||
LLPCode button_pcode = toolData[t];
|
||||
BOOL state = (pcode == button_pcode);
|
||||
mButtons[t]->setToggleState( state );
|
||||
mButtons[t]->setVisible( create_visible );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1034,9 +1033,8 @@ void commit_grid_mode(LLUICtrl *ctrl, void *data)
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTools::setObjectType( void* data )
|
||||
void LLFloaterTools::setObjectType( LLPCode pcode )
|
||||
{
|
||||
LLPCode pcode = *(LLPCode*) data;
|
||||
LLToolPlacer::setObjectType( pcode );
|
||||
gSavedSettings.setBOOL("CreateToolCopySelection", FALSE);
|
||||
gFocusMgr.setMouseCapture(NULL);
|
||||
@@ -1067,11 +1065,11 @@ void LLFloaterTools::onSelectTreesGrass(LLUICtrl*, void*)
|
||||
{
|
||||
const std::string &selected = gFloaterTools->mComboTreesGrass->getValue();
|
||||
LLPCode pcode = LLToolPlacer::getObjectType();
|
||||
if (pcode == LLToolPlacerPanel::sTree)
|
||||
if (pcode == LL_PCODE_LEGACY_TREE)
|
||||
{
|
||||
gSavedSettings.setString("LastTree", selected);
|
||||
}
|
||||
else if (pcode == LLToolPlacerPanel::sGrass)
|
||||
else if (pcode == LL_PCODE_LEGACY_GRASS)
|
||||
{
|
||||
gSavedSettings.setString("LastGrass", selected);
|
||||
}
|
||||
@@ -1085,7 +1083,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
|
||||
LLPCode pcode = LLToolPlacer::getObjectType();
|
||||
std::map<std::string, S32>::iterator it, end;
|
||||
std::string selected;
|
||||
if (pcode == LLToolPlacerPanel::sTree)
|
||||
if (pcode == LL_PCODE_LEGACY_TREE)
|
||||
{
|
||||
tree_grass_label->setVisible(visible);
|
||||
LLButton* button = getChild<LLButton>("ToolTree");
|
||||
@@ -1095,7 +1093,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
|
||||
it = LLVOTree::sSpeciesNames.begin();
|
||||
end = LLVOTree::sSpeciesNames.end();
|
||||
}
|
||||
else if (pcode == LLToolPlacerPanel::sGrass)
|
||||
else if (pcode == LL_PCODE_LEGACY_GRASS)
|
||||
{
|
||||
tree_grass_label->setVisible(visible);
|
||||
LLButton* button = getChild<LLButton>("ToolGrass");
|
||||
|
||||
@@ -103,10 +103,10 @@ public:
|
||||
static void setEditTool(void* data);
|
||||
void saveLastTool();
|
||||
private:
|
||||
static void setObjectType( void* data );
|
||||
|
||||
|
||||
void refresh();
|
||||
|
||||
static void setObjectType( LLPCode pcode );
|
||||
static void onClickGridOptions(void* data);
|
||||
|
||||
public:
|
||||
|
||||
@@ -78,8 +78,7 @@ LLJoystick::LLJoystick(
|
||||
mHeldDown(FALSE),
|
||||
mHeldDownTimer()
|
||||
{
|
||||
setHeldDownCallback(&LLJoystick::onHeldDown);
|
||||
setCallbackUserData(this);
|
||||
setHeldDownCallback(boost::bind(&LLJoystick::onHeldDownCallback,this));
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +177,7 @@ F32 LLJoystick::getElapsedHeldDownTime()
|
||||
}
|
||||
|
||||
// static
|
||||
void LLJoystick::onHeldDown(void *userdata)
|
||||
void LLJoystick::onHeldDownCallback(void *userdata)
|
||||
{
|
||||
LLJoystick *self = (LLJoystick *)userdata;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
virtual void onHeldDown() = 0;
|
||||
F32 getElapsedHeldDownTime();
|
||||
|
||||
static void onHeldDown(void *userdata); // called by llbutton callback handler
|
||||
static void onHeldDownCallback(void *userdata); // called by llbutton callback handler
|
||||
void setInitialQuadrant(EJoystickQuadrant initial) { mInitialQuadrant = initial; };
|
||||
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
|
||||
@@ -81,21 +81,21 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
|
||||
|
||||
mTurnLeftButton = getChild<LLButton>("turn left btn");
|
||||
mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
|
||||
mTurnLeftButton->setHeldDownCallback( turnLeft );
|
||||
mTurnLeftButton->setHeldDownCallback( boost::bind(&LLFloaterMove::turnLeft, this) );
|
||||
|
||||
mTurnRightButton = getChild<LLButton>("turn right btn");
|
||||
mTurnRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
|
||||
mTurnRightButton->setHeldDownCallback( turnRight );
|
||||
mTurnRightButton->setHeldDownCallback( boost::bind(&LLFloaterMove::turnRight, this) );
|
||||
|
||||
mMoveUpButton = getChild<LLButton>("move up btn");
|
||||
childSetAction("move up btn",moveUp,NULL);
|
||||
mMoveUpButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
|
||||
mMoveUpButton->setHeldDownCallback( moveUp );
|
||||
mMoveUpButton->setHeldDownCallback( boost::bind(&LLFloaterMove::moveUp, this) );
|
||||
|
||||
mMoveDownButton = getChild<LLButton>("move down btn");
|
||||
childSetAction("move down btn",moveDown,NULL);
|
||||
mMoveDownButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
|
||||
mMoveDownButton->setHeldDownCallback( moveDown );
|
||||
mMoveDownButton->setHeldDownCallback( boost::bind(&LLFloaterMove::moveDown, this) );
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
||||
@@ -270,22 +270,18 @@ BOOL LLPanelClassified::postBuild()
|
||||
mLocationEditor = getChild<LLLineEditor>("location_editor");
|
||||
|
||||
mSetBtn = getChild<LLButton>( "set_location_btn");
|
||||
mSetBtn->setClickedCallback(onClickSet);
|
||||
mSetBtn->setCallbackUserData(this);
|
||||
mSetBtn->setClickedCallback(boost::bind(&LLPanelClassified::onClickSet, this));
|
||||
|
||||
mTeleportBtn = getChild<LLButton>( "classified_teleport_btn");
|
||||
mTeleportBtn->setClickedCallback(onClickTeleport);
|
||||
mTeleportBtn->setCallbackUserData(this);
|
||||
mTeleportBtn->setClickedCallback(boost::bind(&LLPanelClassified::onClickTeleport, this));
|
||||
|
||||
mMapBtn = getChild<LLButton>( "classified_map_btn");
|
||||
mMapBtn->setClickedCallback(onClickMap);
|
||||
mMapBtn->setCallbackUserData(this);
|
||||
mMapBtn->setClickedCallback(boost::bind(&LLPanelClassified::onClickMap, this));
|
||||
|
||||
if(mInFinder)
|
||||
{
|
||||
mProfileBtn = getChild<LLButton>( "classified_profile_btn");
|
||||
mProfileBtn->setClickedCallback(onClickProfile);
|
||||
mProfileBtn->setCallbackUserData(this);
|
||||
mProfileBtn->setClickedCallback(boost::bind(&LLPanelClassified::onClickProfile, this));
|
||||
}
|
||||
|
||||
mCategoryCombo = getChild<LLComboBox>( "classified_category_combo");
|
||||
@@ -319,7 +315,7 @@ BOOL LLPanelClassified::postBuild()
|
||||
}
|
||||
|
||||
mUpdateBtn = getChild<LLButton>("classified_update_btn");
|
||||
mUpdateBtn->setClickedCallback(onClickUpdate);
|
||||
mUpdateBtn->setClickedCallback(boost::bind(&LLPanelClassified::onClickUpdate, this));
|
||||
mUpdateBtn->setCallbackUserData(this);
|
||||
|
||||
if (!mInFinder)
|
||||
|
||||
@@ -89,20 +89,16 @@ BOOL LLPanelEvent::postBuild()
|
||||
mTBCover = getChild<LLTextBox>("event_cover");
|
||||
|
||||
mTeleportBtn = getChild<LLButton>( "teleport_btn");
|
||||
mTeleportBtn->setClickedCallback(onClickTeleport);
|
||||
mTeleportBtn->setCallbackUserData(this);
|
||||
mTeleportBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickTeleport,this));
|
||||
|
||||
mMapBtn = getChild<LLButton>( "map_btn");
|
||||
mMapBtn->setClickedCallback(onClickMap);
|
||||
mMapBtn->setCallbackUserData(this);
|
||||
mMapBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickMap,this));
|
||||
|
||||
mNotifyBtn = getChild<LLButton>( "notify_btn");
|
||||
mNotifyBtn->setClickedCallback(onClickNotify);
|
||||
mNotifyBtn->setCallbackUserData(this);
|
||||
mNotifyBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickNotify,this));
|
||||
|
||||
mCreateEventBtn = getChild<LLButton>( "create_event_btn");
|
||||
mCreateEventBtn->setClickedCallback(onClickCreateEvent);
|
||||
mCreateEventBtn->setCallbackUserData(this);
|
||||
mCreateEventBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickCreateEvent,this));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -72,8 +72,7 @@ BOOL LLPanelGroupTab::postBuild()
|
||||
LLButton* button = getChild<LLButton>("help_button");
|
||||
if (button)
|
||||
{
|
||||
button->setClickedCallback(onClickHelp);
|
||||
button->setCallbackUserData(this);
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroupTab::onClickHelp,this));
|
||||
}
|
||||
|
||||
mHelpText = getString("help_text");
|
||||
@@ -267,23 +266,21 @@ BOOL LLPanelGroup::postBuild()
|
||||
LLButton* button = getChild<LLButton>("btn_ok");
|
||||
if (button)
|
||||
{
|
||||
button->setClickedCallback(onBtnOK);
|
||||
button->setCallbackUserData(this);
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroup::onBtnOK,this));
|
||||
button->setVisible(mAllowEdit);
|
||||
}
|
||||
|
||||
button = getChild<LLButton>("btn_cancel");
|
||||
if (button)
|
||||
{
|
||||
button->setClickedCallback(onBtnCancel);
|
||||
button->setCallbackUserData(this);
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroup::onBtnCancel,this));
|
||||
button->setVisible(mAllowEdit);
|
||||
}
|
||||
|
||||
button = getChild<LLButton>("btn_apply");
|
||||
if (button)
|
||||
{
|
||||
button->setClickedCallback(onBtnApply);
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroup::onBtnApply,this));
|
||||
button->setVisible(mAllowEdit);
|
||||
button->setEnabled(FALSE);
|
||||
|
||||
@@ -293,8 +290,7 @@ BOOL LLPanelGroup::postBuild()
|
||||
button = getChild<LLButton>("btn_refresh");
|
||||
if (button)
|
||||
{
|
||||
button->setClickedCallback(onBtnRefresh);
|
||||
button->setCallbackUserData(this);
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroup::onBtnRefresh,this));
|
||||
button->setVisible(mAllowEdit);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,15 +135,13 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mBtnJoinGroup = getChild<LLButton>("join_button", recurse);
|
||||
if ( mBtnJoinGroup )
|
||||
{
|
||||
mBtnJoinGroup->setClickedCallback(onClickJoin);
|
||||
mBtnJoinGroup->setCallbackUserData(this);
|
||||
mBtnJoinGroup->setClickedCallback(boost::bind(&LLPanelGroupGeneral::onClickJoin, this));
|
||||
}
|
||||
|
||||
mBtnInfo = getChild<LLButton>("info_button", recurse);
|
||||
if ( mBtnInfo )
|
||||
{
|
||||
mBtnInfo->setClickedCallback(onClickInfo);
|
||||
mBtnInfo->setCallbackUserData(this);
|
||||
mBtnInfo->setClickedCallback(boost::bind(&LLPanelGroupGeneral::onClickInfo, this));
|
||||
}
|
||||
|
||||
LLTextBox* founder = getChild<LLTextBox>("founder_name");
|
||||
@@ -158,7 +156,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
|
||||
if (mListVisibleMembers)
|
||||
{
|
||||
mListVisibleMembers->setDoubleClickCallback(openProfile);
|
||||
mListVisibleMembers->setDoubleClickCallback(&LLPanelGroupGeneral::openProfile);
|
||||
mListVisibleMembers->setCallbackUserData(this);
|
||||
}
|
||||
|
||||
@@ -166,7 +164,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse);
|
||||
if (mCtrlShowInGroupList)
|
||||
{
|
||||
mCtrlShowInGroupList->setCommitCallback(onCommitAny);
|
||||
mCtrlShowInGroupList->setCommitCallback(&LLPanelGroupGeneral::onCommitAny);
|
||||
mCtrlShowInGroupList->setCallbackUserData(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -527,17 +527,14 @@ BOOL LLPanelGroupInvite::postBuild()
|
||||
{
|
||||
// default to opening avatarpicker automatically
|
||||
// (*impl::callbackClickAdd)((void*)this);
|
||||
button->setClickedCallback(impl::callbackClickAdd);
|
||||
button->setCallbackUserData(this);
|
||||
button->setClickedCallback(boost::bind(&impl::callbackClickAdd, this));
|
||||
}
|
||||
|
||||
mImplementation->mRemoveButton =
|
||||
getChild<LLButton>("remove_button", recurse);
|
||||
if ( mImplementation->mRemoveButton )
|
||||
{
|
||||
mImplementation->mRemoveButton->
|
||||
setClickedCallback(impl::callbackClickRemove);
|
||||
mImplementation->mRemoveButton->setCallbackUserData(mImplementation);
|
||||
mImplementation->mRemoveButton->setClickedCallback(boost::bind(&impl::callbackClickRemove, mImplementation));
|
||||
mImplementation->mRemoveButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
@@ -545,17 +542,14 @@ BOOL LLPanelGroupInvite::postBuild()
|
||||
getChild<LLButton>("ok_button", recurse);
|
||||
if ( mImplementation->mOKButton )
|
||||
{
|
||||
mImplementation->mOKButton->
|
||||
setClickedCallback(impl::callbackClickOK);
|
||||
mImplementation->mOKButton->setCallbackUserData(mImplementation);
|
||||
mImplementation->mOKButton->setClickedCallback(boost::bind(&impl::callbackClickOK, mImplementation));
|
||||
mImplementation->mOKButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
button = getChild<LLButton>("cancel_button", recurse);
|
||||
if ( button )
|
||||
{
|
||||
button->setClickedCallback(impl::callbackClickCancel);
|
||||
button->setCallbackUserData(mImplementation);
|
||||
button->setClickedCallback(boost::bind(&impl::callbackClickCancel,mImplementation));
|
||||
}
|
||||
|
||||
mImplementation->mOwnerWarning = getString("confirm_invite_owner_str");
|
||||
|
||||
@@ -654,7 +654,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
|
||||
|
||||
if ( mImplementationp->mMapButtonp )
|
||||
{
|
||||
mImplementationp->mMapButtonp->setClickedCallback(LLPanelGroupLandMoney::impl::mapCallback, mImplementationp);
|
||||
mImplementationp->mMapButtonp->setClickedCallback(boost::bind(&LLPanelGroupLandMoney::impl::mapCallback, mImplementationp));
|
||||
}
|
||||
|
||||
if ( mImplementationp->mGroupOverLimitTextp )
|
||||
|
||||
@@ -220,13 +220,11 @@ BOOL LLPanelGroupNotices::postBuild()
|
||||
mNoticesList->setCallbackUserData(this);
|
||||
|
||||
mBtnNewMessage = getChild<LLButton>("create_new_notice",recurse);
|
||||
mBtnNewMessage->setClickedCallback(onClickNewMessage);
|
||||
mBtnNewMessage->setCallbackUserData(this);
|
||||
mBtnNewMessage->setClickedCallback(boost::bind(&LLPanelGroupNotices::onClickNewMessage,this));
|
||||
mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
|
||||
|
||||
mBtnGetPastNotices = getChild<LLButton>("refresh_notices",recurse);
|
||||
mBtnGetPastNotices->setClickedCallback(onClickRefreshNotices);
|
||||
mBtnGetPastNotices->setCallbackUserData(this);
|
||||
mBtnGetPastNotices->setClickedCallback(boost::bind(&LLPanelGroupNotices::onClickRefreshNotices,this));
|
||||
|
||||
// Create
|
||||
mCreateSubject = getChild<LLLineEditor>("create_subject",recurse);
|
||||
@@ -240,12 +238,10 @@ BOOL LLPanelGroupNotices::postBuild()
|
||||
mCreateInventoryIcon->setVisible(FALSE);
|
||||
|
||||
mBtnSendMessage = getChild<LLButton>("send_notice",recurse);
|
||||
mBtnSendMessage->setClickedCallback(onClickSendMessage);
|
||||
mBtnSendMessage->setCallbackUserData(this);
|
||||
mBtnSendMessage->setClickedCallback(boost::bind(&LLPanelGroupNotices::onClickSendMessage,this));
|
||||
|
||||
mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse);
|
||||
mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment);
|
||||
mBtnRemoveAttachment->setCallbackUserData(this);
|
||||
mBtnRemoveAttachment->setClickedCallback(boost::bind(&LLPanelGroupNotices::onClickRemoveAttachment,this));
|
||||
mBtnRemoveAttachment->setEnabled(FALSE);
|
||||
|
||||
// View
|
||||
@@ -261,8 +257,7 @@ BOOL LLPanelGroupNotices::postBuild()
|
||||
mViewInventoryIcon->setVisible(FALSE);
|
||||
|
||||
mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse);
|
||||
mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment);
|
||||
mBtnOpenAttachment->setCallbackUserData(this);
|
||||
mBtnOpenAttachment->setClickedCallback(boost::bind(&LLPanelGroupNotices::onClickOpenAttachment,this));
|
||||
|
||||
mNoNoticesStr = getString("no_notices_text");
|
||||
|
||||
|
||||
@@ -501,15 +501,13 @@ BOOL LLPanelGroupSubTab::postBuild()
|
||||
mSearchButton = getChild<LLButton>("search_button", recurse);
|
||||
|
||||
if (!mSearchButton) return FALSE;
|
||||
mSearchButton->setClickedCallback(onClickSearch);
|
||||
mSearchButton->setCallbackUserData(this);
|
||||
mSearchButton->setClickedCallback(boost::bind(&LLPanelGroupSubTab::onClickSearch,this));
|
||||
mSearchButton->setEnabled(FALSE);
|
||||
|
||||
mShowAllButton = getChild<LLButton>("show_all_button", recurse);
|
||||
|
||||
if (!mShowAllButton) return FALSE;
|
||||
mShowAllButton->setClickedCallback(onClickShowAll);
|
||||
mShowAllButton->setCallbackUserData(this);
|
||||
mShowAllButton->setClickedCallback(boost::bind(&LLPanelGroupSubTab::onClickShowAll,this));
|
||||
mShowAllButton->setEnabled(FALSE);
|
||||
|
||||
// Get icons for later use.
|
||||
@@ -665,8 +663,7 @@ bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action)
|
||||
void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
|
||||
U64 allowed_by_some,
|
||||
U64 allowed_by_all,
|
||||
icon_map_t& icons,
|
||||
void (*commit_callback)(LLUICtrl*,void*),
|
||||
LLUICtrl::commit_callback_t commit_callback,
|
||||
BOOL show_all,
|
||||
BOOL filter,
|
||||
BOOL is_owner_role)
|
||||
@@ -686,7 +683,6 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
|
||||
allowed_by_some,
|
||||
allowed_by_all,
|
||||
(*ras_it),
|
||||
icons,
|
||||
commit_callback,
|
||||
show_all,
|
||||
filter,
|
||||
@@ -698,8 +694,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
|
||||
U64 allowed_by_some,
|
||||
U64 allowed_by_all,
|
||||
LLRoleActionSet* action_set,
|
||||
icon_map_t& icons,
|
||||
void (*commit_callback)(LLUICtrl*,void*),
|
||||
LLUICtrl::commit_callback_t commit_callback,
|
||||
BOOL show_all,
|
||||
BOOL filter,
|
||||
BOOL is_owner_role)
|
||||
@@ -712,10 +707,11 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
|
||||
LLSD row;
|
||||
|
||||
row["columns"][0]["column"] = "icon";
|
||||
icon_map_t::iterator iter = icons.find("folder");
|
||||
if (iter != icons.end())
|
||||
row["columns"][0]["type"] = "icon";
|
||||
|
||||
icon_map_t::iterator iter = mActionIcons.find("folder");
|
||||
if (iter != mActionIcons.end())
|
||||
{
|
||||
row["columns"][0]["type"] = "icon";
|
||||
row["columns"][0]["value"] = (*iter).second;
|
||||
}
|
||||
|
||||
@@ -777,8 +773,8 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
|
||||
{
|
||||
if (show_full_strength)
|
||||
{
|
||||
icon_map_t::iterator iter = icons.find("full");
|
||||
if (iter != icons.end())
|
||||
icon_map_t::iterator iter = mActionIcons.find("full");
|
||||
if (iter != mActionIcons.end())
|
||||
{
|
||||
row["columns"][column_index]["column"] = "checkbox";
|
||||
row["columns"][column_index]["type"] = "icon";
|
||||
@@ -788,8 +784,8 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
|
||||
}
|
||||
else
|
||||
{
|
||||
icon_map_t::iterator iter = icons.find("partial");
|
||||
if (iter != icons.end())
|
||||
icon_map_t::iterator iter = mActionIcons.find("partial");
|
||||
if (iter != mActionIcons.end())
|
||||
{
|
||||
row["columns"][column_index]["column"] = "checkbox";
|
||||
row["columns"][column_index]["type"] = "icon";
|
||||
@@ -813,7 +809,6 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
|
||||
LLCheckBoxCtrl* check = check_cell->getCheckBox();
|
||||
check->setEnabled(can_change_actions);
|
||||
check->setCommitCallback(commit_callback);
|
||||
check->setCallbackUserData(ctrl->getCallbackUserData());
|
||||
check->setToolTip( check->getLabel() );
|
||||
|
||||
if (show_all)
|
||||
@@ -912,16 +907,14 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
|
||||
LLButton* button = parent->getChild<LLButton>("member_invite", recurse);
|
||||
if ( button )
|
||||
{
|
||||
button->setClickedCallback(onInviteMember);
|
||||
button->setCallbackUserData(this);
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroupMembersSubTab::onInviteMember,this));
|
||||
button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
|
||||
}
|
||||
|
||||
mEjectBtn = parent->getChild<LLButton>("member_eject", recurse);
|
||||
if ( mEjectBtn )
|
||||
{
|
||||
mEjectBtn->setClickedCallback(onEjectMembers);
|
||||
mEjectBtn->setCallbackUserData(this);
|
||||
mEjectBtn->setClickedCallback(boost::bind(&LLPanelGroupMembersSubTab::onEjectMembers,this));
|
||||
mEjectBtn->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
@@ -956,7 +949,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
||||
if (selection.empty()) return;
|
||||
|
||||
// Build a vector of all selected members, and gather allowed actions.
|
||||
std::vector<LLUUID> selected_members;
|
||||
uuid_vec_t selected_members;
|
||||
U64 allowed_by_all = 0xffffffffffffLL;
|
||||
U64 allowed_by_some = 0;
|
||||
|
||||
@@ -964,10 +957,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
||||
for (itor = selection.begin();
|
||||
itor != selection.end(); ++itor)
|
||||
{
|
||||
selected_members.push_back( (*itor)->getUUID() );
|
||||
LLUUID member_id = (*itor)->getUUID();
|
||||
|
||||
selected_members.push_back( member_id );
|
||||
// Get this member's power mask including any unsaved changes
|
||||
|
||||
U64 powers = getAgentPowersBasedOnRoleChanges((*itor)->getUUID());
|
||||
U64 powers = getAgentPowersBasedOnRoleChanges( member_id );
|
||||
|
||||
allowed_by_all &= powers;
|
||||
allowed_by_some |= powers;
|
||||
@@ -980,7 +975,6 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
||||
buildActionsList(mAllowedActionsList,
|
||||
allowed_by_some,
|
||||
allowed_by_all,
|
||||
mActionIcons,
|
||||
NULL,
|
||||
FALSE,
|
||||
FALSE,
|
||||
@@ -1021,8 +1015,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
||||
if (cb_enable && (count > 0) && role_id == gdatap->mOwnerRole)
|
||||
{
|
||||
// Check if any owners besides this agent are selected.
|
||||
std::vector<LLUUID>::const_iterator member_iter;
|
||||
std::vector<LLUUID>::const_iterator member_end =
|
||||
uuid_vec_t::const_iterator member_iter;
|
||||
uuid_vec_t::const_iterator member_end =
|
||||
selected_members.end();
|
||||
for (member_iter = selected_members.begin();
|
||||
member_iter != member_end;
|
||||
@@ -1048,7 +1042,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
||||
|
||||
//now see if there are any role changes for the selected
|
||||
//members and remember to include them
|
||||
std::vector<LLUUID>::iterator sel_mem_iter = selected_members.begin();
|
||||
uuid_vec_t::iterator sel_mem_iter = selected_members.begin();
|
||||
for (; sel_mem_iter != selected_members.end(); sel_mem_iter++)
|
||||
{
|
||||
LLRoleMemberChangeType type;
|
||||
@@ -1106,7 +1100,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
||||
check->setTentative(
|
||||
(0 != count)
|
||||
&& (selected_members.size() !=
|
||||
(std::vector<LLUUID>::size_type)count));
|
||||
(uuid_vec_t::size_type)count));
|
||||
|
||||
//NOTE: as of right now a user can break the group
|
||||
//by removing himself from a role if he is the
|
||||
@@ -1281,7 +1275,6 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
|
||||
buildActionsList(mAllowedActionsList,
|
||||
powers_some_have,
|
||||
powers_all_have,
|
||||
mActionIcons,
|
||||
NULL,
|
||||
FALSE,
|
||||
FALSE,
|
||||
@@ -1778,8 +1771,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
|
||||
parent->getChild<LLButton>("role_create", recurse);
|
||||
if ( mCreateRoleButton )
|
||||
{
|
||||
mCreateRoleButton->setCallbackUserData(this);
|
||||
mCreateRoleButton->setClickedCallback(onCreateRole);
|
||||
mCreateRoleButton->setClickedCallback(boost::bind(&LLPanelGroupRolesSubTab::onCreateRole,this));
|
||||
mCreateRoleButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
@@ -1787,8 +1779,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
|
||||
parent->getChild<LLButton>("role_delete", recurse);
|
||||
if ( mDeleteRoleButton )
|
||||
{
|
||||
mDeleteRoleButton->setCallbackUserData(this);
|
||||
mDeleteRoleButton->setClickedCallback(onDeleteRole);
|
||||
mDeleteRoleButton->setClickedCallback(boost::bind(&LLPanelGroupRolesSubTab::onDeleteRole,this));
|
||||
mDeleteRoleButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
@@ -2062,8 +2053,7 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
|
||||
buildActionsList(mAllowedActionsList,
|
||||
rd.mRolePowers,
|
||||
0LL,
|
||||
mActionIcons,
|
||||
onActionCheck,
|
||||
boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false),
|
||||
TRUE,
|
||||
FALSE,
|
||||
is_owner_role);
|
||||
@@ -2160,24 +2150,18 @@ void LLPanelGroupRolesSubTab::buildMembersList()
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupRolesSubTab::onActionCheck(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data);
|
||||
LLCheckBoxCtrl* check = static_cast<LLCheckBoxCtrl*>(ctrl);
|
||||
if (!check || !self) return;
|
||||
|
||||
self->handleActionCheck(check);
|
||||
}
|
||||
|
||||
struct ActionCBData
|
||||
{
|
||||
LLPanelGroupRolesSubTab* mSelf;
|
||||
LLCheckBoxCtrl* mCheck;
|
||||
};
|
||||
|
||||
void LLPanelGroupRolesSubTab::handleActionCheck(LLCheckBoxCtrl* check, bool force)
|
||||
void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
|
||||
{
|
||||
LLCheckBoxCtrl* check = dynamic_cast<LLCheckBoxCtrl*>(ctrl);
|
||||
if (!check)
|
||||
return;
|
||||
|
||||
lldebugs << "LLPanelGroupRolesSubTab::handleActionSelect()" << llendl;
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
@@ -2473,7 +2457,7 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
|
||||
|
||||
mActionList->setCallbackUserData(this);
|
||||
mActionList->setCommitOnSelectionChange(TRUE);
|
||||
mActionList->setCommitCallback(onActionSelect);
|
||||
mActionList->setCommitCallback(boost::bind(&LLPanelGroupActionsSubTab::handleActionSelect, this));
|
||||
|
||||
mActionMembers->setCallbackUserData(this);
|
||||
mActionRoles->setCallbackUserData(this);
|
||||
@@ -2529,20 +2513,12 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
|
||||
buildActionsList(mActionList,
|
||||
GP_ALL_POWERS,
|
||||
GP_ALL_POWERS,
|
||||
mActionIcons,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupActionsSubTab::onActionSelect(LLUICtrl* scroll, void* data)
|
||||
{
|
||||
LLPanelGroupActionsSubTab* self = static_cast<LLPanelGroupActionsSubTab*>(data);
|
||||
self->handleActionSelect();
|
||||
}
|
||||
|
||||
void LLPanelGroupActionsSubTab::handleActionSelect()
|
||||
{
|
||||
mActionMembers->deleteAllItems();
|
||||
|
||||
@@ -130,8 +130,7 @@ public:
|
||||
void buildActionsList(LLScrollListCtrl* ctrl,
|
||||
U64 allowed_by_some,
|
||||
U64 allowed_by_all,
|
||||
icon_map_t& icons,
|
||||
void (*commit_callback)(LLUICtrl*,void*),
|
||||
LLUICtrl::commit_callback_t commit_callback,
|
||||
BOOL show_all,
|
||||
BOOL filter,
|
||||
BOOL is_owner_role);
|
||||
@@ -139,8 +138,7 @@ public:
|
||||
U64 allowed_by_some,
|
||||
U64 allowed_by_all,
|
||||
LLRoleActionSet* action_set,
|
||||
icon_map_t& icons,
|
||||
void (*commit_callback)(LLUICtrl*,void*),
|
||||
LLUICtrl::commit_callback_t commit_callback,
|
||||
BOOL show_all,
|
||||
BOOL filter,
|
||||
BOOL is_owner_role);
|
||||
@@ -248,8 +246,6 @@ public:
|
||||
void handleRoleSelect();
|
||||
void buildMembersList();
|
||||
|
||||
static void onActionCheck(LLUICtrl*, void*);
|
||||
void handleActionCheck(LLCheckBoxCtrl*, bool force=false);
|
||||
bool addActionCB(const LLSD& notification, const LLSD& response, LLCheckBoxCtrl* check);
|
||||
|
||||
static void onPropertiesKey(LLLineEditor*, void*);
|
||||
@@ -268,10 +264,8 @@ public:
|
||||
|
||||
void saveRoleChanges();
|
||||
protected:
|
||||
LLSD createRoleItem(const LLUUID& role_id,
|
||||
std::string name,
|
||||
std::string title,
|
||||
S32 members);
|
||||
void handleActionCheck(LLUICtrl* ctrl, bool force);
|
||||
LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members);
|
||||
|
||||
LLScrollListCtrl* mRolesList;
|
||||
LLNameListCtrl* mAssignedMembersList;
|
||||
@@ -306,7 +300,6 @@ public:
|
||||
virtual bool apply(std::string& mesg);
|
||||
virtual void update(LLGroupChange gc);
|
||||
|
||||
static void onActionSelect(LLUICtrl*, void*);
|
||||
void handleActionSelect();
|
||||
protected:
|
||||
LLScrollListCtrl* mActionList;
|
||||
|
||||
@@ -1575,35 +1575,25 @@ BOOL LLPanelGroupVoting::postBuild()
|
||||
mImpl->mVotesHistory->setDoubleClickCallback(impl::onDoubleClickHistoryItem);
|
||||
mImpl->mVotesHistory->setCallbackUserData(mImpl);
|
||||
|
||||
mImpl->mBtnAbstain->setClickedCallback(impl::onClickAbstain);
|
||||
mImpl->mBtnAbstain->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnAbstain->setClickedCallback(boost::bind(&impl::onClickAbstain,mImpl));
|
||||
|
||||
mImpl->mBtnNo->setClickedCallback(impl::onClickNo);
|
||||
mImpl->mBtnNo->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnNo->setClickedCallback(boost::bind(&impl::onClickNo,mImpl));
|
||||
|
||||
mImpl->mBtnYes->setClickedCallback(impl::onClickYes);
|
||||
mImpl->mBtnYes->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnYes->setClickedCallback(boost::bind(&impl::onClickYes,mImpl));
|
||||
|
||||
mImpl->mBtnCreateProposal->setClickedCallback(impl::onClickCreateProposal);
|
||||
mImpl->mBtnCreateProposal->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnCreateProposal->setClickedCallback(boost::bind(&impl::onClickCreateProposal,mImpl));
|
||||
|
||||
mImpl->mBtnSubmitProposal->setClickedCallback(impl::onClickSubmitProposal);
|
||||
mImpl->mBtnSubmitProposal->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnSubmitProposal->setClickedCallback(boost::bind(&impl::onClickSubmitProposal,mImpl));
|
||||
|
||||
mImpl->mBtnCancelProposal->setClickedCallback(impl::onClickCancelProposal);
|
||||
mImpl->mBtnCancelProposal->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnCancelProposal->setClickedCallback(boost::bind(&impl::onClickCancelProposal,mImpl));
|
||||
|
||||
mImpl->mBtnViewProposalList->setClickedCallback(impl::onClickViewProposalList);
|
||||
mImpl->mBtnViewProposalList->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnViewProposalList->setClickedCallback(boost::bind(&impl::onClickViewProposalList,mImpl));
|
||||
|
||||
mImpl->mBtnViewProposalItem->setClickedCallback(impl::onClickViewProposalItem);
|
||||
mImpl->mBtnViewProposalItem->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnViewProposalItem->setClickedCallback(boost::bind(&impl::onClickViewProposalItem,mImpl));
|
||||
|
||||
mImpl->mBtnViewHistoryList->setClickedCallback(impl::onClickViewHistoryList);
|
||||
mImpl->mBtnViewHistoryList->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnViewHistoryList->setClickedCallback(boost::bind(&impl::onClickViewHistoryList,mImpl));
|
||||
|
||||
mImpl->mBtnViewHistoryItem->setClickedCallback(impl::onClickViewHistoryItem);
|
||||
mImpl->mBtnViewHistoryItem->setCallbackUserData(mImpl);
|
||||
mImpl->mBtnViewHistoryItem->setClickedCallback(boost::bind(&impl::onClickViewHistoryItem,mImpl));
|
||||
|
||||
gMessageSystem->setHandlerFuncFast(_PREHASH_GroupActiveProposalItemReply,
|
||||
impl::processGroupActiveProposalItemReply);
|
||||
|
||||
@@ -129,20 +129,20 @@ BOOL LLPanelMediaHUD::postBuild()
|
||||
|
||||
LLButton* scroll_up_btn = getChild<LLButton>("scrollup");
|
||||
scroll_up_btn->setClickedCallback(onScrollUp, this);
|
||||
scroll_up_btn->setHeldDownCallback(onScrollUpHeld);
|
||||
scroll_up_btn->setMouseUpCallback(onScrollStop);
|
||||
scroll_up_btn->setHeldDownCallback(onScrollUpHeld, this);
|
||||
scroll_up_btn->setMouseUpCallback(onScrollStop, this);
|
||||
LLButton* scroll_left_btn = getChild<LLButton>("scrollleft");
|
||||
scroll_left_btn->setClickedCallback(onScrollLeft, this);
|
||||
scroll_left_btn->setHeldDownCallback(onScrollLeftHeld);
|
||||
scroll_left_btn->setMouseUpCallback(onScrollStop);
|
||||
scroll_left_btn->setHeldDownCallback(onScrollLeftHeld, this);
|
||||
scroll_left_btn->setMouseUpCallback(onScrollStop, this);
|
||||
LLButton* scroll_right_btn = getChild<LLButton>("scrollright");
|
||||
scroll_right_btn->setClickedCallback(onScrollRight, this);
|
||||
scroll_right_btn->setHeldDownCallback(onScrollLeftHeld);
|
||||
scroll_right_btn->setMouseUpCallback(onScrollStop);
|
||||
scroll_right_btn->setHeldDownCallback(onScrollLeftHeld, this);
|
||||
scroll_right_btn->setMouseUpCallback(onScrollStop, this);
|
||||
LLButton* scroll_down_btn = getChild<LLButton>("scrolldown");
|
||||
scroll_down_btn->setClickedCallback(onScrollDown, this);
|
||||
scroll_down_btn->setHeldDownCallback(onScrollDownHeld);
|
||||
scroll_down_btn->setMouseUpCallback(onScrollStop);
|
||||
scroll_down_btn->setHeldDownCallback(onScrollDownHeld, this);
|
||||
scroll_down_btn->setMouseUpCallback(onScrollStop, this);
|
||||
|
||||
mMouseInactiveTime = gSavedSettings.getF32("MediaControlTimeout");
|
||||
mControlFadeTime = gSavedSettings.getF32("MediaControlFadeTime");
|
||||
|
||||
@@ -160,16 +160,13 @@ BOOL LLPanelPick::postBuild()
|
||||
mLocationEditor = getChild<LLLineEditor>("location_editor");
|
||||
|
||||
mSetBtn = getChild<LLButton>( "set_location_btn");
|
||||
mSetBtn->setClickedCallback(onClickSet);
|
||||
mSetBtn->setCallbackUserData(this);
|
||||
mSetBtn->setClickedCallback(boost::bind(&LLPanelPick::onClickSet,this));
|
||||
|
||||
mTeleportBtn = getChild<LLButton>( "pick_teleport_btn");
|
||||
mTeleportBtn->setClickedCallback(onClickTeleport);
|
||||
mTeleportBtn->setCallbackUserData(this);
|
||||
mTeleportBtn->setClickedCallback(boost::bind(&LLPanelPick::onClickTeleport,this));
|
||||
|
||||
mMapBtn = getChild<LLButton>( "pick_map_btn");
|
||||
mMapBtn->setClickedCallback(onClickMap);
|
||||
mMapBtn->setCallbackUserData(this);
|
||||
mMapBtn->setClickedCallback(boost::bind(&LLPanelPick::onClickMap,this));
|
||||
|
||||
mSortOrderText = getChild<LLTextBox>("sort_order_text");
|
||||
|
||||
|
||||
@@ -106,20 +106,16 @@ BOOL LLPanelPlace::postBuild()
|
||||
mLocationDisplay = getChild<LLTextBox>("location_editor");
|
||||
|
||||
mTeleportBtn = getChild<LLButton>( "teleport_btn");
|
||||
mTeleportBtn->setClickedCallback(onClickTeleport);
|
||||
mTeleportBtn->setCallbackUserData(this);
|
||||
mTeleportBtn->setClickedCallback(boost::bind(&LLPanelPlace::onClickTeleport,this));
|
||||
|
||||
mMapBtn = getChild<LLButton>( "map_btn");
|
||||
mMapBtn->setClickedCallback(onClickMap);
|
||||
mMapBtn->setCallbackUserData(this);
|
||||
mMapBtn->setClickedCallback(boost::bind(&LLPanelPlace::onClickMap,this));
|
||||
|
||||
//mLandmarkBtn = getChild<LLButton>( "landmark_btn");
|
||||
//mLandmarkBtn->setClickedCallback(onClickLandmark);
|
||||
//mLandmarkBtn->setCallbackUserData(this);
|
||||
//mLandmarkBtn->setClickedCallback(boost::bind(&LLPanelPlace::onClickLandmark,this));
|
||||
|
||||
mAuctionBtn = getChild<LLButton>( "auction_btn");
|
||||
mAuctionBtn->setClickedCallback(onClickAuction);
|
||||
mAuctionBtn->setCallbackUserData(this);
|
||||
mAuctionBtn->setClickedCallback(boost::bind(&LLPanelPlace::onClickAuction,this));
|
||||
|
||||
// Default to no auction button. We'll show it if we get an auction id
|
||||
mAuctionBtn->setVisible(FALSE);
|
||||
|
||||
@@ -126,9 +126,9 @@ void LLPanelSkins::refresh()
|
||||
"textures"+gDirUtilp->getDirDelimiter()+
|
||||
imagename);
|
||||
b->setImages(imageprev,imageprev);
|
||||
b->setHoverImages(imageprev,imageprev);
|
||||
b->setScaleImage(TRUE);
|
||||
|
||||
b->setImageHoverSelected(LLUI::getUIImage(imageprev));
|
||||
b->setImageHoverUnselected(LLUI::getUIImage(imageprev));
|
||||
|
||||
//<button scale_image="true" image_selected="skin_thumbnail_default.png"
|
||||
//image_unselected="skin_thumbnail_default.png"
|
||||
// image_hover_selected="skin_thumbnail_default.png"
|
||||
|
||||
@@ -438,26 +438,22 @@ BOOL LLPreviewGesture::postBuild()
|
||||
mLibraryList = list;
|
||||
|
||||
btn = getChild<LLButton>( "add_btn");
|
||||
btn->setClickedCallback(onClickAdd);
|
||||
btn->setCallbackUserData(this);
|
||||
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickAdd,this));
|
||||
btn->setEnabled(FALSE);
|
||||
mAddBtn = btn;
|
||||
|
||||
btn = getChild<LLButton>( "up_btn");
|
||||
btn->setClickedCallback(onClickUp);
|
||||
btn->setCallbackUserData(this);
|
||||
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickUp,this));
|
||||
btn->setEnabled(FALSE);
|
||||
mUpBtn = btn;
|
||||
|
||||
btn = getChild<LLButton>( "down_btn");
|
||||
btn->setClickedCallback(onClickDown);
|
||||
btn->setCallbackUserData(this);
|
||||
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickDown,this));
|
||||
btn->setEnabled(FALSE);
|
||||
mDownBtn = btn;
|
||||
|
||||
btn = getChild<LLButton>( "delete_btn");
|
||||
btn->setClickedCallback(onClickDelete);
|
||||
btn->setCallbackUserData(this);
|
||||
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickDelete,this));
|
||||
btn->setEnabled(FALSE);
|
||||
mDeleteBtn = btn;
|
||||
|
||||
@@ -529,12 +525,12 @@ BOOL LLPreviewGesture::postBuild()
|
||||
mActiveCheck = check;
|
||||
|
||||
btn = getChild<LLButton>( "save_btn");
|
||||
btn->setClickedCallback(onClickSave);
|
||||
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickSave,this));
|
||||
btn->setCallbackUserData(this);
|
||||
mSaveBtn = btn;
|
||||
|
||||
btn = getChild<LLButton>( "preview_btn");
|
||||
btn->setClickedCallback(onClickPreview);
|
||||
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickPreview,this));
|
||||
btn->setCallbackUserData(this);
|
||||
mPreviewBtn = btn;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ BOOL LLProgressView::postBuild()
|
||||
mProgressBar = getChild<LLProgressBar>("login_progress_bar");
|
||||
|
||||
mCancelBtn = getChild<LLButton>("cancel_btn");
|
||||
mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked );
|
||||
mCancelBtn->setClickedCallback( boost::bind(&LLProgressView::onCancelButtonClicked) );
|
||||
mFadeTimer.stop();
|
||||
|
||||
getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
|
||||
@@ -224,7 +224,7 @@ void LLProgressView::setCancelButtonVisible(BOOL b, const std::string& label)
|
||||
}
|
||||
|
||||
// static
|
||||
void LLProgressView::onCancelButtonClicked(void*)
|
||||
void LLProgressView::onCancelButtonClicked()
|
||||
{
|
||||
if (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
void setCancelButtonVisible(BOOL b, const std::string& label);
|
||||
|
||||
static void onCancelButtonClicked( void* );
|
||||
static void onCancelButtonClicked();
|
||||
static void onClickMessage(void*);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -588,23 +588,6 @@ void LLToolPlacer::handleDeselect()
|
||||
//////////////////////////////////////////////////////
|
||||
// LLToolPlacerPanel
|
||||
|
||||
// static
|
||||
LLPCode LLToolPlacerPanel::sCube = LL_PCODE_CUBE;
|
||||
LLPCode LLToolPlacerPanel::sPrism = LL_PCODE_PRISM;
|
||||
LLPCode LLToolPlacerPanel::sPyramid = LL_PCODE_PYRAMID;
|
||||
LLPCode LLToolPlacerPanel::sTetrahedron = LL_PCODE_TETRAHEDRON;
|
||||
LLPCode LLToolPlacerPanel::sCylinder = LL_PCODE_CYLINDER;
|
||||
LLPCode LLToolPlacerPanel::sCylinderHemi= LL_PCODE_CYLINDER_HEMI;
|
||||
LLPCode LLToolPlacerPanel::sCone = LL_PCODE_CONE;
|
||||
LLPCode LLToolPlacerPanel::sConeHemi = LL_PCODE_CONE_HEMI;
|
||||
LLPCode LLToolPlacerPanel::sTorus = LL_PCODE_TORUS;
|
||||
LLPCode LLToolPlacerPanel::sSquareTorus = LLViewerObject::LL_VO_SQUARE_TORUS;
|
||||
LLPCode LLToolPlacerPanel::sTriangleTorus = LLViewerObject::LL_VO_TRIANGLE_TORUS;
|
||||
LLPCode LLToolPlacerPanel::sSphere = LL_PCODE_SPHERE;
|
||||
LLPCode LLToolPlacerPanel::sSphereHemi = LL_PCODE_SPHERE_HEMI;
|
||||
LLPCode LLToolPlacerPanel::sTree = LL_PCODE_LEGACY_TREE;
|
||||
LLPCode LLToolPlacerPanel::sGrass = LL_PCODE_LEGACY_GRASS;
|
||||
|
||||
S32 LLToolPlacerPanel::sButtonsAdded = 0;
|
||||
LLButton* LLToolPlacerPanel::sButtons[ TOOL_PLACER_NUM_BUTTONS ];
|
||||
|
||||
@@ -612,22 +595,6 @@ LLToolPlacerPanel::LLToolPlacerPanel(const std::string& name, const LLRect& rect
|
||||
:
|
||||
LLPanel( name, rect )
|
||||
{
|
||||
/* DEPRECATED - JC
|
||||
addButton( "UIImgCubeUUID", "UIImgCubeSelectedUUID", &LLToolPlacerPanel::sCube );
|
||||
addButton( "UIImgPrismUUID", "UIImgPrismSelectedUUID", &LLToolPlacerPanel::sPrism );
|
||||
addButton( "UIImgPyramidUUID", "UIImgPyramidSelectedUUID", &LLToolPlacerPanel::sPyramid );
|
||||
addButton( "UIImgTetrahedronUUID", "UIImgTetrahedronSelectedUUID", &LLToolPlacerPanel::sTetrahedron );
|
||||
addButton( "UIImgCylinderUUID", "UIImgCylinderSelectedUUID", &LLToolPlacerPanel::sCylinder );
|
||||
addButton( "UIImgHalfCylinderUUID", "UIImgHalfCylinderSelectedUUID",&LLToolPlacerPanel::sCylinderHemi );
|
||||
addButton( "UIImgConeUUID", "UIImgConeSelectedUUID", &LLToolPlacerPanel::sCone );
|
||||
addButton( "UIImgHalfConeUUID", "UIImgHalfConeSelectedUUID", &LLToolPlacerPanel::sConeHemi );
|
||||
addButton( "UIImgSphereUUID", "UIImgSphereSelectedUUID", &LLToolPlacerPanel::sSphere );
|
||||
addButton( "UIImgHalfSphereUUID", "UIImgHalfSphereSelectedUUID", &LLToolPlacerPanel::sSphereHemi );
|
||||
addButton( "UIImgTreeUUID", "UIImgTreeSelectedUUID", &LLToolPlacerPanel::sTree );
|
||||
addButton( "UIImgGrassUUID", "UIImgGrassSelectedUUID", &LLToolPlacerPanel::sGrass );
|
||||
addButton( "ObjectTorusImageID", "ObjectTorusActiveImageID", &LLToolPlacerPanel::sTorus );
|
||||
addButton( "ObjectTubeImageID", "ObjectTubeActiveImageID", &LLToolPlacerPanel::sSquareTorus );
|
||||
*/
|
||||
}
|
||||
|
||||
void LLToolPlacerPanel::addButton( const std::string& up_state, const std::string& down_state, LLPCode* pcode )
|
||||
|
||||
@@ -83,22 +83,6 @@ public:
|
||||
|
||||
static void setObjectType( void* data );
|
||||
|
||||
static LLPCode sCube;
|
||||
static LLPCode sPrism;
|
||||
static LLPCode sPyramid;
|
||||
static LLPCode sTetrahedron;
|
||||
static LLPCode sCylinder;
|
||||
static LLPCode sCylinderHemi;
|
||||
static LLPCode sCone;
|
||||
static LLPCode sConeHemi;
|
||||
static LLPCode sTorus;
|
||||
static LLPCode sSquareTorus;
|
||||
static LLPCode sTriangleTorus;
|
||||
static LLPCode sSphere;
|
||||
static LLPCode sSphereHemi;
|
||||
static LLPCode sTree;
|
||||
static LLPCode sGrass;
|
||||
|
||||
private:
|
||||
void addButton( const std::string& up_state, const std::string& down_state, LLPCode* pcode );
|
||||
|
||||
|
||||
@@ -69,17 +69,15 @@ LLVoiceRemoteCtrl::~LLVoiceRemoteCtrl()
|
||||
BOOL LLVoiceRemoteCtrl::postBuild()
|
||||
{
|
||||
mTalkBtn = getChild<LLButton>("push_to_talk");
|
||||
mTalkBtn->setClickedCallback(onBtnTalkClicked);
|
||||
mTalkBtn->setHeldDownCallback(onBtnTalkHeld);
|
||||
mTalkBtn->setMouseUpCallback(onBtnTalkReleased);
|
||||
mTalkBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnTalkClicked));
|
||||
mTalkBtn->setHeldDownCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnTalkHeld));
|
||||
mTalkBtn->setMouseUpCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnTalkReleased));
|
||||
|
||||
mTalkLockBtn = getChild<LLButton>("ptt_lock");
|
||||
mTalkLockBtn->setClickedCallback(onBtnLock);
|
||||
mTalkLockBtn->setCallbackUserData(this);
|
||||
mTalkLockBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onBtnLock,this));
|
||||
|
||||
mSpeakersBtn = getChild<LLButton>("speakers_btn");
|
||||
mSpeakersBtn->setClickedCallback(onClickSpeakers);
|
||||
mSpeakersBtn->setCallbackUserData(this);
|
||||
mSpeakersBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickSpeakers));
|
||||
|
||||
childSetAction("show_channel", onClickPopupBtn, this);
|
||||
childSetAction("end_call_btn", onClickEndCall, this);
|
||||
@@ -216,7 +214,7 @@ void LLVoiceRemoteCtrl::draw()
|
||||
LLPanel::draw();
|
||||
}
|
||||
|
||||
void LLVoiceRemoteCtrl::onBtnTalkClicked(void *user_data)
|
||||
void LLVoiceRemoteCtrl::onBtnTalkClicked()
|
||||
{
|
||||
// when in toggle mode, clicking talk button turns mic on/off
|
||||
if (gSavedSettings.getBOOL("PushToTalkToggle"))
|
||||
@@ -225,7 +223,7 @@ void LLVoiceRemoteCtrl::onBtnTalkClicked(void *user_data)
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceRemoteCtrl::onBtnTalkHeld(void *user_data)
|
||||
void LLVoiceRemoteCtrl::onBtnTalkHeld()
|
||||
{
|
||||
// when not in toggle mode, holding down talk button turns on mic
|
||||
if (!gSavedSettings.getBOOL("PushToTalkToggle"))
|
||||
@@ -234,7 +232,7 @@ void LLVoiceRemoteCtrl::onBtnTalkHeld(void *user_data)
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceRemoteCtrl::onBtnTalkReleased(void* user_data)
|
||||
void LLVoiceRemoteCtrl::onBtnTalkReleased()
|
||||
{
|
||||
// when not in toggle mode, releasing talk button turns off mic
|
||||
if (!gSavedSettings.getBOOL("PushToTalkToggle"))
|
||||
@@ -279,7 +277,7 @@ void LLVoiceRemoteCtrl::onClickEndCall(void* user_data)
|
||||
}
|
||||
|
||||
|
||||
void LLVoiceRemoteCtrl::onClickSpeakers(void *user_data)
|
||||
void LLVoiceRemoteCtrl::onClickSpeakers()
|
||||
{
|
||||
LLFloaterActiveSpeakers::toggleInstance(LLSD());
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ public:
|
||||
/*virtual*/ void draw();
|
||||
|
||||
static void onBtnLock(void* user_data);
|
||||
static void onBtnTalkHeld(void *user_data);
|
||||
static void onBtnTalkReleased(void* user_data);
|
||||
static void onBtnTalkClicked(void* user_data);
|
||||
static void onClickSpeakers(void *user_data);
|
||||
static void onBtnTalkHeld();
|
||||
static void onBtnTalkReleased();
|
||||
static void onBtnTalkClicked();
|
||||
static void onClickSpeakers();
|
||||
static void onClickPopupBtn(void* user_data);
|
||||
static void onClickVoiceChannel(void* user_data);
|
||||
static void onClickEndCall(void* user_data);
|
||||
|
||||
Reference in New Issue
Block a user