aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-05 18:30:09 -0700
committerMcCabe Maxsted2009-06-05 18:30:09 -0700
commitab324d7f6a9672d1f27481d9c38f9e7dae95be5e (patch)
treecfd49a8b5cbc4b5628a9f3bc25cc2ee51916d09b
parentMenu bar now only changes color for Aditi (diff)
parentMerge branch 'mccabe/next' into next-1.1 (diff)
downloadmeta-impy-ab324d7f6a9672d1f27481d9c38f9e7dae95be5e.zip
meta-impy-ab324d7f6a9672d1f27481d9c38f9e7dae95be5e.tar.gz
meta-impy-ab324d7f6a9672d1f27481d9c38f9e7dae95be5e.tar.bz2
meta-impy-ab324d7f6a9672d1f27481d9c38f9e7dae95be5e.tar.xz
Merged in jacek/next
-rw-r--r--ChangeLog.txt162
-rw-r--r--linden/indra/cmake/GStreamer.cmake14
-rw-r--r--linden/indra/cmake/OPENAL.cmake26
-rw-r--r--linden/indra/llaudio/audioengine_openal.cpp138
-rw-r--r--linden/indra/llaudio/audioengine_openal.h10
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp13
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.h54
-rw-r--r--linden/indra/newview/llagent.cpp41
-rw-r--r--linden/indra/newview/llagent.h12
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp3
-rw-r--r--linden/indra/newview/llinventorybridge.cpp21
-rw-r--r--linden/indra/newview/llinventorybridge.h4
-rw-r--r--linden/indra/newview/llmutelist.cpp38
-rw-r--r--linden/indra/newview/llmutelist.h5
-rw-r--r--linden/indra/newview/llpanelavatar.cpp4
-rw-r--r--linden/indra/newview/llpanellogin.cpp2
-rw-r--r--linden/indra/newview/llviewermenu.cpp18
-rw-r--r--linden/indra/newview/llviewerwindow.cpp21
-rw-r--r--linden/indra/newview/llviewerwindow.h2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/alerts.xml100
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml5
-rwxr-xr-xlinden/indra/newview/viewer_manifest.py5
-rw-r--r--linden/install.xml4
24 files changed, 584 insertions, 128 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 07d6dc5..fe4b0a5 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -30,14 +30,115 @@
30 Menu bar now only changes color for Aditi. 30 Menu bar now only changes color for Aditi.
31 31
32 32
332009-06-01 Jacek Antonelli <jacek.antonelli@gmail.com>
34
35 * Mute in Profile window triggers confirmation dialog too.
36
37 modified: linden/indra/newview/llpanelavatar.cpp
38
39
40 * Added confirmation dialogs for Mute from pie menu.
41 Dialog is for muting avatars and objects from the pie menu only.
42
43 modified: linden/indra/newview/llmutelist.cpp
44 modified: linden/indra/newview/llmutelist.h
45 modified: linden/indra/newview/llviewermenu.cpp
46 modified: linden/indra/newview/skins/default/xui/en-us/alerts.xml
47
48
492009-05-31 Jacek Antonelli <jacek.antonelli@gmail.com>
50
51 * Added a confirmation dialog for Take Off All Clothes.
52
53 modified: linden/indra/newview/llagent.cpp
54 modified: linden/indra/newview/llagent.h
55 modified: linden/indra/newview/skins/default/xui/en-us/alerts.xml
56
57
582009-05-25 Jacek Antonelli <jacek.antonelli@gmail.com>
59
60 * linden/indra/newview/llinventorybridge.cpp (buildContextMenu):
61 Added a separator between Wear and Restore to Last Position.
62 * linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml:
63 Ditto.
64
65
66 * linden/indra/newview/llinventorybridge.cpp:
67 Restore to Last Position has a confirmation dialog now.
68
69
70 * linden/indra/newview/llinventorybridge.cpp:
71 Added Restore to Last Position confirmation and callback methods.
72 LLItemBridge::restoreToWorldConfirm()
73 LLItemBridge::restoreToWorldCallback()
74 * linden/indra/newview/llinventorybridge.h:
75 Ditto.
76
77
78 * linden/indra/newview/skins/default/xui/en-us/alerts.xml:
79 Added ConfirmRestoreToWorld alert text.
80
81
82 * linden/indra/newview/llpanellogin.cpp:
83 User-initiated Toggle Fullscreen has a confirmation dialog now.
84 That's in the View menu and also Alt+Enter at login screen.
85 * linden/indra/newview/llviewermenu.cpp:
86 Ditto.
87
88
89 * linden/indra/newview/llviewerwindow.cpp:
90 Added Toggle Fullscreen confirmation and callback methods.
91 LLViewerWindow::toggleFullscreenConfirm()
92 LLViewerWindow::toggleFullscreenCallback()
93 * linden/indra/newview/llviewerwindow.h (LLWindowCallbacks):
94 Ditto.
95
96
97 * linden/indra/newview/skins/default/xui/en-us/alerts.xml:
98 Added ConfirmToggleFullscreen alert text.
99
100
1012009-05-24 Jacek Antonelli <jacek.antonelli@gmail.com>
102
103 * linden/indra/newview/llfloaterworldmap.cpp:
104 User-initiated Teleport Home has confirmation dialog.
105 That's in the World menu and on the world map.
106 * linden/indra/newview/llviewermenu.cpp:
107 Ditto.
108
109
110 * linden/indra/newview/llagent.cpp:
111 Added Teleport Home confirmation and callback methods.
112 LLAgent::teleportHomeConfirm()
113 LLAgent::teleportHomeCallback()
114 * linden/indra/newview/llagent.h:
115 Ditto.
116
117
118 * linden/indra/newview/llagent.cpp:
119 Moved LLAgent::teleportHome() definition.
120 Was in llagent.h for no good reason, now in llagent.cpp.
121 * linden/indra/newview/llagent.h:
122 Ditto.
123
124
125 * linden/indra/newview/skins/default/xui/en-us/alerts.xml:
126 Added ConfirmTeleportHome alert text.
127
128
1292009-05-16 Jacek Antonelli <jacek.antonelli@gmail.com>
130
131 * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml:
132 Reverted Ctrl-D shortcut back to Edit > Duplicate.
133 No longer World > Create Landmark Here.
134
135
332009-04-28 McCabe Maxsted <hakushakukun@gmail.com> 1362009-04-28 McCabe Maxsted <hakushakukun@gmail.com>
34 137
35 * linden/install.xml: 138 * linden/install.xml:
36 Fixed gstreamer plugins windows library. 139 Fixed gstreamer plugins windows library.
37 140
38 141
392009-04-28 McCabe Maxsted <hakushakukun@gmail.com>
40
41 * linden/indra/cmake/CopyWinLibs.cmake: 142 * linden/indra/cmake/CopyWinLibs.cmake:
42 Updated copy_win_libs for 1.1 RC3. 143 Updated copy_win_libs for 1.1 RC3.
43 144
@@ -50,6 +151,43 @@
50 Ditto. 151 Ditto.
51 152
52 153
1542009-04-20 Jacek Antonelli <jacek.antonelli@gmail.com>
155
156 * linden/indra/llaudio/audioengine_openal.cpp:
157 Imported GreenLife Emerald Viewer's OpenAL code. It works!
158 * linden/indra/llaudio/audioengine_openal.h:
159 Ditto.
160
161
162 * linden/indra/newview/viewer_manifest.py:
163 We'll use libopenal.1.dylib after all (yet again).
164
165
166 * linden/indra/cmake/OPENAL.cmake:
167 Help (force) Mac find the right OpenAL lib and header dir.
168
169
170 * linden/install.xml:
171 Mac viewer uses Thomas Shikami's OpenAL libs.
172
173
1742009-04-18 Jacek Antonelli <jacek.antonelli@gmail.com>
175
176 * linden/indra/llmedia/llmediaimplgstreamer.h:
177 LLMediaImplGStreamer::startPlay() is protected, LLGstPlayThread friend.
178
179 * linden/indra/llmedia/llmediaimplgstreamer.cpp:
180 Removed redundant play() from LLMediaImplGStreamer::navigateTo().
181
182
183 * linden/indra/llmedia/llmediaimplgstreamer.cpp:
184 LLMediaImplGStreamer::play() is no-op if already playing.
185
186
187 * linden/indra/llmedia/llmediaimplgstreamer.cpp:
188 Removed some useless code from LLMediaImplGStreamer::startPlay().
189
190
532009-04-17 McCabe Maxsted <hakushakukun@gmail.com> 1912009-04-17 McCabe Maxsted <hakushakukun@gmail.com>
54 192
55 * linden/indra/llmedia/llmediaimplgstreamer.cpp: 193 * linden/indra/llmedia/llmediaimplgstreamer.cpp:
@@ -64,6 +202,26 @@
64 Updated Windows libpng url. 202 Updated Windows libpng url.
65 203
66 204
2052009-04-10 Jacek Antonelli <jacek.antonelli@gmail.com>
206
207 * linden/indra/newview/viewer_manifest.py:
208 Added libneon to Mac manifest.
209
210
211 * linden/indra/cmake/OPENAL.cmake:
212 Help Mac find the right libalut.0.dylib.
213
214
215 * linden/indra/cmake/GStreamer.cmake:
216 Help Mac find the right libxml2.2.dylib.
217
218
219 * linden/indra/newview/viewer_manifest.py:
220 Tweaked Mac lib manifest.
221 Removed pango, commented out libopenal, added libxml2.
222
223
224
672009-04-06 Jacek Antonelli <jacek.antonelli@gmail.com> 2252009-04-06 Jacek Antonelli <jacek.antonelli@gmail.com>
68 226
69 * linden/indra/llmedia/llmediaimplgstreamer.cpp: 227 * linden/indra/llmedia/llmediaimplgstreamer.cpp:
diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake
index c1bbc57..880233e 100644
--- a/linden/indra/cmake/GStreamer.cmake
+++ b/linden/indra/cmake/GStreamer.cmake
@@ -64,6 +64,18 @@ else (WINDOWS)
64 64
65 if (DARWIN) 65 if (DARWIN)
66 66
67 find_library( XML2_LIB
68 NAMES xml2.2
69 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
70 NO_DEFAULT_PATH
71 DOC "libxml2 dynamic library / shared object" )
72
73 if (NOT XML2_LIB)
74 message(FATAL_ERROR "libxml2 not found!")
75 else (NOT XML2_LIB)
76 #message(STATUS "libxml2 found: ${XML2_LIB}")
77 endif (NOT XML2_LIB)
78
67 set(GSTREAMER_LIBRARIES 79 set(GSTREAMER_LIBRARIES
68 gstvideo-0.10 80 gstvideo-0.10
69 gstaudio-0.10 81 gstaudio-0.10
@@ -73,7 +85,7 @@ else (WINDOWS)
73 gmodule-2.0 85 gmodule-2.0
74 gthread-2.0 86 gthread-2.0
75 glib-2.0 87 glib-2.0
76 xml2 88 ${XML2_LIB}
77 ) 89 )
78 90
79 else (DARWIN) 91 else (DARWIN)
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
index f06a38e..94fa75d 100644
--- a/linden/indra/cmake/OPENAL.cmake
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -1,5 +1,8 @@
1# -*- cmake -*- 1# -*- cmake -*-
2 2
3include(Variables)
4include(Linking)
5
3set(OPENAL ON CACHE BOOL "Enable OpenAL") 6set(OPENAL ON CACHE BOOL "Enable OpenAL")
4 7
5 8
@@ -17,8 +20,9 @@ if (OPENAL)
17 elseif (DARWIN) 20 elseif (DARWIN)
18 # Look for for system's OpenAL.framework 21 # Look for for system's OpenAL.framework
19 find_library(OPENAL_LIB 22 find_library(OPENAL_LIB
20 NAMES OpenAL openal 23 NAMES openal.1
21 PATHS ${ARCH_PREBUILT_DIRS_RELEASE} 24 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
25 NO_DEFAULT_PATH
22 ) 26 )
23 else (WINDOWS) 27 else (WINDOWS)
24 set(OPENAL_LIB openal) 28 set(OPENAL_LIB openal)
@@ -34,10 +38,14 @@ if (OPENAL)
34 38
35 # OPENAL_INCLUDE_DIR 39 # OPENAL_INCLUDE_DIR
36 40
37 find_path(OPENAL_INCLUDE_DIR 41 if (DARWIN)
38 NAMES al.h 42 set(OPENAL_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/AL")
39 PATHS ${LIBS_PREBUILT_DIR}/include/AL 43 else (DARWIN)
40 ) 44 find_path(OPENAL_INCLUDE_DIR
45 NAMES al.h
46 PATHS ${LIBS_PREBUILT_DIR}/include/AL
47 )
48 endif (DARWIN)
41 49
42 if (NOT OPENAL_INCLUDE_DIR) 50 if (NOT OPENAL_INCLUDE_DIR)
43 message(FATAL_ERROR "al.h not found!") 51 message(FATAL_ERROR "al.h not found!")
@@ -54,7 +62,13 @@ if (OPENAL)
54 NAMES alut freealut 62 NAMES alut freealut
55 PATHS ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release 63 PATHS ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release
56 ) 64 )
57 else (WINDOWS) 65 elseif (DARWIN)
66 find_library( ALUT_LIB
67 NAMES alut.0
68 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
69 NO_DEFAULT_PATH
70 )
71 else (WINDOWS)
58 set(ALUT_LIB alut) 72 set(ALUT_LIB alut)
59 endif (WINDOWS) 73 endif (WINDOWS)
60 74
diff --git a/linden/indra/llaudio/audioengine_openal.cpp b/linden/indra/llaudio/audioengine_openal.cpp
index 6d9a242..a14b725 100644
--- a/linden/indra/llaudio/audioengine_openal.cpp
+++ b/linden/indra/llaudio/audioengine_openal.cpp
@@ -5,7 +5,7 @@
5 * 5 *
6 * $LicenseInfo:firstyear=2002&license=viewergpl$ 6 * $LicenseInfo:firstyear=2002&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2002-2008, Linden Research, Inc. 8 * Copyright (c) 2002-2009, Linden Research, Inc.
9 * 9 *
10 * Second Life Viewer Source Code 10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab 11 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -36,6 +36,7 @@
36#include "audioengine_openal.h" 36#include "audioengine_openal.h"
37#include "listener_openal.h" 37#include "listener_openal.h"
38 38
39
39LLAudioEngine_OpenAL::LLAudioEngine_OpenAL() 40LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
40 : 41 :
41 mWindGen(NULL), 42 mWindGen(NULL),
@@ -53,41 +54,67 @@ LLAudioEngine_OpenAL::~LLAudioEngine_OpenAL()
53{ 54{
54} 55}
55 56
57static ALboolean alutInitHelp(const char **errorstring)
58{
59 ALboolean result = AL_FALSE;
60 ALenum err = AL_NO_ERROR;
61#if LL_WINDOWS
62 __try {
63 result = alutInit(NULL, NULL);
64 err = alutGetError();
65 alGetError(); // hit loading of wrap_oal.dll
66 if(!result) *errorstring = alutGetErrorString(err);
67 } __except( EXCEPTION_EXECUTE_HANDLER ) {
68 *errorstring = "[Exception]";
69 result = AL_FALSE;
70 }
71 return result;
72#else
73 result = alutInit(NULL, NULL);
74 if(!result) {
75 err = alutGetError();
76 *errorstring = alutGetErrorString(err);
77 }
78 return result;
79#endif
80}
81
56// virtual 82// virtual
57bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata) 83bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata)
58{ 84{
85 const char *errorstring = "(null)";
59 mWindGen = NULL; 86 mWindGen = NULL;
60 LLAudioEngine::init(num_channels, userdata); 87 LLAudioEngine::init(num_channels, userdata);
61 88
62 if(!alutInit(NULL, NULL)) 89 if(!alutInitHelp(&errorstring))
63 { 90 {
64 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; 91 llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << errorstring << llendl;
65 return false; 92 return false;
66 } 93 }
67 94
68 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL; 95 llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl;
69 96
70 LL_INFOS("OpenAL") << "OpenAL version: " 97 llinfos << "OpenAL version: "
71 << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL; 98 << ll_safe_string(alGetString(AL_VERSION)) << llendl;
72 LL_INFOS("OpenAL") << "OpenAL vendor: " 99 llinfos << "OpenAL vendor: "
73 << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL; 100 << ll_safe_string(alGetString(AL_VENDOR)) << llendl;
74 LL_INFOS("OpenAL") << "OpenAL renderer: " 101 llinfos << "OpenAL renderer: "
75 << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL; 102 << ll_safe_string(alGetString(AL_RENDERER)) << llendl;
76 103
77 ALint major = alutGetMajorVersion (); 104 ALint major = alutGetMajorVersion ();
78 ALint minor = alutGetMinorVersion (); 105 ALint minor = alutGetMinorVersion ();
79 LL_INFOS("OpenAL") << "ALUT version: " << major << "." << minor << LL_ENDL; 106 llinfos << "ALUT version: " << major << "." << minor << llendl;
80 107
81 ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); 108 ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext());
82 109
83 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major); 110 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major);
84 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor); 111 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor);
85 LL_INFOS("OpenAL") << "ALC version: " << major << "." << minor << LL_ENDL; 112 llinfos << "ALC version: " << major << "." << minor << llendl;
86 113
87 LL_INFOS("OpenAL") << "ALC default device: " 114 llinfos << "ALC default device: "
88 << ll_safe_string(alcGetString(device, 115 << ll_safe_string(alcGetString(device,
89 ALC_DEFAULT_DEVICE_SPECIFIER)) 116 ALC_DEFAULT_DEVICE_SPECIFIER))
90 << LL_ENDL; 117 << llendl;
91 118
92 return true; 119 return true;
93} 120}
@@ -127,24 +154,24 @@ void LLAudioEngine_OpenAL::allocateListener()
127 mListenerp = (LLListener *) new LLListener_OpenAL(); 154 mListenerp = (LLListener *) new LLListener_OpenAL();
128 if(!mListenerp) 155 if(!mListenerp)
129 { 156 {
130 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL; 157 llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl;
131 } 158 }
132} 159}
133 160
134// virtual 161// virtual
135void LLAudioEngine_OpenAL::shutdown() 162void LLAudioEngine_OpenAL::shutdown()
136{ 163{
137 LL_INFOS("OpenAL") << "About to LLAudioEngine::shutdown()" << LL_ENDL; 164 llinfos << "About to LLAudioEngine::shutdown()" << llendl;
138 LLAudioEngine::shutdown(); 165 LLAudioEngine::shutdown();
139 166
140 LL_INFOS("OpenAL") << "About to alutExit()" << LL_ENDL; 167 llinfos << "About to alutExit()" << llendl;
141 if(!alutExit()) 168 if(!alutExit())
142 { 169 {
143 LL_WARNS("OpenAL") << "Nuts." << LL_ENDL; 170 llwarns << "Nuts." << llendl;
144 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; 171 llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl;
145 } 172 }
146 173
147 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL; 174 llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
148 175
149 delete mListenerp; 176 delete mListenerp;
150 mListenerp = NULL; 177 mListenerp = NULL;
@@ -162,7 +189,7 @@ LLAudioChannel *LLAudioEngine_OpenAL::createChannel()
162 189
163void LLAudioEngine_OpenAL::setInternalGain(F32 gain) 190void LLAudioEngine_OpenAL::setInternalGain(F32 gain)
164{ 191{
165 //LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL; 192 //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl;
166 alListenerf(AL_GAIN, gain); 193 alListenerf(AL_GAIN, gain);
167} 194}
168 195
@@ -172,17 +199,6 @@ LLAudioChannelOpenAL::LLAudioChannelOpenAL()
172 mLastSamplePos(0) 199 mLastSamplePos(0)
173{ 200{
174 alGenSources(1, &mALSource); 201 alGenSources(1, &mALSource);
175
176 if( mALSource == AL_NONE )
177 {
178 ALenum error = alGetError();
179 if( error == AL_NO_ERROR )
180 {
181 LL_WARNS("OpenAL") << "LLAudioChannelOpenAL::LLAudioChannelOpenAL() Could not generate mALSource, but no error is indicated!" << LL_ENDL;
182 }
183 LL_WARNS("OpenAL") << "LLAudioChannelOpenAL::LLAudioChannelOpenAL() Could not generate mALSource: (" << error << ") " << alGetString( error ) << LL_ENDL;
184 }
185
186} 202}
187 203
188LLAudioChannelOpenAL::~LLAudioChannelOpenAL() 204LLAudioChannelOpenAL::~LLAudioChannelOpenAL()
@@ -201,7 +217,7 @@ void LLAudioChannelOpenAL::play()
201{ 217{
202 if (mALSource == AL_NONE) 218 if (mALSource == AL_NONE)
203 { 219 {
204 LL_WARNS("OpenAL") << "Playing without a mALSource, aborting" << LL_ENDL; 220 llwarns << "Playing without a mALSource, aborting" << llendl;
205 return; 221 return;
206 } 222 }
207 223
@@ -226,8 +242,8 @@ void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp)
226 alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET, 242 alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET,
227 &master_offset); 243 &master_offset);
228 244
229 LL_INFOS("OpenAL") << "Syncing with master at " << master_offset 245 llinfos << "Syncing with master at " << master_offset
230 << "sec" << LL_ENDL; 246 << "sec" << llendl;
231 // *TODO: detect when this fails, maybe use AL_SAMPLE_ 247 // *TODO: detect when this fails, maybe use AL_SAMPLE_
232 alSourcef(mALSource, AL_SEC_OFFSET, master_offset); 248 alSourcef(mALSource, AL_SEC_OFFSET, master_offset);
233 } 249 }
@@ -309,14 +325,12 @@ void LLAudioChannelOpenAL::update3DPosition()
309 { 325 {
310 alSource3f(mALSource, AL_POSITION, 0.0, 0.0, 0.0); 326 alSource3f(mALSource, AL_POSITION, 0.0, 0.0, 0.0);
311 alSource3f(mALSource, AL_VELOCITY, 0.0, 0.0, 0.0); 327 alSource3f(mALSource, AL_VELOCITY, 0.0, 0.0, 0.0);
312 //alSource3f(mALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
313 alSourcei (mALSource, AL_SOURCE_RELATIVE, AL_TRUE); 328 alSourcei (mALSource, AL_SOURCE_RELATIVE, AL_TRUE);
314 } else { 329 } else {
315 LLVector3 float_pos; 330 LLVector3 float_pos;
316 float_pos.setVec(mCurrentSourcep->getPositionGlobal()); 331 float_pos.setVec(mCurrentSourcep->getPositionGlobal());
317 alSourcefv(mALSource, AL_POSITION, float_pos.mV); 332 alSourcefv(mALSource, AL_POSITION, float_pos.mV);
318 alSourcefv(mALSource, AL_VELOCITY, mCurrentSourcep->getVelocity().mV); 333 alSourcefv(mALSource, AL_VELOCITY, mCurrentSourcep->getVelocity().mV);
319 //alSource3f(mALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
320 alSourcei (mALSource, AL_SOURCE_RELATIVE, AL_FALSE); 334 alSourcei (mALSource, AL_SOURCE_RELATIVE, AL_FALSE);
321 } 335 }
322 336
@@ -351,18 +365,18 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename)
351 ALenum error = alutGetError(); 365 ALenum error = alutGetError();
352 if (gDirUtilp->fileExists(filename)) 366 if (gDirUtilp->fileExists(filename))
353 { 367 {
354 LL_WARNS("OpenAL") << 368 llwarns <<
355 "LLAudioBufferOpenAL::loadWAV() Error loading " 369 "LLAudioBufferOpenAL::loadWAV() Error loading "
356 << filename 370 << filename
357 << " " << alutGetErrorString(error) << LL_ENDL; 371 << " " << alutGetErrorString(error) << llendl;
358 } 372 }
359 else 373 else
360 { 374 {
361 // It's common for the file to not actually exist. 375 // It's common for the file to not actually exist.
362 //LL_DEBUGS("OpenAL") << 376 lldebugs <<
363 // "LLAudioBufferOpenAL::loadWAV() Error loading " 377 "LLAudioBufferOpenAL::loadWAV() Error loading "
364 // << filename 378 << filename
365 // << " " << alutGetErrorString(error) << LL_ENDL; 379 << " " << alutGetErrorString(error) << llendl;
366 } 380 }
367 return false; 381 return false;
368 } 382 }
@@ -378,7 +392,7 @@ U32 LLAudioBufferOpenAL::getLength()
378 } 392 }
379 ALint length; 393 ALint length;
380 alGetBufferi(mALBuffer, AL_SIZE, &length); 394 alGetBufferi(mALBuffer, AL_SIZE, &length);
381 return length >> 2; 395 return length / 2; // convert size in bytes to size in (16-bit) samples
382} 396}
383 397
384// ------------ 398// ------------
@@ -386,7 +400,7 @@ U32 LLAudioBufferOpenAL::getLength()
386void LLAudioEngine_OpenAL::initWind() 400void LLAudioEngine_OpenAL::initWind()
387{ 401{
388 ALenum error; 402 ALenum error;
389 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL; 403 llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl;
390 404
391 mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS; 405 mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS;
392 406
@@ -396,11 +410,10 @@ void LLAudioEngine_OpenAL::initWind()
396 410
397 if((error=alGetError()) != AL_NO_ERROR) 411 if((error=alGetError()) != AL_NO_ERROR)
398 { 412 {
399 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<LL_ENDL; 413 llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<llendl;
400 } 414 }
401 415
402 mWindGen = new LLWindGen<WIND_SAMPLE_T>; 416 mWindGen = new LLWindGen<WIND_SAMPLE_T>;
403 const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec
404 417
405 mWindBufFreq = mWindGen->getInputSamplingRate(); 418 mWindBufFreq = mWindGen->getInputSamplingRate();
406 mWindBufSamples = llceil(mWindBufFreq * WIND_BUFFER_SIZE_SEC); 419 mWindBufSamples = llceil(mWindBufFreq * WIND_BUFFER_SIZE_SEC);
@@ -410,22 +423,22 @@ void LLAudioEngine_OpenAL::initWind()
410 423
411 if(mWindBuf==NULL) 424 if(mWindBuf==NULL)
412 { 425 {
413 LL_ERRS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL; 426 llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl;
414 mEnableWind=false; 427 mEnableWind=false;
415 } 428 }
416 429
417 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL; 430 llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl;
418} 431}
419 432
420void LLAudioEngine_OpenAL::cleanupWind() 433void LLAudioEngine_OpenAL::cleanupWind()
421{ 434{
422 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL; 435 llinfos << "LLAudioEngine_OpenAL::cleanupWind()" << llendl;
423 436
424 if (mWindSource != AL_NONE) 437 if (mWindSource != AL_NONE)
425 { 438 {
426 // detach and delete all outstanding buffers on the wind source 439 // detach and delete all outstanding buffers on the wind source
427 alSourceStop(mWindSource); 440 alSourceStop(mWindSource);
428 int processed; 441 ALint processed;
429 alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed); 442 alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed);
430 while (processed--) 443 while (processed--)
431 { 444 {
@@ -485,7 +498,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
485 498
486 // ok lets make a wind buffer now 499 // ok lets make a wind buffer now
487 500
488 int processed, queued, unprocessed; 501 ALint processed, queued, unprocessed;
489 alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed); 502 alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed);
490 alGetSourcei(mWindSource, AL_BUFFERS_QUEUED, &queued); 503 alGetSourcei(mWindSource, AL_BUFFERS_QUEUED, &queued);
491 unprocessed = queued - processed; 504 unprocessed = queued - processed;
@@ -495,18 +508,18 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
495 mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed); 508 mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed);
496 mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); 509 mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
497 510
498 //LL_INFOS("OpenAL") << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL; 511 //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl;
499 512
500 while(processed--) // unqueue old buffers 513 while(processed--) // unqueue old buffers
501 { 514 {
502 ALuint buffer; 515 ALuint buffer;
503 int error; 516 ALenum error;
504 alGetError(); /* clear error */ 517 alGetError(); /* clear error */
505 alSourceUnqueueBuffers(mWindSource, 1, &buffer); 518 alSourceUnqueueBuffers(mWindSource, 1, &buffer);
506 error = alGetError(); 519 error = alGetError();
507 if(error != AL_NO_ERROR) 520 if(error != AL_NO_ERROR)
508 { 521 {
509 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL; 522 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
510 } 523 }
511 else 524 else
512 { 525 {
@@ -522,7 +535,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
522 alGenBuffers(1,&buffer); 535 alGenBuffers(1,&buffer);
523 if((error=alGetError()) != AL_NO_ERROR) 536 if((error=alGetError()) != AL_NO_ERROR)
524 { 537 {
525 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << LL_ENDL; 538 llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl;
526 break; 539 break;
527 } 540 }
528 541
@@ -534,22 +547,27 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
534 mWindBufFreq); 547 mWindBufFreq);
535 error = alGetError(); 548 error = alGetError();
536 if(error != AL_NO_ERROR) 549 if(error != AL_NO_ERROR)
537 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL; 550 {
551 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl;
552 }
538 553
539 alSourceQueueBuffers(mWindSource, 1, &buffer); 554 alSourceQueueBuffers(mWindSource, 1, &buffer);
540 error = alGetError(); 555 error = alGetError();
541 if(error != AL_NO_ERROR) 556 if(error != AL_NO_ERROR)
542 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL; 557 {
558 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl;
559 }
543 560
544 --mNumEmptyWindALBuffers; 561 --mNumEmptyWindALBuffers;
545 } 562 }
546 563
547 int playing; 564 ALint playing;
548 alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing); 565 alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing);
549 if(playing != AL_PLAYING) 566 if(playing != AL_PLAYING)
550 { 567 {
551 alSourcePlay(mWindSource); 568 alSourcePlay(mWindSource);
552 569
553 LL_INFOS("OpenAL") << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL; 570 lldebugs << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl;
554 } 571 }
555} 572}
573
diff --git a/linden/indra/llaudio/audioengine_openal.h b/linden/indra/llaudio/audioengine_openal.h
index 1f6dee4..70de9d4 100644
--- a/linden/indra/llaudio/audioengine_openal.h
+++ b/linden/indra/llaudio/audioengine_openal.h
@@ -6,7 +6,7 @@
6 * 6 *
7 * $LicenseInfo:firstyear=2002&license=viewergpl$ 7 * $LicenseInfo:firstyear=2002&license=viewergpl$
8 * 8 *
9 * Copyright (c) 2002-2008, Linden Research, Inc. 9 * Copyright (c) 2002-2009, Linden Research, Inc.
10 * 10 *
11 * Second Life Viewer Source Code 11 * Second Life Viewer Source Code
12 * The source code in this file ("Source Code") is provided by Linden Lab 12 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -39,6 +39,11 @@
39#include "listener_openal.h" 39#include "listener_openal.h"
40#include "windgen.h" 40#include "windgen.h"
41 41
42#if 1
43#define WIND_BUFFER_SIZE_SEC 0.05f
44#endif
45
46
42class LLAudioEngine_OpenAL : public LLAudioEngine 47class LLAudioEngine_OpenAL : public LLAudioEngine
43{ 48{
44 public: 49 public:
@@ -72,6 +77,9 @@ class LLAudioEngine_OpenAL : public LLAudioEngine
72 int mNumEmptyWindALBuffers; 77 int mNumEmptyWindALBuffers;
73 78
74 static const int MAX_NUM_WIND_BUFFERS = 80; 79 static const int MAX_NUM_WIND_BUFFERS = 80;
80#if 0
81 static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec
82#endif
75}; 83};
76 84
77class LLAudioChannelOpenAL : public LLAudioChannel 85class LLAudioChannelOpenAL : public LLAudioChannel
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 5978ba3..98f53ca 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -591,9 +591,6 @@ bool LLMediaImplGStreamer::navigateTo (const std::string urlIn)
591 591
592 mState = GST_STATE_READY; 592 mState = GST_STATE_READY;
593 593
594 // navigateTo implicitly plays, too.
595 play();
596
597 return true; 594 return true;
598} 595}
599 596
@@ -792,6 +789,13 @@ bool LLMediaImplGStreamer::play()
792 if (!mPlaybin || mState == GST_STATE_NULL) 789 if (!mPlaybin || mState == GST_STATE_NULL)
793 return true; 790 return true;
794 791
792
793 if( getState() == GST_STATE_PLAYING )
794 {
795 LL_DEBUGS("MediaImpl") << "... but already playing." << LL_ENDL;
796 return true;
797 }
798
795 // Clean up the existing thread, if any. 799 // Clean up the existing thread, if any.
796 if( mPlayThread != NULL && mPlayThread->isStopped()) 800 if( mPlayThread != NULL && mPlayThread->isStopped())
797 { 801 {
@@ -813,9 +817,6 @@ bool LLMediaImplGStreamer::play()
813 817
814void LLMediaImplGStreamer::startPlay() 818void LLMediaImplGStreamer::startPlay()
815{ 819{
816 GstElement *pipeline = (GstElement *)gst_object_ref(GST_OBJECT(mPlaybin));
817 gst_object_unref(pipeline);
818
819 GstStateChangeReturn state_change; 820 GstStateChangeReturn state_change;
820 821
821 state_change = gst_element_set_state(mPlaybin, GST_STATE_PLAYING); 822 state_change = gst_element_set_state(mPlaybin, GST_STATE_PLAYING);
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h
index 32e6bd1..d1566e3 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.h
+++ b/linden/indra/llmedia/llmediaimplgstreamer.h
@@ -57,6 +57,8 @@ class LLMediaImplMaker;
57class LLMediaImplGStreamer: 57class LLMediaImplGStreamer:
58 public LLMediaImplCommon 58 public LLMediaImplCommon
59{ 59{
60 friend class LLGstPlayThread;
61
60 public: 62 public:
61 LLMediaImplGStreamer (); 63 LLMediaImplGStreamer ();
62 virtual ~LLMediaImplGStreamer (); 64 virtual ~LLMediaImplGStreamer ();
@@ -95,33 +97,35 @@ class LLMediaImplGStreamer:
95 /* virtual */ int getTextureFormatType() const; 97 /* virtual */ int getTextureFormatType() const;
96 /* virtual */ int getTextureFormatInternal() const; 98 /* virtual */ int getTextureFormatInternal() const;
97 /* virtual */ bool seek( double time ); 99 /* virtual */ bool seek( double time );
98 /* virtual */ bool setVolume( float volume ); 100 /* virtual */ bool setVolume( float volume );
99 101
100 void startPlay(); 102 LLMediaEmitter< LLMediaObserver > getEventEmitter() const {return mEventEmitter;};
101 103
104 protected:
105
106 void startPlay();
102 107
103 LLMediaEmitter< LLMediaObserver > getEventEmitter() const {return mEventEmitter;};
104 108
105 private: 109 private:
106 110
107 // misc 111 // misc
108 bool unload(); 112 bool unload();
109 bool pause(); 113 bool pause();
110 bool stop(); 114 bool stop();
111 bool play(); 115 bool play();
112 116
113 static gboolean bus_callback (GstBus *bus, 117 static gboolean bus_callback (GstBus *bus,
114 GstMessage *message, 118 GstMessage *message,
115 gpointer data); 119 gpointer data);
116 unsigned char* mediaData;
117 int mMediaRowbytes;
118 120
119 int mTextureFormatPrimary; 121 unsigned char* mediaData;
120 int mTextureFormatType; 122 int mMediaRowbytes;
123 int mTextureFormatPrimary;
124 int mTextureFormatType;
121 125
122 // GStreamer-specific 126 // GStreamer-specific
123 GMainLoop *mPump; // event pump for this media 127 GMainLoop *mPump; // event pump for this media
124 GstElement *mPlaybin; 128 GstElement *mPlaybin;
125 GstSLVideo *mVideoSink; 129 GstSLVideo *mVideoSink;
126 GstState mState; 130 GstState mState;
127 GstState getState() const { return mState; } 131 GstState getState() const { return mState; }
@@ -131,12 +135,12 @@ class LLMediaImplGStreamer:
131 135
132class LLMediaImplGStreamerMaker : public LLMediaImplMaker 136class LLMediaImplGStreamerMaker : public LLMediaImplMaker
133{ 137{
134public: 138 public:
135 LLMediaImplGStreamerMaker(); 139 LLMediaImplGStreamerMaker();
136 LLMediaImplGStreamer* create() 140 LLMediaImplGStreamer* create()
137 { 141 {
138 return new LLMediaImplGStreamer(); 142 return new LLMediaImplGStreamer();
139 } 143 }
140}; 144};
141 145
142///////////////////////////////////////////////////////////////////////// 146/////////////////////////////////////////////////////////////////////////
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index d268397..8c4e8b3 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -5926,6 +5926,28 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
5926 } 5926 }
5927} 5927}
5928 5928
5929
5930void LLAgent::teleportHome()
5931{
5932 teleportViaLandmark(LLUUID::null);
5933}
5934
5935void LLAgent::teleportHomeConfirm()
5936{
5937 gViewerWindow->alertXml("ConfirmTeleportHome", LLAgent::teleportHomeCallback, (void *)this);
5938}
5939
5940// static
5941void LLAgent::teleportHomeCallback(S32 option, void *userdata)
5942{
5943 if( option == 0 )
5944 {
5945 // They confirmed it. Here we go!
5946 ((LLAgent *) userdata)->teleportHome();
5947 }
5948}
5949
5950
5929void LLAgent::setTeleportState(ETeleportState state) 5951void LLAgent::setTeleportState(ETeleportState state)
5930{ 5952{
5931 mTeleportState = state; 5953 mTeleportState = state;
@@ -7410,6 +7432,25 @@ void LLAgent::userRemoveWearable( void* userdata )
7410 } 7432 }
7411} 7433}
7412 7434
7435
7436// static
7437void LLAgent::userRemoveAllClothesConfirm()
7438{
7439 gViewerWindow->alertXml("ConfirmRemoveAllClothes",
7440 LLAgent::userRemoveAllClothesCallback, NULL);
7441}
7442
7443// static
7444void LLAgent::userRemoveAllClothesCallback(S32 option, void *userdata)
7445{
7446 if( option == 0 )
7447 {
7448 // They confirmed it. Here we go!
7449 LLAgent::userRemoveAllClothes(NULL);
7450 }
7451}
7452
7453
7413void LLAgent::userRemoveAllClothes( void* userdata ) 7454void LLAgent::userRemoveAllClothes( void* userdata )
7414{ 7455{
7415 // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. 7456 // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h
index 97f9aed..4d24aee 100644
--- a/linden/indra/newview/llagent.h
+++ b/linden/indra/newview/llagent.h
@@ -462,7 +462,9 @@ public:
462 void teleportViaLandmark(const LLUUID& landmark_id); 462 void teleportViaLandmark(const LLUUID& landmark_id);
463 463
464 // go home 464 // go home
465 void teleportHome() { teleportViaLandmark(LLUUID::null); } 465 void teleportHome();
466 void teleportHomeConfirm();
467 static void teleportHomeCallback(S32 option, void *userdata);
466 468
467 // to an invited location 469 // to an invited location
468 void teleportViaLure(const LLUUID& lure_id, BOOL godlike); 470 void teleportViaLure(const LLUUID& lure_id, BOOL godlike);
@@ -666,8 +668,12 @@ public:
666 static void stopFidget(); 668 static void stopFidget();
667 static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); 669 static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data);
668 static void userRemoveWearable( void* userdata ); // userdata is EWearableType 670 static void userRemoveWearable( void* userdata ); // userdata is EWearableType
669 static void userRemoveAllClothes( void* userdata ); // userdata is NULL 671
670 static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL 672 static void userRemoveAllClothesConfirm();
673 static void userRemoveAllClothesCallback(S32 option, void *userdata);
674 static void userRemoveAllClothes( void* userdata ); // userdata is NULL
675 static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL
676
671 static void userRemoveAllAttachments( void* userdata); // userdata is NULL 677 static void userRemoveAllAttachments( void* userdata); // userdata is NULL
672 static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType 678 static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType
673 679
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp
index 8396454..66b2813 100644
--- a/linden/indra/newview/llfloaterworldmap.cpp
+++ b/linden/indra/newview/llfloaterworldmap.cpp
@@ -1052,8 +1052,7 @@ void LLFloaterWorldMap::onPanBtn( void* userdata )
1052// static 1052// static
1053void LLFloaterWorldMap::onGoHome(void*) 1053void LLFloaterWorldMap::onGoHome(void*)
1054{ 1054{
1055 gAgent.teleportHome(); 1055 gAgent.teleportHomeConfirm();
1056 gFloaterWorldMap->close();
1057} 1056}
1058 1057
1059 1058
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index 34277f7..7af8c89 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -758,7 +758,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
758 } 758 }
759 else if ("restoreToWorld" == action) 759 else if ("restoreToWorld" == action)
760 { 760 {
761 restoreToWorld(); 761 restoreToWorldConfirm();
762 } 762 }
763 else if ("restore" == action) 763 else if ("restore" == action)
764 { 764 {
@@ -816,6 +816,24 @@ void LLItemBridge::restoreItem()
816 } 816 }
817} 817}
818 818
819
820// virtual
821void LLItemBridge::restoreToWorldConfirm()
822{
823 gViewerWindow->alertXml("ConfirmRestoreToWorld", LLItemBridge::restoreToWorldCallback, (void *)this);
824}
825
826// static
827void LLItemBridge::restoreToWorldCallback(S32 option, void *userdata)
828{
829 if( option == 0 )
830 {
831 // They confirmed it. Here we go!
832 ((LLItemBridge *) userdata)->restoreToWorld();
833 }
834}
835
836// virtual
819void LLItemBridge::restoreToWorld() 837void LLItemBridge::restoreToWorld()
820{ 838{
821 LLViewerInventoryItem* itemp = (LLViewerInventoryItem*)getItem(); 839 LLViewerInventoryItem* itemp = (LLViewerInventoryItem*)getItem();
@@ -3421,6 +3439,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3421 items.push_back(std::string("Object Wear")); 3439 items.push_back(std::string("Object Wear"));
3422 items.push_back(std::string("Attach To")); 3440 items.push_back(std::string("Attach To"));
3423 items.push_back(std::string("Attach To HUD")); 3441 items.push_back(std::string("Attach To HUD"));
3442 items.push_back(std::string("RestoreToWorld Separator"));
3424 items.push_back(std::string("Restore to Last Position")); 3443 items.push_back(std::string("Restore to Last Position"));
3425 3444
3426 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE); 3445 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE);
diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h
index eb17432..a4f59fe 100644
--- a/linden/indra/newview/llinventorybridge.h
+++ b/linden/indra/newview/llinventorybridge.h
@@ -244,7 +244,11 @@ public:
244 244
245 virtual void selectItem(); 245 virtual void selectItem();
246 virtual void restoreItem(); 246 virtual void restoreItem();
247
247 virtual void restoreToWorld(); 248 virtual void restoreToWorld();
249 virtual void restoreToWorldConfirm();
250 static void restoreToWorldCallback(S32 option, void *userdata);
251
248 252
249 virtual LLUIImagePtr getIcon() const; 253 virtual LLUIImagePtr getIcon() const;
250 virtual const std::string& getDisplayName() const; 254 virtual const std::string& getDisplayName() const;
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp
index 0cdfe83..00ef9c3 100644
--- a/linden/indra/newview/llmutelist.cpp
+++ b/linden/indra/newview/llmutelist.cpp
@@ -64,6 +64,7 @@
64#include "llworld.h" //for particle system banning 64#include "llworld.h" //for particle system banning
65#include "llchat.h" 65#include "llchat.h"
66#include "llfloaterchat.h" 66#include "llfloaterchat.h"
67#include "llfloatermute.h"
67#include "llimpanel.h" 68#include "llimpanel.h"
68#include "llimview.h" 69#include "llimview.h"
69#include "llnotify.h" 70#include "llnotify.h"
@@ -245,6 +246,43 @@ BOOL LLMuteList::isLinden(const std::string& name) const
245} 246}
246 247
247 248
249void LLMuteList::addMuteAgentConfirm( const LLMute &mute )
250{
251 LLMute *newmute = new LLMute(mute);
252
253 LLStringUtil::format_map_t args;
254 args["[NAME]"] = newmute->mName;
255
256 gViewerWindow->alertXml("ConfirmMuteAgent", args,
257 LLMuteList::addMuteCallback,
258 static_cast<void*>(newmute));
259}
260
261void LLMuteList::addMuteObjectConfirm( const LLMute &mute )
262{
263 LLMute *newmute = new LLMute(mute);
264
265 LLStringUtil::format_map_t args;
266 args["[NAME]"] = newmute->mName;
267
268 gViewerWindow->alertXml("ConfirmMuteObject", args,
269 LLMuteList::addMuteCallback,
270 static_cast<void*>(newmute));
271}
272
273// static
274void LLMuteList::addMuteCallback(S32 option, void *userdata)
275{
276 LLMute *mute = static_cast<LLMute*>(userdata);
277 if( option == 0 )
278 {
279 // They confirmed it. Here we go!
280 LLMuteList::getInstance()->add( *mute );
281 LLFloaterMute::showInstance();
282 }
283 delete mute;
284}
285
248BOOL LLMuteList::add(const LLMute& mute, U32 flags) 286BOOL LLMuteList::add(const LLMute& mute, U32 flags)
249{ 287{
250 // Can't mute text from Lindens 288 // Can't mute text from Lindens
diff --git a/linden/indra/newview/llmutelist.h b/linden/indra/newview/llmutelist.h
index 400f13e..d66dd17 100644
--- a/linden/indra/newview/llmutelist.h
+++ b/linden/indra/newview/llmutelist.h
@@ -102,6 +102,11 @@ public:
102 void addObserver(LLMuteListObserver* observer); 102 void addObserver(LLMuteListObserver* observer);
103 void removeObserver(LLMuteListObserver* observer); 103 void removeObserver(LLMuteListObserver* observer);
104 104
105
106 void addMuteAgentConfirm( const LLMute &mute );
107 void addMuteObjectConfirm( const LLMute &mute );
108 static void addMuteCallback(S32 option, void *userdata);
109
105 // Add either a normal or a BY_NAME mute, for any or all properties. 110 // Add either a normal or a BY_NAME mute, for any or all properties.
106 BOOL add(const LLMute& mute, U32 flags = 0); 111 BOOL add(const LLMute& mute, U32 flags = 0);
107 112
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp
index 76dbd1f..82d9054 100644
--- a/linden/indra/newview/llpanelavatar.cpp
+++ b/linden/indra/newview/llpanelavatar.cpp
@@ -1590,16 +1590,16 @@ void LLPanelAvatar::onClickMute(void *userdata)
1590 if (name_edit) 1590 if (name_edit)
1591 { 1591 {
1592 std::string agent_name = name_edit->getText(); 1592 std::string agent_name = name_edit->getText();
1593 LLFloaterMute::showInstance();
1594 1593
1595 if (LLMuteList::getInstance()->isMuted(agent_id)) 1594 if (LLMuteList::getInstance()->isMuted(agent_id))
1596 { 1595 {
1597 LLFloaterMute::getInstance()->selectMute(agent_id); 1596 LLFloaterMute::getInstance()->selectMute(agent_id);
1597 LLFloaterMute::showInstance();
1598 } 1598 }
1599 else 1599 else
1600 { 1600 {
1601 LLMute mute(agent_id, agent_name, LLMute::AGENT); 1601 LLMute mute(agent_id, agent_name, LLMute::AGENT);
1602 LLMuteList::getInstance()->add(mute); 1602 LLMuteList::getInstance()->addMuteAgentConfirm(mute);
1603 } 1603 }
1604 } 1604 }
1605} 1605}
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index aeb3b2d..7f654bb 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -538,7 +538,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask)
538{ 538{
539 if (( KEY_RETURN == key ) && (MASK_ALT == mask)) 539 if (( KEY_RETURN == key ) && (MASK_ALT == mask))
540 { 540 {
541 gViewerWindow->toggleFullscreen(FALSE); 541 gViewerWindow->toggleFullscreenConfirm();
542 return TRUE; 542 return TRUE;
543 } 543 }
544 544
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 486e4f1..4081e97 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -2087,10 +2087,16 @@ class LLObjectMute : public view_listener_t
2087 } 2087 }
2088 else 2088 else
2089 { 2089 {
2090 LLMuteList::getInstance()->add(mute); 2090 if( LLMute::AGENT == type )
2091 LLFloaterMute::showInstance(); 2091 {
2092 LLMuteList::getInstance()->addMuteAgentConfirm(mute);
2093 }
2094 else
2095 {
2096 // must be an object.
2097 LLMuteList::getInstance()->addMuteObjectConfirm(mute);
2098 }
2092 } 2099 }
2093
2094 return true; 2100 return true;
2095 } 2101 }
2096}; 2102};
@@ -3262,7 +3268,7 @@ class LLViewFullscreen : public view_listener_t
3262{ 3268{
3263 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 3269 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
3264 { 3270 {
3265 gViewerWindow->toggleFullscreen(TRUE); 3271 gViewerWindow->toggleFullscreenConfirm();
3266 return true; 3272 return true;
3267 } 3273 }
3268}; 3274};
@@ -4686,7 +4692,7 @@ class LLWorldTeleportHome : public view_listener_t
4686{ 4692{
4687 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4693 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4688 { 4694 {
4689 gAgent.teleportHome(); 4695 gAgent.teleportHomeConfirm();
4690 return true; 4696 return true;
4691 } 4697 }
4692}; 4698};
@@ -7352,7 +7358,7 @@ class LLEditTakeOff : public view_listener_t
7352 } 7358 }
7353 else if (clothing == "all") 7359 else if (clothing == "all")
7354 { 7360 {
7355 LLAgent::userRemoveAllClothes(NULL); 7361 LLAgent::userRemoveAllClothesConfirm();
7356 } 7362 }
7357 return true; 7363 return true;
7358 } 7364 }
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 854d757..0c43b59 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -4612,6 +4612,27 @@ void LLViewerWindow::initFonts(F32 zoom_factor)
4612 gDirUtilp->getAppRODataDir() 4612 gDirUtilp->getAppRODataDir()
4613 ); 4613 );
4614} 4614}
4615
4616
4617void LLViewerWindow::toggleFullscreenConfirm()
4618{
4619 gViewerWindow->alertXml("ConfirmToggleFullscreen",
4620 LLViewerWindow::toggleFullscreenCallback,
4621 (void *)this);
4622}
4623
4624
4625// static
4626void LLViewerWindow::toggleFullscreenCallback(S32 option, void *userdata)
4627{
4628 if( option == 0 )
4629 {
4630 // User confirmed it. Here we go!
4631 ((LLViewerWindow *)userdata)->toggleFullscreen( TRUE );
4632 }
4633}
4634
4635
4615void LLViewerWindow::toggleFullscreen(BOOL show_progress) 4636void LLViewerWindow::toggleFullscreen(BOOL show_progress)
4616{ 4637{
4617 if (mWindow) 4638 if (mWindow)
diff --git a/linden/indra/newview/llviewerwindow.h b/linden/indra/newview/llviewerwindow.h
index 21df0d5..d562d0f 100644
--- a/linden/indra/newview/llviewerwindow.h
+++ b/linden/indra/newview/llviewerwindow.h
@@ -338,6 +338,8 @@ public:
338 338
339 // Request display setting changes 339 // Request display setting changes
340 void toggleFullscreen(BOOL show_progress); 340 void toggleFullscreen(BOOL show_progress);
341 void toggleFullscreenConfirm();
342 static void toggleFullscreenCallback(S32 option, void *userdata);
341 343
342 // handle shutting down GL and bringing it back up 344 // handle shutting down GL and bringing it back up
343 BOOL checkSettings(); 345 BOOL checkSettings();
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
index 92e2014..25d3a84 100644
--- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
@@ -5060,5 +5060,105 @@ Would you like to visit the Second Life website to set this up?
5060 The string [STRING_NAME] is missing from strings.xml 5060 The string [STRING_NAME] is missing from strings.xml
5061 </message> 5061 </message>
5062 </alert> 5062 </alert>
5063
5064 <alert modal="true" name="ConfirmTeleportHome">
5065 <message name="message">
5066 Are you sure you want to teleport home?
5067 </message>
5068 <ignore name="ignore">
5069 When teleporting home
5070 </ignore>
5071 <option name="Teleport">
5072 Teleport
5073 </option>
5074 <option name="Cancel">
5075 Cancel
5076 </option>
5077 </alert>
5078
5079 <alert modal="true" name="ConfirmToggleFullscreen">
5080 <message name="message">
5081 Are you sure you want to toggle fullscreen mode?
5082 </message>
5083 <ignore name="ignore">
5084 When toggling fullscreen mode
5085 </ignore>
5086 <option name="Toggle">
5087 Toggle
5088 </option>
5089 <option name="Cancel">
5090 Cancel
5091 </option>
5092 </alert>
5093
5094 <alert modal="true" name="ConfirmRestoreToWorld">
5095 <message name="message">
5096 Are you sure you want to restore the object to its last position?
5097
5098WARNING: Don't restore if you aren't sure where the object will go!
5099 </message>
5100 <ignore name="ignore">
5101 When restoring objects to their last positions
5102 </ignore>
5103 <option name="Restore">
5104 Restore
5105 </option>
5106 <option name="MoreInfo">
5107 More Info
5108 </option>
5109 <option name="Cancel">
5110 Cancel
5111 </option>
5112 <url option="1">
5113 http://imprudenceviewer.org/wiki/Restore_to_Last_Position
5114 </url>
5115
5116 </alert>
5117
5118 <alert modal="true" name="ConfirmRemoveAllClothes">
5119 <message name="message">
5120 Are you sure you want to take off all clothes?
5121 </message>
5122 <ignore name="ignore">
5123 When taking off all clothes
5124 </ignore>
5125 <option name="Take Off">
5126 Take Off
5127 </option>
5128 <option name="Cancel">
5129 Cancel
5130 </option>
5131 </alert>
5132
5133 <alert modal="true" name="ConfirmMuteAgent">
5134 <message name="message">
5135 Are you sure you want to mute [NAME] (resident)?
5136 </message>
5137 <ignore name="ignore">
5138 When muting a Resident
5139 </ignore>
5140 <option name="Mute">
5141 Mute
5142 </option>
5143 <option name="Cancel">
5144 Cancel
5145 </option>
5146 </alert>
5147
5148 <alert modal="true" name="ConfirmMuteObject">
5149 <message name="message">
5150 Are you sure you want to mute [NAME] (object)?
5151 </message>
5152 <ignore name="ignore">
5153 When muting an object
5154 </ignore>
5155 <option name="Mute">
5156 Mute
5157 </option>
5158 <option name="Cancel">
5159 Cancel
5160 </option>
5161 </alert>
5162
5063</alerts> 5163</alerts>
5064 5164
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
index aa61e77..ff3b8ce 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
@@ -218,15 +218,17 @@
218 name="Deactivate" width="128"> 218 name="Deactivate" width="128">
219 <on_click filter="" function="Inventory.DoToSelected" userdata="deactivate" /> 219 <on_click filter="" function="Inventory.DoToSelected" userdata="deactivate" />
220 </menu_item_call> 220 </menu_item_call>
221 <menu_item_separator name="RestoreToWorld Separator" />
222 <menu_item_call name="Restore to Last Position"
223 label="Restore to Last Position">
224 <on_click filter="" function="Inventory.DoToSelected"
225 userdata="restoreToWorld" />
226 </menu_item_call>
221 <menu_item_separator name="Attach Separator" /> 227 <menu_item_separator name="Attach Separator" />
222 <menu_item_call bottom_delta="-18" height="18" label="Detach From Yourself" left="0" 228 <menu_item_call bottom_delta="-18" height="18" label="Detach From Yourself" left="0"
223 mouse_opaque="true" name="Detach From Yourself" width="128"> 229 mouse_opaque="true" name="Detach From Yourself" width="128">
224 <on_click filter="" function="Inventory.DoToSelected" userdata="detach" /> 230 <on_click filter="" function="Inventory.DoToSelected" userdata="detach" />
225 </menu_item_call> 231 </menu_item_call>
226 <menu_item_call bottom_delta="-18" height="18" label="Restore to Last Position" left="0" mouse_opaque="true"
227 name="Restore to Last Position" width="128">
228 <on_click filter="" function="Inventory.DoToSelected" userdata="restoreToWorld" />
229 </menu_item_call>
230 <menu_item_call bottom_delta="-18" height="18" label="Wear" left="0" mouse_opaque="true" 232 <menu_item_call bottom_delta="-18" height="18" label="Wear" left="0" mouse_opaque="true"
231 name="Object Wear" width="128"> 233 name="Object Wear" width="128">
232 <on_click filter="" function="Inventory.DoToSelected" userdata="attach" /> 234 <on_click filter="" function="Inventory.DoToSelected" userdata="attach" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 4758116..086f059 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -127,7 +127,7 @@
127 </menu_item_call> 127 </menu_item_call>
128 <menu_item_separator /> 128 <menu_item_separator />
129 <menu_item_call name="Duplicate" enabled="false" 129 <menu_item_call name="Duplicate" enabled="false"
130 label="Duplicate"> 130 label="Duplicate" shortcut="control|D">
131 <on_click function="Edit.Duplicate" userdata="" /> 131 <on_click function="Edit.Duplicate" userdata="" />
132 <on_enable function="Edit.EnableDuplicate" /> 132 <on_enable function="Edit.EnableDuplicate" />
133 </menu_item_call> 133 </menu_item_call>
@@ -487,8 +487,7 @@
487 <on_check control="FlyBtnState" /> 487 <on_check control="FlyBtnState" />
488 </menu_item_check> 488 </menu_item_check>
489 <menu_item_separator /> 489 <menu_item_separator />
490 <menu_item_call name="Create Landmark Here" shortcut="control|D" 490 <menu_item_call name="Create Landmark Here" label="Create Landmark Here">
491 label="Create Landmark Here">
492 <on_click function="World.CreateLandmark" userdata="" /> 491 <on_click function="World.CreateLandmark" userdata="" />
493 <on_enable function="World.EnableCreateLandmark" userdata="" /> 492 <on_enable function="World.EnableCreateLandmark" userdata="" />
494 </menu_item_call> 493 </menu_item_call>
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py
index 71c07b6..9aeb31e 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -437,12 +437,12 @@ class DarwinManifest(ViewerManifest):
437 self.path("libgsttag-0.10.dylib") 437 self.path("libgsttag-0.10.dylib")
438 self.path("libgstvideo-0.10.dylib") 438 self.path("libgstvideo-0.10.dylib")
439 439
440 self.path("libxml2.2.dylib")
440 self.path("libintl.3.dylib") 441 self.path("libintl.3.dylib")
441 self.path("libjpeg.62.dylib") 442 self.path("libjpeg.62.dylib")
443 self.path("libneon.27.dylib")
442 self.path("libogg.0.dylib") 444 self.path("libogg.0.dylib")
443 self.path("liboil-0.3.0.dylib") 445 self.path("liboil-0.3.0.dylib")
444 self.path("libpango-1.0.0.dylib")
445 self.path("libpangoft2-1.0.0.dylib")
446 self.path("libtheora.0.dylib") 446 self.path("libtheora.0.dylib")
447 self.path("libvorbis.0.dylib") 447 self.path("libvorbis.0.dylib")
448 self.path("libvorbisenc.2.dylib") 448 self.path("libvorbisenc.2.dylib")
@@ -521,7 +521,6 @@ class DarwinManifest(ViewerManifest):
521 self.path("libgstogg.so") 521 self.path("libgstogg.so")
522 self.path("libgstosxaudio.so") 522 self.path("libgstosxaudio.so")
523 self.path("libgstosxvideosink.so") 523 self.path("libgstosxvideosink.so")
524 self.path("libgstpango.so")
525 self.path("libgstplaybin.so") 524 self.path("libgstplaybin.so")
526 self.path("libgstpng.so") 525 self.path("libgstpng.so")
527 self.path("libgstpostproc.so") 526 self.path("libgstpostproc.so")
diff --git a/linden/install.xml b/linden/install.xml
index f4ddffc..41eec44 100644
--- a/linden/install.xml
+++ b/linden/install.xml
@@ -841,9 +841,9 @@ anguage Infrstructure (CLI) international standard</string>
841 <key>darwin</key> 841 <key>darwin</key>
842 <map> 842 <map>
843 <key>md5sum</key> 843 <key>md5sum</key>
844 <string>a0757244e3e6688fde2ffeea35cc1f96</string> 844 <string>f30b851e089108978c8218295a405159</string>
845 <key>url</key> 845 <key>url</key>
846 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-darwin-20080924.tar.bz2</uri> 846 <uri>http://thomas.shikami.mooo.com/install_pkgs/openal-darwin-20090418.tar.bz2</uri>
847 </map> 847 </map>
848 <key>linux</key> 848 <key>linux</key>
849 <map> 849 <map>