summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp39
1 files changed, 31 insertions, 8 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index fe867ffd14..e90e8ae48a 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -61,6 +61,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterregiondebugconsole.h"
+#include "llfloaterregionrestartschedule.h"
#include "llfloatertelehub.h"
#include "llgltfmateriallist.h"
#include "llinventorymodel.h"
@@ -259,6 +260,7 @@ bool LLFloaterRegionInfo::postBuild()
panel = new LLPanelRegionGeneralInfo;
mInfoPanels.push_back(panel);
panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
+ panel->getCommitCallbackRegistrar().add("RegionInfo.ManageRestart", boost::bind(&LLPanelRegionInfo::onClickManageRestartSchedule, panel));
panel->buildFromFile("panel_region_general.xml");
mTab->addTabPanel(panel);
@@ -852,8 +854,9 @@ void LLPanelRegionInfo::initCtrl(const std::string& name)
template<typename CTRL>
void LLPanelRegionInfo::initAndSetCtrl(CTRL*& ctrl, const std::string& name)
{
- initCtrl(name);
ctrl = findChild<CTRL>(name);
+ if (ctrl)
+ ctrl->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this));
}
void LLPanelRegionInfo::onClickManageTelehub()
@@ -862,6 +865,25 @@ void LLPanelRegionInfo::onClickManageTelehub()
LLFloaterReg::showInstance("telehubs");
}
+void LLPanelRegionInfo::onClickManageRestartSchedule()
+{
+ LLFloater* floaterp = mFloaterRestartScheduleHandle.get();
+ // Show the dialog
+ if (!floaterp)
+ {
+ floaterp = new LLFloaterRegionRestartSchedule(this);
+ }
+
+ if (floaterp->getVisible())
+ {
+ floaterp->closeFloater();
+ }
+ else
+ {
+ floaterp->openFloater();
+ }
+}
+
/////////////////////////////////////////////////////////////////////////////
// LLPanelRegionGeneralInfo
//
@@ -877,6 +899,8 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
getChildView("kick_all_btn")->setEnabled(allow_modify);
getChildView("im_btn")->setEnabled(allow_modify);
getChildView("manage_telehub_btn")->setEnabled(allow_modify);
+ getChildView("manage_restart_btn")->setEnabled(allow_modify);
+ getChildView("manage_restart_btn")->setVisible(LLFloaterRegionRestartSchedule::canUse());
// Data gets filled in by processRegionInfo
@@ -2331,7 +2355,6 @@ void LLPanelEstateInfo::refresh()
// Disable access restriction controls if they make no sense.
bool public_access = ("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
- getChildView("Only Allow")->setEnabled(public_access);
getChildView("limit_payment")->setEnabled(public_access);
getChildView("limit_age_verified")->setEnabled(public_access);
getChildView("limit_bots")->setEnabled(public_access);
@@ -4201,11 +4224,11 @@ bool LLPanelRegionEnvironment::postBuild()
if (!LLPanelEnvironmentInfo::postBuild())
return false;
- getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
- getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(true);
- getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
+ mBtnUseDefault->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
+ mCheckAllowOverride->setVisible(true);
+ mPanelEnvAltitudes->setVisible(true);
- getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
+ mCheckAllowOverride->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this));
return true;
@@ -4227,7 +4250,7 @@ void LLPanelRegionEnvironment::refresh()
LLPanelEnvironmentInfo::refresh();
- getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setValue(mAllowOverride);
+ mCheckAllowOverride->setValue(mAllowOverride);
}
bool LLPanelRegionEnvironment::refreshFromRegion(LLViewerRegion* region)
@@ -4293,7 +4316,7 @@ bool LLPanelRegionEnvironment::confirmUpdateEstateEnvironment(const LLSD& notifi
case 1:
mAllowOverride = mAllowOverrideRestore;
- getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setValue(mAllowOverride);
+ mCheckAllowOverride->setValue(mAllowOverride);
break;
default:
break;