aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-15 03:00:48 -0700
committerMcCabe Maxsted2009-06-15 03:03:59 -0700
commit96741727e0d1dbb743fe9dcfff68d52b12617136 (patch)
treeddfcd81551f3a907875b9dd5cd6f7a0cc2a19b8f /linden/indra/newview
parentOnline/Offline notifications now always show in IM windows (diff)
downloadmeta-impy-96741727e0d1dbb743fe9dcfff68d52b12617136.zip
meta-impy-96741727e0d1dbb743fe9dcfff68d52b12617136.tar.gz
meta-impy-96741727e0d1dbb743fe9dcfff68d52b12617136.tar.bz2
meta-impy-96741727e0d1dbb743fe9dcfff68d52b12617136.tar.xz
Applied Dale Glass' patch for VWR-12655: Add support for displaying the title of the song
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/lloverlaybar.cpp49
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml6
3 files changed, 65 insertions, 1 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 5c76185..7ab215a 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -7337,6 +7337,17 @@
7337 <key>Value</key> 7337 <key>Value</key>
7338 <integer>0</integer> 7338 <integer>0</integer>
7339 </map> 7339 </map>
7340 <key>ShowStreamTitle</key>
7341 <map>
7342 <key>Comment</key>
7343 <string>Show the title of the song playing on the parcel's stream</string>
7344 <key>Persist</key>
7345 <integer>1</integer>
7346 <key>Type</key>
7347 <string>Boolean</string>
7348 <key>Value</key>
7349 <integer>1</integer>
7350 </map>
7340 <key>ShowTangentBasis</key> 7351 <key>ShowTangentBasis</key>
7341 <map> 7352 <map>
7342 <key>Comment</key> 7353 <key>Comment</key>
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp
index 91a7375..e1aeeca 100644
--- a/linden/indra/newview/lloverlaybar.cpp
+++ b/linden/indra/newview/lloverlaybar.cpp
@@ -41,6 +41,7 @@
41#include "llagent.h" 41#include "llagent.h"
42#include "llbutton.h" 42#include "llbutton.h"
43#include "llchatbar.h" 43#include "llchatbar.h"
44#include "llfloaterchat.h"
44#include "llfocusmgr.h" 45#include "llfocusmgr.h"
45#include "llimview.h" 46#include "llimview.h"
46#include "llmediaremotectrl.h" 47#include "llmediaremotectrl.h"
@@ -72,6 +73,53 @@ LLOverlayBar *gOverlayBar = NULL;
72 73
73extern S32 MENU_BAR_HEIGHT; 74extern S32 MENU_BAR_HEIGHT;
74 75
76
77class LLTitleObserver
78 : public LLMediaObserver
79{
80public:
81 void init(std::string url);
82 /*virtual*/ void onMediaTitleChange(const EventType& event_in);
83private:
84 LLMediaBase* mMediaSource;
85};
86
87static LLTitleObserver sTitleObserver;
88
89static LLRegisterWidget<LLMediaRemoteCtrl> r("media_remote");
90
91void LLTitleObserver::init(std::string url)
92{
93
94 if (!gAudiop)
95 {
96 return;
97 }
98
99 mMediaSource = gAudiop->getStreamMedia(); // LLViewerMedia::getSource();
100
101 if ( mMediaSource )
102 {
103 mMediaSource->addObserver(this);
104 }
105}
106
107//virtual
108void LLTitleObserver::onMediaTitleChange(const EventType& event_in)
109{
110 if ( !gSavedSettings.getBOOL("ShowStreamTitle") )
111 {
112 return;
113 }
114
115 LLChat chat;
116 //TODO: set this in XUI
117 std::string playing_msg = "Playing: " + event_in.getStringValue();
118 chat.mText = playing_msg;
119 LLFloaterChat::addChat(chat, FALSE, FALSE);
120}
121
122
75// 123//
76// Functions 124// Functions
77// 125//
@@ -406,6 +454,7 @@ void LLOverlayBar::toggleMusicPlay(void*)
406 // if ( gAudiop->isInternetStreamPlaying() == 0 ) 454 // if ( gAudiop->isInternetStreamPlaying() == 0 )
407 { 455 {
408 gAudiop->startInternetStream(parcel->getMusicURL()); 456 gAudiop->startInternetStream(parcel->getMusicURL());
457 sTitleObserver.init(parcel->getMusicURL());
409 } 458 }
410 } 459 }
411 } 460 }
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
index 92978ab..c960d36 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
@@ -15,7 +15,7 @@
15 Streaming Preferences: 15 Streaming Preferences:
16 </text> 16 </text>
17 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 17 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
18 bottom="-280" drop_shadow_visible="true" enabled="true" follows="left|top" 18 bottom="-300" drop_shadow_visible="true" enabled="true" follows="left|top"
19 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 19 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
20 mouse_opaque="true" name="audio_prefs_text" v_pad="0" width="128"> 20 mouse_opaque="true" name="audio_prefs_text" v_pad="0" width="128">
21 Audio Preferences: 21 Audio Preferences:
@@ -28,6 +28,10 @@
28 label="Play Streaming Music When Available (uses more bandwidth)" 28 label="Play Streaming Music When Available (uses more bandwidth)"
29 left="142" mouse_opaque="true" name="streaming_music" radio_style="false" 29 left="142" mouse_opaque="true" name="streaming_music" radio_style="false"
30 width="339" /> 30 width="339" />
31 <check_box bottom_delta="-20" control_name="ShowStreamTitle" enabled="true"
32 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
33 label="Show stream info in chat" left="162" mouse_opaque="true"
34 name="show_stream_title" radio_style="false" width="338" />
31 <check_box bottom_delta="-20" control_name="AudioStreamingVideo" enabled="true" 35 <check_box bottom_delta="-20" control_name="AudioStreamingVideo" enabled="true"
32 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" 36 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
33 label="Play Streaming Media When Available (uses more bandwidth)" 37 label="Play Streaming Media When Available (uses more bandwidth)"