diff options
author | McCabe Maxsted | 2011-06-25 18:03:47 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-06-25 18:03:47 -0700 |
commit | f5f7f67bdd4df81b1c04ab29e98008bb4d9a6d2b (patch) | |
tree | c593cd15213d784fc1bef5e6dc4573579d77cfe5 | |
parent | Fixed windows installer files missing from the repo and added the VS2010 redi... (diff) | |
download | meta-impy-f5f7f67bdd4df81b1c04ab29e98008bb4d9a6d2b.zip meta-impy-f5f7f67bdd4df81b1c04ab29e98008bb4d9a6d2b.tar.gz meta-impy-f5f7f67bdd4df81b1c04ab29e98008bb4d9a6d2b.tar.bz2 meta-impy-f5f7f67bdd4df81b1c04ab29e98008bb4d9a6d2b.tar.xz |
Removed some unused code from the media tab panel and fixed the '?' button in about land > audio
-rw-r--r-- | linden/indra/newview/llpanellandaudio.cpp | 17 | ||||
-rw-r--r-- | linden/indra/newview/llpanellandaudio.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/llpanellandmedia.cpp | 30 | ||||
-rw-r--r-- | linden/indra/newview/llpanellandmedia.h | 4 |
4 files changed, 18 insertions, 36 deletions
diff --git a/linden/indra/newview/llpanellandaudio.cpp b/linden/indra/newview/llpanellandaudio.cpp index 8d902b6..c7543a0 100644 --- a/linden/indra/newview/llpanellandaudio.cpp +++ b/linden/indra/newview/llpanellandaudio.cpp | |||
@@ -69,7 +69,12 @@ enum | |||
69 | //--------------------------------------------------------------------------- | 69 | //--------------------------------------------------------------------------- |
70 | 70 | ||
71 | LLPanelLandAudio::LLPanelLandAudio(LLParcelSelectionHandle& parcel) | 71 | LLPanelLandAudio::LLPanelLandAudio(LLParcelSelectionHandle& parcel) |
72 | : LLPanel(std::string("land_media_panel")), mParcel(parcel) | 72 | : LLPanel(std::string("land_media_panel")), |
73 | mParcel(parcel), | ||
74 | mCheckSoundLocal(NULL), | ||
75 | mSoundHelpButton(NULL), | ||
76 | mRadioVoiceChat(NULL), | ||
77 | mMusicURLEdit(NULL) | ||
73 | { | 78 | { |
74 | } | 79 | } |
75 | 80 | ||
@@ -82,6 +87,9 @@ LLPanelLandAudio::~LLPanelLandAudio() | |||
82 | 87 | ||
83 | BOOL LLPanelLandAudio::postBuild() | 88 | BOOL LLPanelLandAudio::postBuild() |
84 | { | 89 | { |
90 | mSoundHelpButton = getChild<LLButton>("?"); | ||
91 | mSoundHelpButton->setClickedCallback(onClickSoundHelp, this); | ||
92 | |||
85 | mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check_sound_local"); | 93 | mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check_sound_local"); |
86 | childSetCommitCallback("check_sound_local", onCommitAny, this); | 94 | childSetCommitCallback("check_sound_local", onCommitAny, this); |
87 | 95 | ||
@@ -185,3 +193,10 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) | |||
185 | // Might have changed properties, so let's redraw! | 193 | // Might have changed properties, so let's redraw! |
186 | self->refresh(); | 194 | self->refresh(); |
187 | } | 195 | } |
196 | |||
197 | |||
198 | // static | ||
199 | void LLPanelLandAudio::onClickSoundHelp(void*) | ||
200 | { | ||
201 | LLNotifications::instance().add("ClickSoundHelpLand"); | ||
202 | } | ||
diff --git a/linden/indra/newview/llpanellandaudio.h b/linden/indra/newview/llpanellandaudio.h index 82e27f6..b443beb 100644 --- a/linden/indra/newview/llpanellandaudio.h +++ b/linden/indra/newview/llpanellandaudio.h | |||
@@ -50,11 +50,12 @@ public: | |||
50 | 50 | ||
51 | private: | 51 | private: |
52 | static void onCommitAny(LLUICtrl* ctrl, void *userdata); | 52 | static void onCommitAny(LLUICtrl* ctrl, void *userdata); |
53 | static void onClickSoundHelp(void*); | ||
53 | 54 | ||
54 | private: | ||
55 | LLCheckBoxCtrl* mCheckSoundLocal; | 55 | LLCheckBoxCtrl* mCheckSoundLocal; |
56 | LLRadioGroup* mRadioVoiceChat; | 56 | LLRadioGroup* mRadioVoiceChat; |
57 | LLLineEditor* mMusicURLEdit; | 57 | LLLineEditor* mMusicURLEdit; |
58 | LLButton* mSoundHelpButton; | ||
58 | 59 | ||
59 | LLSafeHandle<LLParcelSelection>& mParcel; | 60 | LLSafeHandle<LLParcelSelection>& mParcel; |
60 | }; | 61 | }; |
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index 8a0be86..dba7883 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp | |||
@@ -65,12 +65,9 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) | |||
65 | : LLPanel(std::string("land_media_panel")), | 65 | : LLPanel(std::string("land_media_panel")), |
66 | 66 | ||
67 | mParcel(parcel), | 67 | mParcel(parcel), |
68 | mCheckSoundLocal(NULL), | ||
69 | mSoundHelpButton(NULL), | ||
70 | mCheckEnableVoiceChat(NULL), | 68 | mCheckEnableVoiceChat(NULL), |
71 | mCheckEnableVoiceChatIsEstateDisabled(NULL), | 69 | mCheckEnableVoiceChatIsEstateDisabled(NULL), |
72 | mCheckEnableVoiceChatParcel(NULL), | 70 | mCheckEnableVoiceChatParcel(NULL), |
73 | mMusicURLEdit(NULL), | ||
74 | mMediaURLEdit(NULL), | 71 | mMediaURLEdit(NULL), |
75 | mMediaDescEdit(NULL), | 72 | mMediaDescEdit(NULL), |
76 | mMediaTypeCombo(NULL), | 73 | mMediaTypeCombo(NULL), |
@@ -92,21 +89,8 @@ LLPanelLandMedia::~LLPanelLandMedia() | |||
92 | } | 89 | } |
93 | 90 | ||
94 | 91 | ||
95 | // static | ||
96 | void LLPanelLandMedia::onClickSoundHelp(void*) | ||
97 | { | ||
98 | LLNotifications::instance().add("ClickSoundHelpLand"); | ||
99 | } | ||
100 | |||
101 | |||
102 | BOOL LLPanelLandMedia::postBuild() | 92 | BOOL LLPanelLandMedia::postBuild() |
103 | { | 93 | { |
104 | mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local"); | ||
105 | childSetCommitCallback("check sound local", onCommitAny, this); | ||
106 | |||
107 | mSoundHelpButton = getChild<LLButton>("?"); | ||
108 | mSoundHelpButton->setClickedCallback(onClickSoundHelp, this); | ||
109 | |||
110 | mCheckEnableVoiceChat = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel"); | 94 | mCheckEnableVoiceChat = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel"); |
111 | childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); | 95 | childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); |
112 | mCheckEnableVoiceChatIsEstateDisabled = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_is_estate_disabled"); | 96 | mCheckEnableVoiceChatIsEstateDisabled = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_is_estate_disabled"); |
@@ -114,9 +98,6 @@ BOOL LLPanelLandMedia::postBuild() | |||
114 | mCheckEnableVoiceChatParcel = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_parcel"); | 98 | mCheckEnableVoiceChatParcel = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_parcel"); |
115 | childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this); | 99 | childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this); |
116 | 100 | ||
117 | mMusicURLEdit = getChild<LLLineEditor>("music_url"); | ||
118 | childSetCommitCallback("music_url", onCommitAny, this); | ||
119 | |||
120 | mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); | 101 | mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); |
121 | mMediaTextureCtrl->setCommitCallback( onCommitAny ); | 102 | mMediaTextureCtrl->setCommitCallback( onCommitAny ); |
122 | mMediaTextureCtrl->setCallbackUserData( this ); | 103 | mMediaTextureCtrl->setCallbackUserData( this ); |
@@ -169,9 +150,6 @@ void LLPanelLandMedia::refresh() | |||
169 | // Display options | 150 | // Display options |
170 | BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); | 151 | BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); |
171 | 152 | ||
172 | mCheckSoundLocal->set( parcel->getSoundLocal() ); | ||
173 | mCheckSoundLocal->setEnabled( can_change_media ); | ||
174 | |||
175 | LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); | 153 | LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); |
176 | if (!region) | 154 | if (!region) |
177 | { | 155 | { |
@@ -217,9 +195,6 @@ void LLPanelLandMedia::refresh() | |||
217 | 195 | ||
218 | mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); | 196 | mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); |
219 | 197 | ||
220 | mMusicURLEdit->setText(parcel->getMusicURL()); | ||
221 | mMusicURLEdit->setEnabled( can_change_media ); | ||
222 | |||
223 | mMediaURLEdit->setText(parcel->getMediaURL()); | 198 | mMediaURLEdit->setText(parcel->getMediaURL()); |
224 | mMediaURLEdit->setEnabled( FALSE ); | 199 | mMediaURLEdit->setEnabled( FALSE ); |
225 | 200 | ||
@@ -374,8 +349,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) | |||
374 | } | 349 | } |
375 | 350 | ||
376 | // Extract data from UI | 351 | // Extract data from UI |
377 | BOOL sound_local = self->mCheckSoundLocal->get(); | ||
378 | std::string music_url = self->mMusicURLEdit->getText(); | ||
379 | std::string media_url = self->mMediaURLEdit->getText(); | 352 | std::string media_url = self->mMediaURLEdit->getText(); |
380 | std::string media_desc = self->mMediaDescEdit->getText(); | 353 | std::string media_desc = self->mMediaDescEdit->getText(); |
381 | std::string mime_type = self->childGetText("mime_type"); | 354 | std::string mime_type = self->childGetText("mime_type"); |
@@ -391,14 +364,11 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) | |||
391 | self->childSetText("mime_type", mime_type); | 364 | self->childSetText("mime_type", mime_type); |
392 | 365 | ||
393 | // Remove leading/trailing whitespace (common when copying/pasting) | 366 | // Remove leading/trailing whitespace (common when copying/pasting) |
394 | LLStringUtil::trim(music_url); | ||
395 | LLStringUtil::trim(media_url); | 367 | LLStringUtil::trim(media_url); |
396 | 368 | ||
397 | // Push data into current parcel | 369 | // Push data into current parcel |
398 | parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); | 370 | parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); |
399 | parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); | 371 | parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); |
400 | parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); | ||
401 | parcel->setMusicURL(music_url); | ||
402 | parcel->setMediaURL(media_url); | 372 | parcel->setMediaURL(media_url); |
403 | parcel->setMediaType(mime_type); | 373 | parcel->setMediaType(mime_type); |
404 | parcel->setMediaDesc(media_desc); | 374 | parcel->setMediaDesc(media_desc); |
diff --git a/linden/indra/newview/llpanellandmedia.h b/linden/indra/newview/llpanellandmedia.h index 845b953..fda99bd 100644 --- a/linden/indra/newview/llpanellandmedia.h +++ b/linden/indra/newview/llpanellandmedia.h | |||
@@ -56,15 +56,11 @@ private: | |||
56 | static void onCommitAny(LLUICtrl* ctrl, void *userdata); | 56 | static void onCommitAny(LLUICtrl* ctrl, void *userdata); |
57 | static void onCommitType(LLUICtrl* ctrl, void *userdata); | 57 | static void onCommitType(LLUICtrl* ctrl, void *userdata); |
58 | static void onSetBtn(void* userdata); | 58 | static void onSetBtn(void* userdata); |
59 | static void onClickSoundHelp(void*); | ||
60 | 59 | ||
61 | private: | 60 | private: |
62 | LLCheckBoxCtrl* mCheckSoundLocal; | ||
63 | LLButton* mSoundHelpButton; | ||
64 | LLCheckBoxCtrl* mCheckEnableVoiceChat; | 61 | LLCheckBoxCtrl* mCheckEnableVoiceChat; |
65 | LLCheckBoxCtrl* mCheckEnableVoiceChatIsEstateDisabled; | 62 | LLCheckBoxCtrl* mCheckEnableVoiceChatIsEstateDisabled; |
66 | LLCheckBoxCtrl* mCheckEnableVoiceChatParcel; | 63 | LLCheckBoxCtrl* mCheckEnableVoiceChatParcel; |
67 | LLLineEditor* mMusicURLEdit; | ||
68 | LLLineEditor* mMediaURLEdit; | 64 | LLLineEditor* mMediaURLEdit; |
69 | LLLineEditor* mMediaDescEdit; | 65 | LLLineEditor* mMediaDescEdit; |
70 | LLComboBox* mMediaTypeCombo; | 66 | LLComboBox* mMediaTypeCombo; |