diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanellandmedia.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index 6810c0a..e4cdfaf 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp | |||
@@ -66,7 +66,7 @@ enum | |||
66 | //--------------------------------------------------------------------------- | 66 | //--------------------------------------------------------------------------- |
67 | 67 | ||
68 | LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) | 68 | LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) |
69 | : LLPanel("land_media_panel"), mParcel(parcel) | 69 | : LLPanel(std::string("land_media_panel")), mParcel(parcel) |
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
@@ -150,9 +150,9 @@ void LLPanelLandMedia::refresh() | |||
150 | mCheckSoundLocal->set( parcel->getSoundLocal() ); | 150 | mCheckSoundLocal->set( parcel->getSoundLocal() ); |
151 | mCheckSoundLocal->setEnabled( can_change_media ); | 151 | mCheckSoundLocal->setEnabled( can_change_media ); |
152 | 152 | ||
153 | if(parcel->getVoiceEnabled()) | 153 | if(parcel->getParcelFlagAllowVoice()) |
154 | { | 154 | { |
155 | if(parcel->getVoiceUseEstateChannel()) | 155 | if(parcel->getParcelFlagUseEstateVoiceChannel()) |
156 | mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatEstate); | 156 | mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatEstate); |
157 | else | 157 | else |
158 | mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatPrivate); | 158 | mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatPrivate); |
@@ -170,7 +170,7 @@ void LLPanelLandMedia::refresh() | |||
170 | mMediaURLEdit->setText(parcel->getMediaURL()); | 170 | mMediaURLEdit->setText(parcel->getMediaURL()); |
171 | mMediaURLEdit->setEnabled( FALSE ); | 171 | mMediaURLEdit->setEnabled( FALSE ); |
172 | 172 | ||
173 | mMediaDescEdit->setText(LLString(parcel->getMediaDesc())); | 173 | mMediaDescEdit->setText(parcel->getMediaDesc()); |
174 | mMediaDescEdit->setEnabled( can_change_media ); | 174 | mMediaDescEdit->setEnabled( can_change_media ); |
175 | 175 | ||
176 | std::string mime_type = parcel->getMediaType(); | 176 | std::string mime_type = parcel->getMediaType(); |
@@ -267,12 +267,12 @@ void LLPanelLandMedia::refresh() | |||
267 | 267 | ||
268 | void LLPanelLandMedia::populateMIMECombo() | 268 | void LLPanelLandMedia::populateMIMECombo() |
269 | { | 269 | { |
270 | LLString default_mime_type = "none/none"; | 270 | std::string default_mime_type = "none/none"; |
271 | LLString default_label; | 271 | std::string default_label; |
272 | LLMIMETypes::mime_widget_set_map_t::const_iterator it; | 272 | LLMIMETypes::mime_widget_set_map_t::const_iterator it; |
273 | for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it) | 273 | for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it) |
274 | { | 274 | { |
275 | const LLString& mime_type = it->first; | 275 | const std::string& mime_type = it->first; |
276 | const LLMIMETypes::LLMIMEWidgetSet& info = it->second; | 276 | const LLMIMETypes::LLMIMEWidgetSet& info = it->second; |
277 | if (info.mDefaultMimeType == default_mime_type) | 277 | if (info.mDefaultMimeType == default_mime_type) |
278 | { | 278 | { |
@@ -289,24 +289,24 @@ void LLPanelLandMedia::populateMIMECombo() | |||
289 | mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM ); | 289 | mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM ); |
290 | } | 290 | } |
291 | 291 | ||
292 | void LLPanelLandMedia::setMediaType(const LLString& mime_type) | 292 | void LLPanelLandMedia::setMediaType(const std::string& mime_type) |
293 | { | 293 | { |
294 | LLParcel *parcel = mParcel->getParcel(); | 294 | LLParcel *parcel = mParcel->getParcel(); |
295 | if(parcel) | 295 | if(parcel) |
296 | parcel->setMediaType(mime_type.c_str()); | 296 | parcel->setMediaType(mime_type); |
297 | 297 | ||
298 | LLString media_key = LLMIMETypes::widgetType(mime_type); | 298 | std::string media_key = LLMIMETypes::widgetType(mime_type); |
299 | mMediaTypeCombo->setValue(media_key); | 299 | mMediaTypeCombo->setValue(media_key); |
300 | childSetText("mime_type", mime_type); | 300 | childSetText("mime_type", mime_type); |
301 | } | 301 | } |
302 | 302 | ||
303 | void LLPanelLandMedia::setMediaURL(const LLString& media_url) | 303 | void LLPanelLandMedia::setMediaURL(const std::string& media_url) |
304 | { | 304 | { |
305 | mMediaURLEdit->setText(media_url); | 305 | mMediaURLEdit->setText(media_url); |
306 | mMediaURLEdit->onCommit(); | 306 | mMediaURLEdit->onCommit(); |
307 | } | 307 | } |
308 | 308 | ||
309 | LLString LLPanelLandMedia::getMediaURL() | 309 | std::string LLPanelLandMedia::getMediaURL() |
310 | { | 310 | { |
311 | return mMediaURLEdit->getText(); | 311 | return mMediaURLEdit->getText(); |
312 | } | 312 | } |
@@ -374,17 +374,17 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) | |||
374 | } | 374 | } |
375 | 375 | ||
376 | // Remove leading/trailing whitespace (common when copying/pasting) | 376 | // Remove leading/trailing whitespace (common when copying/pasting) |
377 | LLString::trim(music_url); | 377 | LLStringUtil::trim(music_url); |
378 | LLString::trim(media_url); | 378 | LLStringUtil::trim(media_url); |
379 | 379 | ||
380 | // Push data into current parcel | 380 | // Push data into current parcel |
381 | parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); | 381 | parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); |
382 | parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); | 382 | parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); |
383 | parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); | 383 | parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); |
384 | parcel->setMusicURL(music_url.c_str()); | 384 | parcel->setMusicURL(music_url); |
385 | parcel->setMediaURL(media_url.c_str()); | 385 | parcel->setMediaURL(media_url); |
386 | parcel->setMediaType(mime_type.c_str()); | 386 | parcel->setMediaType(mime_type); |
387 | parcel->setMediaDesc(media_desc.c_str()); | 387 | parcel->setMediaDesc(media_desc); |
388 | parcel->setMediaWidth(media_width); | 388 | parcel->setMediaWidth(media_width); |
389 | parcel->setMediaHeight(media_height); | 389 | parcel->setMediaHeight(media_height); |
390 | parcel->setMediaID(media_id); | 390 | parcel->setMediaID(media_id); |