summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2013-12-03 09:29:01 +0200
committerMaximB ProductEngine <mberezhnoy@productengine.com>2013-12-03 09:29:01 +0200
commitc0ecaeb5d8121d5cd81e94a646b448b84a475550 (patch)
tree975e181102c5bc4b1558d90d06501270242c85eb /indra
parentb93374e0702b5e69fa8200590da274c49f931fcf (diff)
parentd3e2573ebd60c67c99644fdcf471c6b8102c302d (diff)
merge
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloaterland.cpp43
-rwxr-xr-xindra/newview/llfloaterland.h1
-rwxr-xr-xindra/newview/llfloaterregioninfo.cpp7
-rwxr-xr-xindra/newview/llfloaterregioninfo.h1
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_viewer.xml12
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_region_debug.xml10
6 files changed, 53 insertions, 21 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 2b9c216e54..74592dbdde 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2331,7 +2331,7 @@ BOOL LLPanelLandAccess::postBuild()
childSetCommitCallback("public_access", onCommitPublicAccess, this);
childSetCommitCallback("limit_payment", onCommitAny, this);
childSetCommitCallback("limit_age_verified", onCommitAny, this);
- childSetCommitCallback("GroupCheck", onCommitAny, this);
+ childSetCommitCallback("GroupCheck", onCommitGroupCheck, this);
childSetCommitCallback("PassCheck", onCommitAny, this);
childSetCommitCallback("pass_combo", onCommitAny, this);
childSetCommitCallback("PriceSpin", onCommitAny, this);
@@ -2496,11 +2496,11 @@ void LLPanelLandAccess::refresh()
}
BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
- getChild<LLUICtrl>("PassCheck")->setValue(use_pass );
+ getChild<LLUICtrl>("PassCheck")->setValue(use_pass);
LLCtrlSelectionInterface* passcombo = childGetSelectionInterface("pass_combo");
if (passcombo)
{
- if (public_access || !use_pass || !use_group)
+ if (public_access || !use_pass)
{
passcombo->selectByValue("anyone");
}
@@ -2593,12 +2593,11 @@ void LLPanelLandAccess::refresh_ui()
getChildView("limit_age_verified")->setEnabled(FALSE);
- BOOL group_access = getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
BOOL sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
getChildView("PassCheck")->setEnabled(can_manage_allowed);
if (sell_passes)
{
- getChildView("pass_combo")->setEnabled(group_access && can_manage_allowed);
+ getChildView("pass_combo")->setEnabled(can_manage_allowed);
getChildView("PriceSpin")->setEnabled(can_manage_allowed);
getChildView("HoursSpin")->setEnabled(can_manage_allowed);
}
@@ -2657,6 +2656,32 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata)
onCommitAny(ctrl, userdata);
}
+void LLPanelLandAccess::onCommitGroupCheck(LLUICtrl *ctrl, void *userdata)
+{
+ LLPanelLandAccess *self = (LLPanelLandAccess *)userdata;
+ LLParcel* parcel = self->mParcel->getParcel();
+ if (!parcel)
+ {
+ return;
+ }
+
+ BOOL use_pass_list = !self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
+ BOOL use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
+ LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
+ if (passcombo)
+ {
+ if (use_access_group && use_pass_list)
+ {
+ if (passcombo->getSelectedValue().asString() == "group")
+ {
+ passcombo->selectByValue("anyone");
+ }
+ }
+ }
+
+ onCommitAny(ctrl, userdata);
+}
+
// static
void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
{
@@ -2694,14 +2719,14 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
{
use_access_list = TRUE;
use_pass_list = self->getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
- if (use_access_group && use_pass_list)
+ LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
+ if (passcombo)
{
- LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
- if (passcombo)
+ if (use_access_group && use_pass_list)
{
if (passcombo->getSelectedValue().asString() == "group")
{
- use_access_list = FALSE;
+ use_access_group = FALSE;
}
}
}
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 4f1c10274a..95612fcb4a 100755
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -366,6 +366,7 @@ public:
static void onCommitPublicAccess(LLUICtrl* ctrl, void *userdata);
static void onCommitAny(LLUICtrl* ctrl, void *userdata);
+ static void onCommitGroupCheck(LLUICtrl* ctrl, void *userdata);
static void onClickRemoveAccess(void*);
static void onClickRemoveBanned(void*);
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 66bf49331b..d826e56e2c 100755
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -890,6 +890,7 @@ BOOL LLPanelRegionDebugInfo::postBuild()
childSetAction("top_scripts_btn", onClickTopScripts, this);
childSetAction("restart_btn", onClickRestart, this);
childSetAction("cancel_restart_btn", onClickCancelRestart, this);
+ childSetAction("region_debug_console_btn", onClickDebugConsole, this);
return TRUE;
}
@@ -911,6 +912,7 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region)
getChildView("top_scripts_btn")->setEnabled(allow_modify);
getChildView("restart_btn")->setEnabled(allow_modify);
getChildView("cancel_restart_btn")->setEnabled(allow_modify);
+ getChildView("region_debug_console_btn")->setEnabled(allow_modify);
return LLPanelRegionInfo::refreshFromRegion(region);
}
@@ -1073,6 +1075,11 @@ void LLPanelRegionDebugInfo::onClickCancelRestart(void* data)
self->sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings);
}
+// static
+void LLPanelRegionDebugInfo::onClickDebugConsole(void* data)
+{
+ LLFloaterReg::showInstance("region_debug_console");
+}
BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
{
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index f0499f1903..bf174f3700 100755
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -209,6 +209,7 @@ protected:
static void onClickRestart(void* data);
bool callbackRestart(const LLSD& notification, const LLSD& response);
static void onClickCancelRestart(void* data);
+ static void onClickDebugConsole(void* data);
private:
LLUUID mTargetAvatar;
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 6354006b87..7fab89b693 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3126,18 +3126,6 @@
<menu_item_call.on_click
function="Advanced.PrintAgentInfo" />
</menu_item_call>
- <menu_item_check
- label="Region Debug Console"
- name="Region Debug Console"
- shortcut="control|shift|`"
- use_mac_ctrl="true">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="region_debug_console" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="region_debug_console" />
- </menu_item_check>
<menu_item_separator />
<menu_item_check
diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml
index 81b2281adb..fea5f1b19f 100755
--- a/indra/newview/skins/default/xui/en/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml
@@ -201,4 +201,14 @@
tool_tip="Cancel region restart"
top_delta="0"
width="150" />
+ <button
+ follows="left|top"
+ height="20"
+ label="Region Debug Console"
+ layout="topleft"
+ left="10"
+ name="region_debug_console_btn"
+ tool_tip="Open Region Debug Console"
+ top_pad="5"
+ width="150" />
</panel>