diff options
Diffstat (limited to 'indra/newview/llfloatergodtools.cpp')
-rw-r--r-- | indra/newview/llfloatergodtools.cpp | 64 |
1 files changed, 13 insertions, 51 deletions
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index c2b0bd18fa..bd07cfdfbf 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -213,6 +213,9 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name) // static void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg) { + llassert(msg); + if (!msg) return; + LLHost host = msg->getSender(); if (host != gAgent.getRegionHost()) { @@ -270,8 +273,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg) if ( gAgent.isGodlike() && LLFloaterReg::instanceVisible("god_tools") && god_tools->mPanelRegionTools - && god_tools->mPanelObjectTools - && msg ) + && god_tools->mPanelObjectTools) { LLPanelRegionTools* rtool = god_tools->mPanelRegionTools; god_tools->mCurrentHost = host; @@ -414,17 +416,17 @@ LLPanelRegionTools::LLPanelRegionTools() BOOL LLPanelRegionTools::postBuild() { getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this); - childSetPrevalidate("region name", &LLLineEditor::prevalidateASCIIPrintableNoPipe); - childSetPrevalidate("estate", &LLLineEditor::prevalidatePositiveS32); - childSetPrevalidate("parentestate", &LLLineEditor::prevalidatePositiveS32); + childSetPrevalidate("region name", &LLTextValidate::validateASCIIPrintableNoPipe); + childSetPrevalidate("estate", &LLTextValidate::validatePositiveS32); + childSetPrevalidate("parentestate", &LLTextValidate::validatePositiveS32); childDisable("parentestate"); - childSetPrevalidate("gridposx", &LLLineEditor::prevalidatePositiveS32); + childSetPrevalidate("gridposx", &LLTextValidate::validatePositiveS32); childDisable("gridposx"); - childSetPrevalidate("gridposy", &LLLineEditor::prevalidatePositiveS32); + childSetPrevalidate("gridposy", &LLTextValidate::validatePositiveS32); childDisable("gridposy"); - childSetPrevalidate("redirectx", &LLLineEditor::prevalidatePositiveS32); - childSetPrevalidate("redirecty", &LLLineEditor::prevalidatePositiveS32); + childSetPrevalidate("redirectx", &LLTextValidate::validatePositiveS32); + childSetPrevalidate("redirecty", &LLTextValidate::validatePositiveS32); return TRUE; } @@ -826,7 +828,6 @@ const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f; LLPanelGridTools::LLPanelGridTools() : LLPanel() { - mCommitCallbackRegistrar.add("GridTools.KickAll", boost::bind(&LLPanelGridTools::onClickKickAll, this)); mCommitCallbackRegistrar.add("GridTools.FlushMapVisibilityCaches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this)); } @@ -844,46 +845,6 @@ void LLPanelGridTools::refresh() { } -void LLPanelGridTools::onClickKickAll() -{ - LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick); -} - - -bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& response) -{ - if (LLNotificationsUtil::getSelectedOption(notification, response) == 0) - { - LLSD payload; - payload["kick_message"] = response["message"].asString(); - LLNotificationsUtil::add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick); - } - return false; -} - - -// static -bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - - if (option == 0) - { - LLMessageSystem* msg = gMessageSystem; - - msg->newMessageFast(_PREHASH_GodKickUser); - msg->nextBlockFast(_PREHASH_UserInfo); - msg->addUUIDFast(_PREHASH_GodID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID()); - msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS ); - msg->addU32("KickFlags", KICK_FLAGS_DEFAULT ); - msg->addStringFast(_PREHASH_Reason, notification["payload"]["kick_message"].asString()); - gAgent.sendReliableMessage(); - } - return false; -} - void LLPanelGridTools::onClickFlushMapVisibilityCaches() { LLNotificationsUtil::add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm); @@ -961,6 +922,7 @@ LLPanelObjectTools::~LLPanelObjectTools() BOOL LLPanelObjectTools::postBuild() { + refresh(); return TRUE; } @@ -1189,7 +1151,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data) panelp->childSetValue("target_avatar_name", name); } -void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (ids.empty() || names.empty()) return; mTargetAvatar = ids[0]; |