summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallum <none@none>2009-12-14 13:20:23 -0800
committercallum <none@none>2009-12-14 13:20:23 -0800
commit894a5006b3e5b4c725060443dab34491b0da3a4d (patch)
tree4d4d0631380454c9e483fa1da4181d2ede91d503
parent0a8d9fa5b5d044bed7d4c38ec51d87bc90f3b3a6 (diff)
Fix for DEV-44045 "Update text, checkbox & layout changes for Build : Media Settings : Controls tab"
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp6
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.h2
-rw-r--r--indra/newview/llpanelmediasettingspermissions.cpp46
-rw-r--r--indra/newview/llpanelmediasettingspermissions.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml30
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml43
6 files changed, 65 insertions, 63 deletions
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index 88eba14553..f574f55beb 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -67,7 +67,6 @@ const char *CHECKERBOARD_DATA_URL = "data:image/svg+xml,%3Csvg xmlns=%22http://w
////////////////////////////////////////////////////////////////////////////////
//
LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
- mControls( NULL ),
mAutoLoop( NULL ),
mFirstClick( NULL ),
mAutoZoom( NULL ),
@@ -93,7 +92,6 @@ BOOL LLPanelMediaSettingsGeneral::postBuild()
mAutoPlay = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_PLAY_KEY );
mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY );
mAutoZoom = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_ZOOM_KEY );
- mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY );
mCurrentURL = getChild< LLTextBox >( LLMediaEntry::CURRENT_URL_KEY );
mFirstClick = getChild< LLCheckBoxCtrl >( LLMediaEntry::FIRST_CLICK_INTERACT_KEY );
mHeightPixels = getChild< LLSpinCtrl >( LLMediaEntry::HEIGHT_PIXELS_KEY );
@@ -211,7 +209,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mAutoPlay->clear();
self->mAutoScale->clear();
self->mAutoZoom ->clear();
- self->mControls->clear();
self->mCurrentURL->clear();
self->mFirstClick->clear();
self->mHeightPixels->clear();
@@ -221,7 +218,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mAutoPlay ->setEnabled(editable);
self->mAutoScale ->setEnabled(editable);
self->mAutoZoom ->setEnabled(editable);
- self->mControls ->setEnabled(editable);
self->mCurrentURL ->setEnabled(editable);
self->mFirstClick ->setEnabled(editable);
self->mHeightPixels ->setEnabled(editable);
@@ -283,7 +279,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_
{ LLMediaEntry::AUTO_PLAY_KEY, self->mAutoPlay, "LLCheckBoxCtrl" },
{ LLMediaEntry::AUTO_SCALE_KEY, self->mAutoScale, "LLCheckBoxCtrl" },
{ LLMediaEntry::AUTO_ZOOM_KEY, self->mAutoZoom, "LLCheckBoxCtrl" },
- { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" },
{ LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLTextBox" },
{ LLMediaEntry::HEIGHT_PIXELS_KEY, self->mHeightPixels, "LLSpinCtrl" },
{ LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" },
@@ -416,7 +411,6 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in )
fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue();
fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue();
fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue();
- fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex();
//Don't fill in current URL: this is only supposed to get changed via navigate
// fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue();
fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue();
diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h
index c6895b1dc9..5f90321362 100644
--- a/indra/newview/llpanelmediasettingsgeneral.h
+++ b/indra/newview/llpanelmediasettingsgeneral.h
@@ -37,7 +37,6 @@
class LLButton;
class LLCheckBoxCtrl;
-class LLComboBox;
class LLLineEditor;
class LLSpinCtrl;
class LLTextureCtrl;
@@ -90,7 +89,6 @@ private:
void checkHomeUrlPassesWhitelist();
- LLComboBox* mControls;
LLCheckBoxCtrl* mAutoLoop;
LLCheckBoxCtrl* mFirstClick;
LLCheckBoxCtrl* mAutoZoom;
diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp
index 2f3f550e35..1fadb41c18 100644
--- a/indra/newview/llpanelmediasettingspermissions.cpp
+++ b/indra/newview/llpanelmediasettingspermissions.cpp
@@ -51,9 +51,11 @@
#include "llnamebox.h"
#include "lltrans.h"
#include "llfloatermediasettings.h"
+
////////////////////////////////////////////////////////////////////////////////
//
LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
+ mControls( NULL ),
mPermsOwnerInteract( 0 ),
mPermsOwnerControl( 0 ),
mPermsGroupName( 0 ),
@@ -71,6 +73,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
BOOL LLPanelMediaSettingsPermissions::postBuild()
{
// connect member vars with UI widgets
+ mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY );
mPermsOwnerInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_INTERACT_KEY );
mPermsOwnerControl = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_CONTROL_KEY );
mPermsGroupInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_GROUP_INTERACT_KEY );
@@ -123,19 +126,22 @@ void LLPanelMediaSettingsPermissions::draw()
void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable)
{
LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata;
+
+ self->mControls->clear();
self->mPermsOwnerInteract->clear();
self->mPermsOwnerControl->clear();
- self->mPermsGroupInteract ->clear();
+ self->mPermsGroupInteract->clear();
self->mPermsGroupControl->clear();
- self->mPermsWorldInteract ->clear();
- self->mPermsWorldControl ->clear();
+ self->mPermsWorldInteract->clear();
+ self->mPermsWorldControl->clear();
+ self->mControls->setEnabled(editable);
self->mPermsOwnerInteract->setEnabled(editable);
- self->mPermsOwnerControl ->setEnabled(editable);
+ self->mPermsOwnerControl->setEnabled(editable);
self->mPermsGroupInteract->setEnabled(editable);
- self->mPermsGroupControl ->setEnabled(editable);
+ self->mPermsGroupControl->setEnabled(editable);
self->mPermsWorldInteract->setEnabled(editable);
- self->mPermsWorldControl ->setEnabled(editable);
+ self->mPermsWorldControl->setEnabled(editable);
}
////////////////////////////////////////////////////////////////////////////////
@@ -175,6 +181,7 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me
} data_set [] =
{
+ { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" },
{ LLPanelContents::PERMS_OWNER_INTERACT_KEY, self->mPermsOwnerInteract, "LLCheckBoxCtrl" },
{ LLPanelContents::PERMS_OWNER_CONTROL_KEY, self->mPermsOwnerControl, "LLCheckBoxCtrl" },
{ LLPanelContents::PERMS_GROUP_INTERACT_KEY, self->mPermsGroupInteract, "LLCheckBoxCtrl" },
@@ -194,27 +201,27 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me
{
if ( data_set[ i ].ctrl_type == "LLCheckBoxCtrl" )
{
- // the sense of the checkboxes changed and it made sense
- // to just reverse their sense back again here and avoid
- // changing server code.
+ // Most recent change to the "sense" of these checkboxes
+ // means the value in the checkbox matches that on the server
static_cast< LLCheckBoxCtrl* >( data_set[ i ].ctrl_ptr )->
- setValue( ! media_settings[ base_key ].asBoolean() );
+ setValue( media_settings[ base_key ].asBoolean() );
}
else
if ( data_set[ i ].ctrl_type == "LLComboBox" )
static_cast< LLComboBox* >( data_set[ i ].ctrl_ptr )->
setCurrentByIndex( media_settings[ base_key ].asInteger() );
+
data_set[ i ].ctrl_ptr->setEnabled(editable);
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
};
};
+
self->childSetEnabled("media_perms_label_owner", editable );
self->childSetText("media_perms_label_owner", LLTrans::getString("Media Perms Owner") );
self->childSetEnabled("media_perms_label_group", editable );
self->childSetText("media_perms_label_group", LLTrans::getString("Media Perms Group") );
self->childSetEnabled("media_perms_label_anyone", editable );
self->childSetText("media_perms_label_anyone", LLTrans::getString("Media Perms Anyone") );
-
}
////////////////////////////////////////////////////////////////////////////////
@@ -228,6 +235,9 @@ void LLPanelMediaSettingsPermissions::preApply()
//
void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in )
{
+ // moved over from the 'General settings' tab
+ fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex();
+
// *NOTE: For some reason, gcc does not like these symbol references in the
// expressions below (inside the static_casts). I have NO idea why :(.
// For some reason, assigning them to const temp vars here fixes the link
@@ -237,13 +247,13 @@ void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in )
const U8 group = LLMediaEntry::PERM_GROUP;
const U8 anyone = LLMediaEntry::PERM_ANYONE;
const LLSD::Integer control = static_cast<LLSD::Integer>(
- (mPermsOwnerControl->getValue() ? none : owner ) |
- (mPermsGroupControl->getValue() ? none : group ) |
- (mPermsWorldControl->getValue() ? none : anyone ));
+ (mPermsOwnerControl->getValue() ? owner : none ) |
+ (mPermsGroupControl->getValue() ? group: none ) |
+ (mPermsWorldControl->getValue() ? anyone : none ));
const LLSD::Integer interact = static_cast<LLSD::Integer>(
- (mPermsOwnerInteract->getValue() ? none : owner ) |
- (mPermsGroupInteract->getValue() ? none : group ) |
- (mPermsWorldInteract->getValue() ? none : anyone ));
+ (mPermsOwnerInteract->getValue() ? owner: none ) |
+ (mPermsGroupInteract->getValue() ? group : none ) |
+ (mPermsWorldInteract->getValue() ? anyone : none ));
fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control;
fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact;
}
@@ -254,4 +264,4 @@ void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in )
void LLPanelMediaSettingsPermissions::postApply()
{
// no-op
-}
+} \ No newline at end of file
diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h
index 45a596c615..bd0c3b8ab5 100644
--- a/indra/newview/llpanelmediasettingspermissions.h
+++ b/indra/newview/llpanelmediasettingspermissions.h
@@ -65,6 +65,7 @@ public:
static void clearValues( void* userdata, bool editable);
private:
+ LLComboBox* mControls;
LLCheckBoxCtrl* mPermsOwnerInteract;
LLCheckBoxCtrl* mPermsOwnerControl;
LLNameBox* mPermsGroupName;
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index 24c40b32fb..c8ec515e6d 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -93,35 +93,6 @@
<button.commit_callback
function="Media.ResetCurrentUrl"/>
</button>
- <text
- bottom_delta="-5"
- follows="top|left"
- height="15"
- left="10"
- name="controls_label">
- Controls:
- </text>
- <combo_box
- allow_text_entry="false"
- bottom_delta="-20"
- follows="left|top"
- height="18"
- left="10"
- max_chars="20"
- name="controls"
- width="120">
- <combo_item
- name="Standard"
- value="Standard">
- Standard
- </combo_item>
- <combo_item
- name="Mini"
- value="Mini">
- Mini
- </combo_item>
- </combo_box>
-
<check_box
bottom_delta="-25"
enabled="true"
@@ -135,7 +106,6 @@
name="auto_loop"
radio_style="false"
width="150" />
-
<check_box
bottom_delta="-25"
visible="false"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
index 85f534c4a3..b5c2371510 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
@@ -4,13 +4,42 @@
enabled="true"
follows="left|top|right|bottom"
height="500"
- label="Controls"
+ label="Customize"
left="102"
mouse_opaque="true"
name="Media settings for controls"
help_topic = "media_settings_controls"
width="365">
+ <text
+ bottom_delta="-50"
+ follows="top|left"
+ height="15"
+ left="10"
+ name="controls_label">
+ Controls:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ bottom_delta="0"
+ follows="left|top"
+ height="18"
+ left="100"
+ max_chars="20"
+ name="controls"
+ width="120">
+ <combo_item
+ name="Standard"
+ value="Standard">
+ Standard
+ </combo_item>
+ <combo_item
+ name="Mini"
+ value="Mini">
+ Mini
+ </combo_item>
+ </combo_box>
+
<text
bottom_delta="-50"
follows="top|left"
@@ -27,7 +56,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Disable Navigation &amp; Interactivity"
+ label="Allow Navigation &amp; Interactivity"
left="30"
mouse_opaque="true"
name="perms_owner_interact"
@@ -41,7 +70,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Hide Control Bar"
+ label="Show Control Bar"
left="30"
mouse_opaque="true"
name="perms_owner_control"
@@ -74,7 +103,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Disable Navigation &amp; Interactivity"
+ label="Allow Navigation &amp; Interactivity"
left="30"
mouse_opaque="true"
name="perms_group_interact"
@@ -88,7 +117,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Hide Control Bar"
+ label="Show Control Bar"
left="30"
mouse_opaque="true"
name="perms_group_control"
@@ -111,7 +140,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Disable Navigation &amp; Interactivity"
+ label="Allow Navigation &amp; Interactivity"
left="30"
mouse_opaque="true"
name="perms_anyone_interact"
@@ -125,7 +154,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Hide Control Bar"
+ label="Show Control Bar"
left="30"
mouse_opaque="true"
name="perms_anyone_control"