diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 43 | ||||
-rw-r--r-- | indra/newview/llagent.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llcallingcard.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfirstuse.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llfirstuse.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 163 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.h | 62 | ||||
-rw-r--r-- | indra/newview/llfloatersettingsdebug.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llfloatervoicedevicesettings.cpp | 323 | ||||
-rw-r--r-- | indra/newview/llfloatervoicedevicesettings.h | 82 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 48 | ||||
-rw-r--r-- | indra/newview/llpanellogin.h | 1 | ||||
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 35 | ||||
-rw-r--r-- | indra/newview/llpreviewtexture.h | 4 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 10 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 17 | ||||
-rw-r--r-- | indra/newview/macview_Prefix.h | 1 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 26 |
21 files changed, 776 insertions, 96 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7e687a5e64..93c06a474c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2224,6 +2224,28 @@ <integer>0</integer> </array> </map> + <key>FloaterActiveSpeakersSortColumn</key> + <map> + <key>Comment</key> + <string>Column name to sort on</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>speaker_name</string> + </map> + <key>FloaterActiveSpeakersSortAscending</key> + <map> + <key>Comment</key> + <string>Whether to sort up or down</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>FloaterAudioVolumeRect</key> <map> <key>Comment</key> @@ -2304,7 +2326,7 @@ <integer>0</integer> </array> </map> - <key>FloaterCameraRect2</key> + <key>FloaterCameraRect3</key> <map> <key>Comment</key> <string>Rectangle for camera control window</string> @@ -2314,10 +2336,10 @@ <string>Rect</string> <key>Value</key> <array> - <integer>166</integer> - <integer>128</integer> - <integer>342</integer> + <integer>0</integer> <integer>64</integer> + <integer>176</integer> + <integer>0</integer> </array> </map> <key>FloaterChatRect</key> @@ -6062,6 +6084,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowActiveSpeakers</key> + <map> + <key>Comment</key> + <string>Display active speakers list on login</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowAxes</key> <map> <key>Comment</key> @@ -6082,7 +6115,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>ShowChatHistory</key> <map> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a9d4e8a2f6..d00dfef478 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -58,7 +58,6 @@ #include "imageids.h" #include "llbox.h" #include "llbutton.h" -#include "llcameraview.h" #include "llcallingcard.h" #include "llchatbar.h" #include "llconsole.h" @@ -69,6 +68,7 @@ #include "llfloateractivespeakers.h" #include "llfloateravatarinfo.h" #include "llfloaterbuildoptions.h" +#include "llfloatercamera.h" #include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloaterdirectory.h" diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index fb726e7c97..143c9cece4 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -320,6 +320,10 @@ bool LLAppViewerWin32::initHardwareTest() { BOOL vram_only = !gSavedSettings.getBOOL("ProbeHardwareOnStartup"); + // per DEV-11631 - disable hardware probing for everything + // but vram. + vram_only = TRUE; + LLSplashScreen::update("Detecting hardware..."); llinfos << "Attempting to poll DirectX for hardware info" << llendl; diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 0e0880959e..11d4f4c651 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -60,6 +60,8 @@ #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llvoavatar.h" +#include "llimview.h" +#include "llimpanel.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -671,7 +673,18 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) } if(notify) { + // Popup a notify box with online status of this agent LLNotifyBox::showXml(online ? "FriendOnline" : "FriendOffline", args); + + // If there's an open IM session with this agent, send a notification there too. + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); + LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id); + if (floater) + { + LLUIString notifyMsg = LLNotifyBox::getTemplateMessage((online ? "FriendOnline" : "FriendOffline"),args); + if (!notifyMsg.empty()) + floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor")); + } } mModifyMask |= LLFriendObserver::ONLINE; diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index b00450eec6..c07319e224 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -38,7 +38,6 @@ // viewer includes #include "llnotify.h" -#include "llfloatervoicewizard.h" #include "llviewercontrol.h" #include "llui.h" #include "llappviewer.h" @@ -255,20 +254,6 @@ void LLFirstUse::useSculptedPrim() } // static -void LLFirstUse::useVoice() -{ - if (!gSavedSettings.getBOOL("CmdLineDisableVoice")) - { - if (gSavedSettings.getWarning("FirstVoice")) - { - gSavedSettings.setWarning("FirstVoice", FALSE); - - LLFloaterVoiceWizard::showInstance(); - } - } -} - -// static void LLFirstUse::useMedia() { if (gSavedSettings.getWarning("FirstMedia")) diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h index 5510ce02b9..92c3da6f44 100644 --- a/indra/newview/llfirstuse.h +++ b/indra/newview/llfirstuse.h @@ -104,7 +104,6 @@ public: static void useFlexible(); static void useDebugMenus(); static void useSculptedPrim(); - static void useVoice(); static void useMedia(); protected: diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp new file mode 100644 index 0000000000..6bc14b331b --- /dev/null +++ b/indra/newview/llfloatercamera.cpp @@ -0,0 +1,163 @@ +/** + * @file llfloatercamera.cpp + * @brief Container for camera control buttons (zoom, pan, orbit) + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * 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. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatercamera.h" + +// Library includes +#include "lluictrlfactory.h" + +// Viewer includes +#include "lljoystickbutton.h" +#include "llviewercontrol.h" + +// Constants +const F32 CAMERA_BUTTON_DELAY = 0.0f; + +// Globals +LLFloaterCamera* gFloaterCamera = NULL; + + +// +// Member functions +// + +LLFloaterCamera::LLFloaterCamera(const std::string& name) +: LLFloater(name) // uses "FloaterCameraRect3" +{ + setIsChrome(TRUE); + + // For now, only used for size and tooltip strings + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml"); + + S32 top = getRect().getHeight(); + S32 bottom = 0; + S32 left = 16; + + const S32 ROTATE_WIDTH = 64; + mRotate = new LLJoystickCameraRotate("cam rotate stick", + LLRect( left, top, left + ROTATE_WIDTH, bottom ), + "cam_rotate_out.tga", + "cam_rotate_in.tga" ); + mRotate->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); + mRotate->setHeldDownDelay(CAMERA_BUTTON_DELAY); + mRotate->setToolTip( getString("rotate_tooltip") ); + mRotate->setSoundFlags(MOUSE_DOWN | MOUSE_UP); + addChild(mRotate); + + left += ROTATE_WIDTH; + + const S32 ZOOM_WIDTH = 16; + mZoom = new LLJoystickCameraZoom( + "zoom", + LLRect( left, top, left + ZOOM_WIDTH, bottom ), + "cam_zoom_out.tga", + "cam_zoom_plus_in.tga", + "cam_zoom_minus_in.tga"); + mZoom->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); + mZoom->setHeldDownDelay(CAMERA_BUTTON_DELAY); + mZoom->setToolTip( getString("zoom_tooltip") ); + mZoom->setSoundFlags(MOUSE_DOWN | MOUSE_UP); + addChild(mZoom); + + left += ZOOM_WIDTH; + + const S32 TRACK_WIDTH = 64; + mTrack = new LLJoystickCameraTrack("cam track stick", + LLRect( left, top, left + TRACK_WIDTH, bottom ), + "cam_tracking_out.tga", + "cam_tracking_in.tga"); + mTrack->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); + mTrack->setHeldDownDelay(CAMERA_BUTTON_DELAY); + mTrack->setToolTip( getString("move_tooltip") ); + mTrack->setSoundFlags(MOUSE_DOWN | MOUSE_UP); + addChild(mTrack); +} + + +LLFloaterCamera::~LLFloaterCamera() +{ + // children all deleted by LLView destructor + gFloaterCamera = NULL; +} + +// virtual +void LLFloaterCamera::onClose(bool app_quitting) +{ + LLFloater::onClose(app_quitting); + + if (!app_quitting) + { + gSavedSettings.setBOOL("ShowCameraControls", FALSE); + } +} + +// +// Static member functions +// + +// static +void LLFloaterCamera::show(void*) +{ + if(!gFloaterCamera) + { + gFloaterCamera = new LLFloaterCamera("camera floater"); + } + gFloaterCamera->open(); /* Flawfinder: ignore */ + gSavedSettings.setBOOL("ShowCameraControls", TRUE); +} + +// static +void LLFloaterCamera::toggle(void*) +{ + if (gFloaterCamera) + { + gFloaterCamera->close(); + } + else + { + show(NULL); + } +} + +// static +BOOL LLFloaterCamera::visible(void*) +{ + if (gFloaterCamera) + { + return gFloaterCamera->getVisible(); + } + else + { + return FALSE; + } +} diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h new file mode 100644 index 0000000000..fac4d2f191 --- /dev/null +++ b/indra/newview/llfloatercamera.h @@ -0,0 +1,62 @@ +/** + * @file llfloatercamera.h + * @brief Container for camera control buttons (zoom, pan, orbit) + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * 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. + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERCAMERA_H +#define LLFLOATERCAMERA_H + +#include "llfloater.h" + +class LLJoystickCameraRotate; +class LLJoystickCameraZoom; +class LLJoystickCameraTrack; + +class LLFloaterCamera + : public LLFloater +{ +public: + LLFloaterCamera(const std::string& name); + ~LLFloaterCamera(); + + /*virtual*/ void onClose(bool app_quitting); + + static void show(void*); + static void toggle(void*); + static BOOL visible(void*); + +public: + LLJoystickCameraRotate* mRotate; + LLJoystickCameraZoom* mZoom; + LLJoystickCameraTrack* mTrack; +}; + +extern LLFloaterCamera *gFloaterCamera; + +#endif diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index bb44304ae6..2b7d10a7a9 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -235,12 +235,16 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) spinner4->setVisible(FALSE); color_swatch->setVisible(FALSE); childSetVisible("val_text", FALSE); - childSetVisible("boolean_combo", FALSE); mComment->setText(LLString::null); if (controlp) { eControlType type = controlp->type(); + + //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame + childSetVisible("boolean_combo", type == TYPE_BOOLEAN); + + mComment->setText(controlp->getComment()); spinner1->setMaxValue(F32_MAX); spinner2->setMaxValue(F32_MAX); @@ -304,8 +308,6 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) } break; case TYPE_BOOLEAN: - childSetVisible("boolean_combo", TRUE); - if (!childHasFocus("boolean_combo")) { if (sd.asBoolean()) diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp new file mode 100644 index 0000000000..699f89c944 --- /dev/null +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -0,0 +1,323 @@ +/** + * @file llfloatervoicedevicesettings.cpp + * @author Richard Nelson + * @brief Voice communication set-up + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 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. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatervoicedevicesettings.h" + +// Viewer includes +#include "llagent.h" +#include "llbutton.h" +#include "llcombobox.h" +#include "llfocusmgr.h" +#include "lliconctrl.h" +#include "llprefsvoice.h" +#include "llsliderctrl.h" +#include "llviewercontrol.h" +#include "llvoiceclient.h" +#include "llimpanel.h" + +// Library includes (after viewer) +#include "lluictrlfactory.h" + + +LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() +{ + mCtrlInputDevices = NULL; + mCtrlOutputDevices = NULL; + mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + mDevicesUpdated = FALSE; + + // grab "live" mic volume level + mMicVolume = gSavedSettings.getF32("AudioLevelMic"); + + // ask for new device enumeration + // now do this in onOpen() instead... + //gVoiceClient->refreshDeviceLists(); +} + +LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() +{ +} + +BOOL LLPanelVoiceDeviceSettings::postBuild() +{ + LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); + // set mic volume tuning slider based on last mic volume setting + volume_slider->setValue(mMicVolume); + + childSetCommitCallback("voice_input_device", onCommitInputDevice, this); + childSetCommitCallback("voice_output_device", onCommitOutputDevice, this); + + return TRUE; +} + +void LLPanelVoiceDeviceSettings::draw() +{ + // let user know that volume indicator is not yet available + childSetVisible("wait_text", !gVoiceClient->inTuningMode()); + + LLPanel::draw(); + + F32 voice_power = gVoiceClient->tuningGetEnergy(); + S32 discrete_power = 0; + + if (!gVoiceClient->inTuningMode()) + { + discrete_power = 0; + } + else + { + discrete_power = llmin(4, llfloor((voice_power / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 4.f)); + } + + if (gVoiceClient->inTuningMode()) + { + for(S32 power_bar_idx = 0; power_bar_idx < 5; power_bar_idx++) + { + LLString view_name = llformat("%s%d", "bar", power_bar_idx); + LLView* bar_view = getChild<LLView>(view_name); + if (bar_view) + { + if (power_bar_idx < discrete_power) + { + LLColor4 color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor"); + gl_rect_2d(bar_view->getRect(), color, TRUE); + } + gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE); + } + } + } +} + +void LLPanelVoiceDeviceSettings::apply() +{ + std::string s; + if(mCtrlInputDevices) + { + s = mCtrlInputDevices->getSimple(); + gSavedSettings.setString("VoiceInputAudioDevice", s); + } + + if(mCtrlOutputDevices) + { + s = mCtrlOutputDevices->getSimple(); + gSavedSettings.setString("VoiceOutputAudioDevice", s); + } + + // assume we are being destroyed by closing our embedding window + gSavedSettings.setF32("AudioLevelMic", mMicVolume); +} + +void LLPanelVoiceDeviceSettings::cancel() +{ + gSavedSettings.setString("VoiceInputAudioDevice", mInputDevice); + gSavedSettings.setString("VoiceOutputAudioDevice", mOutputDevice); + + if(mCtrlInputDevices) + mCtrlInputDevices->setSimple(mInputDevice); + + if(mCtrlOutputDevices) + mCtrlOutputDevices->setSimple(mOutputDevice); +} + +void LLPanelVoiceDeviceSettings::refresh() +{ + //grab current volume + LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); + // set mic volume tuning slider based on last mic volume setting + mMicVolume = (F32)volume_slider->getValue().asReal(); + gVoiceClient->tuningSetMicVolume(mMicVolume); + + // Fill in popup menus + mCtrlInputDevices = getChild<LLComboBox>("voice_input_device"); + mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device"); + + if(!gVoiceClient->deviceSettingsAvailable()) + { + // The combo boxes are disabled, since we can't get the device settings from the daemon just now. + // Put the currently set default (ONLY) in the box, and select it. + if(mCtrlInputDevices) + { + mCtrlInputDevices->removeall(); + mCtrlInputDevices->add( mInputDevice, ADD_BOTTOM ); + mCtrlInputDevices->setSimple(mInputDevice); + } + if(mCtrlOutputDevices) + { + mCtrlOutputDevices->removeall(); + mCtrlOutputDevices->add( mOutputDevice, ADD_BOTTOM ); + mCtrlOutputDevices->setSimple(mOutputDevice); + } + } + else if (!mDevicesUpdated) + { + LLVoiceClient::deviceList *devices; + + LLVoiceClient::deviceList::iterator iter; + + if(mCtrlInputDevices) + { + mCtrlInputDevices->removeall(); + mCtrlInputDevices->add( getString("default_text"), ADD_BOTTOM ); + + devices = gVoiceClient->getCaptureDevices(); + for(iter=devices->begin(); iter != devices->end(); iter++) + { + mCtrlInputDevices->add( *iter, ADD_BOTTOM ); + } + + if(!mCtrlInputDevices->setSimple(mInputDevice)) + { + mCtrlInputDevices->setSimple(getString("default_text")); + } + } + + if(mCtrlOutputDevices) + { + mCtrlOutputDevices->removeall(); + mCtrlOutputDevices->add( getString("default_text"), ADD_BOTTOM ); + + devices = gVoiceClient->getRenderDevices(); + for(iter=devices->begin(); iter != devices->end(); iter++) + { + mCtrlOutputDevices->add( *iter, ADD_BOTTOM ); + } + + if(!mCtrlOutputDevices->setSimple(mOutputDevice)) + { + mCtrlOutputDevices->setSimple(getString("default_text")); + } + } + mDevicesUpdated = TRUE; + } +} + +void LLPanelVoiceDeviceSettings::onOpen() +{ + mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + mMicVolume = gSavedSettings.getF32("AudioLevelMic"); + mDevicesUpdated = FALSE; + + // ask for new device enumeration + gVoiceClient->refreshDeviceLists(); + + // put voice client in "tuning" mode + gVoiceClient->tuningStart(); + LLVoiceChannel::suspend(); +} + +void LLPanelVoiceDeviceSettings::onClose(bool app_quitting) +{ + gVoiceClient->tuningStop(); + LLVoiceChannel::resume(); +} + +// static +void LLPanelVoiceDeviceSettings::onCommitInputDevice(LLUICtrl* ctrl, void* user_data) +{ + gSavedSettings.setString("VoiceInputAudioDevice", ctrl->getValue().asString()); +} + +// static +void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user_data) +{ + gSavedSettings.setString("VoiceOutputAudioDevice", ctrl->getValue().asString()); +} + +// +// LLFloaterVoiceDeviceSettings +// + +LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed) : LLFloater("floater_device_settings"), mDevicePanel(NULL) +{ + mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this); + // do not automatically open singleton floaters (as result of getInstance()) + BOOL no_open = FALSE; + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", &mFactoryMap, no_open); + center(); +} + +void LLFloaterVoiceDeviceSettings::onOpen() +{ + if(mDevicePanel) + { + mDevicePanel->onOpen(); + } + + LLFloater::onOpen(); +} + +void LLFloaterVoiceDeviceSettings::onClose(bool app_quitting) +{ + if(mDevicePanel) + { + mDevicePanel->onClose(app_quitting); + } + + setVisible(FALSE); +} + +void LLFloaterVoiceDeviceSettings::apply() +{ + if (mDevicePanel) + { + mDevicePanel->apply(); + } +} + +void LLFloaterVoiceDeviceSettings::cancel() +{ + if (mDevicePanel) + { + mDevicePanel->cancel(); + } +} + +void LLFloaterVoiceDeviceSettings::draw() +{ + if (mDevicePanel) + { + mDevicePanel->refresh(); + } + LLFloater::draw(); +} + +// static +void* LLFloaterVoiceDeviceSettings::createPanelVoiceDeviceSettings(void* user_data) +{ + LLFloaterVoiceDeviceSettings* floaterp = (LLFloaterVoiceDeviceSettings*)user_data; + floaterp->mDevicePanel = new LLPanelVoiceDeviceSettings(); + return floaterp->mDevicePanel; +} diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h new file mode 100644 index 0000000000..45a209b24b --- /dev/null +++ b/indra/newview/llfloatervoicedevicesettings.h @@ -0,0 +1,82 @@ +/** + * @file llpanelvoicedevicesettings.h + * @author Richard Nelson + * @brief Voice communication set-up wizard + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * 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. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERVOICEDEVICESETTINGS_H +#define LL_LLFLOATERVOICEDEVICESETTINGS_H + +#include "llfloater.h" + +class LLPrefsVoiceLogic; + +class LLPanelVoiceDeviceSettings : public LLPanel +{ +public: + LLPanelVoiceDeviceSettings(); + ~LLPanelVoiceDeviceSettings(); + + /*virtual*/ void draw(); + /*virtual*/ BOOL postBuild(); + void apply(); + void cancel(); + void refresh(); + void onOpen(); + void onClose(bool app_quitting); + +protected: + static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data); + static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data); + + F32 mMicVolume; + std::string mInputDevice; + std::string mOutputDevice; + class LLComboBox *mCtrlInputDevices; + class LLComboBox *mCtrlOutputDevices; + BOOL mDevicesUpdated; +}; + +class LLFloaterVoiceDeviceSettings : public LLFloater, public LLFloaterSingleton<LLFloaterVoiceDeviceSettings> +{ +public: + LLFloaterVoiceDeviceSettings(const LLSD& seed); + /*virtual*/ void onOpen(); + /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void draw(); + void apply(); + void cancel(); + +protected: + static void* createPanelVoiceDeviceSettings(void* user_data); + + LLPanelVoiceDeviceSettings* mDevicePanel; +}; + +#endif // LL_LLFLOATERVOICEDEVICESETTINGS_H diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 4047cd022f..5fa49e0e8b 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -404,6 +404,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, combo->setCommitCallback( &LLPanelGeneral::set_start_location ); + childSetCommitCallback("server_combo", onSelectServer, this); + childSetAction("connect_btn", onClickConnect, this); setDefaultBtn("connect_btn"); @@ -909,6 +911,7 @@ void LLPanelLogin::loadLoginPage() first_query_delimiter = "?"; } + // Language LLString language(gSavedSettings.getString("Language")); if(language == "default") { @@ -916,11 +919,37 @@ void LLPanelLogin::loadLoginPage() } oStr << first_query_delimiter<<"lang=" << language; + // First Login? if (gSavedSettings.getBOOL("FirstLoginThisInstall")) { oStr << "&firstlogin=TRUE"; } + // Channel and Version + LLString version = llformat("%d.%d.%d (%d)", + LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); + + char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); + char* curl_version = curl_escape(version.c_str(), 0); + + oStr << "&channel=" << curl_channel; + oStr << "&version=" << curl_version; + + curl_free(curl_channel); + curl_free(curl_version); + + // Grid + LLString grid; + S32 grid_index; + getServer( grid, grid_index ); + if( grid_index != (S32)GRID_INFO_OTHER ) + { + grid = gGridInfo[grid_index].mLabel; + } + + char* curl_grid = curl_escape(grid.c_str(), 0); + oStr << "&grid=" << curl_grid; + curl_free(curl_grid); #if USE_VIEWER_AUTH LLURLSimString::sInstance.parse(); @@ -970,22 +999,12 @@ void LLPanelLogin::loadLoginPage() lastname = gSavedSettings.getString("LastName"); } - LLString version = llformat("%d.%d.%d (%d)", - LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); - char* curl_region = curl_escape(region.c_str(), 0); - char* curl_channel = curl_escape(gChannelName.c_str(), 0); - char* curl_version = curl_escape(version.c_str(), 0); oStr <<"firstname=" << firstname << - "&lastname=" << lastname << "&location=" << location << "®ion=" << curl_region << - "&grid=" << gGridInfo[gGridChoice].mLabel << "&channel=" << curl_channel << - "&version=" << curl_version; + "&lastname=" << lastname << "&location=" << location << "®ion=" << curl_region; curl_free(curl_region); - curl_free(curl_channel); - curl_free(curl_version); - if (!password.empty()) { @@ -1147,3 +1166,10 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) sCapslockDidNotification = TRUE; } } + +// static +void LLPanelLogin::onSelectServer(LLUICtrl*, void*) +{ + // grid changed so show new splash screen (possibly) + loadLoginPage(); +} diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index ac6e3b0426..a13431d683 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -112,6 +112,7 @@ private: virtual void onNavigateComplete( const EventType& eventIn ); static void onClickForgotPassword(void*); static void onPassKey(LLLineEditor* caller, void* user_data); + static void onSelectServer(LLUICtrl*, void*); private: LLPointer<LLUIImage> mLogoImage; diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 392c9724a0..bdcde60f46 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -193,7 +193,7 @@ void LLPreviewTexture::init() void LLPreviewTexture::draw() { - updateAspectRatio(); + updateDimensions(); LLPreview::draw(); @@ -377,7 +377,7 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success, // It takes a while until we get height and width information. // When we receive it, reshape the window accordingly. -void LLPreviewTexture::updateAspectRatio() +void LLPreviewTexture::updateDimensions() { if (!mImage) return; @@ -386,24 +386,21 @@ void LLPreviewTexture::updateAspectRatio() // Attempt to make the image 1:1 on screen. // If that fails, cut width by half. S32 client_width = image_width; + S32 client_height = image_height; S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE; S32 vert_pad = PREVIEW_HEADER_SIZE + 2 * CLIENT_RECT_VPAD + LLPANEL_BORDER_WIDTH; - S32 screen_width = gViewerWindow->getWindowWidth(); - S32 max_client_width = screen_width - horiz_pad; + S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad; S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad; - F32 inv_aspect_ratio = (F32) image_height / (F32) image_width; - while ((client_width > max_client_width) || ( llround(client_width * inv_aspect_ratio) > max_client_height ) ) + while ((client_width > max_client_width) || + (client_height > max_client_height ) ) { client_width /= 2; + client_height /= 2; } S32 view_width = client_width + horiz_pad; - - // Adjust the height based on the width computed above. - S32 client_height = llround(client_width * inv_aspect_ratio); S32 view_height = client_height + vert_pad; - // set text on dimensions display (should be moved out of here and into a callback of some sort) childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->mFullWidth)); @@ -459,26 +456,20 @@ void LLPreviewTexture::updateAspectRatio() else { client_width = getRect().getWidth() - horiz_pad; - client_height = llround(client_width * inv_aspect_ratio); + client_height = getRect().getHeight() - vert_pad; } + S32 max_height = getRect().getHeight() - PREVIEW_BORDER - button_height + - CLIENT_RECT_VPAD - info_height - CLIENT_RECT_VPAD - PREVIEW_HEADER_SIZE; + S32 max_width = getRect().getWidth() - horiz_pad; - S32 max_height = getRect().getHeight() - PREVIEW_BORDER - button_height - - CLIENT_RECT_VPAD - info_height - CLIENT_RECT_VPAD - PREVIEW_HEADER_SIZE; - max_height = llmax(max_height, 1); - - if (client_height > max_height) - { - F32 aspect_ratio = (F32) image_width / (F32) image_height; - client_height = max_height; - client_width = llround(client_height * aspect_ratio); - } + client_height = llclamp(client_height, 1, max_height); + client_width = llclamp(client_width, 1, max_width); LLRect window_rect(0, getRect().getHeight(), getRect().getWidth(), 0); window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD; - // try to keep aspect ratio when hosted, as hosting view can resize without user input mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height); } diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 8ed5210c46..a897dcadef 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -78,11 +78,11 @@ public: protected: void init(); - void updateAspectRatio(); virtual const char *getTitleName() const { return "Texture"; } -protected: +private: + void updateDimensions(); LLUUID mImageID; LLPointer<LLViewerImage> mImage; BOOL mLoadingFullImage; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index daaa117a9c..1533ccf659 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -48,7 +48,6 @@ #include "audiosettings.h" #include "llares.h" #include "llcachename.h" -#include "llcameraview.h" #include "llviewercontrol.h" #include "lldir.h" #include "llerrorcontrol.h" @@ -91,6 +90,7 @@ #include "llfeaturemanager.h" #include "llfirstuse.h" #include "llfloateractivespeakers.h" +#include "llfloatercamera.h" #include "llfloaterchat.h" #include "llfloatergesture.h" #include "llfloaterhud.h" @@ -1591,6 +1591,11 @@ BOOL idle_startup() LLFloaterMove::show(NULL); } + if (gSavedSettings.getBOOL("ShowActiveSpeakers")) + { + LLFloaterActiveSpeakers::showInstance(); + } + if (!gNoRender) { // Move the progress view in front of the UI @@ -2281,9 +2286,6 @@ BOOL idle_startup() // On first start, ask user for gender dialog_choose_gender_first_start(); - // setup voice - LLFirstUse::useVoice(); - // Start automatic replay if the flag is set. if (gSavedSettings.getBOOL("StatsAutoRun")) { diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 16ab3c0944..315136ed36 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -194,8 +194,12 @@ BOOL LLToolPie::pickAndShowMenu(S32 x, S32 y, MASK mask, BOOL always_show) // nothing break; case CLICK_ACTION_SIT: - handle_sit_or_stand(); - return TRUE; + if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting + { + handle_sit_or_stand(); + return TRUE; + } // else nothing (fall through to touch) + case CLICK_ACTION_PAY: if (object && object->flagTakesMoney() || parent && parent->flagTakesMoney()) @@ -436,7 +440,10 @@ ECursorType cursor_from_object(LLViewerObject* object) switch(click_action) { case CLICK_ACTION_SIT: - cursor = UI_CURSOR_TOOLSIT; + if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // not already sitting? + { + cursor = UI_CURSOR_TOOLSIT; + } break; case CLICK_ACTION_BUY: cursor = UI_CURSOR_TOOLBUY; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a1181ccf3a..f4cf31273f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -92,6 +92,7 @@ #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" #include "llfloaterbuyland.h" +#include "llfloatercamera.h" #include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloaterdaycycle.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index afd1e48921..4068933fe1 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -76,7 +76,6 @@ #include "llagent.h" #include "llalertdialog.h" #include "llbox.h" -#include "llcameraview.h" #include "llchatbar.h" #include "llconsole.h" #include "llviewercontrol.h" @@ -95,6 +94,7 @@ #include "llfloateractivespeakers.h" #include "llfloaterbuildoptions.h" #include "llfloaterbuyland.h" +#include "llfloatercamera.h" #include "llfloaterchat.h" #include "llfloaterchatterbox.h" #include "llfloatercustomize.h" @@ -1750,6 +1750,19 @@ void adjust_rect_top_left(const LLString& control, const LLRect& window) } } +void adjust_rect_top_center(const LLString& control, const LLRect& window) +{ + LLRect r = gSavedSettings.getRect(control); + if (r.mLeft == 0 && r.mBottom == 0) + { + r.setLeftTopAndSize( window.getWidth()/2 - r.getWidth()/2, + window.getHeight(), + r.getWidth(), + r.getHeight() ); + gSavedSettings.setRect(control, r); + } +} + void adjust_rect_top_right(const LLString& control, const LLRect& window) { LLRect r = gSavedSettings.getRect(control); @@ -1808,7 +1821,7 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window) adjust_rect_bottom_center("FloaterMoveRect2", window); - adjust_rect_bottom_center("FloaterCameraRect2", window); + adjust_rect_top_center("FloaterCameraRect3", window); adjust_rect_top_left("FloaterCustomizeAppearanceRect", window); diff --git a/indra/newview/macview_Prefix.h b/indra/newview/macview_Prefix.h index eb394dc557..ac19cd924e 100644 --- a/indra/newview/macview_Prefix.h +++ b/indra/newview/macview_Prefix.h @@ -58,7 +58,6 @@ #include "llbox.h" #include "llbutton.h" -#include "llcameraview.h" #include "llconsole.h" #include "lldrawable.h" #include "llfirstuse.h" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 71509f50f5..e73d278043 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -127,26 +127,6 @@ class ViewerManifest(LLManifest): return " ".join((channel_flags, grid_flags)).strip() - def login_url(self): - """ Convenience function that returns the appropriate login url for the grid""" - if(self.args.get('login_url')): - return self.args['login_url'] - else: - if(self.default_grid()): - if(self.default_channel()): - # agni release - return 'http://secondlife.com/app/login/' - else: - # first look (or other) on agni - return 'http://secondlife.com/app/login/%s/' % self.channel_lowerword() - else: - # beta grid - return 'http://secondlife.com/app/login/beta/' - - def replace_login_url(self): - # set the login page to point to a url appropriate for the type of client - self.replace_in("skins/xui/en-us/panel_login.xml", searchdict={'http://secondlife.com/app/login/':self.login_url()}) - class WindowsManifest(ViewerManifest): def final_exe(self): @@ -229,7 +209,6 @@ class WindowsManifest(ViewerManifest): # pull in the crash logger and updater from other projects self.path(src="../win_crash_logger/win_crash_logger.exe", dst="win_crash_logger.exe") self.path(src="../win_updater/updater.exe", dst="updater.exe") - self.replace_login_url() def nsi_file_commands(self, install=True): def wpath(path): @@ -387,9 +366,6 @@ class DarwinManifest(ViewerManifest): # command line arguments for connecting to the proper grid self.put_in_file(self.flags_list(), 'arguments.txt') - # set the proper login url - self.replace_login_url() - self.end_prefix("Resources") self.end_prefix("Contents") @@ -471,8 +447,6 @@ class LinuxManifest(ViewerManifest): # Create an appropriate gridargs.dat for this package, denoting required grid. self.put_in_file(self.flags_list(), 'gridargs.dat') - # set proper login url - self.replace_login_url() # stripping all the libs removes a few megabytes from the end-user package for s,d in self.file_list: |