diff options
Diffstat (limited to 'linden/indra/newview/llpanellandmedia.cpp')
-rw-r--r-- | linden/indra/newview/llpanellandmedia.cpp | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index cb8e8c5..6810c0a 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp | |||
@@ -37,7 +37,7 @@ | |||
37 | // viewer includes | 37 | // viewer includes |
38 | #include "llmimetypes.h" | 38 | #include "llmimetypes.h" |
39 | #include "llviewerparcelmgr.h" | 39 | #include "llviewerparcelmgr.h" |
40 | #include "llvieweruictrlfactory.h" | 40 | #include "lluictrlfactory.h" |
41 | 41 | ||
42 | // library includes | 42 | // library includes |
43 | #include "llcheckboxctrl.h" | 43 | #include "llcheckboxctrl.h" |
@@ -80,58 +80,51 @@ LLPanelLandMedia::~LLPanelLandMedia() | |||
80 | 80 | ||
81 | BOOL LLPanelLandMedia::postBuild() | 81 | BOOL LLPanelLandMedia::postBuild() |
82 | { | 82 | { |
83 | mCheckSoundLocal = LLUICtrlFactory::getCheckBoxByName(this, "check sound local"); | 83 | mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local"); |
84 | childSetCommitCallback("check sound local", onCommitAny, this); | 84 | childSetCommitCallback("check sound local", onCommitAny, this); |
85 | 85 | ||
86 | mRadioVoiceChat = LLUICtrlFactory::getRadioGroupByName(this, "parcel_voice_channel"); | 86 | mRadioVoiceChat = getChild<LLRadioGroup>("parcel_voice_channel"); |
87 | childSetCommitCallback("parcel_voice_channel", onCommitAny, this); | 87 | childSetCommitCallback("parcel_voice_channel", onCommitAny, this); |
88 | 88 | ||
89 | mMusicURLEdit = LLUICtrlFactory::getLineEditorByName(this, "music_url"); | 89 | mMusicURLEdit = getChild<LLLineEditor>("music_url"); |
90 | childSetCommitCallback("music_url", onCommitAny, this); | 90 | childSetCommitCallback("music_url", onCommitAny, this); |
91 | 91 | ||
92 | mMediaTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this, "media texture"); | 92 | mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); |
93 | if (mMediaTextureCtrl) | 93 | mMediaTextureCtrl->setCommitCallback( onCommitAny ); |
94 | { | 94 | mMediaTextureCtrl->setCallbackUserData( this ); |
95 | mMediaTextureCtrl->setCommitCallback( onCommitAny ); | 95 | mMediaTextureCtrl->setAllowNoTexture ( TRUE ); |
96 | mMediaTextureCtrl->setCallbackUserData( this ); | 96 | mMediaTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); |
97 | mMediaTextureCtrl->setAllowNoTexture ( TRUE ); | 97 | mMediaTextureCtrl->setNonImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); |
98 | mMediaTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); | ||
99 | mMediaTextureCtrl->setNonImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); | ||
100 | } | ||
101 | else | ||
102 | { | ||
103 | llwarns << "LLViewerUICtrlFactory::getTexturePickerByName() returned NULL for 'media texure'" << llendl; | ||
104 | } | ||
105 | 98 | ||
106 | mMediaAutoScaleCheck = LLUICtrlFactory::getCheckBoxByName(this, "media_auto_scale"); | 99 | mMediaAutoScaleCheck = getChild<LLCheckBoxCtrl>("media_auto_scale"); |
107 | childSetCommitCallback("media_auto_scale", onCommitAny, this); | 100 | childSetCommitCallback("media_auto_scale", onCommitAny, this); |
108 | 101 | ||
109 | mMediaLoopCheck = LLUICtrlFactory::getCheckBoxByName(this, "media_loop"); | 102 | mMediaLoopCheck = getChild<LLCheckBoxCtrl>("media_loop"); |
110 | childSetCommitCallback("media_loop", onCommitAny, this); | 103 | childSetCommitCallback("media_loop", onCommitAny, this); |
111 | 104 | ||
112 | mMediaUrlCheck = LLUICtrlFactory::getCheckBoxByName(this, "hide_media_url"); | 105 | mMediaUrlCheck = getChild<LLCheckBoxCtrl>("hide_media_url"); |
113 | childSetCommitCallback("hide_media_url", onCommitAny, this); | 106 | childSetCommitCallback("hide_media_url", onCommitAny, this); |
114 | 107 | ||
115 | mMusicUrlCheck = LLUICtrlFactory::getCheckBoxByName(this, "hide_music_url"); | 108 | mMusicUrlCheck = getChild<LLCheckBoxCtrl>("hide_music_url"); |
116 | childSetCommitCallback("hide_music_url", onCommitAny, this); | 109 | childSetCommitCallback("hide_music_url", onCommitAny, this); |
117 | 110 | ||
118 | mMediaURLEdit = LLUICtrlFactory::getLineEditorByName(this, "media_url"); | 111 | mMediaURLEdit = getChild<LLLineEditor>("media_url"); |
119 | childSetCommitCallback("media_url", onCommitAny, this); | 112 | childSetCommitCallback("media_url", onCommitAny, this); |
120 | 113 | ||
121 | mMediaDescEdit = LLUICtrlFactory::getLineEditorByName(this, "url_description"); | 114 | mMediaDescEdit = getChild<LLLineEditor>("url_description"); |
122 | childSetCommitCallback("url_description", onCommitAny, this); | 115 | childSetCommitCallback("url_description", onCommitAny, this); |
123 | 116 | ||
124 | mMediaTypeCombo = LLUICtrlFactory::getComboBoxByName(this, "media type"); | 117 | mMediaTypeCombo = getChild<LLComboBox>("media type"); |
125 | childSetCommitCallback("media type", onCommitType, this); | 118 | childSetCommitCallback("media type", onCommitType, this); |
126 | populateMIMECombo(); | 119 | populateMIMECombo(); |
127 | 120 | ||
128 | mMediaWidthCtrl = LLUICtrlFactory::getSpinnerByName(this, "media_size_width"); | 121 | mMediaWidthCtrl = getChild<LLSpinCtrl>("media_size_width"); |
129 | childSetCommitCallback("media_size_width", onCommitAny, this); | 122 | childSetCommitCallback("media_size_width", onCommitAny, this); |
130 | mMediaHeightCtrl = LLUICtrlFactory::getSpinnerByName(this, "media_size_height"); | 123 | mMediaHeightCtrl = getChild<LLSpinCtrl>("media_size_height"); |
131 | childSetCommitCallback("media_size_height", onCommitAny, this); | 124 | childSetCommitCallback("media_size_height", onCommitAny, this); |
132 | mMediaSizeCtrlLabel = LLUICtrlFactory::getTextBoxByName(this, "media_size"); | 125 | mMediaSizeCtrlLabel = getChild<LLTextBox>("media_size"); |
133 | 126 | ||
134 | mSetURLButton = LLUICtrlFactory::getButtonByName(this, "set_media_url"); | 127 | mSetURLButton = getChild<LLButton>("set_media_url"); |
135 | childSetAction("set_media_url", onSetBtn, this); | 128 | childSetAction("set_media_url", onSetBtn, this); |
136 | 129 | ||
137 | return TRUE; | 130 | return TRUE; |
@@ -401,7 +394,7 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) | |||
401 | parcel->setObscureMusic( obscure_music ); | 394 | parcel->setObscureMusic( obscure_music ); |
402 | 395 | ||
403 | // Send current parcel data upstream to server | 396 | // Send current parcel data upstream to server |
404 | gParcelMgr->sendParcelPropertiesUpdate( parcel ); | 397 | LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); |
405 | 398 | ||
406 | // Might have changed properties, so let's redraw! | 399 | // Might have changed properties, so let's redraw! |
407 | self->refresh(); | 400 | self->refresh(); |