aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-02-14 23:56:36 -0700
committerMcCabe Maxsted2009-02-14 23:56:36 -0700
commitb126a1f08592c59b185a89325c55031ff939cae1 (patch)
tree65f1e4dd9720991367d8f9e9c341de041ce99323 /linden/indra/newview
parentFixed music button not toggling on first run (diff)
downloadmeta-impy-b126a1f08592c59b185a89325c55031ff939cae1.zip
meta-impy-b126a1f08592c59b185a89325c55031ff939cae1.tar.gz
meta-impy-b126a1f08592c59b185a89325c55031ff939cae1.tar.bz2
meta-impy-b126a1f08592c59b185a89325c55031ff939cae1.tar.xz
Removed useless music pause button
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/llmediaremotectrl.cpp20
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml188
2 files changed, 98 insertions, 110 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);
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml b/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml
index 1fead04..7e4f12a 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml
@@ -1,98 +1,90 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<panel bg_visible="false" border="false" border_visible="false" bottom="1" 2<panel bg_visible="false" border="false" border_visible="false" bottom="1"
3 enabled="true" follows="right|bottom" height="20" left="0" 3 enabled="true" follows="right|bottom" height="20" left="0"
4 name="media_controls" width="262"> 4 name="media_controls" width="262">
5 <icon bottom="-22" enabled="true" follows="left|top" height="22" 5 <icon bottom="-22" enabled="true" follows="left|top" height="22"
6 image_name="icn_label_music.tga" label="" left_delta="2" mouse_opaque="true" 6 image_name="icn_label_music.tga" label="" left_delta="2" mouse_opaque="true"
7 name="music_icon" scale_image="true" tool_tip="Play/pause streaming music" 7 name="music_icon" scale_image="true" tool_tip="Play streaming music"
8 width="20" /> 8 width="20" />
9 <button bottom="-21" enabled="true" follows="left|top" height="20" 9 <button bottom="-21" enabled="true" follows="left|top" height="20"
10 image_overlay="icn_play.tga" 10 image_overlay="icn_play.tga"
11 image_unselected="flyout_btn_left.tga" 11 image_unselected="flyout_btn_left.tga"
12 image_selected="flyout_btn_left_selected.tga" 12 image_selected="flyout_btn_left_selected.tga"
13 image_disabled="flyout_btn_left_disabled.tga" 13 image_disabled="flyout_btn_left_disabled.tga"
14 label="" left_delta="20" 14 label="" left_delta="20"
15 mouse_opaque="true" name="music_play" scale_image="true" toggle="false" 15 mouse_opaque="true" name="music_play" scale_image="true" toggle="false"
16 tool_tip="Play/pause streaming music" width="20" /> 16 tool_tip="Play streaming music" width="20" />
17 <button bottom="-21" enabled="false" follows="left|top" height="20" 17 <button bottom="-21" enabled="true" follows="left|top" height="20"
18 image_overlay="icn_pause.tga" 18 image_overlay="icn_stop.tga"
19 image_unselected="flyout_btn_left.tga" 19 image_unselected="flyout_btn_right.tga"
20 image_selected="flyout_btn_left_selected.tga" 20 image_selected="flyout_btn_right_selected.tga"
21 image_disabled="flyout_btn_left_disabled.tga" 21 image_disabled="flyout_btn_right_disabled.tga"
22 label="" left_delta="0" 22 label="" left_delta="20"
23 mouse_opaque="true" name="music_pause" scale_image="true" toggle="false" 23 mouse_opaque="true" name="music_stop" scale_image="true" toggle="false"
24 tool_tip="Pause streaming music" width="20" /> 24 tool_tip="Stop streaming music" width="20" />
25 <button bottom="-21" enabled="true" follows="left|top" height="20" 25 <icon bottom="-22" enabled="true" follows="left|top" height="22"
26 image_overlay="icn_stop.tga" 26 image_name="icn_label_media.tga"
27 image_unselected="flyout_btn_right.tga" 27 label="" left_delta="23" mouse_opaque="true"
28 image_selected="flyout_btn_right_selected.tga" 28 name="media_icon" scale_image="true" tool_tip="Play/pause streaming media"
29 image_disabled="flyout_btn_right_disabled.tga" 29 width="20" />
30 label="" left_delta="20" 30 <button bottom="-21" enabled="true" follows="left|top" height="20"
31 mouse_opaque="true" name="music_stop" scale_image="true" toggle="false" 31 image_overlay="icn_play.tga"
32 tool_tip="Stop streaming music" width="20" /> 32 image_unselected="flyout_btn_left.tga"
33 <icon bottom="-22" enabled="true" follows="left|top" height="22" 33 image_selected="flyout_btn_left_selected.tga"
34 image_name="icn_label_media.tga" 34 image_disabled="flyout_btn_left_disabled.tga"
35 label="" left_delta="23" mouse_opaque="true" 35 label="" left_delta="21"
36 name="media_icon" scale_image="true" tool_tip="Play/pause streaming music" 36 mouse_opaque="true" name="media_play" scale_image="true" toggle="false"
37 width="20" /> 37 tool_tip="Play/pause streaming music" width="20" />
38 <button bottom="-21" enabled="true" follows="left|top" height="20" 38 <button bottom="-21" enabled="false" follows="left|top" height="20"
39 image_overlay="icn_play.tga" 39 image_overlay="icn_pause.tga"
40 image_unselected="flyout_btn_left.tga" 40 image_unselected="flyout_btn_left.tga"
41 image_selected="flyout_btn_left_selected.tga" 41 image_selected="flyout_btn_left_selected.tga"
42 image_disabled="flyout_btn_left_disabled.tga" 42 image_disabled="flyout_btn_left_disabled.tga"
43 label="" left_delta="21" 43 label="" left_delta="0"
44 mouse_opaque="true" name="media_play" scale_image="true" toggle="false" 44 mouse_opaque="true" name="media_pause" scale_image="true" toggle="false"
45 tool_tip="Play/pause streaming music" width="20" /> 45 tool_tip="Pause streaming media" width="20" />
46 <button bottom="-21" enabled="false" follows="left|top" height="20" 46 <button bottom="-21" enabled="true" follows="left|top" height="20"
47 image_overlay="icn_pause.tga" 47 image_overlay="icn_stop.tga"
48 image_unselected="flyout_btn_left.tga" 48 image_unselected="flyout_btn_right.tga"
49 image_selected="flyout_btn_left_selected.tga" 49 image_selected="flyout_btn_right_selected.tga"
50 image_disabled="flyout_btn_left_disabled.tga" 50 image_disabled="flyout_btn_right_disabled.tga"
51 label="" left_delta="0" 51 label="" left_delta="20"
52 mouse_opaque="true" name="media_pause" scale_image="true" toggle="false" 52 mouse_opaque="true" name="media_stop" scale_image="true" toggle="false"
53 tool_tip="Pause streaming media" width="20" /> 53 tool_tip="Stop streaming media" width="20" />
54 <button bottom="-21" enabled="true" follows="left|top" height="20" 54 <volume_slider bottom="-23" control_name="AudioLevelMaster" height="22" increment="0.05"
55 image_overlay="icn_stop.tga" 55 initial_val="0.5" left_delta="15" max_val="1" min_val="0"
56 image_unselected="flyout_btn_right.tga" 56 mouse_opaque="true" name="volume_slider" tool_tip="Master Volume"
57 image_selected="flyout_btn_right_selected.tga" 57 width="56" />
58 image_disabled="flyout_btn_right_disabled.tga" 58 <button bottom="-19" control_name="MuteAudio" height="20"
59 label="" left_delta="20" 59 image_selected="icn_speaker-muted_dark.tga"
60 mouse_opaque="true" name="media_stop" scale_image="true" toggle="false" 60 image_unselected="icn_speaker_dark.tga" label="" left_delta="56"
61 tool_tip="Stop streaming media" width="20" /> 61 name="mute_master" toggle="true" tool_tip="Master Mute" width="24" />
62 <volume_slider bottom="-23" control_name="AudioLevelMaster" height="22" increment="0.05" 62 <button bottom="-22" control_name="ShowVolumeSettingsPopup" height="22" label=""
63 initial_val="0.5" left_delta="15" max_val="1" min_val="0" 63 left_delta="19" name="expand" scale_image="true" toggle="true"
64 mouse_opaque="true" name="volume_slider" tool_tip="Master Volume" 64 tool_tip="Adjust individual volume levels" width="22" />
65 width="56" /> 65
66 <button bottom="-19" control_name="MuteAudio" height="20" 66 <string name="play_label">
67 image_selected="icn_speaker-muted_dark.tga" 67 Play
68 image_unselected="icn_speaker_dark.tga" label="" left_delta="56" 68 </string>
69 name="mute_master" toggle="true" tool_tip="Master Mute" width="24" /> 69 <string name="stop_label">
70 <button bottom="-22" control_name="ShowVolumeSettingsPopup" height="22" label="" 70 Stop
71 left_delta="19" name="expand" scale_image="true" toggle="true" 71 </string>
72 tool_tip="Adjust individual volume levels" width="22" /> 72 <string name="pause_label">
73 73 Pause
74 <string name="play_label"> 74 </string>
75 Play 75 <string name="default_tooltip_label">
76 </string> 76 No Media Specified
77 <string name="stop_label"> 77 </string>
78 Stop 78 <string name="media_hidden_label">
79 </string> 79 (URL hidden by parcel owner)
80 <string name="pause_label"> 80 </string>
81 Pause 81 <string name="media_icon_tooltip_web">
82 </string> 82 This location displays content from the World Wide Web. Click the Play button to display Web content.
83 <string name="default_tooltip_label"> 83 </string>
84 No Media Specified 84 <string name="media_icon_tooltip_movie">
85 </string> 85 This location displays Video content. Click the Play button to play the video.
86 <string name="media_hidden_label"> 86 </string>
87 (URL hidden by parcel owner) 87 <string name="media_play_tooltip">
88 </string> 88 Display Web content at this location.
89 <string name="media_icon_tooltip_web"> 89 </string>
90 This location displays content from the World Wide Web. Click the Play button to display Web content. 90</panel>
91 </string>
92 <string name="media_icon_tooltip_movie">
93 This location displays Video content. Click the Play button to play the video.
94 </string>
95 <string name="media_play_tooltip">
96 Display Web content at this location.
97 </string>
98</panel>