From 117e22047c5752352342d64e3fb7ce00a4eb8113 Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Fri, 15 Aug 2008 23:45:04 -0500
Subject: Second Life viewer sources 1.18.1.2
---
.../indra/newview/English.lproj/InfoPlist.strings | 4 +-
linden/indra/newview/Info-SecondLife.plist | 2 +-
linden/indra/newview/fakevoicesoundsignal.cpp | 49 +
linden/indra/newview/fakevoicesoundsignal.h | 25 +
linden/indra/newview/featuretable_solaris.txt | 173 +
linden/indra/newview/files.lst | 13 +-
linden/indra/newview/licenses-solaris.txt | 516 +++
linden/indra/newview/linux_tools/client-readme.txt | 29 +-
linden/indra/newview/linux_tools/unicode.ttf | 2 +-
linden/indra/newview/linux_tools/wrapper.sh | 17 +
linden/indra/newview/llagent.cpp | 62 +-
linden/indra/newview/llagent.h | 2 +-
linden/indra/newview/llaudiosourcevo.cpp | 2 +-
linden/indra/newview/llaudiostatus.cpp | 412 --
linden/indra/newview/llaudiostatus.h | 52 -
linden/indra/newview/llcallingcard.cpp | 1 +
linden/indra/newview/llchatbar.cpp | 155 +-
linden/indra/newview/llchatbar.h | 21 +-
linden/indra/newview/llcolorswatch.cpp | 15 -
linden/indra/newview/llcolorswatch.h | 2 -
linden/indra/newview/llcontroldef.cpp | 604 ++-
linden/indra/newview/lldebugmessagebox.cpp | 10 +-
linden/indra/newview/lldebugview.cpp | 14 -
linden/indra/newview/lldrawable.h | 1 +
linden/indra/newview/lldrawpoolsky.h | 2 +-
linden/indra/newview/lldrawpoolwater.cpp | 2 +-
linden/indra/newview/llemote.h | 2 +
linden/indra/newview/llface.h | 1 -
linden/indra/newview/llfasttimerview.cpp | 3 +-
linden/indra/newview/llfeaturemanager.cpp | 7 +
linden/indra/newview/llfirstuse.cpp | 13 +
linden/indra/newview/llfirstuse.h | 1 +
linden/indra/newview/llfloateractivespeakers.cpp | 831 ++++
linden/indra/newview/llfloateractivespeakers.h | 211 +
linden/indra/newview/llfloateranimpreview.cpp | 2 +-
linden/indra/newview/llfloateravatarpicker.cpp | 7 +-
linden/indra/newview/llfloaterchat.cpp | 213 +-
linden/indra/newview/llfloaterchat.h | 25 +-
linden/indra/newview/llfloaterchatterbox.cpp | 342 ++
linden/indra/newview/llfloaterchatterbox.h | 87 +
linden/indra/newview/llfloatercustomize.cpp | 28 +-
linden/indra/newview/llfloaterdirectory.cpp | 14 +-
linden/indra/newview/llfloaterfriends.cpp | 395 +-
linden/indra/newview/llfloaterfriends.h | 26 +-
linden/indra/newview/llfloatergroups.cpp | 477 ++-
linden/indra/newview/llfloatergroups.h | 79 +-
linden/indra/newview/llfloaterhtmlhelp.cpp | 2 +-
linden/indra/newview/llfloaterimport.cpp | 5 +-
linden/indra/newview/llfloaterinspect.cpp | 19 +-
linden/indra/newview/llfloaterland.cpp | 73 +-
linden/indra/newview/llfloaterland.h | 2 +
linden/indra/newview/llfloatermute.cpp | 1 +
linden/indra/newview/llfloaternamedesc.cpp | 4 +-
linden/indra/newview/llfloaternewim.cpp | 8 +-
linden/indra/newview/llfloaterpostcard.cpp | 2 +-
linden/indra/newview/llfloaterpreference.cpp | 10 +-
linden/indra/newview/llfloaterpreference.h | 2 +
linden/indra/newview/llfloaterregioninfo.cpp | 26 +-
linden/indra/newview/llfloaterscriptdebug.cpp | 11 +-
linden/indra/newview/llfloatersnapshot.cpp | 22 +-
linden/indra/newview/llfloatertest.cpp | 7 +
linden/indra/newview/llfloatertest.h | 8 +
linden/indra/newview/llfloatertools.cpp | 11 +-
linden/indra/newview/llfloatertools.h | 2 -
linden/indra/newview/llfloatervoicewizard.cpp | 444 +++
linden/indra/newview/llfloatervoicewizard.h | 100 +
linden/indra/newview/llfloaterworldmap.cpp | 75 +-
linden/indra/newview/llfloaterworldmap.h | 1 +
linden/indra/newview/llfolderview.cpp | 79 +-
linden/indra/newview/llframestatview.cpp | 6 +
linden/indra/newview/llgesturemgr.cpp | 68 +-
linden/indra/newview/llgesturemgr.h | 2 +-
linden/indra/newview/llglslshader.cpp | 21 +-
linden/indra/newview/llhoverview.cpp | 7 +
linden/indra/newview/llhudeffectlookat.cpp | 63 +-
linden/indra/newview/llhudmanager.cpp | 101 -
linden/indra/newview/llhudmanager.h | 10 -
linden/indra/newview/llhudobject.cpp | 4 +
linden/indra/newview/llhudobject.h | 3 +-
linden/indra/newview/llhudtext.cpp | 3 +-
linden/indra/newview/llimpanel.cpp | 1020 ++++-
linden/indra/newview/llimpanel.h | 155 +-
linden/indra/newview/llimview.cpp | 823 ++--
linden/indra/newview/llimview.h | 57 +-
linden/indra/newview/llinventoryactions.cpp | 4 +-
linden/indra/newview/llinventorybridge.cpp | 9 +-
linden/indra/newview/llinventorymodel.cpp | 9 +-
linden/indra/newview/llinventoryview.cpp | 12 +-
linden/indra/newview/llmediaremotectrl.cpp | 167 +-
linden/indra/newview/llmediaremotectrl.h | 92 +-
linden/indra/newview/llmemoryview.cpp | 53 +-
linden/indra/newview/llmemoryview.h | 7 +
linden/indra/newview/llmutelist.cpp | 124 +-
linden/indra/newview/llmutelist.h | 32 +-
linden/indra/newview/llnetmap.cpp | 2 +-
linden/indra/newview/llnotify.cpp | 215 +-
linden/indra/newview/llnotify.h | 60 +-
linden/indra/newview/lloverlaybar.cpp | 453 ++-
linden/indra/newview/lloverlaybar.h | 45 +-
linden/indra/newview/llpanelaudioprefs.cpp | 142 +-
linden/indra/newview/llpanelaudioprefs.h | 15 +-
linden/indra/newview/llpanelaudiovolume.cpp | 109 +
linden/indra/newview/llpanelaudiovolume.h | 55 +
linden/indra/newview/llpanelavatar.cpp | 36 +-
linden/indra/newview/llpanelavatar.h | 18 +-
linden/indra/newview/llpanelclassified.cpp | 21 +-
linden/indra/newview/llpanelclassified.h | 25 +-
linden/indra/newview/llpaneldebug.cpp | 2 +
linden/indra/newview/llpaneldirbrowser.cpp | 5 +-
linden/indra/newview/llpaneldisplay.cpp | 1 +
linden/indra/newview/llpanelgeneral.cpp | 2 -
linden/indra/newview/llpanelgroup.cpp | 11 +-
linden/indra/newview/llpanelinventory.cpp | 2 +-
linden/indra/newview/llpanellogin.cpp | 32 +-
linden/indra/newview/llpanellogin.h | 1 +
linden/indra/newview/llpanelpermissions.cpp | 16 +-
linden/indra/newview/llpolymesh.cpp | 5 +-
linden/indra/newview/llprefschat.cpp | 13 -
linden/indra/newview/llprefsvoice.cpp | 277 ++
linden/indra/newview/llprefsvoice.h | 87 +
linden/indra/newview/llpreview.cpp | 3 +-
linden/indra/newview/llpreviewscript.cpp | 32 +-
linden/indra/newview/llpreviewsound.cpp | 15 +-
linden/indra/newview/llpreviewtexture.cpp | 2 +-
linden/indra/newview/llselectmgr.cpp | 40 +-
linden/indra/newview/llselectmgr.h | 5 +-
linden/indra/newview/llstartup.cpp | 128 +-
linden/indra/newview/llstatusbar.cpp | 110 +-
linden/indra/newview/llstatusbar.h | 25 +-
linden/indra/newview/lltoolbar.cpp | 35 +-
linden/indra/newview/lltoolbar.h | 3 +-
linden/indra/newview/lltooldraganddrop.cpp | 2 -
linden/indra/newview/lltoolselect.cpp | 2 +-
linden/indra/newview/lluserauth.cpp | 2 +
linden/indra/newview/llviewercontrol.h | 2 +
linden/indra/newview/llviewerimage.h | 22 +-
linden/indra/newview/llviewerimagelist.cpp | 17 +
linden/indra/newview/llviewerinventory.cpp | 6 +-
linden/indra/newview/llviewerjointattachment.cpp | 17 +-
linden/indra/newview/llviewerjointmesh.cpp | 215 +-
linden/indra/newview/llviewerjointmesh.h | 16 +
linden/indra/newview/llviewerjointmesh_sse.cpp | 114 +
linden/indra/newview/llviewerjointmesh_sse2.cpp | 121 +
linden/indra/newview/llviewerjointmesh_vec.cpp | 95 +
linden/indra/newview/llviewermenu.cpp | 168 +-
linden/indra/newview/llviewermenufile.cpp | 16 +-
linden/indra/newview/llviewermessage.cpp | 98 +-
linden/indra/newview/llviewerobject.cpp | 23 +-
linden/indra/newview/llviewerobject.h | 5 +-
linden/indra/newview/llviewerobjectlist.cpp | 6 +-
linden/indra/newview/llviewerparcelmgr.cpp | 19 +-
linden/indra/newview/llviewerpartsim.cpp | 2 +-
linden/indra/newview/llviewerpartsource.cpp | 6 +
linden/indra/newview/llviewerprecompiledheaders.h | 2 -
linden/indra/newview/llviewerregion.cpp | 148 +-
linden/indra/newview/llviewerregion.h | 16 +-
linden/indra/newview/llviewertexteditor.cpp | 17 +-
linden/indra/newview/llvieweruictrlfactory.cpp | 7 -
linden/indra/newview/llvieweruictrlfactory.h | 2 -
linden/indra/newview/llviewerwindow.cpp | 338 +-
linden/indra/newview/llviewerwindow.h | 5 +
linden/indra/newview/llvoavatar.cpp | 318 +-
linden/indra/newview/llvoavatar.h | 16 +
linden/indra/newview/llvocache.cpp | 45 +-
linden/indra/newview/llvograss.cpp | 8 +-
linden/indra/newview/llvoiceclient.cpp | 4076 ++++++++++++++++++++
linden/indra/newview/llvoiceclient.h | 523 +++
linden/indra/newview/llvoiceremotectrl.cpp | 180 +
linden/indra/newview/llvoiceremotectrl.h | 56 +
linden/indra/newview/llvoicevisualizer.cpp | 431 +++
linden/indra/newview/llvoicevisualizer.h | 111 +
linden/indra/newview/llvolumesliderctrl.cpp | 193 -
linden/indra/newview/llvolumesliderctrl.h | 56 -
linden/indra/newview/llvopartgroup.cpp | 2 +-
linden/indra/newview/llvosky.cpp | 8 +-
linden/indra/newview/llvotree.cpp | 4 +-
linden/indra/newview/llvovolume.cpp | 4 +-
linden/indra/newview/llweb.cpp | 2 +
linden/indra/newview/llwebbrowserctrl.cpp | 4 +-
linden/indra/newview/llworldmap.cpp | 11 +-
linden/indra/newview/llworldmap.h | 4 +-
linden/indra/newview/llworldmapview.cpp | 3 +-
linden/indra/newview/llxmlrpctransaction.cpp | 2 +
.../newview/macview.xcodeproj/project.pbxproj | 238 +-
linden/indra/newview/moviemaker.cpp | 10 +-
linden/indra/newview/newview.vcproj | 210 +-
linden/indra/newview/newview_vc8.vcproj | 208 +-
linden/indra/newview/pipeline.cpp | 265 +-
linden/indra/newview/pipeline.h | 27 +-
linden/indra/newview/postbuild.bat | 52 +-
linden/indra/newview/releasenotes.txt | 80 +-
linden/indra/newview/res/newViewRes.rc | 8 +-
.../newview/secondlife setup build firstlook.bat | 4 -
.../newview/secondlife setup build voicebeta.bat | 4 +
.../secondlife setup build voicefirstlook.bat | 4 +
linden/indra/newview/skins/textures/textures.xml | 22 +-
linden/indra/newview/skins/xui/de/role_actions.xml | 82 +-
linden/indra/newview/skins/xui/en-us/alerts.xml | 59 +-
.../newview/skins/xui/en-us/floater_about.xml | 5 +-
.../newview/skins/xui/en-us/floater_about_land.xml | 78 +-
.../skins/xui/en-us/floater_active_speakers.xml | 72 +
.../skins/xui/en-us/floater_audio_volume.xml | 11 +
.../skins/xui/en-us/floater_buy_contents.xml | 2 +-
.../skins/xui/en-us/floater_chat_history.xml | 134 +-
.../newview/skins/xui/en-us/floater_chatterbox.xml | 6 +
.../skins/xui/en-us/floater_device_settings.xml | 4 +
.../newview/skins/xui/en-us/floater_friends.xml | 225 +-
.../newview/skins/xui/en-us/floater_groups.xml | 80 +-
.../indra/newview/skins/xui/en-us/floater_im.xml | 39 +-
.../skins/xui/en-us/floater_instant_message.xml | 57 +-
.../xui/en-us/floater_instant_message_ad_hoc.xml | 119 +
.../xui/en-us/floater_instant_message_group.xml | 160 +
.../en-us/floater_inventory_item_properties.xml | 4 +-
.../newview/skins/xui/en-us/floater_my_friends.xml | 9 +
.../newview/skins/xui/en-us/floater_report_bug.xml | 4 +-
.../newview/skins/xui/en-us/floater_select_key.xml | 15 +
.../skins/xui/en-us/floater_settings_debug.xml | 7 +-
.../indra/newview/skins/xui/en-us/floater_test.xml | 5 +
.../skins/xui/en-us/floater_voice_wizard.xml | 17 +
.../newview/skins/xui/en-us/menu_inventory.xml | 16 +-
.../indra/newview/skins/xui/en-us/menu_viewer.xml | 70 +-
linden/indra/newview/skins/xui/en-us/notify.xml | 93 +-
.../indra/newview/skins/xui/en-us/panel_audio.xml | 39 +
.../newview/skins/xui/en-us/panel_audio_device.xml | 77 +
.../newview/skins/xui/en-us/panel_friends.xml | 62 +
.../newview/skins/xui/en-us/panel_group_roles.xml | 2 +
.../indra/newview/skins/xui/en-us/panel_groups.xml | 43 +
.../skins/xui/en-us/panel_master_volume.xml | 13 +
.../newview/skins/xui/en-us/panel_media_remote.xml | 27 +-
.../newview/skins/xui/en-us/panel_music_remote.xml | 27 +-
.../newview/skins/xui/en-us/panel_overlaybar.xml | 17 +-
.../skins/xui/en-us/panel_preferences_audio.xml | 155 +-
.../skins/xui/en-us/panel_preferences_chat.xml | 2 +-
.../xui/en-us/panel_preferences_graphics3.xml | 2 +-
.../skins/xui/en-us/panel_preferences_voice.xml | 89 +
.../skins/xui/en-us/panel_region_estate.xml | 7 +-
.../newview/skins/xui/en-us/panel_status_bar.xml | 8 +-
.../newview/skins/xui/en-us/panel_toolbar.xml | 7 +-
.../newview/skins/xui/en-us/panel_voice_enable.xml | 98 +
.../skins/xui/en-us/panel_voice_options.xml | 46 +
.../newview/skins/xui/en-us/panel_voice_remote.xml | 12 +
linden/indra/newview/skins/xui/es/role_actions.xml | 372 +-
linden/indra/newview/skins/xui/fr/role_actions.xml | 378 +-
linden/indra/newview/skins/xui/ja/role_actions.xml | 84 +-
linden/indra/newview/skins/xui/ko/role_actions.xml | 84 +-
linden/indra/newview/skins/xui/pt/role_actions.xml | 372 +-
linden/indra/newview/skins/xui/zh/role_actions.xml | 366 +-
linden/indra/newview/viewer.cpp | 944 ++---
linden/indra/newview/viewer.h | 7 +
linden/indra/newview/viewer_manifest.py | 197 +-
250 files changed, 18415 insertions(+), 5958 deletions(-)
create mode 100644 linden/indra/newview/fakevoicesoundsignal.cpp
create mode 100644 linden/indra/newview/fakevoicesoundsignal.h
create mode 100644 linden/indra/newview/featuretable_solaris.txt
create mode 100644 linden/indra/newview/licenses-solaris.txt
delete mode 100644 linden/indra/newview/llaudiostatus.cpp
delete mode 100644 linden/indra/newview/llaudiostatus.h
create mode 100644 linden/indra/newview/llfloateractivespeakers.cpp
create mode 100644 linden/indra/newview/llfloateractivespeakers.h
create mode 100644 linden/indra/newview/llfloaterchatterbox.cpp
create mode 100644 linden/indra/newview/llfloaterchatterbox.h
create mode 100644 linden/indra/newview/llfloatervoicewizard.cpp
create mode 100644 linden/indra/newview/llfloatervoicewizard.h
create mode 100644 linden/indra/newview/llpanelaudiovolume.cpp
create mode 100644 linden/indra/newview/llpanelaudiovolume.h
create mode 100644 linden/indra/newview/llprefsvoice.cpp
create mode 100644 linden/indra/newview/llprefsvoice.h
create mode 100644 linden/indra/newview/llviewerjointmesh_sse.cpp
create mode 100644 linden/indra/newview/llviewerjointmesh_sse2.cpp
create mode 100644 linden/indra/newview/llviewerjointmesh_vec.cpp
create mode 100644 linden/indra/newview/llvoiceclient.cpp
create mode 100644 linden/indra/newview/llvoiceclient.h
create mode 100644 linden/indra/newview/llvoiceremotectrl.cpp
create mode 100644 linden/indra/newview/llvoiceremotectrl.h
create mode 100644 linden/indra/newview/llvoicevisualizer.cpp
create mode 100644 linden/indra/newview/llvoicevisualizer.h
delete mode 100644 linden/indra/newview/llvolumesliderctrl.cpp
delete mode 100644 linden/indra/newview/llvolumesliderctrl.h
delete mode 100644 linden/indra/newview/secondlife setup build firstlook.bat
create mode 100644 linden/indra/newview/secondlife setup build voicebeta.bat
create mode 100644 linden/indra/newview/secondlife setup build voicefirstlook.bat
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_active_speakers.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_audio_volume.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_chatterbox.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_device_settings.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_instant_message_ad_hoc.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_instant_message_group.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_my_friends.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_select_key.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_test.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_voice_wizard.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_audio.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_audio_device.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_friends.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_groups.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_master_volume.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_preferences_voice.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_voice_enable.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_voice_options.xml
create mode 100644 linden/indra/newview/skins/xui/en-us/panel_voice_remote.xml
(limited to 'linden/indra/newview')
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings
index bc1c7dd..aa9b6c0 100644
--- a/linden/indra/newview/English.lproj/InfoPlist.strings
+++ b/linden/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.18.0.6";
-CFBundleGetInfoString = "Second Life version 1.18.0.6, Copyright 2004-2007 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.18.1.2";
+CFBundleGetInfoString = "Second Life version 1.18.1.2, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist
index f4dd8e0..91d1849 100644
--- a/linden/indra/newview/Info-SecondLife.plist
+++ b/linden/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
CFBundleVersion
- 1.18.0.6
+ 1.18.1.2
CSResourcesFileMapped
diff --git a/linden/indra/newview/fakevoicesoundsignal.cpp b/linden/indra/newview/fakevoicesoundsignal.cpp
new file mode 100644
index 0000000..2a271ad
--- /dev/null
+++ b/linden/indra/newview/fakevoicesoundsignal.cpp
@@ -0,0 +1,49 @@
+//----------------------------------------------------------------------
+// Fake Voice Sound Signal
+// author: JJ Ventrella
+// THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
+//----------------------------------------------------------------------
+
+#include "llviewerprecompiledheaders.h"
+#include "fakevoicesoundsignal.h"
+
+//-----------------------------------------------
+// constructor
+//-----------------------------------------------
+FakeVoiceSoundSignal::FakeVoiceSoundSignal()
+{
+}//---------------------------------------------------
+
+
+//-----------------------------------------------
+// destructor
+//-----------------------------------------------
+FakeVoiceSoundSignal::~FakeVoiceSoundSignal()
+{
+}//---------------------------------------------------
+
+//---------------------------------------------------
+F32 FakeVoiceSoundSignal::getAmplitude()
+{
+ return 0.0;
+
+}//---------------------------------------------------
+
+
+//---------------------------------------------------
+bool FakeVoiceSoundSignal::getActive()
+{
+ return false;
+
+}//---------------------------------------------------
+
+
+//---------------------------------------------------
+void FakeVoiceSoundSignal::update()
+{
+
+}//---------------------------------------------------
+
+
+
+
diff --git a/linden/indra/newview/fakevoicesoundsignal.h b/linden/indra/newview/fakevoicesoundsignal.h
new file mode 100644
index 0000000..9e0132c
--- /dev/null
+++ b/linden/indra/newview/fakevoicesoundsignal.h
@@ -0,0 +1,25 @@
+//--------------------------------------------------------------------
+// Fake Voice Sound Signal
+// author: JJ Ventrella
+// THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
+//-----------------------------------------------------------------------------
+#ifndef FAKE_VOICE_SOUND_SIGNAL_H
+#define FAKE_VOICE_SOUND_SIGNAL_H
+
+//----------------------------------------------------------------------------
+// FakeVoiceSoundSignal
+//----------------------------------------------------------------------------
+class FakeVoiceSoundSignal
+{
+ public:
+ FakeVoiceSoundSignal();
+ ~FakeVoiceSoundSignal();
+ void update();
+ F32 getAmplitude();
+ bool getActive();
+
+};//-----------------------------------------------------------------
+ // end of class
+//------------------------------------------------------------------
+
+#endif //FAKE_VOICE_SOUND_SIGNAL_H
diff --git a/linden/indra/newview/featuretable_solaris.txt b/linden/indra/newview/featuretable_solaris.txt
new file mode 100644
index 0000000..6c7acfa
--- /dev/null
+++ b/linden/indra/newview/featuretable_solaris.txt
@@ -0,0 +1,173 @@
+version 10
+
+// NOTE: This is mostly identical to featuretable.txt with a few differences
+// Should be combined into one table
+
+//
+// Generates lists of feature mask that can be applied on top of each other.
+//
+// // Begin comments
+// list
+// Starts a feature list named
+//
+// is the name of a feature
+// is 0 or 1, whether the feature is available
+// is an S32 which is the recommended value
+//
+// For now, the first list read sets up all of the default values
+//
+
+
+//
+// All contains everything at their default settings for high end machines
+// NOTE: All settings are set to the MIN of applied values, including 'all'!
+//
+list all
+RenderVBO 1 1
+RenderAniso 1 0
+RenderAvatarMode 1 2
+RenderAvatarVP 1 1
+RenderDistance 1 128
+RenderLighting 1 1
+RenderObjectBump 1 1
+RenderParticleCount 1 4096
+RenderRippleWater 1 1
+RenderTerrainDetail 1 2
+VertexShaderEnable 1 1
+
+//
+// Class 0 Hardware (Unknown or just old)
+//
+list Class0
+VertexShaderEnable 1 0
+RenderVBO 1 0
+RenderDistance 1 64
+RenderAvatarVP 1 0
+RenderAvatarMode 1 0
+RenderLighting 1 0
+RenderObjectBump 1 0
+RenderRippleWater 1 0
+
+//
+// Class 1 Hardware
+//
+list Class1
+VertexShaderEnable 1 0
+RenderVBO 1 1
+RenderDistance 1 96
+RenderAvatarVP 1 1
+RenderAvatarMode 1 0
+RenderLighting 1 0
+RenderObjectBump 1 0
+RenderRippleWater 1 0
+
+//
+// Class 2 Hardware (make it purty)
+//
+list Class2
+VertexShaderEnable 1 1
+RenderAvatarVP 1 1
+RenderAvatarMode 1 1
+RenderLighting 1 1
+RenderObjectBump 1 1
+RenderRippleWater 1 1
+
+//
+// Class 3 Hardware (make it purty)
+//
+list Class3
+VertexShaderEnable 1 1
+RenderAvatarVP 1 1
+RenderAvatarMode 1 1
+RenderLighting 1 1
+RenderObjectBump 1 1
+RenderRippleWater 1 1
+
+//
+// No Pixel Shaders available
+//
+list NoPixelShaders
+VertexShaderEnable 0 0
+RenderAvatarVP 0 0
+
+//
+// No Vertex Shaders available
+//
+list NoVertexShaders
+VertexShaderEnable 0 0
+RenderAvatarVP 0 0
+
+//
+// "Default" setups for safe, low, medium, high
+//
+list safe
+RenderVBO 1 0
+RenderAniso 1 0
+RenderAvatarVP 0 0
+RenderLighting 1 0
+RenderParticleCount 1 1024
+RenderTerrainDetail 1 0
+
+
+list low
+RenderVBO 1 0
+RenderAniso 1 0
+RenderLighting 1 0
+
+list medium
+RenderLighting 1 0
+
+
+//
+// CPU based feature masks
+//
+
+// 1Ghz or less (equiv)
+list CPUSlow
+RenderParticleCount 1 1024
+
+
+//
+// RAM based feature masks
+//
+list RAM256MB
+RenderObjectBump 0 0
+
+
+//
+// Graphics card based feature masks
+//
+list OpenGLPre15
+RenderVBO 1 0
+
+list Intel
+RenderVBO 1 0
+RenderAniso 1 0
+RenderLighting 1 0
+RenderTerrainDetail 1 0
+
+list GeForce2
+RenderVBO 1 1
+RenderAniso 1 0
+RenderLighting 1 0
+RenderParticleCount 1 2048
+RenderTerrainDetail 1 0
+
+list GeForce3
+
+list ATI
+
+list Radeon8500
+RenderLighting 1 0
+RenderParticleCount 1 4096
+
+// Hacked to be paranoid "safe"
+list Radeon9700
+RenderParticleCount 1 4096
+
+// Hacked to be paranoid "safe"
+list MobilityRadeon9000
+RenderLighting 1 0
+RenderParticleCount 1 4096
+
+list GeForceFX
diff --git a/linden/indra/newview/files.lst b/linden/indra/newview/files.lst
index 6c51893..a5c348c 100644
--- a/linden/indra/newview/files.lst
+++ b/linden/indra/newview/files.lst
@@ -6,7 +6,6 @@ newview/llanimalcontrols.cpp
newview/llassetuploadresponders.cpp
newview/llasynchostbyname.cpp
newview/llaudiosourcevo.cpp
-newview/llaudiostatus.cpp
newview/llbbox.cpp
newview/llbox.cpp
newview/llcallbacklist.cpp
@@ -56,6 +55,7 @@ newview/llfilepicker.cpp
newview/llfirstuse.cpp
newview/llflexibleobject.cpp
newview/llfloaterabout.cpp
+newview/llfloateractivespeakers.cpp
newview/llfloateranimpreview.cpp
newview/llfloaterauction.cpp
newview/llfloateravatarinfo.cpp
@@ -68,6 +68,7 @@ newview/llfloaterbuy.cpp
newview/llfloaterbuycurrency.cpp
newview/llfloaterbuyland.cpp
newview/llfloaterchat.cpp
+newview/llfloaterchatterbox.cpp
newview/llfloaterclothing.cpp
newview/llfloatercolorpicker.cpp
newview/llfloatercustomize.cpp
@@ -107,6 +108,7 @@ newview/llfloatertest.cpp
newview/llfloatertools.cpp
newview/llfloatertopobjects.cpp
newview/llfloatertos.cpp
+newview/llfloatervoicewizard.cpp
newview/llfloaterworldmap.cpp
newview/llfolderview.cpp
newview/llfollowcam.cpp
@@ -162,6 +164,7 @@ newview/llnetmap.cpp
newview/llnotify.cpp
newview/lloverlaybar.cpp
newview/llpanelaudioprefs.cpp
+newview/llpanelaudiovolume.cpp
newview/llpanelavatar.cpp
newview/llpanelclassified.cpp
newview/llpanelcontents.cpp
@@ -206,6 +209,7 @@ newview/llpolymesh.cpp
newview/llpolymorph.cpp
newview/llprefschat.cpp
newview/llprefsim.cpp
+newview/llprefsvoice.cpp
newview/llpreviewanim.cpp
newview/llpreview.cpp
newview/llpreviewgesture.cpp
@@ -275,6 +279,9 @@ newview/llviewerinventory.cpp
newview/llviewerjointattachment.cpp
newview/llviewerjoint.cpp
newview/llviewerjointmesh.cpp
+newview/llviewerjointmesh_sse.cpp
+newview/llviewerjointmesh_sse2.cpp
+newview/llviewerjointmesh_vec.cpp
newview/llviewerjointshape.cpp
newview/llviewerjoystick.cpp
newview/llviewerkeyboard.cpp
@@ -305,8 +312,10 @@ newview/llvocache.cpp
newview/llvoclouds.cpp
newview/llvograss.cpp
newview/llvoground.cpp
+newview/llvoiceclient.cpp
+newview/llvoiceremotectrl.cpp
+newview/llvoicevisualizer.cpp
newview/llvoinventorylistener.cpp
-newview/llvolumesliderctrl.cpp
newview/llvopartgroup.cpp
newview/llvosky.cpp
newview/llvostars.cpp
diff --git a/linden/indra/newview/licenses-solaris.txt b/linden/indra/newview/licenses-solaris.txt
new file mode 100644
index 0000000..a0dc048
--- /dev/null
+++ b/linden/indra/newview/licenses-solaris.txt
@@ -0,0 +1,516 @@
+===========
+APR License
+===========
+
+Copyright 2000-2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+==============
+Base32 License
+==============
+
+ * Copyright (c) 2006 Christian Biere
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the authors nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+
+==========
+Cg License
+==========
+
+Copyright (c) 2002, NVIDIA Corporation.
+
+
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
+of your agreement to the following terms, and your use, installation,
+modification or redistribution of this NVIDIA software constitutes
+acceptance of these terms. If you do not agree with these terms, please do
+not use, install, modify or redistribute this NVIDIA software.
+
+
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive license,
+under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
+Software"), to use, reproduce, modify and redistribute the NVIDIA
+Software, with or without modifications, in source and/or binary forms;
+provided that if you redistribute the NVIDIA Software, you must retain the
+copyright notice of NVIDIA, this notice and the following text and
+disclaimers in all such redistributions of the NVIDIA Software. Neither the
+name, trademarks, service marks nor logos of NVIDIA Corporation may be used
+to endorse or promote products derived from the NVIDIA Software without
+specific prior written permission from NVIDIA. Except as expressly stated
+in this notice, no other rights or licenses express or implied, are granted
+by NVIDIA herein, including but not limited to any patent rights that may be
+infringed by your derivative works or by other works in which the NVIDIA
+Software may be incorporated. No hardware is licensed hereunder.
+
+
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
+WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
+EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
+
+
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
+EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
+PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
+REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
+HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
+NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+============
+cURL License
+============
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2002, Daniel Stenberg, .
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+
+=============
+expat License
+=============
+
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+================
+FreeType License
+================
+
+Portions of this software are copyright (c) 2003 The FreeType
+Project (www.freetype.org). All rights reserved.
+
+==========================
+FSI FontShop International
+==========================
+
+Certain of the fonts in the Meta family of copyrighted typefaces are
+used in Second Life under license from FSI FontShop
+International. Copies of such Meta fonts that are included in the
+Viewer are not themselves open source and are not available under the
+GPL license, and they may not be copied. Developers may use those
+fonts solely to the extent necessary to use or customize the Linden
+Software in Second Life and to develop and distribute content solely
+for use in the Second Life environment, and for no other purposes.
+Second Life developers who wish to make other uses of Meta fonts must
+obtain a license from FSI FontShop International at www.fontfont.com.
+
+==========
+GL License
+==========
+
+Mesa 3-D graphics library
+Version: 6.2
+
+Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=======================
+JPEG Library 6b License
+=======================
+
+This software is based in part on the work of the Independent JPEG Group
+
+================
+JPEG2000 License
+================
+
+Copyright 2001, David Taubman, The University of New South Wales (UNSW)
+The copyright owner is Unisearch Ltd, Australia (commercial arm of UNSW)
+Neither this copyright statement, nor the licensing details below
+may be removed from this file or dissociated from its contents.
+
+Licensee: Linden Research, Inc.
+License number: 00024
+The licensee has been granted a COMMERCIAL license to the contents of
+this source file. A brief summary of this license appears below. This
+summary is not to be relied upon in preference to the full text of the
+license agreement, accepted at purchase of the license.
+1. The Licensee has the right to Commercial Use of the Kakadu software,
+ including distribution of one or more Applications built using the
+ software.
+2. The Licensee has the right to Internal Use of the Kakadu software,
+ including use by employees of the Licensee or an Affiliate for the
+ purpose of performing services on behalf of the Licensee or Affiliate,
+ or in the performance of services for Third Parties who engage Licensee
+ or an Affiliate for such services.
+3. The Licensee has the right to distribute Reusable Code (including
+ source code and dynamically or statically linked libraries) to a Third
+ Party, provided the Third Party possesses a license to use the Kakadu
+ software.
+
+==================
+ogg/vorbis License
+==================
+
+Copyright (c) 2001, Xiphophorus
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiphophorus nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+===========
+SDL License
+===========
+
+SDL - Simple DirectMedia Layer
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; if not, write to the Free
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Sam Lantinga
+slouken@libsdl.org
+
+The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html
+
+=============
+ELFIO License
+=============
+
+ELFIO.h - ELF reader and producer.
+Copyright (C) 2001 Serge Lamikhov-Center
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html
+
+===============
+OpenSSL License
+===============
+
+Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. All advertising materials mentioning features or use of this
+ software must display the following acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+
+4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ openssl-core@openssl.org.
+
+5. Products derived from this software may not be called "OpenSSL"
+ nor may "OpenSSL" appear in their names without prior written
+ permission of the OpenSSL Project.
+
+6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+====================================================================
+
+This product includes cryptographic software written by Eric Young
+(eay@cryptsoft.com). This product includes software written by Tim
+Hudson (tjh@cryptsoft.com).
+
+
+
+=======================
+Original SSLeay License
+=======================
+
+Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+All rights reserved.
+
+This package is an SSL implementation written
+by Eric Young (eay@cryptsoft.com).
+The implementation was written so as to conform with Netscapes SSL.
+
+This library is free for commercial and non-commercial use as long as
+the following conditions are aheared to. The following conditions
+apply to all code found in this distribution, be it the RC4, RSA,
+lhash, DES, etc., code; not just the SSL code. The SSL documentation
+included with this distribution is covered by the same copyright terms
+except that the holder is Tim Hudson (tjh@cryptsoft.com).
+
+Copyright remains Eric Young's, and as such any Copyright notices in
+the code are not to be removed.
+If this package is used in a product, Eric Young should be given attribution
+as the author of the parts of the library used.
+This can be in the form of a textual message at program startup or
+in documentation (online or textual) provided with the package.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ "This product includes cryptographic software written by
+ Eric Young (eay@cryptsoft.com)"
+ The word 'cryptographic' can be left out if the rouines from the library
+ being used are not cryptographic related :-).
+4. If you include any Windows specific code (or a derivative thereof) from
+ the apps directory (application code) you must include an acknowledgement:
+ "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+
+THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The licence and distribution terms for any publically available version or
+derivative of this code cannot be changed. i.e. this code cannot simply be
+copied and put under another distribution licence
+[including the GNU Public Licence.]
+
+
+==================
+xmlrpc-epi License
+==================
+
+Copyright 2000 Epinions, Inc.
+
+Subject to the following 3 conditions, Epinions, Inc. permits you, free of charge, to (a) use, copy, distribute, modify, perform and display this software and associated documentation files (the "Software"), and (b) permit others to whom the Software is furnished to do so as well.
+
+1) The above copyright notice and this permission notice shall be included without modification in all copies or substantial portions of the Software.
+
+2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+
+3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+===============
+libuuid License
+===============
+
+Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, and the entire permission notice in its entirety,
+ including the disclaimer of warranties.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+
+============
+zlib License
+============
+
+'zlib' general purpose compression library version 1.1.4, March 11th, 2002
+
+Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+The origin of this software must not be misrepresented; you must not claim
+that you wrote the original software. If you use this software in a product,
+an acknowledgment in the product documentation would be appreciated but is
+not required.
+
+Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+
+This notice may not be removed or altered from any source distribution.
+
+Jean-loup Gailly
+jloup@gzip.org
+
+Mark Adler
+madler@alumni.caltech.edu
diff --git a/linden/indra/newview/linux_tools/client-readme.txt b/linden/indra/newview/linux_tools/client-readme.txt
index 63086c8..e07384c 100644
--- a/linden/indra/newview/linux_tools/client-readme.txt
+++ b/linden/indra/newview/linux_tools/client-readme.txt
@@ -15,6 +15,7 @@ Life itself - please see .
5.3. 'Shiny' and client performance
5.4. Audio
5.5. 'Alt' key for camera controls doesn't work
+ 5.6. In-world movie playback
6. Advanced Troubleshooting
6.1. Audio
6.2. OpenGL
@@ -57,6 +58,7 @@ Minimum requirements:
* Video/Graphics Card:
o nVidia GeForce 2, GeForce 4mx, or better
o OR ATI Radeon 8500, 9250, or better
+ (nVidia cards are strongly recommended for the Linux client)
**NOTE**: Second Life absolutely requires you to have recent, correctly-
configured OpenGL 3D drivers for your hardware - the graphics drivers
@@ -76,6 +78,14 @@ unpacked it into - no installation step is required.
Run ./secondlife from the installation directory to start Second Life.
+For in-world MOVIE PLAYBACK, you will need GStreamer 0.10 installed on your
+system. This is optional - it is not required for general client
+functionality. If you have GStreamer 0.10 installed, the selection of
+in-world movies you can successfully play will depend on the GStreamer
+plugins you have; if you cannot play a certain in-world movie then you are
+probably missing the appropriate GStreamer plugin on your system - you may
+be able to install it (see TROUBLESHOOTING).
+
User data is stored in the hidden directory ~/.secondlife by default; you may
override this location with the SECONDLIFE_USER_DIR environment variable if
you wish.
@@ -93,10 +103,9 @@ the Alpha release of the Linux client.
stability. See PROBLEM 3 in the TROUBLESHOOTING section if you wish to
turn these on to possibly enhance your experience.
-* MISC - The following user-visible features are not currently fully
- implemented on the Linux client and are therefore known not to work properly
- at this time:
- * QuickTime movie playback and movie recording
+* MISC - The following features are not currently fully implemented on the
+ Linux client and are therefore known not to work properly:
+ * Movie recording
* Full Unicode font rendering
* Auto-updater
@@ -176,6 +185,13 @@ SOLUTION:- Some window managers eat the Alt key for their own purposes; you
example, the 'Windows' key!) which will allow the Alt key to function
properly with mouse actions in Second Life and other applications.
+PROBLEM 6:- In-world movie playback doesn't work for me.
+SOLUTION:- You need to have a working installation of GStreamer 0.10; this
+ is usually an optional package for most versions of Linux. If you have
+ installed GStreamer 0.10 and you can play some movies but not others then
+ you need to install a wider selection of GStreamer plugins, either
+ from your vendor or an appropriate third party.
+
6. ADVANCED TROUBLESHOOTING
-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -219,9 +235,8 @@ For problems and discussion concerning unofficial (not secondlife.com)
releases, please contact your packager or the SLDev mailing list:
-In-world help: Please use the 'Help' menu in the client for general
-non-Linux-specific Second Life help including live support from the fabulous
-'Help Request' team.
+In-world help: Please use the 'Help' menu in the client for various
+non-Linux-specific Second Life help options.
In-world discussion: There is a 'Linux Client Users' group
inside Second Life which is free to join. You can find it by pressing
diff --git a/linden/indra/newview/linux_tools/unicode.ttf b/linden/indra/newview/linux_tools/unicode.ttf
index c9c230d..91e6150 120000
--- a/linden/indra/newview/linux_tools/unicode.ttf
+++ b/linden/indra/newview/linux_tools/unicode.ttf
@@ -1 +1 @@
-/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
\ No newline at end of file
+/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
\ No newline at end of file
diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh
index d77da88..d39fc3a 100755
--- a/linden/indra/newview/linux_tools/wrapper.sh
+++ b/linden/indra/newview/linux_tools/wrapper.sh
@@ -48,6 +48,23 @@ export SDL_VIDEO_X11_DGAMOUSE=0
RUN_PATH=`dirname "$0" || echo .`
cd "${RUN_PATH}"
+if [ -n "$LL_TCMALLOC" ]; then
+ tcmalloc_libs='/usr/lib/libtcmalloc.so.0 /usr/lib/libstacktrace.so.0 /lib/libpthread.so.0'
+ all=1
+ for f in $tcmalloc_libs; do
+ if [ ! -f $f ]; then
+ all=0
+ fi
+ done
+ if [ $all != 1 ]; then
+ echo 'Cannot use tcmalloc libraries: components missing' 1>&2
+ else
+ export LD_PRELOAD=$(echo $tcmalloc_libs | tr ' ' :)
+ if [ -z "$HEAPCHECK" -a -z "$HEAPPROFILE" ]; then
+ export HEAPCHECK=${HEAPCHECK:-normal}
+ fi
+ fi
+fi
LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" $LL_WRAPPER bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat
echo
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index 307ab6f..3f6ab4f 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -61,6 +61,7 @@
#include "llface.h"
#include "llfirstuse.h"
#include "llfloater.h"
+#include "llfloateractivespeakers.h"
#include "llfloateravatarinfo.h"
#include "llfloaterbuildoptions.h"
#include "llfloaterchat.h"
@@ -117,6 +118,7 @@
#include "pipeline.h"
#include "roles_constants.h"
#include "viewer.h"
+#include "llvoiceclient.h"
// Ventrella
#include "llfollowcam.h"
@@ -346,7 +348,7 @@ LLAgent::LLAgent()
mEffectColor(0.f, 1.f, 1.f, 1.f),
mHaveHomePosition(FALSE),
mHomeRegionHandle( 0 ),
- mNearChatRadius(10.f),
+ mNearChatRadius(CHAT_NORMAL_RADIUS / 2.f),
mGodLevel( GOD_NOT ),
@@ -2844,7 +2846,7 @@ void LLAgent::endAnimationUpdateUI()
gMorphView->setVisible(FALSE);
}
- gIMView->setFloaterOpen( FALSE );
+ gIMMgr->setFloaterOpen( FALSE );
gConsole->setVisible( TRUE );
if (mAvatarObject)
@@ -3259,6 +3261,19 @@ void LLAgent::updateCamera()
setLookAt(LOOKAT_TARGET_FOCUS, NULL, mCameraPositionAgent);
}
+ // Send the camera position to the spatialized voice system.
+ if(gVoiceClient && getRegion())
+ {
+ LLMatrix3 rot;
+ rot.setRows(gCamera->getAtAxis(), gCamera->getLeftAxis (), gCamera->getUpAxis());
+
+ // MBW -- XXX -- Setting velocity to 0 for now. May figure it out later...
+ gVoiceClient->setCameraPosition(
+ getRegion()->getPosGlobalFromRegion(gCamera->getOrigin()),// position
+ LLVector3::zero, // velocity
+ rot); // rotation matrix
+ }
+
// update the travel distance stat
// this isn't directly related to the camera
// but this seemed like the best place to do this
@@ -3269,7 +3284,7 @@ void LLAgent::updateCamera()
mDistanceTraveled += delta.magVec();
}
mLastPositionGlobal = global_pos;
-
+
if (LLVOAvatar::sVisibleInFirstPerson && mAvatarObject.notNull() && !mAvatarObject->mIsSitting && cameraMouselook())
{
LLVector3 head_pos = mAvatarObject->mHeadp->getWorldPosition() +
@@ -4465,18 +4480,23 @@ void LLAgent::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
//-----------------------------------------------------------------------------
// heardChat()
//-----------------------------------------------------------------------------
-void LLAgent::heardChat(const LLChat& chat)
+void LLAgent::heardChat(const LLUUID& id)
{
- if (chat.mChatType == CHAT_TYPE_START
- || chat.mChatType == CHAT_TYPE_STOP)
+ // log text and voice chat to speaker mgr
+ // for keeping track of active speakers, etc.
+ gLocalSpeakerMgr->speakerChatted(id);
+
+ // don't respond to your own voice
+ if (id == getID()) return;
+
+ if (ll_rand(2) == 0)
{
- return;
- }
+ LLViewerObject *chatter = gObjectList.findObject(mLastChatterID);
+ setLookAt(LOOKAT_TARGET_AUTO_LISTEN, chatter, LLVector3::zero);
+ }
- mLastChatterID = chat.mFromID;
+ mLastChatterID = id;
mChatTimer.reset();
-
- mNearChatRadius = CHAT_NORMAL_RADIUS / 2.f;
}
//-----------------------------------------------------------------------------
@@ -5068,14 +5088,6 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
void update_group_floaters(const LLUUID& group_id)
{
- // *HACK: added to do a live update of the groups floater if it is
- // open.
- LLFloaterGroups* fg = LLFloaterGroups::getInstance(gAgent.getID());
- if(fg)
- {
- fg->reset();
- }
-
LLFloaterGroupInfo::refreshGroup(group_id);
// update avatar info
@@ -5085,10 +5097,10 @@ void update_group_floaters(const LLUUID& group_id)
fa->resetGroupList();
}
- if (gIMView)
+ if (gIMMgr)
{
// update the talk view
- gIMView->refresh();
+ gIMMgr->refresh();
}
}
@@ -5179,6 +5191,7 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
if (need_floater_update)
{
update_group_floaters(group.mID);
+ gAgent.fireEvent(new LLEvent(&gAgent, "new group"), "");
}
}
@@ -5508,6 +5521,11 @@ bool LLAgent::teleportCore(bool is_local)
gAgent.setTeleportState( LLAgent::TELEPORT_START );
}
make_ui_sound("UISndTeleportOut");
+
+ // MBW -- Let the voice client know a teleport has begun so it can leave the existing channel.
+ // This was breaking the case of teleporting within a single sim. Backing it out for now.
+// gVoiceClient->leaveChannel();
+
return true;
}
@@ -6770,7 +6788,7 @@ void LLAgent::removeWearable( EWearableType type )
if( old_wearable->isDirty() )
{
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
- gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)(S32)type );
+ gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)type );
return;
}
else
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h
index e4d207c..7fb4571 100644
--- a/linden/indra/newview/llagent.h
+++ b/linden/indra/newview/llagent.h
@@ -190,7 +190,7 @@ public:
void setObjectTracking(BOOL track) { mTrackFocusObject = track; }
// void setLookingAtAvatar(BOOL looking);
- void heardChat(const LLChat& chat);
+ void heardChat(const LLUUID& id);
void lookAtLastChat();
LLUUID getLastChatter() { return mLastChatterID; }
F32 getTypingTime() { return mTypingTimer.getElapsedTimeF32(); }
diff --git a/linden/indra/newview/llaudiosourcevo.cpp b/linden/indra/newview/llaudiosourcevo.cpp
index 084d532..b0e0758 100644
--- a/linden/indra/newview/llaudiosourcevo.cpp
+++ b/linden/indra/newview/llaudiosourcevo.cpp
@@ -83,7 +83,7 @@ void LLAudioSourceVO::updateGain()
{
mute = TRUE;
}
- else if (gMuteListp->isMuted(mOwnerID))
+ else if (gMuteListp->isMuted(mOwnerID, LLMute::flagObjectSounds))
{
mute = TRUE;
}
diff --git a/linden/indra/newview/llaudiostatus.cpp b/linden/indra/newview/llaudiostatus.cpp
deleted file mode 100644
index f24d939..0000000
--- a/linden/indra/newview/llaudiostatus.cpp
+++ /dev/null
@@ -1,412 +0,0 @@
-/**
- * @file llaudiostatus.cpp
- * @brief Audio channel allocation information
- *
- * Copyright (c) 2001-2007, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llaudiostatus.h"
-
-#include "linked_lists.h"
-#include "llmath.h" // clampf()
-#include "llgl.h"
-#include "llview.h"
-#include "llfontgl.h"
-#include "llcircuit.h"
-#include "message.h"
-#include "sound_ids.h"
-#include "audioengine.h"
-
-#include "llui.h"
-#include "llagent.h"
-#include "llviewercontrol.h"
-#include "viewer.h"
-
-#include "llglheaders.h"
-
-//
-// Imported globals
-//
-extern LLMessageSystem* gMessageSystem;
-extern LLAudioEngine* gAudiop;
-
-//
-// Constants
-//
-
-
-LLAudiostatus::LLAudiostatus(const std::string& name, const LLRect& rect)
- : LLView(name, rect, FALSE)
-{
- mPage = 0;
-}
-
-//
-// Functions
-//
-
-EWidgetType LLAudiostatus::getWidgetType() const
-{
- return WIDGET_TYPE_AUDIO_STATUS;
-}
-
-LLString LLAudiostatus::getWidgetTag() const
-{
- return LL_AUDIOSTATUS_TAG;
-}
-
-const F32 AUDIOSTATUS_SIZE = 64;
-
-void LLAudiostatus::draw()
-{
- /*
- mPage = gSavedSettings.getS32("AudioInfoPage");
-
- if (!getVisible() || !mPage)
- {
- return;
- }
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-
- // We're going to be drawing flat shaded rectangles
- {
- LLGLSNoTexture gls_ui_no_texture;
-
- // Draw background black rectangle
- glColor4f(0.f, 0.f, 0.f, 0.3f);
- gl_rect_2d(0, 0, 325, -340); // -y is down (don't know why)
- }
-
- glPopMatrix();
- glPushMatrix();
-
- S32 channel;
- char out_str[64];
- LLColor4 color;
-
- if (gAudiop)
- {
- for (channel = 0; channel < MAX_BUFFERS; channel++)
- {
- if (gAudiop->getFlags(channel) & LL_SOUND_FLAG_LOOP)
- {
- color.setVec(0.5f,0.5f,1.f,1.f);
- }
- else
- {
- color.setVec(1.f,1.f,1.f,1.f);
- }
-
- sprintf(out_str,"%d:",channel);
-
- U8 render_style = LLFontGL::NORMAL;
-
- if (gAudiop->getFlags(channel) & LL_SOUND_FLAG_SYNC_MASTER)
- {
- render_style |= LLFontGL::BOLD;
- }
-
- if (gAudiop->getFlags(channel) & LL_SOUND_FLAG_SYNC_SLAVE)
- {
- render_style |= LLFontGL::ITALIC;
- }
-
- if (gAudiop->getFlags(channel) & LL_SOUND_FLAG_SYNC_PENDING)
- {
- render_style |= LLFontGL::UNDERLINE;
- }
-
- LLFontGL::sMonospace->render(out_str, 0, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP, render_style, S32_MAX, S32_MAX, NULL);
-
-// render_style = LLFontGL::NORMAL;
-// if (gAudiop->mCurrentSyncMaster == channel)
-// {
-// render_style |= LLFontGL::BOLD;
-// }
-
- if (!gAudiop->mBufferInUse[channel])
- {
- color.setVec(0.5f,0.5f,0.5f,1.f);
- }
- else if (gAudiop->isPlaying(channel))
- {
- color.setVec(0.f,1.f,0.f,1.f);
- }
- else
- {
- color.setVec(1.f,0.f,0.f,1.f);
- }
-
- if (gAudiop->mWindBufferID ==channel)
- {
- strcpy(out_str,"wind DMO");
- }
- else if (gAudiop->mWaterBufferID ==channel)
- {
- strcpy(out_str,"water DMO");
- }
- else if (gAudiop->mGUID[channel] == SND_CHIRP)
- {
- strcpy(out_str,"chirp");
- }
- else if (gAudiop->mGUID[channel] == SND_SHOT)
- {
- strcpy(out_str,"shot");
- }
- else if (gAudiop->mGUID[channel] == SND_MORTAR)
- {
- strcpy(out_str,"mortar");
- }
- else if (gAudiop->mGUID[channel] == SND_HIT)
- {
- strcpy(out_str,"hit");
- }
- else if (gAudiop->mGUID[channel] == SND_EXPLOSION)
- {
- strcpy(out_str,"explosion");
- }
- else if (gAudiop->mGUID[channel] == SND_BOING)
- {
- strcpy(out_str,"boing");
- }
- else if (gAudiop->mGUID[channel] == SND_MUNCH)
- {
- strcpy(out_str,"munch");
- }
- else if (gAudiop->mGUID[channel] == SND_PUNCH)
- {
- strcpy(out_str,"punch");
- }
- else if (gAudiop->mGUID[channel] == SND_SPLASH)
- {
- strcpy(out_str,"splash");
- }
- else if (gAudiop->mGUID[channel] == SND_CLICK)
- {
- strcpy(out_str,"click");
- }
- else if (gAudiop->mGUID[channel] == SND_ARROW_SHOT)
- {
- strcpy(out_str,"arrow");
- }
- else if (gAudiop->mGUID[channel] == SND_ARROW_THUD)
- {
- strcpy(out_str,"arrow thud");
- }
- else if (gAudiop->mGUID[channel] == SND_SILENCE)
- {
- strcpy(out_str,"silence");
- }
- else if (gAudiop->mGUID[channel] == SND_WELCOME)
- {
- strcpy(out_str,"welcome");
- }
- else if (gAudiop->mGUID[channel] == SND_WELCOME)
- {
- strcpy(out_str,"welcome");
- }
- else if (gAudiop->mGUID[channel] == SND_READY_FOR_BATTLE)
- {
- strcpy(out_str,"ready for battle");
- }
- else if (gAudiop->mGUID[channel] == SND_SQUISH)
- {
- strcpy(out_str,"squish");
- }
- else if (gAudiop->mGUID[channel] == SND_FOOTSTEPS)
- {
- strcpy(out_str,"footsteps");
- }
- else if (gAudiop->mGUID[channel] == SND_BALL_COLLISION)
- {
- strcpy(out_str,"ball collision");
- }
- else
- {
- gAudiop->mGUID[channel].toString(out_str);
- }
-
- out_str[8] = 0;
- LLFontGL::sMonospace->render(out_str, 23, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP, render_style, S32_MAX, S32_MAX, NULL);
-
- if (mPage == 1)
- {
- LLVector3 pos = gAudiop->getSourcePos(channel);
- sprintf(out_str,"%6.2f %6.2f %6.2f",pos.mV[VX],pos.mV[VY],pos.mV[VZ]);
- LLFontGL::sMonospace->render(out_str, 103, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
-
- F32 gain = gAudiop->getSourceGain_dB(channel);
- sprintf(out_str,"%7.2f",gain);
- LLFontGL::sMonospace->render(out_str, 260, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
-
- sprintf(out_str,"%X", gAudiop->mPriority[channel] >> 28);
- LLFontGL::sMonospace->render(out_str, 315, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
- }
- else if (mPage == 4)
- {
- F32 indicator_width = 240;
-
- glPushMatrix();
- // We're going to be drawing flat shaded rectangles
- LLGLSNoTexture gls_no_texture;
- // Draw background black rectangle
- glColor4f(0.f, 0.f, 0.f, 1.0f);
-
- F32 length = gAudiop->getSourceLength(channel);
- length = length/(44100.0*2.0); // length in seconds
- length = length/10.f; // rescale per maximum length
-
- gl_rect_2d(80, (-channel*10)-1, 80 + llfloor((F32)(indicator_width * length)), (-channel*10)-9); // -y is down (don't know why)
-
- F32 current_pointer = gAudiop->getSourceCurrentSample(channel);
- current_pointer = current_pointer/(44100.0*2.0); // length in seconds
- current_pointer = current_pointer/10.f; // rescale per maximum length
-
- if (!gAudiop->mBufferInUse[channel])
- {
- glColor4f(0.5f,0.5f,0.5f,1.f);
- }
- else if (gAudiop->isPlaying(channel))
- {
- glColor4f(0.f,1.f,0.f,1.f);
- }
- else
- {
- glColor4f(1.f,0.f,0.f,1.f);
- }
-
- gl_rect_2d(80, (-channel*10)-1, 80 + llfloor((F32)(indicator_width * current_pointer)), (-channel*10)-9); // -y is down (don't know why)
-
- glPopMatrix();
- {
- LLGLSUIDefault gls_ui;
-
- color.setVec(1.f,1.f,1.f,1.f);
-
- sprintf(out_str,"%6.3f",length*10.f);
- LLFontGL::sMonospace->render(out_str, 200, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP, render_style, S32_MAX, S32_MAX, NULL);
-
- if (!(gAudiop->mVO_ID[channel].isNull()))
- {
- gAudiop->mVO_ID[channel].toString(out_str);
- out_str[8] = 0;
- LLFontGL::sMonospace->render(out_str, 260, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP, render_style, S32_MAX, S32_MAX, NULL);
- }
- if (gAudiop->mQueuedTrigger[channel])
- {
- gAudiop->mQueuedTrigger[channel]->mID.toString(out_str);
- out_str[8] = 0;
- LLFontGL::sMonospace->render(out_str, 320, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP, render_style, S32_MAX, S32_MAX, NULL);
- }
- }
- }
- else
- {
- S32 volume;
- S32 freq;
- S32 inside;
- S32 outside;
- LLVector3 orient;
- S32 out_volume;
- F32 min_dist;
- F32 max_dist;
-
- gAudiop->get3DParams(channel, &volume, &freq, &inside, &outside, &orient, &out_volume, &min_dist, &max_dist);
-
- if (mPage == 2)
- {
- sprintf(out_str,"%4.2f %4.2f %4.2f",orient.mV[VX],orient.mV[VY],orient.mV[VZ]);
- LLFontGL::sMonospace->render(out_str, 103, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
-
- sprintf(out_str,"%4d %4d",inside, outside);
- LLFontGL::sMonospace->render(out_str, 210, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
-
- sprintf(out_str,"%6d", out_volume);
- LLFontGL::sMonospace->render(out_str, 280, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
- }
- else // mPage == 3
- {
- F32 distance = 0.f;
- if (gAudiop->isSourceAmbient(channel))
- {
- distance = dist_vec(gAudiop->getSourcePos(channel),LLVector3::zero);
- }
- else
- {
- distance = dist_vec(gAudiop->getSourcePos(channel),gAudiop->getListenerPos());
- }
-
- sprintf(out_str,"%6.2f %6.2f %6.2f",distance, min_dist, max_dist);
- LLFontGL::sMonospace->render(out_str, 103, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
-
- F32 gain = gAudiop->getSourceGain_dB(channel);
- sprintf(out_str,"%7.2f",gain);
- LLFontGL::sMonospace->render(out_str, 280, -channel*10, color, LLFontGL::LEFT, LLFontGL::TOP);
- }
- }
- }
- LLFontGL::sMonospace->render("Listener", 23, -(channel*10+5), color, LLFontGL::LEFT, LLFontGL::TOP);
-
-
- if (mPage == 1)
- {
- LLVector3 lpos = gAudiop->getListenerPos();
- sprintf(out_str,"%6.2f %6.2f %6.2f",lpos.mV[VX],lpos.mV[VY],lpos.mV[VZ]);
- LLFontGL::sMonospace->render(out_str, 103, -(channel*10+5), color, LLFontGL::LEFT, LLFontGL::TOP);
-
- F32 gain = gAudiop->getMasterGain_dB();
- sprintf(out_str,"%7.2f",gain);
- LLFontGL::sMonospace->render(out_str, 280, -(channel*10+5), color, LLFontGL::LEFT, LLFontGL::TOP);
- }
- else if (mPage == 2)
- {
- sprintf(out_str,"cone orient inner outer gain");
- LLFontGL::sMonospace->render(out_str, 103, -(channel*10+5), color, LLFontGL::LEFT, LLFontGL::TOP);
- }
- else if (mPage == 3)
- {
- sprintf(out_str,"distance min max gain");
- LLFontGL::sMonospace->render(out_str, 103, -(channel*10+5), color, LLFontGL::LEFT, LLFontGL::TOP);
- }
- }
- else
- {
- LLFontGL::sMonospace->render("No Audio Engine available", 50 , -175,
- LLColor4(1.f,0.1f,0.1f,1.f),
- LLFontGL::LEFT, LLFontGL::TOP);
- }
-
- glPopMatrix();
- */
-}
-
-
-
-
-
-
diff --git a/linden/indra/newview/llaudiostatus.h b/linden/indra/newview/llaudiostatus.h
deleted file mode 100644
index fe7b67f..0000000
--- a/linden/indra/newview/llaudiostatus.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file llaudiostatus.h
- * @brief Audio channel allocation information
- *
- * Copyright (c) 2001-2007, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- */
-
-#ifndef LL_LLAUDIOSTATUS_H
-#define LL_LLAUDIOSTATUS_H
-
-#include "llmath.h"
-#include "llview.h"
-
-//const char TAB = '\t';
-//const char DIVIDER[] = " / ";
-
-class LLAudiostatus : public LLView
-{
- public:
- S32 mPage;
-protected:
-public:
- LLAudiostatus(const std::string& name, const LLRect& rect);
-
- virtual EWidgetType getWidgetType() const;
- virtual LLString getWidgetTag() const;
-
- virtual void draw();
-};
-
-#endif
diff --git a/linden/indra/newview/llcallingcard.cpp b/linden/indra/newview/llcallingcard.cpp
index 22a7f20..dfc99bf 100644
--- a/linden/indra/newview/llcallingcard.cpp
+++ b/linden/indra/newview/llcallingcard.cpp
@@ -294,6 +294,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
<< "]" << llendl;
}
}
+ notifyObservers();
return new_buddy_count;
}
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp
index 66ffdc4..9798796 100644
--- a/linden/indra/newview/llchatbar.cpp
+++ b/linden/indra/newview/llchatbar.cpp
@@ -47,6 +47,7 @@
#include "llgesturemgr.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
+#include "llstatusbar.h"
#include "lltextbox.h"
#include "lluiconstants.h"
#include "llviewergesture.h" // for triggering gestures
@@ -70,15 +71,18 @@ const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds
LLChatBar *gChatBar = NULL;
-LLChatBarGestureObserver* LLChatBar::sObserver = NULL;
+// legacy calllback glue
+void toggleChatHistory(void* user_data);
class LLChatBarGestureObserver : public LLGestureManagerObserver
{
public:
- LLChatBarGestureObserver() {}
+ LLChatBarGestureObserver(LLChatBar* chat_barp) : mChatBar(chat_barp){}
virtual ~LLChatBarGestureObserver() {}
- virtual void changed() { gChatBar->refreshGestures(); }
+ virtual void changed() { mChatBar->refreshGestures(); }
+private:
+ LLChatBar* mChatBar;
};
@@ -86,12 +90,29 @@ public:
// Functions
//
-LLChatBar::LLChatBar(const std::string& name, const LLRect& rect)
+//inline constructor
+// for chat bars embedded in floaters, etc
+LLChatBar::LLChatBar(const std::string& name)
+: LLPanel(name, LLRect(), BORDER_NO),
+ mInputEditor(NULL),
+ mGestureLabelTimer(),
+ mLastSpecialChatChannel(0),
+ mIsBuilt(FALSE),
+ mDynamicLayout(FALSE),
+ mGestureCombo(NULL),
+ mObserver(NULL)
+{
+}
+
+LLChatBar::LLChatBar(const std::string& name, const LLRect& rect)
: LLPanel(name, rect, BORDER_NO),
mInputEditor(NULL),
mGestureLabelTimer(),
mLastSpecialChatChannel(0),
- mIsBuilt(FALSE)
+ mIsBuilt(FALSE),
+ mDynamicLayout(TRUE),
+ mGestureCombo(NULL),
+ mObserver(NULL)
{
setIsChrome(TRUE);
@@ -107,29 +128,6 @@ LLChatBar::LLChatBar(const std::string& name, const LLRect& rect)
// Start visible if we left the app while chatting.
setVisible( gSavedSettings.getBOOL("ChatVisible") );
- mInputEditor = LLUICtrlFactory::getLineEditorByName(this, "Chat Editor");
- if (mInputEditor)
- {
- mInputEditor->setCallbackUserData(this);
- mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke);
- mInputEditor->setFocusLostCallback(&onInputEditorFocusLost);
- mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus );
- mInputEditor->setCommitOnFocusLost( FALSE );
- mInputEditor->setRevertOnEsc( FALSE );
- mInputEditor->setIgnoreTab(TRUE);
- mInputEditor->setPassDelete(TRUE);
- mInputEditor->setMaxTextLength(1023);
- mInputEditor->setEnableLineHistory(TRUE);
- }
-
- // Build the list of gestures
- refreshGestures();
-
- sObserver = new LLChatBarGestureObserver;
- gGestureManager.addObserver(sObserver);
-
- mIsBuilt = TRUE;
-
// Apply custom layout.
layout();
@@ -142,23 +140,43 @@ LLChatBar::LLChatBar(const std::string& name, const LLRect& rect)
LLChatBar::~LLChatBar()
{
- delete sObserver;
- sObserver = NULL;
+ delete mObserver;
+ mObserver = NULL;
// LLView destructor cleans up children
}
BOOL LLChatBar::postBuild()
{
- childSetAction("History", LLFloaterChat::toggle, this);
+ childSetAction("History", toggleChatHistory, this);
childSetAction("Say", onClickSay, this);
childSetAction("Shout", onClickShout, this);
- childSetCommitCallback("Gesture", onCommitGesture, this);
- LLButton * sayp = static_cast(getChildByName("Say"));
+
+ // attempt to bind to an existing combo box named gesture
+ setGestureCombo(LLUICtrlFactory::getComboBoxByName(this, "Gesture"));
+
+ LLButton * sayp = static_cast(getChildByName("Say", TRUE));
if(sayp)
{
setDefaultBtn(sayp);
}
+ mInputEditor = LLUICtrlFactory::getLineEditorByName(this, "Chat Editor");
+ if (mInputEditor)
+ {
+ mInputEditor->setCallbackUserData(this);
+ mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke);
+ mInputEditor->setFocusLostCallback(&onInputEditorFocusLost);
+ mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus );
+ mInputEditor->setCommitOnFocusLost( FALSE );
+ mInputEditor->setRevertOnEsc( FALSE );
+ mInputEditor->setIgnoreTab(TRUE);
+ mInputEditor->setPassDelete(TRUE);
+
+ mInputEditor->setMaxTextLength(1023);
+ }
+
+ mIsBuilt = TRUE;
+
return TRUE;
}
@@ -206,7 +224,8 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent )
handled = TRUE;
}
}
- else if ( KEY_ESCAPE == key )
+ // only do this in main chatbar
+ else if ( KEY_ESCAPE == key && gChatBar == this)
{
stopChat();
@@ -219,6 +238,8 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent )
void LLChatBar::layout()
{
+ if (!mDynamicLayout) return;
+
S32 rect_width = mRect.getWidth();
S32 count = 9; // number of elements in LLToolBar
S32 pad = 4;
@@ -281,13 +302,16 @@ void LLChatBar::refresh()
// hide in mouselook, but keep previous visibility state
//BOOL mouselook = gAgent.cameraMouselook();
// call superclass setVisible so that we don't overwrite the saved setting
- LLPanel::setVisible(gSavedSettings.getBOOL("ChatVisible"));
+ if (mDynamicLayout)
+ {
+ LLPanel::setVisible(gSavedSettings.getBOOL("ChatVisible"));
+ }
// HACK: Leave the name of the gesture in place for a few seconds.
const F32 SHOW_GESTURE_NAME_TIME = 2.f;
if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
{
- LLCtrlListInterface* gestures = childGetListInterface("Gesture");
+ LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
if (gestures) gestures->selectFirstItem();
mGestureLabelTimer.stop();
}
@@ -297,6 +321,8 @@ void LLChatBar::refresh()
gAgent.stopTyping();
}
+ childSetValue("History", LLFloaterChat::instanceVisible(LLSD()));
+
childSetEnabled("Say", mInputEditor->getText().size() > 0);
childSetEnabled("Shout", mInputEditor->getText().size() > 0);
@@ -304,16 +330,18 @@ void LLChatBar::refresh()
void LLChatBar::refreshGestures()
{
- LLCtrlListInterface* gestures = childGetListInterface("Gesture");
- if (gestures)
+ LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
+ if (mGestureCombo && gestures)
{
//store current selection so we can maintain it
- LLString cur_gesture = childGetValue("Gesture").asString();
+ LLString cur_gesture = mGestureCombo->getValue().asString();
gestures->selectFirstItem();
- LLString label = childGetValue("Gesture").asString();
+ LLString label = mGestureCombo->getValue().asString();;
// clear
gestures->clearRows();
- // add gestures
+
+ // collect list of unique gestures
+ std::map unique;
LLGestureManager::item_map_t::iterator it;
for (it = gGestureManager.mActive.begin(); it != gGestureManager.mActive.end(); ++it)
{
@@ -322,10 +350,18 @@ void LLChatBar::refreshGestures()
{
if (!gesture->mTrigger.empty())
{
- gestures->addSimpleElement(gesture->mTrigger);
+ unique[gesture->mTrigger] = TRUE;
}
}
}
+
+ // ad unique gestures
+ std::map ::iterator it2;
+ for (it2 = unique.begin(); it2 != unique.end(); ++it2)
+ {
+ gestures->addSimpleElement((*it2).first);
+ }
+
gestures->sortByColumn(0, TRUE);
// Insert label after sorting
gestures->addSimpleElement(label, ADD_TOP);
@@ -382,6 +418,23 @@ LLString LLChatBar::getCurrentChat()
return mInputEditor ? mInputEditor->getText() : LLString::null;
}
+void LLChatBar::setGestureCombo(LLComboBox* combo)
+{
+ mGestureCombo = combo;
+ if (mGestureCombo)
+ {
+ mGestureCombo->setCommitCallback(onCommitGesture);
+ mGestureCombo->setCallbackUserData(this);
+
+ // now register observer since we have a place to put the results
+ mObserver = new LLChatBarGestureObserver(this);
+ gGestureManager.addObserver(mObserver);
+
+ // refresh list from current active gestures
+ refreshGestures();
+ }
+}
+
//-----------------------------------------------------------------------
// Internal functions
//-----------------------------------------------------------------------
@@ -473,13 +526,13 @@ void LLChatBar::sendChat( EChatType type )
sendChatFromViewer(utf8_revised_text, type, TRUE);
}
}
- childSetValue("Chat Editor", LLSD(LLString::null));
+ childSetValue("Chat Editor", LLString::null);
gAgent.stopTyping();
// If the user wants to stop chatting on hitting return, lose focus
// and go out of chat mode.
- if (gSavedSettings.getBOOL("CloseChatOnReturn"))
+ if (gChatBar == this && gSavedSettings.getBOOL("CloseChatOnReturn"))
{
stopChat();
}
@@ -704,7 +757,7 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
void LLChatBar::onCommitGesture(LLUICtrl* ctrl, void* data)
{
LLChatBar* self = (LLChatBar*)data;
- LLCtrlListInterface* gestures = self->childGetListInterface("Gesture");
+ LLCtrlListInterface* gestures = self->mGestureCombo ? self->mGestureCombo->getListInterface() : NULL;
if (gestures)
{
S32 index = gestures->getFirstSelectedIndex();
@@ -728,6 +781,14 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl, void* data)
}
}
self->mGestureLabelTimer.start();
- // free focus back to chat bar
- self->childSetFocus("Gesture", FALSE);
+ if (self->mGestureCombo != NULL)
+ {
+ // free focus back to chat bar
+ self->mGestureCombo->setFocus(FALSE);
+ }
+}
+
+void toggleChatHistory(void* user_data)
+{
+ LLFloaterChat::toggleInstance(LLSD());
}
diff --git a/linden/indra/newview/llchatbar.h b/linden/indra/newview/llchatbar.h
index 32b0018..8a5acc6 100644
--- a/linden/indra/newview/llchatbar.h
+++ b/linden/indra/newview/llchatbar.h
@@ -33,23 +33,21 @@
#include "llframetimer.h"
#include "llchat.h"
-class LLButton;
-class LLComboBox;
class LLLineEditor;
class LLMessageSystem;
-class LLTextBox;
-class LLTextEditor;
class LLUICtrl;
class LLUUID;
class LLFrameTimer;
-class LLStatGraph;
class LLChatBarGestureObserver;
+class LLComboBox;
class LLChatBar
: public LLPanel
{
public:
- LLChatBar(const std::string& name, const LLRect& rect );
+ // constructor for inline chat-bars (e.g. hosted in chat history window)
+ LLChatBar(const std::string& name);
+ LLChatBar(const std::string& name, const LLRect& rect);
~LLChatBar();
virtual BOOL postBuild();
@@ -71,6 +69,10 @@ public:
BOOL inputEditorHasFocus();
LLString getCurrentChat();
+ // since chat bar logic is reused for chat history
+ // gesture combo box might not be a direct child
+ void setGestureCombo(LLComboBox* combo);
+
// Send a chat (after stripping /20foo channel chats).
// "Animate" means the nodding animation for regular text.
void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
@@ -81,7 +83,6 @@ public:
LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
// callbacks
- static void onClickHistory( void* userdata );
static void onClickSay( void* userdata );
static void onClickShout( void* userdata );
@@ -109,8 +110,10 @@ protected:
S32 mLastSpecialChatChannel;
BOOL mIsBuilt;
-
- static LLChatBarGestureObserver* sObserver;
+ BOOL mDynamicLayout;
+ LLComboBox* mGestureCombo;
+
+ LLChatBarGestureObserver* mObserver;
};
extern LLChatBar *gChatBar;
diff --git a/linden/indra/newview/llcolorswatch.cpp b/linden/indra/newview/llcolorswatch.cpp
index 19490a2..2503649 100644
--- a/linden/indra/newview/llcolorswatch.cpp
+++ b/linden/indra/newview/llcolorswatch.cpp
@@ -260,21 +260,6 @@ void LLColorSwatchCtrl::setEnabled( BOOL enabled )
}
-//////////////////////////////////////////////////////////////////////////////
-// called when parent filters down a visibility changed message
-void LLColorSwatchCtrl::onVisibilityChange ( BOOL curVisibilityIn )
-{
- // visibility changed - moved away to different tab for instance - cancel selection
- //if ( ! curVisibilityIn)
- //{
- // LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)LLFloater::getFloaterByHandle(mPickerHandle);
- // if (pickerp)
- // {
- // pickerp->cancelSelection();
- // }
- //}
-}
-
void LLColorSwatchCtrl::setValue(const LLSD& value)
{
set(LLColor4(value), TRUE, TRUE);
diff --git a/linden/indra/newview/llcolorswatch.h b/linden/indra/newview/llcolorswatch.h
index b80a0e6..710d332 100644
--- a/linden/indra/newview/llcolorswatch.h
+++ b/linden/indra/newview/llcolorswatch.h
@@ -88,8 +88,6 @@ public:
virtual LLXMLNodePtr getXML(bool save_children = true) const;
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
- virtual void onVisibilityChange ( BOOL curVisibilityIn );
-
static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE );
protected:
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp
index 7481d99..dffaa36 100644
--- a/linden/indra/newview/llcontroldef.cpp
+++ b/linden/indra/newview/llcontroldef.cpp
@@ -43,6 +43,33 @@
#include "v3color.h"
#include "llfirstuse.h"
+// For Listeners
+#include "audioengine.h"
+#include "llagent.h"
+#include "llconsole.h"
+#include "lldrawpoolterrain.h"
+#include "llflexibleobject.h"
+#include "llglslshader.h"
+#include "llmediaengine.h"
+#include "llpanelgeneral.h"
+#include "llpanelinput.h"
+#include "llsky.h"
+#include "llviewerimagelist.h"
+#include "llviewerthrottle.h"
+#include "llviewerwindow.h"
+#include "llvoavatar.h"
+#include "llvosky.h"
+#include "llvotree.h"
+#include "llvovolume.h"
+#include "llworld.h"
+#include "pipeline.h"
+#include "viewer.h"
+#include "llviewerjoystick.h"
+#include "llviewerparcelmgr.h"
+#include "llparcel.h"
+#include "llnotify.h"
+#include "llkeyboard.h"
+
void declare_settings()
{
// Somewhat under 1024 by 768
@@ -61,7 +88,7 @@ void declare_settings()
gSavedSettings.declareColor4("SystemChatColor", LLColor4(0.8f, 1.f, 1.f, 1.f), "Color of chat messages from SL System");
gSavedSettings.declareColor4("AgentChatColor", LLColor4(1.0f, 1.0f, 1.0f, 1.0f), "Color of chat messages from other residents");
gSavedSettings.declareColor4("ObjectChatColor", LLColor4(0.7f, 0.9f, 0.7f, 1.0f), "Color of chat messages from objects");
- gSavedSettings.declareColor4("llOwnerSayChatColor", LLColor4(0.7f, 0.0f, 0.7f, 1.0f), "Color of chat messages from objects only visible to the owner");
+ gSavedSettings.declareColor4("llOwnerSayChatColor", LLColor4(0.99f, 0.99f, 0.69f, 1.0f), "Color of chat messages from objects only visible to the owner");
gSavedSettings.declareColor4("BackgroundChatColor", LLColor4(0.f, 0.f, 0.f, 1.0f), "Color of chat bubble background");
gSavedSettings.declareColor4("ScriptErrorColor", LLColor4(0.82f, 0.82f, 0.99f, 1.0f), "Color of script error messages");
gSavedSettings.declareColor4("HTMLLinkColor", LLColor4(0.6f, 0.6f, 1.0f, 1.0f), "Color of hyperlinks");
@@ -237,6 +264,75 @@ void declare_settings()
gSavedSettings.declareBOOL("ChatShowTimestamps", TRUE, "Show timestamps in chat");
+ gSavedSettings.declareBOOL("EnableVoiceChat", FALSE, "Enable talking to other residents with a microphone");
+ gSavedSettings.declareBOOL("VoiceCallsFriendsOnly", FALSE, "Only accept voice calls from residents on your friends list");
+ gSavedSettings.declareBOOL("PTTCurrentlyEnabled", TRUE, "", NO_PERSIST);
+ gSavedSettings.declareBOOL("EnablePushToTalk", TRUE, "Must hold down a key or moouse button when talking into your microphone");
+ gSavedSettings.declareString("PushToTalkButton", "MiddleMouse", "Which button or keyboard key is used for push-to-talk");
+ gSavedSettings.declareBOOL("PushToTalkToggle", FALSE, "Should the push-to-talk button behave as a toggle");
+ gSavedSettings.declareS32("VoiceEarLocation", 0, "Location of the virtual ear for voice");
+ gSavedSettings.declareString("VivoxDebugServerName", "bhd.vivox.com", "Hostname of the vivox account server to use for voice when not connected to Agni.");
+ gSavedSettings.declareColor4("SpeakingColor", LLColor4(0.f, 1.f, 0.f, 1.f), "Color of various indicators when resident is speaking on a voice channel.");
+ gSavedSettings.declareColor4("OverdrivenColor", LLColor4(1.f, 0.f, 0.f, 1.f), "Color of various indicators when resident is speaking too loud.");
+ gSavedSettings.declareString("VoiceInputAudioDevice", "Default", "Audio input device to use for voice");
+ gSavedSettings.declareString("VoiceOutputAudioDevice", "Default", "Audio output device to use for voice");
+ gSavedSettings.declareString("VivoxDebugLevel", "-1", "Logging level to use when launching the vivox daemon");
+
+ //voice amplitude images;
+
+ /*
+ gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
+ gSavedSettings.declareString("VoiceImageLevel1", "b06ffd0a-7bfe-0449-0bbc-df291f1857c4", "Texture UUID for voice image level 1");
+ gSavedSettings.declareString("VoiceImageLevel2", "bfa16494-b731-5b59-3260-9e4fd29d63f7", "Texture UUID for voice image level 2");
+ gSavedSettings.declareString("VoiceImageLevel3", "6951074f-de1d-3c55-cb2f-e972877f7f81", "Texture UUID for voice image level 3");
+ gSavedSettings.declareString("VoiceImageLevel4", "ce3df80a-f0c5-a7cb-f5bc-d3bb38949d0d", "Texture UUID for voice image level 4");
+ gSavedSettings.declareString("VoiceImageLevel5", "8d0e359c-5cea-bdf5-b6b0-32d2fea6355c", "Texture UUID for voice image level 5");
+ gSavedSettings.declareString("VoiceImageLevel6", "ad9e64e0-a763-5d8c-f2e8-7b5dfdb7f20f", "Texture UUID for voice image level 6");
+ */
+
+ /*
+ // Jeffrey's first version
+ gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
+ gSavedSettings.declareString("VoiceImageLevel1", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 1");
+ gSavedSettings.declareString("VoiceImageLevel2", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 2");
+ gSavedSettings.declareString("VoiceImageLevel3", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 3");
+ gSavedSettings.declareString("VoiceImageLevel4", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 4");
+ gSavedSettings.declareString("VoiceImageLevel5", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 5");
+ gSavedSettings.declareString("VoiceImageLevel6", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 6");
+ */
+
+ // Brent's first version
+ /*
+ gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
+ gSavedSettings.declareString("VoiceImageLevel1", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 1");
+ gSavedSettings.declareString("VoiceImageLevel2", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 2");
+ gSavedSettings.declareString("VoiceImageLevel3", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 3");
+ gSavedSettings.declareString("VoiceImageLevel4", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 4");
+ gSavedSettings.declareString("VoiceImageLevel5", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 5");
+ gSavedSettings.declareString("VoiceImageLevel6", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 6");
+ */
+
+ /*
+ // Brent's second version
+ gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
+ gSavedSettings.declareString("VoiceImageLevel1", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 1");
+ gSavedSettings.declareString("VoiceImageLevel2", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 2");
+ gSavedSettings.declareString("VoiceImageLevel3", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 3");
+ gSavedSettings.declareString("VoiceImageLevel4", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 4");
+ gSavedSettings.declareString("VoiceImageLevel5", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 5");
+ gSavedSettings.declareString("VoiceImageLevel6", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 6");
+ */
+
+ // Jeffrey's tweak on 4/9/07
+ gSavedSettings.declareString("VoiceImageLevel0", "041ee5a0-cb6a-9ac5-6e49-41e9320507d5", "Texture UUID for voice image level 0");
+ gSavedSettings.declareString("VoiceImageLevel1", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 1");
+ gSavedSettings.declareString("VoiceImageLevel2", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 2");
+ gSavedSettings.declareString("VoiceImageLevel3", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 3");
+ gSavedSettings.declareString("VoiceImageLevel4", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 4");
+ gSavedSettings.declareString("VoiceImageLevel5", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 5");
+ gSavedSettings.declareString("VoiceImageLevel6", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 6");
+
+
//------------------------------------------------------------------------
// Caution Script Permission Prompts
//------------------------------------------------------------------------
@@ -419,6 +515,7 @@ void declare_settings()
gSavedSettings.declareBOOL("CloseChatOnReturn", FALSE, "Close chat after hitting return");
// Copy IM messages into chat history
+ gSavedSettings.declareBOOL("ChatHistoryTornOff", FALSE, "Show chat history window separately from Communicate window.");
gSavedSettings.declareBOOL("IMInChatHistory", FALSE, "Copy IM into chat history");
gSavedSettings.declareBOOL("IMShowTimestamps", TRUE, "Show timestamps in IM");
@@ -591,11 +688,10 @@ void declare_settings()
gSavedSettings.declareBOOL("ShowLeaders", FALSE, "", NO_PERSIST);
gSavedSettings.declareBOOL("ShowDirectory", FALSE, "", NO_PERSIST);
- gSavedSettings.declareBOOL("ShowFriends", FALSE, "", NO_PERSIST);
gSavedSettings.declareBOOL("AutoLoadWebProfiles", FALSE, "Automatically load ALL profile webpages without asking first.");
- gSavedSettings.declareBOOL("ShowIM", FALSE, "", NO_PERSIST);
+ gSavedSettings.declareBOOL("ShowCommunicate", FALSE, "", NO_PERSIST);
gSavedSettings.declareBOOL("ShowChatHistory", FALSE, "", NO_PERSIST);
#ifdef LL_RELEASE_FOR_DOWNLOAD
@@ -636,6 +732,7 @@ void declare_settings()
LLFirstUse::addConfigVariable("FirstStreamingMusic");
LLFirstUse::addConfigVariable("FirstStreamingVideo");
LLFirstUse::addConfigVariable("FirstSculptedPrim");
+ LLFirstUse::addConfigVariable("FirstVoice");
gSavedSettings.declareBOOL("ShowDebugConsole", FALSE, "Show log in SL window");
gSavedSettings.declareBOOL("ShowDebugStats", FALSE, "Show performance stats display");
@@ -797,6 +894,9 @@ void declare_settings()
//gSavedSettings.declareS32("BWRadio", 0, "[NOT USED]");
+ gSavedSettings.declareRect("ChatterboxRect", LLRect(0, 400, 350, 0), "Rectangle for chatterbox window");
+ gSavedSettings.declareRect("FloaterActiveSpeakersRect", LLRect(0, 300, 250, 0), "Rectangle for active speakers window");
+
// Avatar customizing floaters
gSavedSettings.declareRect("FloaterCustomizeAppearanceRect", LLRect(0, 540, 494, 0), "Rectangle for avatar customization window");
@@ -923,6 +1023,9 @@ void declare_settings()
// Script Panel
//gSavedSettings.declareRect("ScriptPanelRect", LLRect(250, 175 + 400, 250 + 400, 175), "[NOT USED]");
+ // volume floater
+ gSavedSettings.declareRect("FloaterAudioVolumeRect", LLRect(0, 440, 470, 0), "Rectangle for Audio Volume window");
+
// Radio button sets
gSavedSettings.declareU32("AvatarSex", 0, "", NO_PERSIST);
@@ -1012,16 +1115,20 @@ void declare_settings()
gSavedSettings.declareRect("HtmlFindRect", LLRect(16,650,600,128), "Rectangle for HTML find window");
// Audio
- gSavedSettings.declareF32("AudioLevelDistance", 1.0f, "Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast)");
- gSavedSettings.declareF32("AudioLevelDoppler", 1.0f, "Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect)");
- gSavedSettings.declareF32("AudioLevelFootsteps", 0.15f, "Relative audio level of footstep sound effects");
gSavedSettings.declareF32("AudioLevelMaster", 1.0f, "Master audio level, or overall volume");
+ gSavedSettings.declareF32("AudioLevelSFX", 1.0f, "Audio level of in-world sound effects");
+ gSavedSettings.declareF32("AudioLevelAmbient",0.5f, "Audio level of environment sounds");
+ gSavedSettings.declareF32("AudioLevelUI", 0.5f, "Audio level of UI sound effects");
gSavedSettings.declareF32("AudioLevelMusic", 1.0f, "Audio level of streaming music");
- gSavedSettings.declareF32("MediaAudioVolume", 1.0f, "Audio level of Quicktime movies");
+ gSavedSettings.declareF32("AudioLevelVoice", 1.0f, "Audio level of voice chat");
+ gSavedSettings.declareF32("AudioLevelMedia", 1.0f, "Audio level of Quicktime movies");
+ gSavedSettings.declareF32("AudioLevelMic", 1.0f, "Audio level of microphone input");
+
+// gSavedSettings.declareF32("MediaAudioVolume", 1.0f, "Audio level of Quicktime movies"); // removed
+
+ gSavedSettings.declareF32("AudioLevelDistance", 1.0f, "Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast)");
+ gSavedSettings.declareF32("AudioLevelDoppler", 1.0f, "Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect)");
gSavedSettings.declareF32("AudioLevelRolloff", 1.0f, "Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff)");
- gSavedSettings.declareF32("AudioLevelUI", 0.5f, "Audio level of UI sound effects");
- //gSavedSettings.declareF32("AudioLevelWater", 0.0f, "[NOT USED]");
- gSavedSettings.declareF32("AudioLevelWind", 0.5f, "Audio level of wind sound effect");
gSavedSettings.declareS32("AudioDefaultBitrate", 64, "Data streaming rate of uploaded audio samples (thousands of bits per second)");
gSavedSettings.declareBOOL("AudioStreamingMusic", FALSE, "Enable streaming audio");
@@ -1107,11 +1214,7 @@ void declare_settings()
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "Turns on \"Debug\" menu");
gSavedSettings.declareS32("ServerChoice", 0, "[DO NOT MODIFY] Controls which grid you connect to");
gSavedSettings.declareString("CustomServer", "", "Specifies IP address or hostname of userserver to which you connect");
-#ifdef LL_RELEASE_FOR_DOWNLOAD
gSavedSettings.declareBOOL("UseDebugLogin", FALSE, "Provides extra control over which grid to connect to");
-#else
- gSavedSettings.declareBOOL("UseDebugLogin", TRUE, "Provides extra control over which grid to connect to" );
-#endif
// First run is true on the first startup of a given installation.
// It is not related to whether your ACCOUNT has been logged in before.
@@ -1146,7 +1249,15 @@ void declare_settings()
gSavedSettings.declareBOOL("EditCameraMovement", FALSE, "When entering build mode, camera moves up above avatar");
gSavedSettings.declareBOOL("AppearanceCameraMovement", TRUE, "When entering appearance editing mode, camera zooms in on currently selected portion of avatar");
- gSavedSettings.declareBOOL("AltShowsPhysical", FALSE, "When ALT key is held down, physical objects are rendered in red.");
+ //gSavedSettings.declareBOOL("AltShowsPhysical", FALSE, "When ALT key is held down, physical objects are rendered in red.");
+ gSavedSettings.declareBOOL("BeaconAlwaysOn", FALSE, "Beacons / highlighting always on");
+ gSavedSettings.declareBOOL("scriptsbeacon", FALSE, "Beacon / Highlight scripted objects");
+ gSavedSettings.declareBOOL("physicalbeacon", TRUE, "Beacon / Highlight physical objects");
+ gSavedSettings.declareBOOL("soundsbeacon", FALSE, "Beacon / Highlight sound generators");
+ gSavedSettings.declareBOOL("particlesbeacon", FALSE, "Beacon / Highlight particle generators");
+ gSavedSettings.declareBOOL("scripttouchbeacon", TRUE, "Beacon / Highlight scripted objects with touch function");
+ gSavedSettings.declareBOOL("renderbeacons", FALSE, "Beacon / Highlight particle generators");
+ gSavedSettings.declareBOOL("renderhighlights", TRUE, "Beacon / Highlight scripted objects with touch function");
gSavedSettings.declareBOOL("MuteAudio", FALSE, "All audio plays at 0 volume (streaming audio still takes up bandwidth, for example)");
gSavedSettings.declareBOOL("MuteWhenMinimized", TRUE, "Mute audio when SL window is minimized");
@@ -1317,6 +1428,12 @@ void declare_settings()
gSavedSettings.declareBOOL("FlycamAbsolute", FALSE, "Treat Flycam values as absolute positions (not deltas).");
gSavedSettings.declareBOOL("FlycamZoomDirect", FALSE, "Map flycam zoom axis directly to camera zoom.");
+ // Vector Processor & Math
+ gSavedSettings.declareBOOL("VectorizePerfTest", TRUE, "Test SSE/vectorization performance and choose fastest version.");
+ gSavedSettings.declareBOOL("VectorizeEnable", FALSE, "Enable general vector operations and data alignment.");
+ gSavedSettings.declareBOOL("VectorizeSkin", TRUE, "Enable vector operations for avatar skinning.");
+ gSavedSettings.declareU32( "VectorizeProcessor", 0, "0=Compiler Default, 1=SSE, 2=SSE2, autodetected", NO_PERSIST);
+
//
// crash_settings.xml
//
@@ -1333,3 +1450,460 @@ void fixup_settings()
gSavedSettings.setBOOL("AnimateTextures", TRUE); // Force AnimateTextures to always be on
#endif
}
+
+////////////////////////////////////////////////////////////////////////////
+// Listeners
+
+class LLAFKTimeoutListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gAFKTimeout = (F32) event->getValue().asReal();
+ return true;
+ }
+};
+static LLAFKTimeoutListener afk_timeout_listener;
+
+class LLMouseSensitivityListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gMouseSensitivity = (F32) event->getValue().asReal();
+ return true;
+ }
+};
+static LLMouseSensitivityListener mouse_sensitivity_listener;
+
+
+class LLInvertMouseListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gInvertMouse = event->getValue().asBoolean();
+ return true;
+ }
+};
+static LLInvertMouseListener invert_mouse_listener;
+
+class LLRenderAvatarMouselookListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOAvatar::sVisibleInFirstPerson = event->getValue().asBoolean();
+ return true;
+ }
+};
+static LLRenderAvatarMouselookListener render_avatar_mouselook_listener;
+
+class LLRenderFarClipListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ F32 draw_distance = (F32) event->getValue().asReal();
+ gAgent.mDrawDistance = draw_distance;
+ if (gWorldPointer)
+ {
+ gWorldPointer->setLandFarClip(draw_distance);
+ }
+ return true;
+ }
+};
+static LLRenderFarClipListener render_far_clip_listener;
+
+class LLTerrainDetailListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLDrawPoolTerrain::sDetailMode = event->getValue().asInteger();
+ return true;
+ }
+};
+static LLTerrainDetailListener terrain_detail_listener;
+
+
+class LLSetShaderListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLShaderMgr::setShaders();
+ return true;
+ }
+};
+static LLSetShaderListener set_shader_listener;
+
+class LLReleaseGLBufferListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gPipeline.releaseGLBuffers();
+ LLShaderMgr::setShaders();
+ return true;
+ }
+};
+static LLReleaseGLBufferListener release_gl_buffer_listener;
+
+class LLVolumeLODListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOVolume::sLODFactor = (F32) event->getValue().asReal();
+ LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f;
+ return true;
+ }
+};
+static LLVolumeLODListener volume_lod_listener;
+
+class LLAvatarLODListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOAvatar::sLODFactor = (F32) event->getValue().asReal();
+ return true;
+ }
+};
+static LLAvatarLODListener avatar_lod_listener;
+
+class LLTreeLODListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOTree::sTreeFactor = (F32) event->getValue().asReal();
+ return true;
+ }
+};
+static LLTreeLODListener tree_lod_listener;
+
+class LLFlexLODListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVolumeImplFlexible::sUpdateFactor = (F32) event->getValue().asReal();
+ return true;
+ }
+};
+static LLFlexLODListener flex_lod_listener;
+
+class LLGammaListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ F32 gamma = (F32) event->getValue().asReal();
+ if (gamma == 0.0f)
+ {
+ gamma = 1.0f; // restore normal gamma
+ }
+ if (gamma != gViewerWindow->getWindow()->getGamma())
+ {
+ // Only save it if it's changed
+ if (!gViewerWindow->getWindow()->setGamma(gamma))
+ {
+ llwarns << "setGamma failed!" << llendl;
+ }
+ }
+
+ return true;
+ }
+};
+static LLGammaListener gamma_listener;
+
+class LLNightBrightnessListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOSky::sNighttimeBrightness = (F32) event->getValue().asReal();
+ return true;
+ }
+};
+static LLNightBrightnessListener night_brightness_listener;
+
+const F32 MAX_USER_FOG_RATIO = 4.f;
+const F32 MIN_USER_FOG_RATIO = 0.5f;
+
+class LLFogRatioListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ F32 fog_ratio = llmax(MIN_USER_FOG_RATIO,
+ llmin((F32) event->getValue().asReal(),
+ MAX_USER_FOG_RATIO));
+ gSky.setFogRatio(fog_ratio);
+ return true;
+ }
+};
+static LLFogRatioListener fog_ratio_listener;
+
+class LLMaxPartCountListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLViewerPartSim::setMaxPartCount(event->getValue().asInteger());
+ return true;
+ }
+};
+static LLMaxPartCountListener max_partCount_listener;
+
+const S32 MAX_USER_COMPOSITE_LIMIT = 100;
+const S32 MIN_USER_COMPOSITE_LIMIT = 0;
+
+class LLCompositeLimitListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ S32 composite_limit = llmax(MIN_USER_COMPOSITE_LIMIT,
+ llmin((S32)event->getValue().asInteger(),
+ MAX_USER_COMPOSITE_LIMIT));
+ LLVOAvatar::sMaxOtherAvatarsToComposite = composite_limit;
+ return true;
+ }
+};
+static LLCompositeLimitListener composite_limit_listener;
+
+class LLVideoMemoryListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gImageList.updateMaxResidentTexMem(event->getValue().asInteger());
+ return true;
+ }
+};
+static LLVideoMemoryListener video_memory_listener;
+
+class LLBandwidthListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gViewerThrottle.setMaxBandwidth((F32) event->getValue().asReal());
+ return true;
+ }
+};
+static LLBandwidthListener bandwidth_listener;
+
+class LLChatFontSizeListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gConsole->setFontSize(event->getValue().asInteger());
+ return true;
+ }
+};
+static LLChatFontSizeListener chat_font_size_listener;
+
+class LLChatPersistTimeListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gConsole->setLinePersistTime((F32) event->getValue().asReal());
+ return true;
+ }
+};
+static LLChatPersistTimeListener chat_persist_time_listener;
+
+class LLConsoleMaxLinesListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gConsole->setMaxLines(event->getValue().asInteger());
+ return true;
+ }
+};
+static LLConsoleMaxLinesListener console_max_lines_listener;
+
+// Listener for all volume settings
+class LLAudioListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ audio_update_volume(true);
+ return true;
+ }
+};
+static LLAudioListener audio_listener;
+
+class LLJoystickListener : public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLViewerJoystick::updateCamera(TRUE);
+ return true;
+ }
+};
+static LLJoystickListener joystick_listener;
+
+void stop_video();
+void prepare_video(const LLParcel *parcel);
+
+class LLAudioStreamMusicListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ if (gAudiop)
+ {
+ if ( event->getValue().asBoolean() )
+ {
+ if (gParcelMgr
+ && gParcelMgr->getAgentParcel()
+ && gParcelMgr->getAgentParcel()->getMusicURL())
+ {
+ // if stream is already playing, don't call this
+ // otherwise music will briefly stop
+ if ( ! gAudiop->isInternetStreamPlaying() )
+ {
+ gAudiop->startInternetStream(gParcelMgr->getAgentParcel()->getMusicURL());
+ }
+ }
+ }
+ else
+ {
+ gAudiop->stopInternetStream();
+ }
+ }
+ return true;
+ }
+};
+
+static LLAudioStreamMusicListener audio_stream_music_listener;
+
+
+
+class LLAudioStreamMediaListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ if (LLMediaEngine::getInstance() && LLMediaEngine::getInstance()->isAvailable())
+ {
+ if (event->getValue().asBoolean())
+ {
+ gMessageSystem->setHandlerFunc ( "ParcelMediaCommandMessage", LLMediaEngine::process_parcel_media );
+ gMessageSystem->setHandlerFunc ( "ParcelMediaUpdate", LLMediaEngine::process_parcel_media_update );
+ if ( ( gParcelMgr ) &&
+ ( gParcelMgr->getAgentParcel () ) &&
+ ( gParcelMgr->getAgentParcel()->getMediaURL () ) )
+ {
+ prepare_video ( gParcelMgr->getAgentParcel () );
+ }
+ }
+ else
+ {
+ gMessageSystem->setHandlerFunc("ParcelMediaCommandMessage", null_message_callback);
+ gMessageSystem->setHandlerFunc ( "ParcelMediaUpdate", null_message_callback );
+ stop_video();
+ }
+ }
+ else
+ {
+ if (gSavedSettings.getWarning("QuickTimeInstalled"))
+ {
+ gSavedSettings.setWarning("QuickTimeInstalled", FALSE);
+
+ LLNotifyBox::showXml("NoQuickTime" );
+ }
+ }
+
+ return true;
+ }
+};
+
+static LLAudioStreamMediaListener audio_stream_media_listener;
+
+
+class LLUseOcclusionListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery &&
+ !gUseWireframe);
+ return true;
+ }
+};
+static LLUseOcclusionListener use_occlusion_listener;
+
+class LLNumpadControlListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ if (gKeyboard)
+ {
+ gKeyboard->setNumpadDistinct(static_cast(event->getValue().asInteger()));
+ }
+ return true;
+ }
+};
+
+static LLNumpadControlListener numpad_control_listener;
+
+class LLRenderUseVBOListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gPipeline.setUseVBO(event->getValue().asBoolean());
+ return true;
+ }
+};
+static LLRenderUseVBOListener render_use_vbo_listener;
+
+class LLRenderLightingDetailListener: public LLSimpleListener
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ gPipeline.setLightingDetail(event->getValue().asInteger());
+ return true;
+ }
+};
+static LLRenderLightingDetailListener render_lighting_detail_listener;
+
+////////////////////////////////////////////////////////////////////////////
+
+void settings_setup_listeners()
+{
+ gSavedSettings.getControl("FirstPersonAvatarVisible")->addListener(&render_avatar_mouselook_listener);
+ gSavedSettings.getControl("MouseSensitivity")->addListener(&mouse_sensitivity_listener);
+ gSavedSettings.getControl("InvertMouse")->addListener(&invert_mouse_listener);
+ gSavedSettings.getControl("AFKTimeout")->addListener(&afk_timeout_listener);
+ gSavedSettings.getControl("RenderFarClip")->addListener(&render_far_clip_listener);
+ gSavedSettings.getControl("RenderTerrainDetail")->addListener(&terrain_detail_listener);
+ gSavedSettings.getControl("RenderRippleWater")->addListener(&set_shader_listener);
+ gSavedSettings.getControl("RenderAvatarVP")->addListener(&set_shader_listener);
+ gSavedSettings.getControl("VertexShaderEnable")->addListener(&set_shader_listener);
+ gSavedSettings.getControl("RenderDynamicReflections")->addListener(&set_shader_listener);
+ gSavedSettings.getControl("RenderGlow")->addListener(&release_gl_buffer_listener);
+ gSavedSettings.getControl("RenderGlowResolution")->addListener(&release_gl_buffer_listener);
+ gSavedSettings.getControl("RenderAvatarMode")->addListener(&set_shader_listener);
+ gSavedSettings.getControl("RenderVolumeLODFactor")->addListener(&volume_lod_listener);
+ gSavedSettings.getControl("RenderAvatarLODFactor")->addListener(&avatar_lod_listener);
+ gSavedSettings.getControl("RenderTreeLODFactor")->addListener(&tree_lod_listener);
+ gSavedSettings.getControl("RenderFlexTimeFactor")->addListener(&flex_lod_listener);
+ gSavedSettings.getControl("ThrottleBandwidthKBPS")->addListener(&bandwidth_listener);
+ gSavedSettings.getControl("RenderGamma")->addListener(&gamma_listener);
+ gSavedSettings.getControl("RenderNightBrightness")->addListener(&night_brightness_listener);
+ gSavedSettings.getControl("RenderFogRatio")->addListener(&fog_ratio_listener);
+ gSavedSettings.getControl("RenderMaxPartCount")->addListener(&max_partCount_listener);
+ gSavedSettings.getControl("AvatarCompositeLimit")->addListener(&composite_limit_listener);
+ gSavedSettings.getControl("GraphicsCardMemorySetting")->addListener(&video_memory_listener);
+ gSavedSettings.getControl("ChatFontSize")->addListener(&chat_font_size_listener);
+ gSavedSettings.getControl("ChatPersistTime")->addListener(&chat_persist_time_listener);
+ gSavedSettings.getControl("ConsoleMaxLines")->addListener(&console_max_lines_listener);
+ gSavedSettings.getControl("UseOcclusion")->addListener(&use_occlusion_listener);
+ gSavedSettings.getControl("AudioLevelMaster")->addListener(&audio_listener);
+// gSavedSettings.getControl("AudioLevelSFX")->addListener(&audio_volume_listener); // no need for listener
+// gSavedSettings.getControl("AudioLevelUI")->addListener(&audio_volume_listener); // no need for listener
+ gSavedSettings.getControl("AudioLevelAmbient")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioLevelMusic")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioLevelMedia")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioLevelVoice")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioLevelDistance")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioLevelDoppler")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioLevelRolloff")->addListener(&audio_listener);
+ gSavedSettings.getControl("AudioStreamingMusic")->addListener(&audio_stream_music_listener);
+ gSavedSettings.getControl("AudioStreamingVideo")->addListener(&audio_stream_media_listener);
+ gSavedSettings.getControl("MuteAudio")->addListener(&audio_listener);
+ gSavedSettings.getControl("RenderVBOEnable")->addListener(&render_use_vbo_listener);
+ gSavedSettings.getControl("RenderLightingDetail")->addListener(&render_lighting_detail_listener);
+ gSavedSettings.getControl("NumpadControl")->addListener(&numpad_control_listener);
+ gSavedSettings.getControl("FlycamAxis0")->addListener(&joystick_listener);
+ gSavedSettings.getControl("FlycamAxis1")->addListener(&joystick_listener);
+ gSavedSettings.getControl("FlycamAxis2")->addListener(&joystick_listener);
+ gSavedSettings.getControl("FlycamAxis3")->addListener(&joystick_listener);
+ gSavedSettings.getControl("FlycamAxis4")->addListener(&joystick_listener);
+ gSavedSettings.getControl("FlycamAxis5")->addListener(&joystick_listener);
+ gSavedSettings.getControl("FlycamAxis6")->addListener(&joystick_listener);
+}
diff --git a/linden/indra/newview/lldebugmessagebox.cpp b/linden/indra/newview/lldebugmessagebox.cpp
index 948b96a..b1f44e9 100644
--- a/linden/indra/newview/lldebugmessagebox.cpp
+++ b/linden/indra/newview/lldebugmessagebox.cpp
@@ -53,25 +53,25 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy
switch(var_type)
{
case VAR_TYPE_F32:
- mSlider1 = new LLSliderCtrl("slider 1", LLRect(20,130,190,110), title, NULL, 70, 130, TRUE, TRUE, NULL, NULL, *((F32*)var), -100.f, 100.f, 0.1f, NULL);
+ mSlider1 = new LLSliderCtrl("slider 1", LLRect(20,130,190,110), title, NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, *((F32*)var), -100.f, 100.f, 0.1f, NULL);
mSlider1->setPrecision(3);
addChild(mSlider1);
mSlider2 = NULL;
mSlider3 = NULL;
break;
case VAR_TYPE_S32:
- mSlider1 = new LLSliderCtrl("slider 1", LLRect(20,100,190,80), title, NULL, 70, 130, TRUE, TRUE, NULL, NULL, (F32)*((S32*)var), -255.f, 255.f, 1.f, NULL);
+ mSlider1 = new LLSliderCtrl("slider 1", LLRect(20,100,190,80), title, NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, (F32)*((S32*)var), -255.f, 255.f, 1.f, NULL);
mSlider1->setPrecision(0);
addChild(mSlider1);
mSlider2 = NULL;
mSlider3 = NULL;
break;
case VAR_TYPE_VEC3:
- mSlider1 = new LLSliderCtrl("slider 1", LLRect(20,130,190,110), "x: ", NULL, 70, 130, TRUE, TRUE, NULL, NULL, ((LLVector3*)var)->mV[VX], -100.f, 100.f, 0.1f, NULL);
+ mSlider1 = new LLSliderCtrl("slider 1", LLRect(20,130,190,110), "x: ", NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, ((LLVector3*)var)->mV[VX], -100.f, 100.f, 0.1f, NULL);
mSlider1->setPrecision(3);
- mSlider2 = new LLSliderCtrl("slider 2", LLRect(20,100,190,80), "y: ", NULL, 70, 130, TRUE, TRUE, NULL, NULL, ((LLVector3*)var)->mV[VY], -100.f, 100.f, 0.1f, NULL);
+ mSlider2 = new LLSliderCtrl("slider 2", LLRect(20,100,190,80), "y: ", NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, ((LLVector3*)var)->mV[VY], -100.f, 100.f, 0.1f, NULL);
mSlider2->setPrecision(3);
- mSlider3 = new LLSliderCtrl("slider 3", LLRect(20,70,190,50), "z: ", NULL, 70, 130, TRUE, TRUE, NULL, NULL, ((LLVector3*)var)->mV[VZ], -100.f, 100.f, 0.1f, NULL);
+ mSlider3 = new LLSliderCtrl("slider 3", LLRect(20,70,190,50), "z: ", NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, ((LLVector3*)var)->mV[VZ], -100.f, 100.f, 0.1f, NULL);
mSlider3->setPrecision(3);
addChild(mSlider1);
addChild(mSlider2);
diff --git a/linden/indra/newview/lldebugview.cpp b/linden/indra/newview/lldebugview.cpp
index dc179cc..861a5bb 100644
--- a/linden/indra/newview/lldebugview.cpp
+++ b/linden/indra/newview/lldebugview.cpp
@@ -37,7 +37,6 @@
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
-#include "llaudiostatus.h"
#include "imageids.h"
#include "llvelocitybar.h"
#include "llviewerwindow.h"
@@ -109,19 +108,6 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
mStatViewp->setVisible(FALSE);
addChild(mStatViewp);
- //
- // Audio debugging stuff
- //
- const S32 AUDIO_STATUS_LEFT = rect.getWidth()/2-100;
- const S32 AUDIO_STATUS_WIDTH = 320;
- const S32 AUDIO_STATUS_TOP = (rect.getHeight()/2)+400;
- const S32 AUDIO_STATUS_HEIGHT = 320;
- r.setLeftTopAndSize( AUDIO_STATUS_LEFT, AUDIO_STATUS_TOP, AUDIO_STATUS_WIDTH, AUDIO_STATUS_HEIGHT );
- LLAudiostatus* gAudioStatus = new LLAudiostatus("AudioStatus", r);
- gAudioStatus->setFollowsTop();
- gAudioStatus->setFollowsRight();
- addChild(gAudioStatus);
-
const S32 VELOCITY_LEFT = 10; // 370;
const S32 VELOCITY_WIDTH = 500;
const S32 VELOCITY_TOP = 140;
diff --git a/linden/indra/newview/lldrawable.h b/linden/indra/newview/lldrawable.h
index c2cafe3..e550142 100644
--- a/linden/indra/newview/lldrawable.h
+++ b/linden/indra/newview/lldrawable.h
@@ -46,6 +46,7 @@
#include "llviewerobject.h"
#include "llrect.h"
+class LLCamera;
class LLDrawPool;
class LLDrawable;
class LLFace;
diff --git a/linden/indra/newview/lldrawpoolsky.h b/linden/indra/newview/lldrawpoolsky.h
index 2f11c67..645e669 100644
--- a/linden/indra/newview/lldrawpoolsky.h
+++ b/linden/indra/newview/lldrawpoolsky.h
@@ -57,7 +57,7 @@ public:
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void renderForSelect();
void setSkyTex(LLSkyTex* const st) { mSkyTex = st; }
- void setSun(LLHeavenBody* sun) { mHB[0] = sun; }
+ void setSun(LLHeavenBody* sun_flag) { mHB[0] = sun_flag; }
void setMoon(LLHeavenBody* moon) { mHB[1] = moon; }
void renderSkyCubeFace(U8 side);
diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp
index 343f14c..100eb43 100644
--- a/linden/indra/newview/lldrawpoolwater.cpp
+++ b/linden/indra/newview/lldrawpoolwater.cpp
@@ -595,7 +595,7 @@ void LLDrawPoolWater::shade()
glUniform1fARB(gWaterProgram.mUniform[LLShaderMgr::WATER_TIME], sTime);
glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_SPECULAR], 1, light_diffuse.mV);
glUniform1fARB(gWaterProgram.mUniform[LLShaderMgr::WATER_SPECULAR_EXP], light_exp);
- glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_EYEVEC], 1, gCamera->getOrigin().mV);
+ glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_EYEVEC], 1, (GLfloat *)(gCamera->getOrigin().mV));
glUniform2fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_WAVE_DIR1], 1, d1.mV);
glUniform2fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_WAVE_DIR2], 1, d2.mV);
glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_LIGHT_DIR], 1, light_dir.mV);
diff --git a/linden/indra/newview/llemote.h b/linden/indra/newview/llemote.h
index a0aa353..9e2e09c 100644
--- a/linden/indra/newview/llemote.h
+++ b/linden/indra/newview/llemote.h
@@ -108,6 +108,8 @@ public:
// called when a motion is deactivated
virtual void onDeactivate();
+ virtual BOOL canDeprecate() { return FALSE; }
+
static BOOL getIndexFromName( const char* name, U32* index );
protected:
diff --git a/linden/indra/newview/llface.h b/linden/indra/newview/llface.h
index 711cd8e..24ef213 100644
--- a/linden/indra/newview/llface.h
+++ b/linden/indra/newview/llface.h
@@ -41,7 +41,6 @@
#include "lldarrayptr.h"
#include "llvertexbuffer.h"
#include "llviewerimage.h"
-#include "llpagemem.h"
#include "llstat.h"
#include "lldrawable.h"
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp
index c7be3aa..ba1296a 100644
--- a/linden/indra/newview/llfasttimerview.cpp
+++ b/linden/indra/newview/llfasttimerview.cpp
@@ -931,8 +931,7 @@ void LLFastTimerView::draw()
//draw line graph history
{
LLGLSNoTexture no_texture;
- LLGLEnable scissor(GL_SCISSOR_TEST);
- LLUI::setScissorRegionLocal(graph_rect);
+ LLLocalClipRect clip(graph_rect);
//normalize based on last frame's maximum
static U64 last_max = 0;
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp
index 2a30680..8bcbc1e 100644
--- a/linden/indra/newview/llfeaturemanager.cpp
+++ b/linden/indra/newview/llfeaturemanager.cpp
@@ -62,6 +62,8 @@ extern void write_debug(const std::string& str);
const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt";
#elif LL_LINUX
const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt";
+#elif LL_SOLARIS
+const char FEATURE_TABLE_FILENAME[] = "featuretable_solaris.txt";
#else
const char FEATURE_TABLE_FILENAME[] = "featuretable.txt";
#endif
@@ -405,7 +407,12 @@ void LLFeatureManager::initCPUFeatureMasks()
maskFeatures("RAM256MB");
}
+#if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast
+#error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here?
+ if (gSysCPU.getMhz() < 800)
+#else
if (gSysCPU.getMhz() < 1100)
+#endif
{
maskFeatures("CPUSlow");
}
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp
index 1ddac8e..b6bd444 100644
--- a/linden/indra/newview/llfirstuse.cpp
+++ b/linden/indra/newview/llfirstuse.cpp
@@ -35,6 +35,7 @@
// viewer includes
#include "llnotify.h"
+#include "llfloatervoicewizard.h"
#include "llviewercontrol.h"
#include "llui.h"
#include "viewer.h"
@@ -248,3 +249,15 @@ void LLFirstUse::useSculptedPrim()
}
}
+
+// static
+void LLFirstUse::useVoice()
+{
+ if (gDisableVoice) return;
+ if (gSavedSettings.getWarning("FirstVoice"))
+ {
+ gSavedSettings.setWarning("FirstVoice", FALSE);
+
+ LLFloaterVoiceWizard::showInstance();
+ }
+}
diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h
index d48ae96..1edbf70 100644
--- a/linden/indra/newview/llfirstuse.h
+++ b/linden/indra/newview/llfirstuse.h
@@ -101,6 +101,7 @@ public:
static void useFlexible();
static void useDebugMenus();
static void useSculptedPrim();
+ static void useVoice();
protected:
static std::set sConfigVariables;
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp
new file mode 100644
index 0000000..1c3990e
--- /dev/null
+++ b/linden/indra/newview/llfloateractivespeakers.cpp
@@ -0,0 +1,831 @@
+/**
+ * @file llfloateractivespeakers.cpp
+ * @brief Management interface for muting and controlling volume of residents currently speaking
+ *
+ * Copyright (c) 2005-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloateractivespeakers.h"
+
+#include "llagent.h"
+#include "llvoavatar.h"
+#include "llfloateravatarinfo.h"
+#include "llvieweruictrlfactory.h"
+#include "llviewercontrol.h"
+#include "llscrolllistctrl.h"
+#include "llbutton.h"
+#include "lltextbox.h"
+#include "llmutelist.h"
+#include "llviewerobjectlist.h"
+#include "llimpanel.h" // LLVoiceChannel
+#include "llsdutil.h"
+
+const F32 SPEAKER_TIMEOUT = 10.f; // seconds of not being on voice channel before removed from list of active speakers
+const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f);
+const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f);
+const F32 TYPING_ANIMATION_FPS = 2.5f;
+
+LLLocalSpeakerMgr* gLocalSpeakerMgr = NULL;
+LLActiveSpeakerMgr* gActiveChannelSpeakerMgr = NULL;
+
+LLSpeaker::speaker_map_t LLSpeaker::sSpeakers;
+
+LLSpeaker::LLSpeaker(const LLUUID& id, const LLString& name, const ESpeakerType type) :
+ mStatus(LLSpeaker::STATUS_TEXT_ONLY),
+ mLastSpokeTime(0.f),
+ mSpeechVolume(0.f),
+ mHasSpoken(FALSE),
+ mDotColor(LLColor4::white),
+ mID(id),
+ mTyping(FALSE),
+ mSortIndex(0),
+ mType(type)
+{
+ mHandle.init();
+ sSpeakers.insert(std::make_pair(mHandle, this));
+ if (name.empty() && type == SPEAKER_AGENT)
+ {
+ lookupName();
+ }
+ else
+ {
+ mDisplayName = name;
+ }
+ mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT);
+}
+
+LLSpeaker::~LLSpeaker()
+{
+ sSpeakers.erase(mHandle);
+}
+
+void LLSpeaker::lookupName()
+{
+ gCacheName->getName(mID, onAvatarNameLookup, new LLViewHandle(mHandle));
+}
+
+//static
+void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const char* first, const char* last, BOOL is_group, void* user_data)
+{
+ LLViewHandle speaker_handle = *(LLViewHandle*)user_data;
+ delete (LLViewHandle*)user_data;
+
+ speaker_map_t::iterator found_it = sSpeakers.find(speaker_handle);
+ if (found_it != sSpeakers.end())
+ {
+ LLSpeaker* speakerp = found_it->second;
+ if (speakerp)
+ {
+ speakerp->mDisplayName = llformat("%s %s", first, last);
+ }
+ }
+}
+
+
+// helper sort class
+struct LLSortRecentSpeakers
+{
+ bool operator()(const LLPointer lhs, const LLPointer rhs) const;
+};
+
+bool LLSortRecentSpeakers::operator()(const LLPointer lhs, const LLPointer rhs) const
+{
+ // Sort first on status
+ if (lhs->mStatus != rhs->mStatus)
+ {
+ return (lhs->mStatus < rhs->mStatus);
+ }
+
+ // and then on last speaking time
+ if(lhs->mLastSpokeTime != rhs->mLastSpokeTime)
+ {
+ return (lhs->mLastSpokeTime > rhs->mLastSpokeTime);
+ }
+
+ // and finally (only if those are both equal), on name.
+ return( lhs->mDisplayName.compare(rhs->mDisplayName) < 0 );
+}
+
+LLFloaterActiveSpeakers::LLFloaterActiveSpeakers(const LLSD& seed) : mPanel(NULL)
+{
+ mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
+ // do not automatically open singleton floaters (as result of getInstance())
+ BOOL no_open = FALSE;
+ gUICtrlFactory->buildFloater(this, "floater_active_speakers.xml", &getFactoryMap(), no_open);
+ //RN: for now, we poll voice client every frame to get voice amplitude feedback
+ //gVoiceClient->addObserver(this);
+ mPanel->refreshSpeakers();
+}
+
+LLFloaterActiveSpeakers::~LLFloaterActiveSpeakers()
+{
+}
+
+void LLFloaterActiveSpeakers::onClose(bool app_quitting)
+{
+ setVisible(FALSE);
+}
+
+void LLFloaterActiveSpeakers::draw()
+{
+ // update state every frame to get live amplitude feedback
+ mPanel->refreshSpeakers();
+ LLFloater::draw();
+}
+
+BOOL LLFloaterActiveSpeakers::postBuild()
+{
+ mPanel = (LLPanelActiveSpeakers*)LLUICtrlFactory::getPanelByName(this, "active_speakers_panel");
+ return TRUE;
+}
+
+void LLFloaterActiveSpeakers::onChange()
+{
+ //refresh();
+}
+
+//static
+void* LLFloaterActiveSpeakers::createSpeakersPanel(void* data)
+{
+ // don't show text only speakers
+ return new LLPanelActiveSpeakers(gActiveChannelSpeakerMgr, FALSE);
+}
+
+
+//
+// LLPanelActiveSpeakers
+//
+LLPanelActiveSpeakers::LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters) :
+ mSpeakerList(NULL),
+ mMuteVoiceCtrl(NULL),
+ mMuteTextCtrl(NULL),
+ mNameText(NULL),
+ mProfileBtn(NULL),
+ mShowTextChatters(show_text_chatters),
+ mSpeakerMgr(data_source)
+{
+ setMouseOpaque(FALSE);
+}
+
+LLPanelActiveSpeakers::~LLPanelActiveSpeakers()
+{
+
+}
+
+BOOL LLPanelActiveSpeakers::postBuild()
+{
+ mSpeakerList = LLUICtrlFactory::getScrollListByName(this, "speakers_list");
+
+ mMuteTextCtrl = (LLUICtrl*)getCtrlByNameAndType("mute_text_btn", WIDGET_TYPE_DONTCARE);
+ childSetCommitCallback("mute_text_btn", onClickMuteTextCommit, this);
+
+ mMuteVoiceCtrl = (LLUICtrl*)getCtrlByNameAndType("mute_btn", WIDGET_TYPE_DONTCARE);
+ childSetCommitCallback("mute_btn", onClickMuteVoiceCommit, this);
+ childSetAction("mute_btn", onClickMuteVoice, this);
+
+ childSetCommitCallback("speaker_volume", onVolumeChange, this);
+
+ mNameText = LLUICtrlFactory::getTextBoxByName(this, "resident_name");
+
+ mProfileBtn = LLUICtrlFactory::getButtonByName(this, "profile_btn");
+ childSetAction("profile_btn", onClickProfile, this);
+ return TRUE;
+}
+
+void LLPanelActiveSpeakers::refreshSpeakers()
+{
+ // store off current selection and scroll state to preserve across list rebuilds
+ LLUUID selected_id = mSpeakerList->getSimpleSelectedValue().asUUID();
+ S32 scroll_pos = mSpeakerList->getScrollInterface()->getScrollPos();
+
+ BOOL sort_ascending = mSpeakerList->getSortAscending();
+ LLString sort_column = mSpeakerList->getSortColumnName();
+ // TODO: put this in xml
+ // enforces default sort column of speaker status
+ if (sort_column.empty())
+ {
+ sort_column = "speaking_status";
+ }
+
+ mSpeakerMgr->update();
+
+ // clear scrolling list widget of names
+ mSpeakerList->clearRows();
+
+ LLSpeakerMgr::speaker_list_t speaker_list;
+ mSpeakerMgr->getSpeakerList(&speaker_list, mShowTextChatters);
+ for (LLSpeakerMgr::speaker_list_t::const_iterator speaker_it = speaker_list.begin(); speaker_it != speaker_list.end(); ++speaker_it)
+ {
+ LLUUID speaker_id = (*speaker_it)->mID;
+ LLPointer speakerp = (*speaker_it);
+
+ // since we are forced to sort by text, encode sort order as string
+ LLString speaking_order_sort_string = llformat("%010d", speakerp->mSortIndex);
+
+ LLSD row;
+ row["id"] = speaker_id;
+
+ row["columns"][0]["column"] = "icon_speaking_status";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["color"] = speakerp->mDotColor.getValue();
+ LLString icon_image_id;
+
+ S32 icon_image_idx = llmin(2, llfloor((speakerp->mSpeechVolume / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 3.f));
+ switch(icon_image_idx)
+ {
+ case 0:
+ icon_image_id = gViewerArt.getString("icn_active-speakers-dot-lvl0.tga");
+ break;
+ case 1:
+ icon_image_id = gViewerArt.getString("icn_active-speakers-dot-lvl1.tga");
+ break;
+ case 2:
+ icon_image_id = gViewerArt.getString("icn_active-speakers-dot-lvl2.tga");
+ break;
+ }
+ //if (speakerp->mTyping)
+ //{
+ // S32 typing_anim_idx = llround(mIconAnimationTimer.getElapsedTimeF32() * TYPING_ANIMATION_FPS) % 3;
+ // switch(typing_anim_idx)
+ // {
+ // case 0:
+ // row["columns"][0]["overlay"] = LLUUID(gViewerArt.getString("icn_active-speakers-typing1.tga"));
+ // break;
+ // case 1:
+ // row["columns"][0]["overlay"] = LLUUID(gViewerArt.getString("icn_active-speakers-typing2.tga"));
+ // break;
+ // case 2:
+ // row["columns"][0]["overlay"] = LLUUID(gViewerArt.getString("icn_active-speakers-typing3.tga"));
+ // break;
+ // default:
+ // break;
+ // }
+ //}
+
+ row["columns"][0]["value"] = speakerp->mStatus == LLSpeaker::STATUS_MUTED ?
+ gViewerArt.getString("mute_icon.tga") : icon_image_id;
+ if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE) // if voice is disabled for this speaker
+ {
+ // non voice speakers have hidden icons, render as transparent
+ row["columns"][0]["color"] = LLColor4(0.f, 0.f, 0.f, 0.f).getValue();
+ }
+ row["columns"][1]["column"] = "speaker_name";
+ row["columns"][1]["type"] = "text";
+ if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL)
+ {
+ // draw inactive speakers in gray
+ row["columns"][1]["color"] = LLColor4::grey4.getValue();
+ }
+
+ if (speakerp->mDisplayName.empty())
+ {
+ row["columns"][1]["value"] = LLCacheName::getDefaultName();
+ }
+ else
+ {
+ row["columns"][1]["value"] = speakerp->mDisplayName;
+ }
+
+ row["columns"][2]["column"] = "speaking_status";
+ row["columns"][2]["type"] = "text";
+
+ // print speaking ordinal in a text-sorting friendly manner
+ row["columns"][2]["value"] = speaking_order_sort_string;
+
+ mSpeakerList->addElement(row);
+ }
+
+ //restore sort order, selection, etc
+ mSpeakerList->sortByColumn(sort_column, sort_ascending);
+ // make sure something is selected
+ if (selected_id.isNull())
+ {
+ mSpeakerList->selectFirstItem();
+ }
+ else
+ {
+ mSpeakerList->selectByValue(selected_id);
+ }
+
+ LLPointer speakerp = mSpeakerMgr->findSpeaker(selected_id);
+
+ if (gMuteListp)
+ {
+ // update UI for selected participant
+ if (mMuteVoiceCtrl)
+ {
+ mMuteVoiceCtrl->setValue(gMuteListp->isMuted(selected_id, LLMute::flagVoiceChat));
+ mMuteVoiceCtrl->setEnabled(selected_id.notNull()
+ && selected_id != gAgent.getID()
+ && mSpeakerMgr->isVoiceActive()
+ && (speakerp.notNull() && speakerp->mType == LLSpeaker::SPEAKER_AGENT));
+ }
+ if (mMuteTextCtrl)
+ {
+ mMuteTextCtrl->setValue(gMuteListp->isMuted(selected_id, LLMute::flagTextChat));
+ mMuteTextCtrl->setEnabled(selected_id.notNull() && selected_id != gAgent.getID() && speakerp.notNull() && !gMuteListp->isLinden(speakerp->mDisplayName));
+ }
+ childSetValue("speaker_volume", gVoiceClient->getUserVolume(selected_id));
+ childSetEnabled("speaker_volume", selected_id.notNull()
+ && selected_id != gAgent.getID()
+ && mSpeakerMgr->isVoiceActive()
+ && (speakerp.notNull() && speakerp->mType == LLSpeaker::SPEAKER_AGENT));
+ if (mProfileBtn)
+ {
+ mProfileBtn->setEnabled(selected_id.notNull());
+ }
+ }
+
+ // show selected user name in large font
+ if (mNameText)
+ {
+ if (speakerp)
+ {
+ mNameText->setValue(speakerp->mDisplayName);
+ }
+ else
+ {
+ mNameText->setValue("");
+ }
+ }
+
+ // keep scroll value stable
+ mSpeakerList->getScrollInterface()->setScrollPos(scroll_pos);
+}
+
+void LLPanelActiveSpeakers::setSpeaker(const LLUUID& id, const LLString& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type)
+{
+ mSpeakerMgr->setSpeaker(id, name, status, type);
+}
+
+
+//static
+void LLPanelActiveSpeakers::onClickMuteTextCommit(LLUICtrl* ctrl, void* user_data)
+{
+ LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
+ LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();
+ BOOL is_muted = gMuteListp->isMuted(speaker_id, LLMute::flagTextChat);
+ std::string name;
+
+ //fill in name using voice client's copy of name cache
+ LLPointer speakerp = panelp->mSpeakerMgr->findSpeaker(speaker_id);
+ if (speakerp.isNull())
+ {
+ return;
+ }
+
+ name = speakerp->mDisplayName;
+
+ LLMute mute(speaker_id, name, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT);
+
+ if (!is_muted)
+ {
+ gMuteListp->add(mute, LLMute::flagTextChat);
+ }
+ else
+ {
+ gMuteListp->remove(mute, LLMute::flagTextChat);
+ }
+}
+
+//static
+void LLPanelActiveSpeakers::onClickMuteVoice(void* user_data)
+{
+ onClickMuteVoiceCommit(NULL, user_data);
+}
+
+//static
+void LLPanelActiveSpeakers::onClickMuteVoiceCommit(LLUICtrl* ctrl, void* user_data)
+{
+ LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
+ LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();
+ BOOL is_muted = gMuteListp->isMuted(speaker_id, LLMute::flagVoiceChat);
+ std::string name;
+
+ LLPointer speakerp = panelp->mSpeakerMgr->findSpeaker(speaker_id);
+ if (speakerp.isNull())
+ {
+ return;
+ }
+
+ name = speakerp->mDisplayName;
+
+ // muting voice means we're dealing with an agent
+ LLMute mute(speaker_id, name, LLMute::AGENT);
+
+ if (!is_muted)
+ {
+ gMuteListp->add(mute, LLMute::flagVoiceChat);
+ }
+ else
+ {
+ gMuteListp->remove(mute, LLMute::flagVoiceChat);
+ }
+}
+
+
+//static
+void LLPanelActiveSpeakers::onVolumeChange(LLUICtrl* source, void* user_data)
+{
+ LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
+ LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();
+
+ gVoiceClient->setUserVolume(speaker_id, (F32)panelp->childGetValue("speaker_volume").asReal());
+}
+
+//static
+void LLPanelActiveSpeakers::onClickProfile(void* user_data)
+{
+ LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
+ LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();
+
+ LLFloaterAvatarInfo::showFromDirectory(speaker_id);
+}
+
+//
+// LLSpeakerMgr
+//
+
+LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) :
+ mVoiceChannel(channelp)
+{
+}
+
+LLSpeakerMgr::~LLSpeakerMgr()
+{
+}
+
+LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const LLString& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type)
+{
+ if (id.isNull()) return NULL;
+
+ LLPointer speakerp;
+ if (mSpeakers.find(id) == mSpeakers.end())
+ {
+ speakerp = new LLSpeaker(id, name, type);
+ speakerp->mStatus = status;
+ mSpeakers.insert(std::make_pair(speakerp->mID, speakerp));
+ mSpeakersSorted.push_back(speakerp);
+ }
+ else
+ {
+ speakerp = findSpeaker(id);
+ if (speakerp.notNull())
+ {
+ // keep highest priority status (lowest value) instead of overriding current value
+ speakerp->mStatus = llmin(speakerp->mStatus, status);
+ speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT);
+ // RN: due to a weird behavior where IMs from attached objects come from the wearer's agent_id
+ // we need to override speakers that we think are objects when we find out they are really
+ // residents
+ if (type == LLSpeaker::SPEAKER_AGENT)
+ {
+ speakerp->mType = LLSpeaker::SPEAKER_AGENT;
+ speakerp->lookupName();
+ }
+ }
+ }
+
+ return speakerp;
+}
+
+void LLSpeakerMgr::update()
+{
+ if (!gVoiceClient)
+ {
+ return;
+ }
+
+ LLColor4 speaking_color = gSavedSettings.getColor4("SpeakingColor");
+ LLColor4 overdriven_color = gSavedSettings.getColor4("OverdrivenColor");
+
+ updateSpeakerList();
+
+ // update status of all current speakers
+ BOOL voice_channel_active = (!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
+ for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();)
+ {
+ LLUUID speaker_id = speaker_it->first;
+ LLSpeaker* speakerp = speaker_it->second;
+
+ speaker_map_t::iterator cur_speaker_it = speaker_it++;
+
+ if (voice_channel_active && gVoiceClient->getVoiceEnabled(speaker_id))
+ {
+ speakerp->mSpeechVolume = gVoiceClient->getCurrentPower(speaker_id);
+
+ if (gVoiceClient->getOnMuteList(speaker_id))
+ {
+ speakerp->mStatus = LLSpeaker::STATUS_MUTED;
+ speakerp->mDotColor = LLColor4::white;
+ }
+ else if (gVoiceClient->getIsSpeaking(speaker_id))
+ {
+ // reset inactivity expiration
+ if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING)
+ {
+ speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32();
+ speakerp->mHasSpoken = TRUE;
+ }
+ speakerp->mStatus = LLSpeaker::STATUS_SPEAKING;
+ // interpolate between active color and full speaking color based on power of speech output
+ speakerp->mDotColor = speaking_color;
+ if (speakerp->mSpeechVolume > LLVoiceClient::OVERDRIVEN_POWER_LEVEL)
+ {
+ speakerp->mDotColor = overdriven_color;
+ }
+ }
+ else
+ {
+ speakerp->mSpeechVolume = 0.f;
+ speakerp->mDotColor = ACTIVE_COLOR;
+
+ if (speakerp->mHasSpoken)
+ {
+ // have spoken once, not currently speaking
+ speakerp->mStatus = LLSpeaker::STATUS_HAS_SPOKEN;
+ }
+ else
+ {
+ // default state for being in voice channel
+ speakerp->mStatus = LLSpeaker::STATUS_VOICE_ACTIVE;
+ }
+ }
+ }
+ // speaker no longer registered in voice channel, demote to text only
+ else if (speakerp->mStatus != LLSpeaker::STATUS_NOT_IN_CHANNEL)
+ {
+ speakerp->mStatus = LLSpeaker::STATUS_TEXT_ONLY;
+ speakerp->mSpeechVolume = 0.f;
+ speakerp->mDotColor = ACTIVE_COLOR;
+ }
+ }
+
+ // sort by status then time last spoken
+ std::sort(mSpeakersSorted.begin(), mSpeakersSorted.end(), LLSortRecentSpeakers());
+
+ // for recent speakers who are not currently speaking, show "recent" color dot for most recent
+ // fading to "active" color
+
+ S32 recent_speaker_count = 0;
+ S32 sort_index = 0;
+ speaker_list_t::iterator sorted_speaker_it;
+ for(sorted_speaker_it = mSpeakersSorted.begin();
+ sorted_speaker_it != mSpeakersSorted.end(); )
+ {
+ LLPointer speakerp = *sorted_speaker_it;
+
+ // color code recent speakers who are not currently speaking
+ if (speakerp->mStatus == LLSpeaker::STATUS_HAS_SPOKEN)
+ {
+ speakerp->mDotColor = lerp(speaking_color, ACTIVE_COLOR, clamp_rescale((F32)recent_speaker_count, -2.f, 3.f, 0.f, 1.f));
+ recent_speaker_count++;
+ }
+
+ // stuff sort ordinal into speaker so the ui can sort by this value
+ speakerp->mSortIndex = sort_index++;
+
+ // remove speakers that have been gone too long
+ if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL && speakerp->mActivityTimer.hasExpired())
+ {
+ mSpeakers.erase(speakerp->mID);
+ sorted_speaker_it = mSpeakersSorted.erase(sorted_speaker_it);
+ }
+ else
+ {
+ ++sorted_speaker_it;
+ }
+ }
+}
+
+void LLSpeakerMgr::updateSpeakerList()
+{
+ // are we bound to the currently active voice channel?
+ if ((!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()))
+ {
+ LLVoiceClient::participantMap* participants = gVoiceClient->getParticipantList();
+ LLVoiceClient::participantMap::iterator participant_it;
+
+ // add new participants to our list of known speakers
+ for (participant_it = participants->begin(); participant_it != participants->end(); ++participant_it)
+ {
+ LLVoiceClient::participantState* participantp = participant_it->second;
+ setSpeaker(participantp->mAvatarID, "", LLSpeaker::STATUS_VOICE_ACTIVE);
+ }
+ }
+}
+
+const LLPointer LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
+{
+ speaker_map_t::iterator found_it = mSpeakers.find(speaker_id);
+ if (found_it == mSpeakers.end())
+ {
+ return NULL;
+ }
+ return found_it->second;
+}
+
+void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, BOOL include_text)
+{
+ speaker_list->clear();
+ for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
+ {
+ LLPointer speakerp = speaker_it->second;
+ // what about text only muted or inactive?
+ if (include_text || speakerp->mStatus != LLSpeaker::STATUS_TEXT_ONLY)
+ {
+ speaker_list->push_back(speakerp);
+ }
+ }
+}
+
+void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, BOOL typing)
+{
+ LLPointer speakerp = findSpeaker(speaker_id);
+ if (speakerp.notNull())
+ {
+ speakerp->mTyping = typing;
+ }
+}
+
+// speaker has chatted via either text or voice
+void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id)
+{
+ LLPointer speakerp = findSpeaker(speaker_id);
+ if (speakerp.notNull())
+ {
+ speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32();
+ speakerp->mHasSpoken = TRUE;
+ }
+}
+
+BOOL LLSpeakerMgr::isVoiceActive()
+{
+ // mVoiceChannel = NULL means current voice channel, whatever it is
+ return LLVoiceClient::voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive();
+}
+
+
+//
+// LLIMSpeakerMgr
+//
+LLIMSpeakerMgr::LLIMSpeakerMgr(LLVoiceChannel* channel) : LLSpeakerMgr(channel)
+{
+}
+
+void LLIMSpeakerMgr::updateSpeakerList()
+{
+ // don't do normal updates which are pulled from voice channel
+ // rely on user list reported by sim
+ return;
+}
+
+void LLIMSpeakerMgr::processSpeakerList(LLSD list)
+{
+ for(LLSD::array_iterator list_it = list.beginArray();
+ list_it != list.endArray();
+ ++list_it)
+ {
+ LLUUID agent_id(list_it->asUUID());
+
+ setSpeaker(agent_id, "", LLSpeaker::STATUS_TEXT_ONLY);
+ }
+}
+
+void LLIMSpeakerMgr::processSpeakerMap(LLSD map)
+{
+ for(LLSD::map_iterator map_it = map.beginMap();
+ map_it != map.endMap();
+ ++map_it)
+ {
+ // add as new speaker
+ setSpeaker(LLUUID(map_it->first));
+ }
+}
+
+
+
+void LLIMSpeakerMgr::processSpeakerListUpdate(LLSD update)
+{
+ for(LLSD::map_iterator update_it = update.beginMap();
+ update_it != update.endMap();
+ ++update_it)
+ {
+ LLUUID agent_id(update_it->first);
+
+ if (update_it->second.asString() == "LEAVE")
+ {
+ LLPointer speakerp = findSpeaker(agent_id);
+ if (speakerp)
+ {
+ speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
+ speakerp->mDotColor = INACTIVE_COLOR;
+ speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT);
+ }
+ }
+ else if (update_it->second.asString() == "ENTER")
+ {
+ // add or update speaker
+ setSpeaker(agent_id);
+ }
+ else
+ {
+ llwarns << "LLIMSpeakerMgr::processSpeakerListUpdate() : bad membership list update " << ll_print_sd(update_it->second) << llendl;
+ }
+ }
+}
+
+
+//
+// LLActiveSpeakerMgr
+//
+
+LLActiveSpeakerMgr::LLActiveSpeakerMgr() : LLSpeakerMgr(NULL)
+{
+}
+
+void LLActiveSpeakerMgr::updateSpeakerList()
+{
+ // point to whatever the current voice channel is
+ mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel();
+
+ // always populate from active voice channel
+ if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel)
+ {
+ mSpeakers.clear();
+ mSpeakersSorted.clear();
+ mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel();
+ }
+ LLSpeakerMgr::updateSpeakerList();
+}
+
+
+
+//
+// LLLocalSpeakerMgr
+//
+
+LLLocalSpeakerMgr::LLLocalSpeakerMgr() : LLSpeakerMgr(LLVoiceChannelProximal::getInstance())
+{
+}
+
+LLLocalSpeakerMgr::~LLLocalSpeakerMgr ()
+{
+}
+
+void LLLocalSpeakerMgr::updateSpeakerList()
+{
+ // pull speakers from voice channel
+ LLSpeakerMgr::updateSpeakerList();
+
+ // add non-voice speakers in chat range
+ std::vector< LLCharacter* >::iterator avatar_it;
+ for(avatar_it = LLCharacter::sInstances.begin(); avatar_it != LLCharacter::sInstances.end(); ++avatar_it)
+ {
+ LLVOAvatar* avatarp = (LLVOAvatar*)*avatar_it;
+ if (dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) <= CHAT_NORMAL_RADIUS)
+ {
+ setSpeaker(avatarp->getID());
+ }
+ }
+
+ // check if text only speakers have moved out of chat range
+ for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
+ {
+ LLUUID speaker_id = speaker_it->first;
+ LLSpeaker* speakerp = speaker_it->second;
+ if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
+ {
+ LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
+ if (!avatarp || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS)
+ {
+ speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
+ speakerp->mDotColor = INACTIVE_COLOR;
+ speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT);
+ }
+ }
+ }
+}
diff --git a/linden/indra/newview/llfloateractivespeakers.h b/linden/indra/newview/llfloateractivespeakers.h
new file mode 100644
index 0000000..f24eca4
--- /dev/null
+++ b/linden/indra/newview/llfloateractivespeakers.h
@@ -0,0 +1,211 @@
+/**
+ * @file llfloateractivespeakers.h
+ * @brief Management interface for muting and controlling volume of residents currently speaking
+ *
+ * Copyright (c) 2005-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LL_LLFLOATERACTIVESPEAKERS_H
+#define LL_LLFLOATERACTIVESPEAKERS_H
+
+#include "llfloater.h"
+#include "llmemory.h"
+#include "llvoiceclient.h"
+#include "llframetimer.h"
+
+class LLScrollListCtrl;
+class LLButton;
+class LLPanelActiveSpeakers;
+class LLSpeakerMgr;
+class LLVoiceChannel;
+
+
+// data for a given participant in a voice channel
+class LLSpeaker : public LLRefCount
+{
+public:
+ typedef enum e_speaker_type
+ {
+ SPEAKER_AGENT,
+ SPEAKER_OBJECT
+ } ESpeakerType;
+
+ typedef enum e_speaker_status
+ {
+ STATUS_SPEAKING,
+ STATUS_HAS_SPOKEN,
+ STATUS_VOICE_ACTIVE,
+ STATUS_TEXT_ONLY,
+ STATUS_NOT_IN_CHANNEL,
+ STATUS_MUTED
+ } ESpeakerStatus;
+
+
+ LLSpeaker(const LLUUID& id, const LLString& name = LLString::null, const ESpeakerType type = SPEAKER_AGENT);
+ ~LLSpeaker();
+
+ void lookupName();
+
+ static void onAvatarNameLookup(const LLUUID& id, const char* first, const char* last, BOOL is_group, void* user_data);
+
+public:
+
+ ESpeakerStatus mStatus; // current activity status in speech group
+ F32 mLastSpokeTime; // timestamp when this speaker last spoke
+ F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?)
+ LLString mDisplayName; // cache user name for this speaker
+ LLFrameTimer mActivityTimer; // time out speakers when they are not part of current voice channel
+ BOOL mHasSpoken; // has this speaker said anything this session?
+ LLColor4 mDotColor;
+ LLUUID mID;
+ BOOL mTyping;
+ S32 mSortIndex;
+ LLViewHandle mHandle;
+ ESpeakerType mType;
+
+ typedef std::map speaker_map_t;
+ static speaker_map_t sSpeakers;
+};
+
+class LLSpeakerMgr
+{
+public:
+ LLSpeakerMgr(LLVoiceChannel* channelp);
+ virtual ~LLSpeakerMgr();
+
+ const LLPointer findSpeaker(const LLUUID& avatar_id);
+ void update();
+ void setSpeakerTyping(const LLUUID& speaker_id, BOOL typing);
+ void speakerChatted(const LLUUID& speaker_id);
+ LLPointer setSpeaker(const LLUUID& id,
+ const LLString& name = LLString::null,
+ LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY,
+ LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT);
+
+ BOOL isVoiceActive();
+
+ typedef std::vector > speaker_list_t;
+ void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text);
+
+protected:
+ virtual void updateSpeakerList();
+
+ typedef std::map > speaker_map_t;
+ speaker_map_t mSpeakers;
+
+ speaker_list_t mSpeakersSorted;
+ LLFrameTimer mSpeechTimer;
+ LLVoiceChannel* mVoiceChannel;
+};
+
+class LLIMSpeakerMgr : public LLSpeakerMgr
+{
+public:
+ LLIMSpeakerMgr(LLVoiceChannel* channel);
+
+ void processSpeakerListUpdate(LLSD update);
+ void processSpeakerList(LLSD list);
+ void processSpeakerMap(LLSD list);
+protected:
+ virtual void updateSpeakerList();
+};
+
+class LLActiveSpeakerMgr : public LLSpeakerMgr
+{
+public:
+ LLActiveSpeakerMgr();
+protected:
+ virtual void updateSpeakerList();
+};
+
+class LLLocalSpeakerMgr : public LLSpeakerMgr
+{
+public:
+ LLLocalSpeakerMgr();
+ ~LLLocalSpeakerMgr ();
+protected:
+ virtual void updateSpeakerList();
+};
+
+
+class LLFloaterActiveSpeakers :
+ public LLUISingleton,
+ public LLFloater,
+ public LLVoiceClientParticipantObserver
+{
+ // friend of singleton class to allow construction inside getInstance() since constructor is protected
+ // to enforce singleton constraint
+ friend class LLUISingleton;
+public:
+ virtual ~LLFloaterActiveSpeakers();
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ void draw();
+
+ /*virtual*/ void onChange();
+
+ static void* createSpeakersPanel(void* data);
+
+protected:
+ LLFloaterActiveSpeakers(const LLSD& seed);
+
+ LLPanelActiveSpeakers* mPanel;
+};
+
+class LLPanelActiveSpeakers : public LLPanel
+{
+public:
+ LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters);
+ virtual ~LLPanelActiveSpeakers();
+
+ /*virtual*/ BOOL postBuild();
+
+ void refreshSpeakers();
+
+ void setSpeaker(const LLUUID& id,
+ const LLString& name = LLString::null,
+ LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY,
+ LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT);
+
+ static void onClickMuteVoice(void* user_data);
+ static void onClickMuteVoiceCommit(LLUICtrl* ctrl, void* user_data);
+ static void onClickMuteTextCommit(LLUICtrl* ctrl, void* user_data);
+ static void onVolumeChange(LLUICtrl* source, void* user_data);
+ static void onClickProfile(void* user_data);
+protected:
+ LLScrollListCtrl* mSpeakerList;
+ LLUICtrl* mMuteVoiceCtrl;
+ LLUICtrl* mMuteTextCtrl;
+ LLTextBox* mNameText;
+ LLButton* mProfileBtn;
+ BOOL mShowTextChatters;
+ LLSpeakerMgr* mSpeakerMgr;
+ LLFrameTimer mIconAnimationTimer;
+};
+
+extern LLLocalSpeakerMgr* gLocalSpeakerMgr;
+extern LLActiveSpeakerMgr* gActiveChannelSpeakerMgr;
+
+#endif // LL_LLFLOATERACTIVESPEAKERS_H
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp
index b1f8a53..09fc508 100644
--- a/linden/indra/newview/llfloateranimpreview.cpp
+++ b/linden/indra/newview/llfloateranimpreview.cpp
@@ -993,7 +993,7 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata)
LLKeyframeDataCache::removeKeyframeData(floaterp->mMotionID);
}
- floaterp->onClose(false);
+ floaterp->close(false);
}
//-----------------------------------------------------------------------------
diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp
index 6989084..3bb2462 100644
--- a/linden/indra/newview/llfloateravatarpicker.cpp
+++ b/linden/indra/newview/llfloateravatarpicker.cpp
@@ -208,7 +208,12 @@ void LLFloaterAvatarPicker::onSelectionChange(const std::dequemAvatarIDs.clear();
self->mAvatarNames.clear();
- self->childSetEnabled("Select", FALSE);
+ // if we have calling cards, disable select button until
+ // the inventory picks a valid calling card
+ if (!items.empty())
+ {
+ self->childSetEnabled("Select", FALSE);
+ }
if (!self->mListNames)
{
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp
index dd79afd..2621161 100644
--- a/linden/indra/newview/llfloaterchat.cpp
+++ b/linden/indra/newview/llfloaterchat.cpp
@@ -34,6 +34,7 @@
#include "llviewerprecompiledheaders.h"
#include "llfloaterchat.h"
+#include "llfloateractivespeakers.h"
#include "llfloaterscriptdebug.h"
#include "llchat.h"
@@ -49,11 +50,13 @@
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "llconsole.h"
+#include "llfloaterchatterbox.h"
#include "llfloatermute.h"
#include "llkeyboard.h"
//#include "lllineeditor.h"
#include "llmutelist.h"
//#include "llresizehandle.h"
+#include "llchatbar.h"
#include "llstatusbar.h"
#include "llviewertexteditor.h"
#include "llviewergesture.h" // for triggering gestures
@@ -70,7 +73,6 @@
//
// Constants
//
-const char FLOATER_TITLE[] = "Chat History";
const F32 INSTANT_MSG_SIZE = 8.0f;
const F32 CHAT_MSG_SIZE = 8.0f;
const LLColor4 INSTANT_MSG_COLOR(1, 1, 1, 1);
@@ -80,25 +82,25 @@ const S32 MAX_CHATTER_COUNT = 16;
//
// Global statics
//
-LLFloaterChat* gFloaterChat = NULL;
-
LLColor4 get_text_color(const LLChat& chat);
//
// Member Functions
//
-LLFloaterChat::LLFloaterChat()
-: LLFloater("chat floater", "FloaterChatRect", FLOATER_TITLE,
- RESIZE_YES, 440, 100, DRAG_ON_TOP, MINIMIZE_NO, CLOSE_YES)
+LLFloaterChat::LLFloaterChat(const LLSD& seed)
+: LLFloater("chat floater", "FloaterChatRect", "",
+ RESIZE_YES, 440, 100, DRAG_ON_TOP, MINIMIZE_NO, CLOSE_YES),
+ mPanel(NULL)
{
-
- gUICtrlFactory->buildFloater(this,"floater_chat_history.xml");
+ mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL);
+ mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
+ // do not automatically open singleton floaters (as result of getInstance())
+ BOOL no_open = FALSE;
+ gUICtrlFactory->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open);
- childSetAction("Mute resident",onClickMute,this);
- childSetAction("Chat", onClickChat, this);
- childSetCommitCallback("chatter combobox",onCommitUserSelect,this);
childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
childSetVisible("Chat History Editor with mute",FALSE);
+ childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
setDefaultBtn("Chat");
}
@@ -112,33 +114,53 @@ void LLFloaterChat::setVisible(BOOL visible)
LLFloater::setVisible( visible );
gSavedSettings.setBOOL("ShowChatHistory", visible);
+}
- // Hide the chat overlay when our history is visible.
- gConsole->setVisible( !visible );
+void LLFloaterChat::draw()
+{
+ // enable say and shout only when text available
+
+ childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
+
+ LLChatBar* chat_barp = (LLChatBar*)getChildByName("chat_panel", TRUE);
+ if (chat_barp)
+ {
+ chat_barp->refresh();
+ }
+
+ mPanel->refreshSpeakers();
+ LLFloater::draw();
}
+BOOL LLFloaterChat::postBuild()
+{
+ mPanel = (LLPanelActiveSpeakers*)LLUICtrlFactory::getPanelByName(this, "active_speakers_panel");
+
+ LLChatBar* chat_barp = (LLChatBar*)getChildByName("chat_panel", TRUE);
+ if (chat_barp)
+ {
+ chat_barp->setGestureCombo(LLUICtrlFactory::getComboBoxByName(this, "Gesture"));
+ }
+ return TRUE;
+}
// public virtual
void LLFloaterChat::onClose(bool app_quitting)
{
- LLFloater::setVisible( FALSE );
-
if (!app_quitting)
{
gSavedSettings.setBOOL("ShowChatHistory", FALSE);
}
-
- // Hide the chat overlay when our history is visible.
- gConsole->setVisible( TRUE );
+ setVisible(FALSE);
}
-
-// public
-void LLFloaterChat::show()
+void LLFloaterChat::onVisibilityChange(BOOL new_visibility)
{
- open(); /*Flawfinder: ignore*/
+ // Hide the chat overlay when our history is visible.
+ gConsole->setVisible( !new_visibility );
}
+
void add_timestamped_line(LLViewerTextEditor* edit, const LLString& line, const LLColor4& color)
{
bool prepend_newline = true;
@@ -162,7 +184,7 @@ void log_chat_text(const LLChat& chat)
}
// static
void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
-{
+{
if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file)
{
log_chat_text(chat);
@@ -185,10 +207,9 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
}
// could flash the chat button in the status bar here. JC
- if (!gFloaterChat) return;
-
- LLViewerTextEditor* history_editor = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor with mute");
+ LLFloaterChat* chat_floater = LLFloaterChat::getInstance(LLSD());
+ LLViewerTextEditor* history_editor = (LLViewerTextEditor*)chat_floater->getChildByName("Chat History Editor", TRUE);
+ LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)chat_floater->getChildByName("Chat History Editor with mute", TRUE);
history_editor->setParseHTML(TRUE);
history_editor_with_mute->setParseHTML(TRUE);
@@ -204,77 +225,24 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
LLColor4 muted_color = lerp(color, LLColor4::grey, 0.5f);
add_timestamped_line(history_editor_with_mute, chat.mText, color);
}
-
- if (!chat.mMuted
- && chat.mSourceType != CHAT_SOURCE_SYSTEM
- && chat.mFromID.notNull()
- && chat.mFromID != gAgent.getID())
+
+ // add objects as transient speakers that can be muted
+ if (chat.mSourceType == CHAT_SOURCE_OBJECT)
{
-
- LLComboBox* chatter_combo = LLUICtrlFactory::getComboBoxByName(gFloaterChat,"chatter combobox");
-
- if(!chatter_combo)
- {
- return;
- }
-
- if (!chatter_combo->setCurrentByID(chat.mFromID))
- {
- // if we have too many items...
- if (chatter_combo->getItemCount() >= MAX_CHATTER_COUNT)
- {
- chatter_combo->remove(0);
- }
-
- LLMute mute(chat.mFromID, chat.mFromName);
- if (chat.mSourceType == CHAT_SOURCE_OBJECT)
- {
- mute.mType = LLMute::OBJECT;
- }
- else if (chat.mSourceType == CHAT_SOURCE_AGENT)
- {
- mute.mType = LLMute::AGENT;
- }
- LLString item = mute.getDisplayName();
- chatter_combo->add(item, chat.mFromID);
- chatter_combo->setCurrentByIndex(chatter_combo->getItemCount() - 1);
- gFloaterChat->childSetEnabled("Mute resident",TRUE);
- }
+ chat_floater->mPanel->setSpeaker(chat.mFromID, chat.mFromName, LLSpeaker::STATUS_NOT_IN_CHANNEL, LLSpeaker::SPEAKER_OBJECT);
}
}
// static
void LLFloaterChat::setHistoryCursorAndScrollToEnd()
{
- if (gFloaterChat)
- {
- LLViewerTextEditor* history_editor = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor with mute");
-
- history_editor->setCursorAndScrollToEnd();
- history_editor_with_mute->setCursorAndScrollToEnd();
- }
-}
-
-
-// static
-void LLFloaterChat::toggle(void*)
-{
- if (gFloaterChat->getVisible())
- {
- gFloaterChat->close();
- }
- else
- {
- gFloaterChat->show();
- }
+ LLViewerTextEditor* history_editor = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor", TRUE);
+ LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor with mute", TRUE);
+
+ history_editor->setCursorAndScrollToEnd();
+ history_editor_with_mute->setCursorAndScrollToEnd();
}
-// static
-BOOL LLFloaterChat::visible(void*)
-{
- return (gFloaterChat && gFloaterChat->getVisible());
-}
//static
void LLFloaterChat::onClickMute(void *data)
@@ -299,30 +267,6 @@ void LLFloaterChat::onClickMute(void *data)
}
//static
-void LLFloaterChat::onClickChat(void*)
-{
- // we need this function as a level of indirection because otherwise startChat would
- // cast the data pointer to a character string, and dump garbage in the chat
- LLChatBar::startChat(NULL);
-}
-
-//static
-void LLFloaterChat::onCommitUserSelect(LLUICtrl* caller, void* data)
-{
- LLFloaterChat* floater = (LLFloaterChat*)data;
- LLComboBox* combo = (LLComboBox*)caller;
-
- if (combo->getCurrentIndex() == -1)
- {
- floater->childSetEnabled("Mute resident",FALSE);
- }
- else
- {
- floater->childSetEnabled("Mute resident",TRUE);
- }
-}
-
-//static
void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
{
LLFloaterChat* floater = (LLFloaterChat*)data;
@@ -330,8 +274,8 @@ void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
//LLCheckBoxCtrl*
BOOL show_mute = LLUICtrlFactory::getCheckBoxByName(floater,"show mutes")->get();
- LLViewerTextEditor* history_editor = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor with mute");
+ LLViewerTextEditor* history_editor = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor", TRUE);
+ LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor with mute", TRUE);
if (!history_editor || !history_editor_with_mute)
return;
@@ -447,7 +391,7 @@ LLColor4 get_text_color(const LLChat& chat)
//static
void LLFloaterChat::loadHistory()
{
- LLLogChat::loadHistory("chat", &chatFromLogFile, (void *)gFloaterChat);
+ LLLogChat::loadHistory("chat", &chatFromLogFile, (void *)LLFloaterChat::getInstance(LLSD()));
}
//static
@@ -458,3 +402,40 @@ void LLFloaterChat::chatFromLogFile(LLString line, void* userdata)
chat.mText = line;
addChatHistory(chat, FALSE);
}
+
+//static
+void* LLFloaterChat::createSpeakersPanel(void* data)
+{
+ return new LLPanelActiveSpeakers(gLocalSpeakerMgr, TRUE);
+}
+
+//static
+void* LLFloaterChat::createChatPanel(void* data)
+{
+ LLChatBar* chatp = new LLChatBar("floating_chat_bar");
+ return chatp;
+}
+
+//static
+void LLFloaterChat::hideInstance(const LLSD& id)
+{
+ LLFloaterChat* floaterp = LLFloaterChat::getInstance(LLSD());
+ // don't do anything when hosted in the chatterbox
+ if(floaterp->getHost())
+ {
+ LLFloaterChatterBox::hideInstance(LLSD());
+ }
+ else
+ {
+ LLUISingleton::hideInstance(id);
+ }
+}
+
+// static
+void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
+{
+ LLFloaterChat* self = (LLFloaterChat*)userdata;
+
+ self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
+}
+
diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h
index 54df738..9558a65 100644
--- a/linden/indra/newview/llfloaterchat.h
+++ b/linden/indra/newview/llfloaterchat.h
@@ -44,17 +44,20 @@ class LLViewerTextEditor;
class LLMessageSystem;
class LLUUID;
class LLCheckBoxCtrl;
+class LLPanelActiveSpeakers;
class LLFloaterChat
-: public LLFloater
+: public LLFloater, public LLUISingleton
{
public:
- LLFloaterChat();
+ LLFloaterChat(const LLSD& seed);
~LLFloaterChat();
- void show();
- virtual void onClose(bool app_quitting);
virtual void setVisible( BOOL b );
+ virtual void draw();
+ virtual BOOL postBuild();
+ virtual void onClose(bool app_quitting);
+ virtual void onVisibilityChange(BOOL cur_visibility);
static void setHistoryCursorAndScrollToEnd();
@@ -65,17 +68,17 @@ public:
// Add chat to history alone.
static void addChatHistory(const LLChat& chat, bool log_to_file = true);
- static void toggle(void*);
- static BOOL visible(void*);
-
static void onClickMute(void *data);
- static void onClickChat(void *);
- static void onCommitUserSelect(LLUICtrl* caller, void* data);
static void onClickToggleShowMute(LLUICtrl* caller, void *data);
+ static void onClickToggleActiveSpeakers(void* userdata);
static void chatFromLogFile(LLString line, void* userdata);
static void loadHistory();
-};
+ static void* createSpeakersPanel(void* data);
+ static void* createChatPanel(void* data);
+ static void hideInstance(const LLSD& id);
-extern LLFloaterChat* gFloaterChat;
+protected:
+ LLPanelActiveSpeakers* mPanel;
+};
#endif
diff --git a/linden/indra/newview/llfloaterchatterbox.cpp b/linden/indra/newview/llfloaterchatterbox.cpp
new file mode 100644
index 0000000..11d2ee6
--- /dev/null
+++ b/linden/indra/newview/llfloaterchatterbox.cpp
@@ -0,0 +1,342 @@
+/**
+ * @file llfloaterchatterbox.cpp
+ * @author Richard
+ * @date 2007-05-08
+ * @brief Implementation of the chatterbox integrated conversation ui
+ *
+ * Copyright (c) 2007-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterchatterbox.h"
+#include "llvieweruictrlfactory.h"
+#include "llfloaterchat.h"
+#include "llfloaterfriends.h"
+#include "llfloatergroups.h"
+#include "llviewercontrol.h"
+#include "llimview.h"
+#include "llimpanel.h"
+
+//
+// LLFloaterMyFriends
+//
+
+LLFloaterMyFriends::LLFloaterMyFriends(const LLSD& seed)
+{
+ mFactoryMap["friends_panel"] = LLCallbackMap(LLFloaterMyFriends::createFriendsPanel, NULL);
+ mFactoryMap["groups_panel"] = LLCallbackMap(LLFloaterMyFriends::createGroupsPanel, NULL);
+ // do not automatically open singleton floaters (as result of getInstance())
+ BOOL no_open = FALSE;
+ gUICtrlFactory->buildFloater(this, "floater_my_friends.xml", &getFactoryMap(), no_open);
+}
+
+LLFloaterMyFriends::~LLFloaterMyFriends()
+{
+}
+
+BOOL LLFloaterMyFriends::postBuild()
+{
+ mTabs = LLUICtrlFactory::getTabContainerByName(this, "friends_and_groups");
+
+ return TRUE;
+}
+
+
+void LLFloaterMyFriends::onClose(bool app_quitting)
+{
+ setVisible(FALSE);
+}
+
+//static
+LLFloaterMyFriends* LLFloaterMyFriends::showInstance(const LLSD& id)
+{
+ LLFloaterMyFriends* floaterp = LLUIInstanceMgr::showInstance(id);
+ // garbage values in id will be interpreted as 0, or the friends tab
+ floaterp->mTabs->selectTab(id);
+
+ return floaterp;
+}
+
+//static
+void LLFloaterMyFriends::hideInstance(const LLSD& id)
+{
+ if(instanceVisible(id))
+ {
+ LLFloaterChatterBox::hideInstance(LLSD());
+ }
+}
+
+// is the specified panel currently visible
+//static
+BOOL LLFloaterMyFriends::instanceVisible(const LLSD& id)
+{
+ // if singleton not created yet, trivially return false
+ if (!findInstance(id)) return FALSE;
+
+ LLFloaterMyFriends* floaterp = getInstance(id);
+ return floaterp->isInVisibleChain() && floaterp->mTabs->getCurrentPanelIndex() == id.asInteger();
+}
+
+//static
+void* LLFloaterMyFriends::createFriendsPanel(void* data)
+{
+ return new LLPanelFriends();
+}
+
+//static
+void* LLFloaterMyFriends::createGroupsPanel(void* data)
+{
+ return new LLPanelGroups();
+}
+
+//
+// LLFloaterChatterBox
+//
+LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
+ mActiveVoiceFloater(NULL)
+{
+ mAutoResize = FALSE;
+
+ gUICtrlFactory->buildFloater(this, "floater_chatterbox.xml", NULL, FALSE);
+ addFloater(LLFloaterMyFriends::getInstance(0), TRUE);
+ if (gSavedSettings.getBOOL("ChatHistoryTornOff"))
+ {
+ LLFloaterChat* floater_chat = LLFloaterChat::getInstance(LLSD());
+ // add then remove to set up relationship for re-attach
+ addFloater(floater_chat, FALSE);
+ removeFloater(floater_chat);
+ // reparent to floater view
+ gFloaterView->addChild(floater_chat);
+ }
+ else
+ {
+ addFloater(LLFloaterChat::getInstance(LLSD()), FALSE);
+ }
+ mTabContainer->lockTabs();
+}
+
+LLFloaterChatterBox::~LLFloaterChatterBox()
+{
+}
+
+BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
+{
+ if (getEnabled()
+ && mask == MASK_CONTROL)
+ {
+ if (key == 'W')
+ {
+ LLFloater* floater = getActiveFloater();
+ // is user closeable and is system closeable
+ if (floater && floater->canClose())
+ {
+ if (floater->isCloseable())
+ {
+ floater->close();
+ }
+ else
+ {
+ // close chatterbox window if frontmost tab is reserved, non-closeable tab
+ // such as contacts or near me
+ close();
+ }
+ }
+ return TRUE;
+ }
+ }
+
+ return LLMultiFloater::handleKeyHere(key, mask, called_from_parent);
+}
+
+void LLFloaterChatterBox::draw()
+{
+ // clear new im notifications when chatterbox is visible
+ if (!isMinimized())
+ {
+ gIMMgr->clearNewIMNotification();
+ }
+ LLFloater* current_active_floater = getCurrentVoiceFloater();
+ // set icon on tab for floater currently associated with active voice channel
+ if(mActiveVoiceFloater != current_active_floater)
+ {
+ // remove image from old floater's tab
+ if (mActiveVoiceFloater)
+ {
+ mTabContainer->setTabImage(mActiveVoiceFloater, "");
+ }
+ }
+
+ // update image on current active tab
+ if (current_active_floater)
+ {
+ LLColor4 icon_color = LLColor4::white;
+ LLVoiceChannel* channelp = LLVoiceChannel::getCurrentVoiceChannel();
+ if (channelp)
+ {
+ if (channelp->isActive())
+ {
+ icon_color = LLColor4::green;
+ }
+ else if (channelp->getState() == LLVoiceChannel::STATE_ERROR)
+ {
+ icon_color = LLColor4::red;
+ }
+ else // active, but not connected
+ {
+ icon_color = LLColor4::yellow;
+ }
+ }
+ mTabContainer->setTabImage(current_active_floater, "active_voice_tab.tga", icon_color);
+ }
+
+ mActiveVoiceFloater = current_active_floater;
+
+ LLFloater::draw();
+}
+
+void LLFloaterChatterBox::onOpen()
+{
+ gSavedSettings.setBOOL("ShowCommunicate", TRUE);
+}
+
+void LLFloaterChatterBox::onClose(bool app_quitting)
+{
+ setVisible(FALSE);
+ gSavedSettings.setBOOL("ShowCommunicate", FALSE);
+}
+
+void LLFloaterChatterBox::removeFloater(LLFloater* floaterp)
+{
+ if (floaterp->getName() == "chat floater")
+ {
+ // only my friends floater now locked
+ mTabContainer->lockTabs(1);
+ gSavedSettings.setBOOL("ChatHistoryTornOff", TRUE);
+ floaterp->setCanClose(TRUE);
+ }
+ LLMultiFloater::removeFloater(floaterp);
+}
+
+void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
+ BOOL select_added_floater,
+ LLTabContainerCommon::eInsertionPoint insertion_point)
+{
+ // make sure my friends and chat history both locked when re-attaching chat history
+ if (floaterp->getName() == "chat floater")
+ {
+ // select my friends tab
+ mTabContainer->selectFirstTab();
+ // add chat history to the right of the my friends tab
+ //*TODO: respect select_added_floater so that we don't leave first tab selected
+ LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT);
+ // make sure first two tabs are now locked
+ mTabContainer->lockTabs(2);
+ gSavedSettings.setBOOL("ChatHistoryTornOff", FALSE);
+ floaterp->setCanClose(FALSE);
+ }
+ else
+ {
+ LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point);
+ }
+
+ // make sure active voice icon shows up for new tab
+ if (floaterp == mActiveVoiceFloater)
+ {
+ mTabContainer->setTabImage(floaterp, "active_voice_tab.tga");
+ }
+}
+
+
+//static
+LLFloaterChatterBox* LLFloaterChatterBox::showInstance(const LLSD& seed)
+{
+ LLFloaterChatterBox* floater = LLUISingleton::showInstance(seed);
+
+ // if TRUE, show tab for active voice channel, otherwise, just show last tab
+ if (seed.asBoolean())
+ {
+ LLFloater* floater_to_show = getCurrentVoiceFloater();
+ if (floater_to_show)
+ {
+ floater_to_show->open();
+ }
+ else
+ {
+ // just open chatterbox if there is no active voice window
+ LLUISingleton::getInstance(seed)->open();
+ }
+ }
+
+ return floater;
+}
+
+//static
+BOOL LLFloaterChatterBox::instanceVisible(const LLSD &seed)
+{
+ if (seed.asBoolean())
+ {
+ LLFloater* floater_to_show = getCurrentVoiceFloater();
+ if (floater_to_show)
+ {
+ return floater_to_show->isInVisibleChain();
+ }
+ }
+
+ return LLUISingleton::instanceVisible(seed);
+}
+
+//static
+LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
+{
+ if (!LLVoiceClient::voiceEnabled())
+ {
+ return NULL;
+ }
+ if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel())
+ {
+ // show near me tab if in proximal channel
+ return LLFloaterChat::getInstance(LLSD());
+ }
+ else
+ {
+ LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance(LLSD());
+ // iterator over all IM tabs (skip friends and near me)
+ for (S32 i = 0; i < floater->getFloaterCount(); i++)
+ {
+ LLPanel* panelp = floater->mTabContainer->getPanelByIndex(i);
+ if (panelp->getName() == "im_floater")
+ {
+ // only LLFloaterIMPanels are called "im_floater"
+ LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)panelp;
+ if (im_floaterp->getVoiceChannel() == LLVoiceChannel::getCurrentVoiceChannel())
+ {
+ return im_floaterp;
+ }
+ }
+ }
+ }
+ return NULL;
+}
diff --git a/linden/indra/newview/llfloaterchatterbox.h b/linden/indra/newview/llfloaterchatterbox.h
new file mode 100644
index 0000000..737f43e
--- /dev/null
+++ b/linden/indra/newview/llfloaterchatterbox.h
@@ -0,0 +1,87 @@
+/**
+ * @file llfloaterchatterbox.h
+ * @author Richard
+ * @date 2007-05-04
+ * @brief Integrated friends and group management/communication tool
+ *
+ * Copyright (c) 2007-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LL_LLFLOATERCHATTERBOX_H
+#define LL_LLFLOATERCHATTERBOX_H
+
+#include "llfloater.h"
+#include "llstring.h"
+
+class LLTabContainerCommon;
+
+class LLFloaterMyFriends : public LLFloater, public LLUISingleton
+{
+public:
+ LLFloaterMyFriends(const LLSD& seed);
+ virtual ~LLFloaterMyFriends();
+
+ virtual BOOL postBuild();
+
+ void onClose(bool app_quitting);
+
+ // override LLUISingleton behavior
+ static LLFloaterMyFriends* showInstance(const LLSD& id);
+ static void hideInstance(const LLSD& id);
+ static BOOL instanceVisible(const LLSD& id);
+
+ static void* createFriendsPanel(void* data);
+ static void* createGroupsPanel(void* data);
+
+protected:
+ LLTabContainerCommon* mTabs;
+};
+
+class LLFloaterChatterBox : public LLMultiFloater, public LLUISingleton
+{
+public:
+ LLFloaterChatterBox(const LLSD& seed);
+ virtual ~LLFloaterChatterBox();
+
+ /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
+ /*virtual*/ void draw();
+ /*virtual*/ void onOpen();
+ /*virtual*/ void onClose(bool app_quitting);
+
+ /*virtual*/ void removeFloater(LLFloater* floaterp);
+ /*virtual*/ void addFloater(LLFloater* floaterp,
+ BOOL select_added_floater,
+ LLTabContainerCommon::eInsertionPoint insertion_point = LLTabContainerCommon::END);
+
+ static LLFloaterChatterBox* showInstance(const LLSD& seed);
+ static BOOL instanceVisible(const LLSD& seed);
+
+ static LLFloater* getCurrentVoiceFloater();
+
+protected:
+ LLFloater* mActiveVoiceFloater;
+};
+
+
+#endif // LL_LLFLOATERCHATTERBOX_H
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp
index 62ead8f..41bd8d7 100644
--- a/linden/indra/newview/llfloatercustomize.cpp
+++ b/linden/indra/newview/llfloatercustomize.cpp
@@ -489,7 +489,7 @@ void LLPanelEditWearable::addSubpart( const LLString& name, ESubpart id, LLSubpa
{
if (!name.empty())
{
- childSetAction(name, &LLPanelEditWearable::onBtnSubpart, (void*)(S32)id);
+ childSetAction(name, &LLPanelEditWearable::onBtnSubpart, (void*)id);
part->mButtonName = name;
}
mSubpartList[id] = part;
@@ -1585,19 +1585,19 @@ BOOL LLFloaterCustomize::postBuild()
initWearablePanels();
// Tab container
- childSetTabChangeCallback("customize tab container", "Shape", onTabChanged, (void*)(S32)WT_SHAPE );
- childSetTabChangeCallback("customize tab container", "Skin", onTabChanged, (void*)(S32)WT_SKIN );
- childSetTabChangeCallback("customize tab container", "Hair", onTabChanged, (void*)(S32)WT_HAIR );
- childSetTabChangeCallback("customize tab container", "Eyes", onTabChanged, (void*)(S32)WT_EYES );
- childSetTabChangeCallback("customize tab container", "Shirt", onTabChanged, (void*)(S32)WT_SHIRT );
- childSetTabChangeCallback("customize tab container", "Pants", onTabChanged, (void*)(S32)WT_PANTS );
- childSetTabChangeCallback("customize tab container", "Shoes", onTabChanged, (void*)(S32)WT_SHOES );
- childSetTabChangeCallback("customize tab container", "Socks", onTabChanged, (void*)(S32)WT_SOCKS );
- childSetTabChangeCallback("customize tab container", "Jacket", onTabChanged, (void*)(S32)WT_JACKET );
- childSetTabChangeCallback("customize tab container", "Gloves", onTabChanged, (void*)(S32)WT_GLOVES );
- childSetTabChangeCallback("customize tab container", "Undershirt", onTabChanged, (void*)(S32)WT_UNDERSHIRT );
- childSetTabChangeCallback("customize tab container", "Underpants", onTabChanged, (void*)(S32)WT_UNDERPANTS );
- childSetTabChangeCallback("customize tab container", "Skirt", onTabChanged, (void*)(S32)WT_SKIRT );
+ childSetTabChangeCallback("customize tab container", "Shape", onTabChanged, (void*)WT_SHAPE );
+ childSetTabChangeCallback("customize tab container", "Skin", onTabChanged, (void*)WT_SKIN );
+ childSetTabChangeCallback("customize tab container", "Hair", onTabChanged, (void*)WT_HAIR );
+ childSetTabChangeCallback("customize tab container", "Eyes", onTabChanged, (void*)WT_EYES );
+ childSetTabChangeCallback("customize tab container", "Shirt", onTabChanged, (void*)WT_SHIRT );
+ childSetTabChangeCallback("customize tab container", "Pants", onTabChanged, (void*)WT_PANTS );
+ childSetTabChangeCallback("customize tab container", "Shoes", onTabChanged, (void*)WT_SHOES );
+ childSetTabChangeCallback("customize tab container", "Socks", onTabChanged, (void*)WT_SOCKS );
+ childSetTabChangeCallback("customize tab container", "Jacket", onTabChanged, (void*)WT_JACKET );
+ childSetTabChangeCallback("customize tab container", "Gloves", onTabChanged, (void*)WT_GLOVES );
+ childSetTabChangeCallback("customize tab container", "Undershirt", onTabChanged, (void*)WT_UNDERSHIRT );
+ childSetTabChangeCallback("customize tab container", "Underpants", onTabChanged, (void*)WT_UNDERPANTS );
+ childSetTabChangeCallback("customize tab container", "Skirt", onTabChanged, (void*)WT_SKIRT );
// Remove underware panels for teens
if (gAgent.mAccess < SIM_ACCESS_MATURE)
diff --git a/linden/indra/newview/llfloaterdirectory.cpp b/linden/indra/newview/llfloaterdirectory.cpp
index aea55f7..3a05715 100644
--- a/linden/indra/newview/llfloaterdirectory.cpp
+++ b/linden/indra/newview/llfloaterdirectory.cpp
@@ -347,13 +347,13 @@ void LLFloaterDirectory::refreshGroup(const LLUUID& group_id)
LLFloaterDirectory::~LLFloaterDirectory()
{
sInstance = NULL;
- delete mPanelAvatarp;
- delete mPanelEventp;
- delete mPanelGroupp;
- delete mPanelGroupHolderp;
- delete mPanelPlacep;
- delete mPanelPlaceSmallp;
- delete mPanelClassifiedp;
+ delete mPanelAvatarp; mPanelAvatarp = NULL;
+ delete mPanelEventp; mPanelEventp = NULL;
+ delete mPanelGroupp; mPanelGroupp = NULL;
+ delete mPanelGroupHolderp; mPanelGroupHolderp = NULL;
+ delete mPanelPlacep; mPanelPlacep = NULL;
+ delete mPanelPlaceSmallp; mPanelPlaceSmallp = NULL;
+ delete mPanelClassifiedp; mPanelClassifiedp = NULL;
gSavedSettings.setBOOL("ShowDirectory", FALSE);
}
diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp
index d01a24b..78447e9 100644
--- a/linden/indra/newview/llfloaterfriends.cpp
+++ b/linden/indra/newview/llfloaterfriends.cpp
@@ -63,20 +63,18 @@
class LLLocalFriendsObserver : public LLFriendObserver
{
public:
- LLLocalFriendsObserver(LLFloaterFriends* floater) : mFloater(floater) {}
+ LLLocalFriendsObserver(LLPanelFriends* floater) : mFloater(floater) {}
virtual ~LLLocalFriendsObserver() { mFloater = NULL; }
virtual void changed(U32 mask)
{
mFloater->updateFriends(mask);
}
protected:
- LLFloaterFriends* mFloater;
+ LLPanelFriends* mFloater;
};
-LLFloaterFriends* LLFloaterFriends::sInstance = NULL;
-
-LLFloaterFriends::LLFloaterFriends() :
- LLFloater("Friends"),
+LLPanelFriends::LLPanelFriends() :
+ LLPanel(),
LLEventTimer(1000000),
mObserver(NULL),
mMenuState(0),
@@ -84,80 +82,38 @@ LLFloaterFriends::LLFloaterFriends() :
mAllowRightsChange(TRUE),
mNumRightsChanged(0)
{
- mTimer.stop();
- sInstance = this;
+ mEventTimer.stop();
mObserver = new LLLocalFriendsObserver(this);
LLAvatarTracker::instance().addObserver(mObserver);
- gSavedSettings.setBOOL("ShowFriends", TRUE);
- // Builds and adds to gFloaterView
- gUICtrlFactory->buildFloater(this, "floater_friends.xml");
}
-LLFloaterFriends::~LLFloaterFriends()
+LLPanelFriends::~LLPanelFriends()
{
LLAvatarTracker::instance().removeObserver(mObserver);
delete mObserver;
- sInstance = NULL;
- gSavedSettings.setBOOL("ShowFriends", FALSE);
}
-void LLFloaterFriends::tick()
+void LLPanelFriends::tick()
{
- mTimer.stop();
+ mEventTimer.stop();
mPeriod = 1000000;
mAllowRightsChange = TRUE;
updateFriends(LLFriendObserver::ADD);
}
-// static
-void LLFloaterFriends::show(void*)
-{
- if(sInstance)
- {
- sInstance->open(); /*Flawfinder: ignore*/
- }
- else
- {
- LLFloaterFriends* self = new LLFloaterFriends;
- self->open(); /*Flawfinder: ignore*/
- }
-}
-
-
-// static
-BOOL LLFloaterFriends::visible(void*)
-{
- return sInstance && sInstance->getVisible();
-}
-
-
-// static
-void LLFloaterFriends::toggle(void*)
-{
- if (sInstance)
- {
- sInstance->close();
- }
- else
- {
- show();
- }
-}
-
-
-void LLFloaterFriends::updateFriends(U32 changed_mask)
+void LLPanelFriends::updateFriends(U32 changed_mask)
{
LLUUID selected_id;
- LLCtrlListInterface *friends_list = sInstance->childGetListInterface("friend_list");
+ LLCtrlListInterface *friends_list = childGetListInterface("friend_list");
if (!friends_list) return;
- LLCtrlScrollInterface *friends_scroll = sInstance->childGetScrollInterface("friend_list");
+ LLCtrlScrollInterface *friends_scroll = childGetScrollInterface("friend_list");
if (!friends_scroll) return;
// We kill the selection warning, otherwise we'll spam with warning popups
// if the maximum amount of friends are selected
mShowMaxSelectWarning = false;
- LLDynamicArray selected_friends = sInstance->getSelectedIDs();
+ LLDynamicArray selected_friends = getSelectedIDs();
if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
{
refreshNames();
@@ -168,8 +124,8 @@ void LLFloaterFriends::updateFriends(U32 changed_mask)
if(mNumRightsChanged > 0)
{
mPeriod = RIGHTS_CHANGE_TIMEOUT;
- mTimer.start();
- mTimer.reset();
+ mEventTimer.start();
+ mEventTimer.reset();
mAllowRightsChange = FALSE;
}
else
@@ -194,12 +150,12 @@ void LLFloaterFriends::updateFriends(U32 changed_mask)
}
// virtual
-BOOL LLFloaterFriends::postBuild()
+BOOL LLPanelFriends::postBuild()
{
-
mFriendsList = LLUICtrlFactory::getScrollListByName(this, "friend_list");
mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT);
mFriendsList->setMaxiumumSelectCallback(onMaximumSelect);
+ mFriendsList->setCommitOnSelectionChange(TRUE);
childSetCommitCallback("friend_list", onSelectName, this);
childSetDoubleClickCallback("friend_list", onClickIM);
@@ -214,14 +170,17 @@ BOOL LLFloaterFriends::postBuild()
childSetAction("pay_btn", onClickPay, this);
childSetAction("add_btn", onClickAddFriend, this);
childSetAction("remove_btn", onClickRemove, this);
- childSetAction("close_btn", onClickClose, this);
+ setDefaultBtn("im_btn");
+
+ updateFriends(LLFriendObserver::ADD);
refreshUI();
+
return TRUE;
}
-void LLFloaterFriends::addFriend(const std::string& name, const LLUUID& agent_id)
+void LLPanelFriends::addFriend(const std::string& name, const LLUUID& agent_id)
{
LLAvatarTracker& at = LLAvatarTracker::instance();
const LLRelationship* relationInfo = at.getBuddyInfo(agent_id);
@@ -275,17 +234,26 @@ void LLFloaterFriends::addFriend(const std::string& name, const LLUUID& agent_id
mFriendsList->addElement(element, ADD_BOTTOM);
}
-void LLFloaterFriends::refreshRightsChangeList(U8 state)
+void LLPanelFriends::refreshRightsChangeList()
{
LLDynamicArray friends = getSelectedIDs();
- const LLRelationship* friend_status = NULL;
- if(friends.size() > 0) friend_status = LLAvatarTracker::instance().getBuddyInfo(friends[0]);
+ S32 num_selected = friends.size();
LLSD row;
- bool can_change_visibility = false;
- bool can_change_modify = false;
- bool can_change_online_multiple = true;
- bool can_change_map_multiple = true;
+ bool can_offer_teleport = num_selected >= 1;
+
+ // aggregate permissions over all selected friends
+ bool friends_see_online = true;
+ bool friends_see_on_map = true;
+ bool friends_modify_objects = true;
+
+ // do at least some of the friends selected have these rights?
+ bool some_friends_see_online = false;
+ bool some_friends_see_on_map = false;
+ bool some_friends_modify_objects = false;
+
+ bool selected_friends_online = true;
+
LLTextBox* processing_label = LLUICtrlFactory::getTextBoxByName(this, "process_rights_label");
if(!mAllowRightsChange)
@@ -293,7 +261,9 @@ void LLFloaterFriends::refreshRightsChangeList(U8 state)
if(processing_label)
{
processing_label->setVisible(true);
- state = 0;
+ // ignore selection for now
+ friends.clear();
+ num_selected = 0;
}
}
else
@@ -304,82 +274,111 @@ void LLFloaterFriends::refreshRightsChangeList(U8 state)
}
}
- if(state == 1)
- {
- if(friend_status && !friend_status->isOnline())
- {
- childSetEnabled("offer_teleport_btn", false);
- }
- can_change_visibility = true;
- can_change_modify = true;
- }
- else if (state == 2)
+ const LLRelationship* friend_status = NULL;
+ for(LLDynamicArray::iterator itr = friends.begin(); itr != friends.end(); ++itr)
{
- can_change_visibility = true;
- can_change_modify = false;
- for(LLDynamicArray::iterator itr = friends.begin(); itr != friends.end(); ++itr)
+ friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
+ if (friend_status)
{
- friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
+ bool can_see_online = friend_status->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS);
+ bool can_see_on_map = friend_status->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION);
+ bool can_modify_objects = friend_status->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS);
+
+ // aggregate rights of this friend into total selection
+ friends_see_online &= can_see_online;
+ friends_see_on_map &= can_see_on_map;
+ friends_modify_objects &= can_modify_objects;
+
+ // can at least one of your selected friends do any of these?
+ some_friends_see_online |= can_see_online;
+ some_friends_see_on_map |= can_see_on_map;
+ some_friends_modify_objects |= can_modify_objects;
+
if(!friend_status->isOnline())
{
- childSetEnabled("offer_teleport_btn", false);
- }
- if(!friend_status->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS))
- {
- can_change_online_multiple = false;
- can_change_map_multiple = false;
- }
- else if(!friend_status->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))
- {
- can_change_map_multiple = false;
+ can_offer_teleport = false;
+ selected_friends_online = false;
}
}
-
+ else // missing buddy info, don't allow any operations
+ {
+ can_offer_teleport = false;
+
+ friends_see_online = false;
+ friends_see_on_map = false;
+ friends_modify_objects = false;
+
+ some_friends_see_online = false;
+ some_friends_see_on_map = false;
+ some_friends_modify_objects = false;
+ }
}
- LLCheckboxCtrl* check;
+ // seeing a friend on the map requires seeing online status as a prerequisite
+ friends_see_on_map &= friends_see_online;
+
mMenuState = 0;
- check = LLUICtrlFactory::getCheckBoxByName(this, "online_status_cb");
- check->setEnabled(can_change_visibility);
- check->set(FALSE);
- if(!mAllowRightsChange) check->setVisible(FALSE);
- else check->setVisible(TRUE);
- if(friend_status)
+ // make checkboxes visible after we have finished processing rights
+ childSetVisible("online_status_cb", mAllowRightsChange);
+ childSetVisible("map_status_cb", mAllowRightsChange);
+ childSetVisible("modify_status_cb", mAllowRightsChange);
+
+ if (num_selected == 0) // nothing selected
{
- check->set(friend_status->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS) && can_change_online_multiple);
- if(friend_status->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) mMenuState |= LLRelationship::GRANT_ONLINE_STATUS;
+ childSetEnabled("im_btn", FALSE);
+ childSetEnabled("offer_teleport_btn", FALSE);
+
+ childSetEnabled("online_status_cb", FALSE);
+ childSetValue("online_status_cb", FALSE);
+ childSetTentative("online_status_cb", FALSE);
+
+ childSetEnabled("map_status_cb", FALSE);
+ childSetValue("map_status_cb", FALSE);
+ childSetTentative("map_status_cb", FALSE);
+
+ childSetEnabled("modify_status_cb", FALSE);
+ childSetValue("modify_status_cb", FALSE);
+ childSetTentative("modify_status_cb", FALSE);
}
-
- check = LLUICtrlFactory::getCheckBoxByName(this, "map_status_cb");
- check->setEnabled(false);
- check->set(FALSE);
- if(!mAllowRightsChange) check->setVisible(FALSE);
- else check->setVisible(TRUE);
- if(friend_status)
+ else // we have at least one friend selected...
{
- check->setEnabled(friend_status->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS) && can_change_visibility && can_change_online_multiple);
- check->set(friend_status->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION) && can_change_map_multiple);
- if(friend_status->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION)) mMenuState |= LLRelationship::GRANT_MAP_LOCATION;
- }
+ // only allow IMs to groups when everyone in the group is online
+ // to be consistent with context menus in inventory and because otherwise
+ // offline friends would be silently dropped from the session
+ childSetEnabled("im_btn", selected_friends_online || num_selected == 1);
- check = LLUICtrlFactory::getCheckBoxByName(this, "modify_status_cb");
- check->setEnabled(can_change_modify);
- check->set(FALSE);
- if(!mAllowRightsChange) check->setVisible(FALSE);
- else check->setVisible(TRUE);
- if(can_change_modify)
- {
- if(friend_status)
+ childSetEnabled("offer_teleport_btn", can_offer_teleport);
+
+ childSetEnabled("online_status_cb", TRUE);
+ childSetValue("online_status_cb", some_friends_see_online);
+ childSetTentative("online_status_cb", some_friends_see_online != friends_see_online);
+ if (friends_see_online)
+ {
+ mMenuState |= LLRelationship::GRANT_ONLINE_STATUS;
+ }
+
+ childSetEnabled("map_status_cb", TRUE);
+ childSetValue("map_status_cb", some_friends_see_on_map);
+ childSetTentative("map_status_cb", some_friends_see_on_map != friends_see_on_map);
+ if(friends_see_on_map)
{
- check->set(friend_status->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS));
- if(friend_status->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS)) mMenuState |= LLRelationship::GRANT_MODIFY_OBJECTS;
+ mMenuState |= LLRelationship::GRANT_MAP_LOCATION;
+ }
+
+ // for now, don't allow modify rights change for multiple select
+ childSetEnabled("modify_status_cb", num_selected == 1);
+ childSetValue("modify_status_cb", some_friends_modify_objects);
+ childSetTentative("modify_status_cb", some_friends_modify_objects != friends_modify_objects);
+ if(friends_modify_objects)
+ {
+ mMenuState |= LLRelationship::GRANT_MODIFY_OBJECTS;
}
}
}
-void LLFloaterFriends::refreshNames()
+void LLPanelFriends::refreshNames()
{
LLDynamicArray selected_ids = getSelectedIDs();
S32 pos = mFriendsList->getScrollPos();
@@ -409,7 +408,7 @@ void LLFloaterFriends::refreshNames()
}
-void LLFloaterFriends::refreshUI()
+void LLPanelFriends::refreshUI()
{
BOOL single_selected = FALSE;
BOOL multiple_selected = FALSE;
@@ -443,40 +442,34 @@ void LLFloaterFriends::refreshUI()
childSetEnabled("im_btn", single_selected);
childSetEnabled("friend_rights", single_selected);
- //Note: We reset this in refreshRightsChangeList since we already have to iterate
- //through all selected friends there
- childSetEnabled("offer_teleport_btn", single_selected);
-
- refreshRightsChangeList((single_selected + multiple_selected));
+ refreshRightsChangeList();
}
-// static
-LLDynamicArray LLFloaterFriends::getSelectedIDs()
+LLDynamicArray LLPanelFriends::getSelectedIDs()
{
LLUUID selected_id;
LLDynamicArray friend_ids;
- if(sInstance)
+ std::vector selected = mFriendsList->getAllSelected();
+ for(std::vector::iterator itr = selected.begin(); itr != selected.end(); ++itr)
{
- std::vector selected = sInstance->mFriendsList->getAllSelected();
- for(std::vector::iterator itr = selected.begin(); itr != selected.end(); ++itr)
- {
- friend_ids.push_back((*itr)->getUUID());
- }
+ friend_ids.push_back((*itr)->getUUID());
}
return friend_ids;
}
// static
-void LLFloaterFriends::onSelectName(LLUICtrl* ctrl, void* user_data)
+void LLPanelFriends::onSelectName(LLUICtrl* ctrl, void* user_data)
{
- if(sInstance)
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ if(panelp)
{
- sInstance->refreshUI();
+ panelp->refreshUI();
}
}
//static
-void LLFloaterFriends::onMaximumSelect(void* user_data)
+void LLPanelFriends::onMaximumSelect(void* user_data)
{
LLString::format_map_t args;
args["[MAX_SELECT]"] = llformat("%d", MAX_FRIEND_SELECT);
@@ -484,10 +477,12 @@ void LLFloaterFriends::onMaximumSelect(void* user_data)
};
// static
-void LLFloaterFriends::onClickProfile(void* user_data)
+void LLPanelFriends::onClickProfile(void* user_data)
{
- //llinfos << "LLFloaterFriends::onClickProfile()" << llendl;
- LLDynamicArray ids = getSelectedIDs();
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ //llinfos << "LLPanelFriends::onClickProfile()" << llendl;
+ LLDynamicArray ids = panelp->getSelectedIDs();
if(ids.size() > 0)
{
LLUUID agent_id = ids[0];
@@ -498,10 +493,12 @@ void LLFloaterFriends::onClickProfile(void* user_data)
}
// static
-void LLFloaterFriends::onClickIM(void* user_data)
+void LLPanelFriends::onClickIM(void* user_data)
{
- //llinfos << "LLFloaterFriends::onClickIM()" << llendl;
- LLDynamicArray ids = getSelectedIDs();
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ //llinfos << "LLPanelFriends::onClickIM()" << llendl;
+ LLDynamicArray ids = panelp->getSelectedIDs();
if(ids.size() > 0)
{
if(ids.size() == 1)
@@ -514,8 +511,8 @@ void LLFloaterFriends::onClickIM(void* user_data)
{
char buffer[MAX_STRING]; /* Flawfinder: ignore */
snprintf(buffer, MAX_STRING, "%s %s", first, last); /* Flawfinder: ignore */
- gIMView->setFloaterOpen(TRUE);
- gIMView->addSession(
+ gIMMgr->setFloaterOpen(TRUE);
+ gIMMgr->addSession(
buffer,
IM_NOTHING_SPECIAL,
agent_id);
@@ -523,17 +520,18 @@ void LLFloaterFriends::onClickIM(void* user_data)
}
else
{
- gIMView->setFloaterOpen(TRUE);
- gIMView->addSession("Friends Conference",
+ gIMMgr->setFloaterOpen(TRUE);
+ gIMMgr->addSession("Friends Conference",
IM_SESSION_CONFERENCE_START,
ids[0],
ids);
}
+ make_ui_sound("UISndStartIM");
}
}
// static
-void LLFloaterFriends::requestFriendship(const LLUUID& target_id, const LLString& target_name)
+void LLPanelFriends::requestFriendship(const LLUUID& target_id, const LLString& target_name)
{
// HACK: folder id stored as "message"
LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
@@ -552,7 +550,7 @@ struct LLAddFriendData
};
// static
-void LLFloaterFriends::callbackAddFriend(S32 option, void* data)
+void LLPanelFriends::callbackAddFriend(S32 option, void* data)
{
LLAddFriendData* add = (LLAddFriendData*)data;
if (option == 0)
@@ -563,7 +561,7 @@ void LLFloaterFriends::callbackAddFriend(S32 option, void* data)
}
// static
-void LLFloaterFriends::onPickAvatar(const std::vector& names,
+void LLPanelFriends::onPickAvatar(const std::vector& names,
const std::vector& ids,
void* )
{
@@ -573,7 +571,7 @@ void LLFloaterFriends::onPickAvatar(const std::vector& names,
}
// static
-void LLFloaterFriends::requestFriendshipDialog(const LLUUID& id,
+void LLPanelFriends::requestFriendshipDialog(const LLUUID& id,
const std::string& name)
{
if(id == gAgentID)
@@ -593,16 +591,24 @@ void LLFloaterFriends::requestFriendshipDialog(const LLUUID& id,
}
// static
-void LLFloaterFriends::onClickAddFriend(void* user_data)
+void LLPanelFriends::onClickAddFriend(void* user_data)
{
- LLFloaterAvatarPicker::show(onPickAvatar, user_data, FALSE, TRUE);
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+ LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(onPickAvatar, user_data, FALSE, TRUE);
+ if (root_floater)
+ {
+ root_floater->addDependentFloater(picker);
+ }
}
// static
-void LLFloaterFriends::onClickRemove(void* user_data)
+void LLPanelFriends::onClickRemove(void* user_data)
{
- //llinfos << "LLFloaterFriends::onClickRemove()" << llendl;
- LLDynamicArray ids = getSelectedIDs();
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ //llinfos << "LLPanelFriends::onClickRemove()" << llendl;
+ LLDynamicArray ids = panelp->getSelectedIDs();
LLStringBase::format_map_t args;
if(ids.size() > 0)
{
@@ -630,9 +636,11 @@ void LLFloaterFriends::onClickRemove(void* user_data)
}
// static
-void LLFloaterFriends::onClickOfferTeleport(void*)
+void LLPanelFriends::onClickOfferTeleport(void* user_data)
{
- LLDynamicArray ids = getSelectedIDs();
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ LLDynamicArray ids = panelp->getSelectedIDs();
if(ids.size() > 0)
{
handle_lure(ids);
@@ -640,43 +648,40 @@ void LLFloaterFriends::onClickOfferTeleport(void*)
}
// static
-void LLFloaterFriends::onClickPay(void*)
+void LLPanelFriends::onClickPay(void* user_data)
{
- LLDynamicArray ids = getSelectedIDs();
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ LLDynamicArray ids = panelp->getSelectedIDs();
if(ids.size() == 1)
{
handle_pay_by_id(ids[0]);
}
}
-// static
-void LLFloaterFriends::onClickClose(void* user_data)
+void LLPanelFriends::onClickOnlineStatus(LLUICtrl* ctrl, void* user_data)
{
- //llinfos << "LLFloaterFriends::onClickClose()" << llendl;
- if(sInstance)
- {
- sInstance->onClose(false);
- }
-}
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-void LLFloaterFriends::onClickOnlineStatus(LLUICtrl* ctrl, void* user_data)
-{
bool checked = ctrl->getValue();
- sInstance->updateMenuState(LLRelationship::GRANT_ONLINE_STATUS, checked);
- sInstance->applyRightsToFriends(LLRelationship::GRANT_ONLINE_STATUS, checked);
+ panelp->updateMenuState(LLRelationship::GRANT_ONLINE_STATUS, checked);
+ panelp->applyRightsToFriends(LLRelationship::GRANT_ONLINE_STATUS, checked);
}
-void LLFloaterFriends::onClickMapStatus(LLUICtrl* ctrl, void* user_data)
+void LLPanelFriends::onClickMapStatus(LLUICtrl* ctrl, void* user_data)
{
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
bool checked = ctrl->getValue();
- sInstance->updateMenuState(LLRelationship::GRANT_MAP_LOCATION, checked);
- sInstance->applyRightsToFriends(LLRelationship::GRANT_MAP_LOCATION, checked);
+ panelp->updateMenuState(LLRelationship::GRANT_MAP_LOCATION, checked);
+ panelp->applyRightsToFriends(LLRelationship::GRANT_MAP_LOCATION, checked);
}
-void LLFloaterFriends::onClickModifyStatus(LLUICtrl* ctrl, void* user_data)
+void LLPanelFriends::onClickModifyStatus(LLUICtrl* ctrl, void* user_data)
{
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
bool checked = ctrl->getValue();
- LLDynamicArray ids = getSelectedIDs();
+ LLDynamicArray ids = panelp->getSelectedIDs();
LLStringBase::format_map_t args;
if(ids.size() > 0)
{
@@ -690,33 +695,35 @@ void LLFloaterFriends::onClickModifyStatus(LLUICtrl* ctrl, void* user_data)
args["[FIRST_NAME]"] = first;
args["[LAST_NAME]"] = last;
}
- if(checked) gViewerWindow->alertXml("GrantModifyRights", args, handleModifyRights, NULL);
- else gViewerWindow->alertXml("RevokeModifyRights", args, handleModifyRights, NULL);
+ if(checked) gViewerWindow->alertXml("GrantModifyRights", args, handleModifyRights, user_data);
+ else gViewerWindow->alertXml("RevokeModifyRights", args, handleModifyRights, user_data);
}
else return;
}
}
-void LLFloaterFriends::handleModifyRights(S32 option, void* user_data)
+void LLPanelFriends::handleModifyRights(S32 option, void* user_data)
{
- if(sInstance)
+ LLPanelFriends* panelp = (LLPanelFriends*)user_data;
+
+ if(panelp)
{
if(!option)
{
- sInstance->updateMenuState(LLRelationship::GRANT_MODIFY_OBJECTS, !((sInstance->getMenuState() & LLRelationship::GRANT_MODIFY_OBJECTS) != 0));
- sInstance->applyRightsToFriends(LLRelationship::GRANT_MODIFY_OBJECTS, ((sInstance->getMenuState() & LLRelationship::GRANT_MODIFY_OBJECTS) != 0));
+ panelp->updateMenuState(LLRelationship::GRANT_MODIFY_OBJECTS, !((panelp->getMenuState() & LLRelationship::GRANT_MODIFY_OBJECTS) != 0));
+ panelp->applyRightsToFriends(LLRelationship::GRANT_MODIFY_OBJECTS, ((panelp->getMenuState() & LLRelationship::GRANT_MODIFY_OBJECTS) != 0));
}
- sInstance->refreshUI();
+ panelp->refreshUI();
}
}
-void LLFloaterFriends::updateMenuState(S32 flag, BOOL value)
+void LLPanelFriends::updateMenuState(S32 flag, BOOL value)
{
if(value) mMenuState |= flag;
else mMenuState &= ~flag;
}
-void LLFloaterFriends::applyRightsToFriends(S32 flag, BOOL value)
+void LLPanelFriends::applyRightsToFriends(S32 flag, BOOL value)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GrantUserRights);
@@ -745,7 +752,7 @@ void LLFloaterFriends::applyRightsToFriends(S32 flag, BOOL value)
// static
-void LLFloaterFriends::handleRemove(S32 option, void* user_data)
+void LLPanelFriends::handleRemove(S32 option, void* user_data)
{
LLDynamicArray* ids = static_cast*>(user_data);
for(LLDynamicArray::iterator itr = ids->begin(); itr != ids->end(); ++itr)
diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h
index 327a8cf..0b6646d 100644
--- a/linden/indra/newview/llfloaterfriends.h
+++ b/linden/indra/newview/llfloaterfriends.h
@@ -31,7 +31,7 @@
#ifndef LL_LLFLOATERFRIENDS_H
#define LL_LLFLOATERFRIENDS_H
-#include "llfloater.h"
+#include "llpanel.h"
#include "llstring.h"
#include "lluuid.h"
#include "lltimer.h"
@@ -40,24 +40,23 @@ class LLFriendObserver;
/**
- * @class LLFloaterFriends
+ * @class LLPanelFriends
* @brief An instance of this class is used for displaying your friends
* and gives you quick access to all agents which a user relationship.
*
* @sa LLFloater
*/
-class LLFloaterFriends : public LLFloater, public LLEventTimer
+class LLPanelFriends : public LLPanel, public LLEventTimer
{
public:
- virtual ~LLFloaterFriends();
+ LLPanelFriends();
+ virtual ~LLPanelFriends();
/**
* @brief This method either creates or brings to the front the
* current instantiation of this floater. There is only once since
* you can currently only look at your local friends.
*/
- static void show(void* ignored = NULL);
-
virtual void tick();
/**
@@ -68,11 +67,6 @@ public:
virtual BOOL postBuild();
- static BOOL visible(void* unused = NULL);
-
- // Toggles visibility of floater
- static void toggle(void* unused = NULL);
-
// Show a dialog explaining what friendship entails, then request
// friendship. JC
static void requestFriendshipDialog(const LLUUID& target_id,
@@ -95,19 +89,18 @@ private:
};
// protected members
- LLFloaterFriends();
void reloadNames();
void refreshNames();
void refreshUI();
- void refreshRightsChangeList(U8 state);
+ void refreshRightsChangeList();
void applyRightsToFriends(S32 flag, BOOL value);
void updateMenuState(S32 flag, BOOL value);
S32 getMenuState() { return mMenuState; }
void addFriend(const std::string& name, const LLUUID& agent_id);
// return LLUUID::null if nothing is selected
- static LLDynamicArray getSelectedIDs();
+ LLDynamicArray getSelectedIDs();
// callback methods
static void onSelectName(LLUICtrl* ctrl, void* user_data);
@@ -123,8 +116,6 @@ private:
static void onClickOfferTeleport(void* user_data);
static void onClickPay(void* user_data);
- static void onClickClose(void* user_data);
-
static void onClickOnlineStatus(LLUICtrl* ctrl, void* user_data);
static void onClickMapStatus(LLUICtrl* ctrl, void* user_data);
static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
@@ -133,9 +124,6 @@ private:
static void handleModifyRights(S32 option, void* user_data);
private:
- // static data
- static LLFloaterFriends* sInstance;
-
// member data
LLFriendObserver* mObserver;
LLUUID mAddFriendID;
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp
index 53d5147..74526e1 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -1,6 +1,6 @@
/**
* @file llfloatergroups.cpp
- * @brief LLFloaterGroups class implementation
+ * @brief LLPanelGroups class implementation
*
* Copyright (c) 2002-2007, Linden Research, Inc.
*
@@ -50,115 +50,135 @@
#include "lltextbox.h"
#include "llvieweruictrlfactory.h"
#include "llviewerwindow.h"
-
-const LLRect FLOATER_RECT(0, 258, 280, 0);
-const char FLOATER_TITLE[] = "Groups";
+#include "llimview.h"
// static
-LLMap LLFloaterGroups::sInstances;
+std::map LLFloaterGroupPicker::sInstances;
+// helper functions
+void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id);
///----------------------------------------------------------------------------
-/// Class LLFloaterGroups
+/// Class LLFloaterGroupPicker
///----------------------------------------------------------------------------
-//LLEventListener
-//virtual
-bool LLFloaterGroups::handleEvent(LLPointer event, const LLSD& userdata)
+// static
+LLFloaterGroupPicker* LLFloaterGroupPicker::findInstance(const LLSD& seed)
{
- if (event->desc() == "new group")
+ instance_map_t::iterator found_it = sInstances.find(seed.asUUID());
+ if (found_it != sInstances.end())
{
- reset();
- return true;
+ return found_it->second;
}
-
- return LLView::handleEvent(event, userdata);
+ return NULL;
}
-// Call this with an agent id and AGENT_GROUPS for an agent's
-// groups, otherwise, call with an object id and SET_OBJECT_GROUP
-// when modifying an object.
// static
-LLFloaterGroups* LLFloaterGroups::show(const LLUUID& id, EGroupDialog type)
+LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
+{
+ LLFloaterGroupPicker* pickerp = new LLFloaterGroupPicker(seed);
+ gUICtrlFactory->buildFloater(pickerp, "floater_choose_group.xml");
+ return pickerp;
+}
+
+LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
+ mSelectCallback(NULL),
+ mCallbackUserdata(NULL)
+{
+ mID = seed.asUUID();
+ sInstances.insert(std::make_pair(mID, this));
+}
+
+LLFloaterGroupPicker::~LLFloaterGroupPicker()
+{
+ sInstances.erase(mID);
+}
+
+void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
+ void* userdata)
{
- LLFloaterGroups* instance = NULL;
- if(sInstances.checkData(id))
+ mSelectCallback = callback;
+ mCallbackUserdata = userdata;
+}
+
+BOOL LLFloaterGroupPicker::postBuild()
+{
+ init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID());
+
+ childSetAction("OK", onBtnOK, this);
+
+ childSetAction("Cancel", onBtnCancel, this);
+
+ setDefaultBtn("OK");
+
+ childSetDoubleClickCallback("group list", onBtnOK);
+ childSetUserData("group list", this);
+
+ childEnable("OK");
+
+ return TRUE;
+}
+
+void LLFloaterGroupPicker::onBtnOK(void* userdata)
+{
+ LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata;
+ if(self) self->ok();
+}
+
+void LLFloaterGroupPicker::onBtnCancel(void* userdata)
+{
+ LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata;
+ if(self) self->close();
+}
+
+
+void LLFloaterGroupPicker::ok()
+{
+ LLCtrlListInterface *group_list = childGetListInterface("group list");
+ LLUUID group_id;
+ if (group_list)
{
- instance = sInstances.getData(id);
- if (instance->getType() != type)
- {
- // not the type we want ==> destroy it and rebuild below
- instance->destroy();
- instance = NULL;
- }
- else
- {
- // Move the existing view to the front
- instance->open(); /* Flawfinder: ignore */
- }
+ group_id = group_list->getCurrentID();
}
-
- if (!instance)
+ if(mSelectCallback)
{
- S32 left = 0;
- S32 top = 0;
- LLRect rect = FLOATER_RECT;
- rect.translate( left - rect.mLeft, top - rect.mTop );
- instance = new LLFloaterGroups("groups", rect, FLOATER_TITLE, id);
- if(instance)
- {
- sInstances.addData(id, instance);
- //instance->init(type);
- instance->mType = type;
- switch (type)
- {
- case AGENT_GROUPS:
- gUICtrlFactory->buildFloater(instance, "floater_groups.xml");
- break;
- case CHOOSE_ONE:
- gUICtrlFactory->buildFloater(instance, "floater_choose_group.xml");
- break;
- }
- instance->center();
- instance->open(); /*Flawfinder: ignore*/
- }
+ mSelectCallback(group_id, mCallbackUserdata);
}
- return instance;
+
+ close();
}
-// static
-LLFloaterGroups* LLFloaterGroups::getInstance(const LLUUID& id)
+///----------------------------------------------------------------------------
+/// Class LLPanelGroups
+///----------------------------------------------------------------------------
+
+//LLEventListener
+//virtual
+bool LLPanelGroups::handleEvent(LLPointer event, const LLSD& userdata)
{
- if(sInstances.checkData(id))
+ if (event->desc() == "new group")
{
- return sInstances.getData(id);
+ reset();
+ return true;
}
- return NULL;
+
+ return LLView::handleEvent(event, userdata);
}
// Default constructor
-LLFloaterGroups::LLFloaterGroups(const std::string& name,
- const LLRect& rect,
- const std::string& title,
- const LLUUID& id) :
- LLFloater(name, rect, title),
- mID(id),
- mType(AGENT_GROUPS),
- mOKCallback(NULL),
- mCallbackUserdata(NULL)
+LLPanelGroups::LLPanelGroups() :
+ LLPanel()
{
+ gAgent.addListener(this, "new group");
}
-// Destroys the object
-LLFloaterGroups::~LLFloaterGroups()
+LLPanelGroups::~LLPanelGroups()
{
- gFocusMgr.releaseFocusIfNeeded( this );
-
- sInstances.removeData(mID);
+ gAgent.removeListener(this);
}
// clear the group list, and get a fresh set of info.
-void LLFloaterGroups::reset()
+void LLPanelGroups::reset()
{
LLCtrlListInterface *group_list = childGetListInterface("group list");
if (group_list)
@@ -168,215 +188,126 @@ void LLFloaterGroups::reset()
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
- initAgentGroups(gAgent.getGroupID());
+ init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID());
enableButtons();
}
-void LLFloaterGroups::setOkCallback(void (*callback)(LLUUID, void*),
- void* userdata)
-{
- mOKCallback = callback;
- mCallbackUserdata = userdata;
-}
-
-BOOL LLFloaterGroups::postBuild()
+BOOL LLPanelGroups::postBuild()
{
childSetCommitCallback("group list", onGroupList, this);
- if(mType == AGENT_GROUPS)
- {
- childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
- childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
-
- initAgentGroups(gAgent.getGroupID());
-
- childSetAction("Activate", onBtnActivate, this);
+ childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
+ childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
- childSetAction("Info", onBtnInfo, this);
+ init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID());
- childSetAction("Leave", onBtnLeave, this);
+ childSetAction("Activate", onBtnActivate, this);
- childSetAction("Create", onBtnCreate, this);
+ childSetAction("Info", onBtnInfo, this);
- childSetAction("Search...", onBtnSearch, this);
+ childSetAction("IM", onBtnIM, this);
- childSetAction("Close", onBtnCancel, this);
+ childSetAction("Leave", onBtnLeave, this);
- setDefaultBtn("Info");
+ childSetAction("Create", onBtnCreate, this);
- childSetDoubleClickCallback("group list", onBtnInfo);
- childSetUserData("group list", this);
- }
- else
- {
- initAgentGroups(gAgent.getGroupID());
-
- childSetAction("OK", onBtnOK, this);
+ childSetAction("Search...", onBtnSearch, this);
- childSetAction("Cancel", onBtnCancel, this);
+ setDefaultBtn("IM");
- setDefaultBtn("OK");
+ childSetDoubleClickCallback("group list", onBtnIM);
+ childSetUserData("group list", this);
- childSetDoubleClickCallback("group list", onBtnOK);
- childSetUserData("group list", this);
- }
-
- enableButtons();
+ reset();
return TRUE;
}
-void LLFloaterGroups::initAgentGroups(const LLUUID& highlight_id)
+void LLPanelGroups::enableButtons()
{
- S32 count = gAgent.mGroups.count();
- LLUUID id;
LLCtrlListInterface *group_list = childGetListInterface("group list");
- if (!group_list) return;
-
- group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
-
- for(S32 i = 0; i < count; ++i)
+ LLUUID group_id;
+ if (group_list)
{
- id = gAgent.mGroups.get(i).mID;
- LLGroupData* group_datap = &gAgent.mGroups.get(i);
- LLString style = "NORMAL";
- if(highlight_id == id)
- {
- style = "BOLD";
- }
-
- LLSD element;
- element["id"] = id;
- element["columns"][0]["column"] = "name";
- element["columns"][0]["value"] = group_datap->mName;
- element["columns"][0]["font"] = "SANSSERIF";
- element["columns"][0]["font-style"] = style;
-
- group_list->addElement(element, ADD_SORTED);
+ group_id = group_list->getCurrentID();
}
+ if(group_id != gAgent.getGroupID())
{
- LLString style = "NORMAL";
- if (highlight_id.isNull())
- {
- style = "BOLD";
- }
- LLSD element;
- element["id"] = LLUUID::null;
- element["columns"][0]["column"] = "name";
- element["columns"][0]["value"] = "none";
- element["columns"][0]["font"] = "SANSSERIF";
- element["columns"][0]["font-style"] = style;
-
- group_list->addElement(element, ADD_TOP);
+ childEnable("Activate");
}
-
- group_list->selectByValue(highlight_id);
-
- childSetFocus("group list");
-}
-
-void LLFloaterGroups::enableButtons()
-{
- LLCtrlListInterface *group_list = childGetListInterface("group list");
- LLUUID group_id;
- if (group_list)
+ else
{
- group_id = group_list->getCurrentID();
+ childDisable("Activate");
}
- if(mType == AGENT_GROUPS)
+ if (group_id.notNull())
{
- if(group_id != gAgent.getGroupID())
- {
- childEnable("Activate");
- }
- else
- {
- childDisable("Activate");
- }
- if (group_id.notNull())
- {
- childEnable("Info");
- childEnable("Leave");
- }
- else
- {
- childDisable("Info");
- childDisable("Leave");
- }
- if(gAgent.mGroups.count() < MAX_AGENT_GROUPS)
- {
- childEnable("Create");
- }
- else
- {
- childDisable("Create");
- }
+ childEnable("Info");
+ childEnable("IM");
+ childEnable("Leave");
}
else
{
- childEnable("OK");
+ childDisable("Info");
+ childDisable("IM");
+ childDisable("Leave");
+ }
+ if(gAgent.mGroups.count() < MAX_AGENT_GROUPS)
+ {
+ childEnable("Create");
+ }
+ else
+ {
+ childDisable("Create");
}
}
-void LLFloaterGroups::onBtnCreate(void* userdata)
+void LLPanelGroups::onBtnCreate(void* userdata)
{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
if(self) self->create();
}
-void LLFloaterGroups::onBtnActivate(void* userdata)
+void LLPanelGroups::onBtnActivate(void* userdata)
{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
if(self) self->activate();
}
-void LLFloaterGroups::onBtnInfo(void* userdata)
+void LLPanelGroups::onBtnInfo(void* userdata)
{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
if(self) self->info();
}
-void LLFloaterGroups::onBtnLeave(void* userdata)
+void LLPanelGroups::onBtnIM(void* userdata)
{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
- if(self) self->leave();
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
+ if(self) self->startIM();
}
-void LLFloaterGroups::onBtnSearch(void* userdata)
+void LLPanelGroups::onBtnLeave(void* userdata)
{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
- if(self) self->search();
-}
-
-void LLFloaterGroups::onBtnOK(void* userdata)
-{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
- if(self) self->ok();
-}
-
-void LLFloaterGroups::onBtnCancel(void* userdata)
-{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
- if(self) self->close();
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
+ if(self) self->leave();
}
-void LLFloaterGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
+void LLPanelGroups::onBtnSearch(void* userdata)
{
- LLFloaterGroups* self = (LLFloaterGroups*)userdata;
- if(self) self->highlightGroupList(ctrl);
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
+ if(self) self->search();
}
-void LLFloaterGroups::create()
+void LLPanelGroups::create()
{
- llinfos << "LLFloaterGroups::create" << llendl;
+ llinfos << "LLPanelGroups::create" << llendl;
LLFloaterGroupInfo::showCreateGroup(NULL);
}
-void LLFloaterGroups::activate()
+void LLPanelGroups::activate()
{
- llinfos << "LLFloaterGroups::activate" << llendl;
+ llinfos << "LLPanelGroups::activate" << llendl;
LLCtrlListInterface *group_list = childGetListInterface("group list");
LLUUID group_id;
if (group_list)
@@ -392,9 +323,9 @@ void LLFloaterGroups::activate()
gAgent.sendReliableMessage();
}
-void LLFloaterGroups::info()
+void LLPanelGroups::info()
{
- llinfos << "LLFloaterGroups::info" << llendl;
+ llinfos << "LLPanelGroups::info" << llendl;
LLCtrlListInterface *group_list = childGetListInterface("group list");
LLUUID group_id;
if (group_list && (group_id = group_list->getCurrentID()).notNull())
@@ -403,9 +334,36 @@ void LLFloaterGroups::info()
}
}
-void LLFloaterGroups::leave()
+void LLPanelGroups::startIM()
+{
+ //llinfos << "LLPanelFriends::onClickIM()" << llendl;
+ LLCtrlListInterface *group_list = childGetListInterface("group list");
+ LLUUID group_id;
+
+ if (group_list && (group_id = group_list->getCurrentID()).notNull())
+ {
+ LLGroupData group_data;
+ if (gAgent.getGroupData(group_id, group_data))
+ {
+ gIMMgr->setFloaterOpen(TRUE);
+ gIMMgr->addSession(
+ group_data.mName,
+ IM_SESSION_GROUP_START,
+ group_id);
+ make_ui_sound("UISndStartIM");
+ }
+ else
+ {
+ // this should never happen, as starting a group IM session
+ // relies on you belonging to the group and hence having the group data
+ make_ui_sound("UISndInvalidOp");
+ }
+ }
+}
+
+void LLPanelGroups::leave()
{
- llinfos << "LLFloaterGroups::leave" << llendl;
+ llinfos << "LLPanelGroups::leave" << llendl;
LLCtrlListInterface *group_list = childGetListInterface("group list");
LLUUID group_id;
if (group_list && (group_id = group_list->getCurrentID()).notNull())
@@ -427,13 +385,13 @@ void LLFloaterGroups::leave()
}
}
-void LLFloaterGroups::search()
+void LLPanelGroups::search()
{
LLFloaterDirectory::showGroups();
}
// static
-void LLFloaterGroups::callbackLeaveGroup(S32 option, void* userdata)
+void LLPanelGroups::callbackLeaveGroup(S32 option, void* userdata)
{
LLUUID* group_id = (LLUUID*)userdata;
if(option == 0 && group_id)
@@ -450,25 +408,58 @@ void LLFloaterGroups::callbackLeaveGroup(S32 option, void* userdata)
delete group_id;
}
-void LLFloaterGroups::ok()
+void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
{
- llinfos << "LLFloaterGroups::ok" << llendl;
- LLCtrlListInterface *group_list = childGetListInterface("group list");
- LLUUID group_id;
- if (group_list)
+ LLPanelGroups* self = (LLPanelGroups*)userdata;
+ if(self) self->enableButtons();
+}
+
+void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
+{
+ S32 count = gAgent.mGroups.count();
+ LLUUID id;
+ LLCtrlListInterface *group_list = ctrl->getListInterface();
+ if (!group_list) return;
+
+ group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+
+ for(S32 i = 0; i < count; ++i)
{
- group_id = group_list->getCurrentID();
+ id = gAgent.mGroups.get(i).mID;
+ LLGroupData* group_datap = &gAgent.mGroups.get(i);
+ LLString style = "NORMAL";
+ if(highlight_id == id)
+ {
+ style = "BOLD";
+ }
+
+ LLSD element;
+ element["id"] = id;
+ element["columns"][0]["column"] = "name";
+ element["columns"][0]["value"] = group_datap->mName;
+ element["columns"][0]["font"] = "SANSSERIF";
+ element["columns"][0]["font-style"] = style;
+
+ group_list->addElement(element, ADD_SORTED);
}
- if(mOKCallback)
+
+ // add "none" to list at top
{
- mOKCallback(group_id, mCallbackUserdata);
+ LLString style = "NORMAL";
+ if (highlight_id.isNull())
+ {
+ style = "BOLD";
+ }
+ LLSD element;
+ element["id"] = LLUUID::null;
+ element["columns"][0]["column"] = "name";
+ element["columns"][0]["value"] = "none";
+ element["columns"][0]["font"] = "SANSSERIF";
+ element["columns"][0]["font-style"] = style;
+
+ group_list->addElement(element, ADD_TOP);
}
- close();
+ group_list->selectByValue(highlight_id);
}
-void LLFloaterGroups::highlightGroupList(LLUICtrl*)
-{
- llinfos << "LLFloaterGroups::highlightGroupList" << llendl;
- enableButtons();
-}
diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h
index 9c51d2f..ed5b8b2 100644
--- a/linden/indra/newview/llfloatergroups.h
+++ b/linden/indra/newview/llfloatergroups.h
@@ -41,89 +41,80 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include "lluuid.h"
-#include "llmap.h"
-#include "llevent.h"
#include "llfloater.h"
+#include