This commit is contained in:
TighMacFanatic
2011-11-10 12:27:02 -05:00
5 changed files with 15 additions and 11 deletions

View File

@@ -980,17 +980,18 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
// static
void LLPanelRegionDebugInfo::onClickRestart(void* data)
{
LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
LLNotificationsUtil::add("ConfirmRestart", LLSD(), LLSD(),
boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2));
boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2, self->getChild<LLSpinCtrl>("rcount")->getValue().asInteger()));
}
bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response)
bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response, S32 seconds)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
strings_t strings;
strings.push_back("120");
strings.push_back(llformat("%d",seconds));
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings);
return false;

View File

@@ -195,7 +195,7 @@ protected:
static void onClickTopColliders(void*);
static void onClickTopScripts(void*);
static void onClickRestart(void* data);
bool callbackRestart(const LLSD& notification, const LLSD& response);
bool callbackRestart(const LLSD& notification, const LLSD& response, S32 seconds);
static void onClickCancelRestart(void* data);
private:

View File

@@ -3693,7 +3693,7 @@ Does this group contain Mature content?
label="Confirm restart"
name="ConfirmRestart"
type="alert">
Do you really want to restart this region in 2 minutes?
Do you really want to restart this region?
<usetemplate
name="okcancelbuttons"
notext="Cancel"

View File

@@ -66,12 +66,15 @@
width="150" />
<button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
left="170" name="top_scripts_help" width="18" />
<button bottom_delta="-50" follows="left|top" height="20" label="Restart Region"
<button bottom_delta="-50" follows="left|top" height="20" label="Restart Region"
left="10" name="restart_btn"
tool_tip="Give 2 minute countdown and restart region" width="130" />
<button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
left="150" name="restart_help" width="18" />
<button bottom_delta="-23" follows="left|top" height="20" label="Delay Restart"
tool_tip="Give x second countdown and restart region" width="130" />
<spinner bottom_delta="0" decimal_digits="0" follows="left|top" height="16"
increment="1" initial_val="120" left_delta="135" max_val="3600" min_val="15"
mouse_opaque="true" name="rcount" label="Seconds:" label_width="50" width="105" />
<button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
left="255" name="restart_help" width="18" />
<button bottom_delta="-23" follows="left|top" height="20" label="Delay Restart"
left="10" name="cancel_restart_btn"
tool_tip="Delay region restart by one hour" width="130" />
</panel>

View File

@@ -1600,7 +1600,7 @@ Publier cette petite annonce maintenant pour [AMOUNT] L$ ?
<usetemplate canceltext="Annuler" name="yesnocancelbuttons" notext="Non" yestext="Oui"/>
</notification>
<notification label="Confirmer le redémarrage" name="ConfirmRestart">
Souhaitez-vous vraiment redémarrer cette région dans 2 minutes ?
Souhaitez-vous vraiment redémarrer cette région ?
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/>
</notification>
<notification label="Envoyer un message à la région" name="MessageRegion">