diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llmediaremotectrl.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index 1b337ab..06978d7 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp | |||
@@ -85,7 +85,6 @@ BOOL LLMediaRemoteCtrl::postBuild() | |||
85 | childSetAction("media_stop",LLOverlayBar::mediaStop,this); | 85 | childSetAction("media_stop",LLOverlayBar::mediaStop,this); |
86 | childSetAction("music_stop",LLOverlayBar::toggleMusicPlay,this); | 86 | childSetAction("music_stop",LLOverlayBar::toggleMusicPlay,this); |
87 | childSetAction("media_pause",LLOverlayBar::toggleMediaPlay,this); | 87 | childSetAction("media_pause",LLOverlayBar::toggleMediaPlay,this); |
88 | childSetAction("music_pause",LLOverlayBar::toggleMusicPlay,this); | ||
89 | 88 | ||
90 | childSetAction("expand", onClickExpandBtn, this); | 89 | childSetAction("expand", onClickExpandBtn, this); |
91 | return TRUE; | 90 | return TRUE; |
@@ -150,7 +149,6 @@ void LLMediaRemoteCtrl::enableMediaButtons() | |||
150 | bool stop_media_enabled = false; | 149 | bool stop_media_enabled = false; |
151 | bool play_music_enabled = false; | 150 | bool play_music_enabled = false; |
152 | bool stop_music_enabled = false; | 151 | bool stop_music_enabled = false; |
153 | bool music_show_pause = false; | ||
154 | bool media_show_pause = false; | 152 | bool media_show_pause = false; |
155 | LLColor4 music_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); | 153 | LLColor4 music_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); |
156 | LLColor4 media_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); | 154 | LLColor4 media_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); |
@@ -203,17 +201,16 @@ void LLMediaRemoteCtrl::enableMediaButtons() | |||
203 | 201 | ||
204 | if ( parcel && parcel->getMusicURL()[0]) | 202 | if ( parcel && parcel->getMusicURL()[0]) |
205 | { | 203 | { |
206 | play_music_enabled = true; | ||
207 | music_icon_color = LLUI::sColorsGroup->getColor( "IconEnabledColor" ); | 204 | music_icon_color = LLUI::sColorsGroup->getColor( "IconEnabledColor" ); |
208 | 205 | ||
209 | if (gOverlayBar->musicPlaying()) | 206 | if (gOverlayBar->musicPlaying()) |
210 | { | 207 | { |
211 | music_show_pause = true; | 208 | play_music_enabled = false; |
212 | stop_music_enabled = true; | 209 | stop_music_enabled = true; |
213 | } | 210 | } |
214 | else | 211 | else |
215 | { | 212 | { |
216 | music_show_pause = false; | 213 | play_music_enabled = true; |
217 | stop_music_enabled = false; | 214 | stop_music_enabled = false; |
218 | } | 215 | } |
219 | } | 216 | } |
@@ -226,20 +223,19 @@ void LLMediaRemoteCtrl::enableMediaButtons() | |||
226 | } | 223 | } |
227 | } | 224 | } |
228 | const std::string media_icon_name = LLMIMETypes::findIcon(media_type); | 225 | const std::string media_icon_name = LLMIMETypes::findIcon(media_type); |
226 | |||
229 | LLButton* music_play_btn = getChild<LLButton>("music_play"); | 227 | LLButton* music_play_btn = getChild<LLButton>("music_play"); |
230 | LLButton* music_stop_btn = getChild<LLButton>("music_stop"); | 228 | LLButton* music_stop_btn = getChild<LLButton>("music_stop"); |
231 | LLButton* music_pause_btn = getChild<LLButton>("music_pause"); | 229 | |
230 | music_play_btn->setEnabled(play_music_enabled); | ||
231 | music_stop_btn->setEnabled(stop_music_enabled); | ||
232 | childSetColor("music_icon", music_icon_color); | ||
233 | |||
232 | LLButton* media_play_btn = getChild<LLButton>("media_play"); | 234 | LLButton* media_play_btn = getChild<LLButton>("media_play"); |
233 | LLButton* media_stop_btn = getChild<LLButton>("media_stop"); | 235 | LLButton* media_stop_btn = getChild<LLButton>("media_stop"); |
234 | LLButton* media_pause_btn = getChild<LLButton>("media_pause"); | 236 | LLButton* media_pause_btn = getChild<LLButton>("media_pause"); |
235 | LLIconCtrl* media_icon = getChild<LLIconCtrl>("media_icon"); | 237 | LLIconCtrl* media_icon = getChild<LLIconCtrl>("media_icon"); |
236 | 238 | ||
237 | music_play_btn->setEnabled(play_music_enabled); | ||
238 | music_stop_btn->setEnabled(stop_music_enabled); | ||
239 | music_pause_btn->setEnabled(music_show_pause); | ||
240 | music_pause_btn->setVisible(music_show_pause); | ||
241 | music_play_btn->setVisible(! music_show_pause); | ||
242 | childSetColor("music_icon", music_icon_color); | ||
243 | if(!media_icon_name.empty()) | 239 | if(!media_icon_name.empty()) |
244 | { | 240 | { |
245 | media_icon->setImage(media_icon_name); | 241 | media_icon->setImage(media_icon_name); |