summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-07-25 16:02:03 +0300
committerGitHub <noreply@github.com>2024-07-25 16:02:03 +0300
commit4d7f622a3c6a2fdec1c57ad4506ae49786b37dfc (patch)
tree969491f586088b68750dc65206ddedbd6d847fb0 /indra/newview/llfloaterregioninfo.cpp
parent6e7c6a3842c077b97b3d9fb04c818613efa06f6f (diff)
viewer#2065 Region restart schedule floater
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index cc9aca1338..02ef342c2a 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);
@@ -862,6 +864,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 +898,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