From a53043e8e2535dbb82c5672259a878664f5036ce Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 22 Apr 2011 12:05:30 -0700 Subject: EXP-738 FIX Login screen background image takes too long to load Misc improvements to make the login page load properly. --- indra/newview/llmediactrl.cpp | 20 ++--- indra/newview/llpanellogin.cpp | 170 +++-------------------------------------- indra/newview/llpanellogin.h | 2 - 3 files changed, 15 insertions(+), 177 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 5007f1c17a..b3ad9efeb2 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -68,7 +68,6 @@ LLMediaCtrl::Params::Params() : start_url("start_url"), border_visible("border_visible", true), ignore_ui_scale("ignore_ui_scale", true), - hide_loading("hide_loading", false), decouple_texture_size("decouple_texture_size", false), texture_width("texture_width", 1024), texture_height("texture_height", 1024), @@ -97,8 +96,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mCurrentNavUrl( "" ), mStretchToFill( true ), mMaintainAspectRatio ( true ), - mHideLoading (false), - mHidingInitialLoad (false), mDecoupleTextureSize ( false ), mTextureWidth ( 1024 ), mTextureHeight ( 1024 ), @@ -121,8 +118,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : setBorderVisible(p.border_visible); - mHideLoading = p.hide_loading; - setDecoupleTextureSize(p.decouple_texture_size); setTextureSize(p.texture_width, p.texture_height); @@ -684,11 +679,6 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->clearCache(); mClearCache = false; } - - if(mHideLoading) - { - mHidingInitialLoad = true; - } } else { @@ -756,11 +746,11 @@ void LLMediaCtrl::draw() } } - if(mHidingInitialLoad) - { - // If we're hiding loading, don't draw at all. - draw_media = false; - } +// if(mHidingInitialLoad) +// { +// // If we're hiding loading, don't draw at all. +// draw_media = false; +// } bool background_visible = isBackgroundVisible(); bool background_opaque = isBackgroundOpaque(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7820ac3ecd..a5385b0b1c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -81,7 +81,6 @@ const S32 MAX_PASSWORD = 16; LLPanelLogin *LLPanelLogin::sInstance = NULL; BOOL LLPanelLogin::sCapslockDidNotification = FALSE; - class LLLoginRefreshHandler : public LLCommandHandler { public: @@ -97,58 +96,6 @@ public: } }; -LLLoginRefreshHandler gLoginRefreshHandler; - - -// helper class that trys to download a URL from a web site and calls a method -// on parent class indicating if the web server is working or not -class LLIamHereLogin : public LLHTTPClient::Responder -{ - private: - LLIamHereLogin( LLPanelLogin* parent ) : - mParent( parent ) - {} - - LLPanelLogin* mParent; - - public: - static boost::intrusive_ptr< LLIamHereLogin > build( LLPanelLogin* parent ) - { - return boost::intrusive_ptr< LLIamHereLogin >( new LLIamHereLogin( parent ) ); - }; - - virtual void setParent( LLPanelLogin* parentIn ) - { - mParent = parentIn; - }; - - // We don't actually expect LLSD back, so need to override completedRaw - virtual void completedRaw(U32 status, const std::string& reason, - const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer) - { - completed(status, reason, LLSD()); // will call result() or error() - } - - virtual void result( const LLSD& content ) - { - if ( mParent ) - mParent->setSiteIsAlive( true ); - }; - - virtual void error( U32 status, const std::string& reason ) - { - if ( mParent ) - mParent->setSiteIsAlive( false ); - }; -}; - -// this is global and not a class member to keep crud out of the header file -namespace { - boost::intrusive_ptr< LLIamHereLogin > gResponsePtr = 0; -}; - - //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -160,7 +107,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLogoImage(), mCallback(callback), mCallbackData(cb_data), - mHtmlAvailable( TRUE ), mListener(new LLPanelLoginListener(this)) { setBackgroundVisible(FALSE); @@ -190,21 +136,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, buildFromFile( "panel_login.xml"); - // Legacy login web page is hidden under the menu bar. - // Adjust reg-in-client web browser widget to not be hidden. - if (gSavedSettings.getBOOL("RegInClient")) - { - reshape(rect.getWidth(), rect.getHeight() - MENU_BAR_HEIGHT); - } - else - { - reshape(rect.getWidth(), rect.getHeight()); - } + reshape(rect.getWidth(), rect.getHeight()); getChild("password_edit")->setKeystrokeCallback(onPassKey, this); // change z sort of clickable text to be behind buttons - //sendChildToBack(getChildView("channel_text")); sendChildToBack(getChildView("forgot_password_text")); if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) @@ -249,16 +185,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLMediaCtrl* web_browser = getChild("login_html"); web_browser->addObserver(this); - // Clear the browser's cache to avoid any potential for the cache messing up the login screen. - web_browser->clearCache(); - reshapeBrowser(); - // kick off a request to grab the url manually - gResponsePtr = LLIamHereLogin::build( this ); - - LLHTTPClient::head( LLGridManager::getInstance()->getLoginPage(), gResponsePtr ); - + loadLoginPage(); + // Show last logged in user favorites in "Start at" combo. addUsersWithFavoritesToUsername(); getChild("username_combo")->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this)); @@ -334,46 +264,10 @@ void LLPanelLogin::reshapeBrowser() reshape( rect.getWidth(), rect.getHeight(), 1 ); } -void LLPanelLogin::setSiteIsAlive( bool alive ) -{ - LLMediaCtrl* web_browser = getChild("login_html"); - // if the contents of the site was retrieved - if ( alive ) - { - if ( web_browser ) - { - loadLoginPage(); - - // mark as available - mHtmlAvailable = TRUE; - } - } - else - // the site is not available (missing page, server down, other badness) - { - if ( web_browser ) - { - // hide browser control (revealing default one) - web_browser->setVisible( FALSE ); - - // mark as unavailable - mHtmlAvailable = FALSE; - } - } -} - - LLPanelLogin::~LLPanelLogin() { LLPanelLogin::sInstance = NULL; - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - - //// We know we're done with the image, so be rid of it. - //gTextureList.deleteImage( mLogoImage ); - // Controls having keyboard focus by default // must reset it on destroy. (EXT-2748) gFocusMgr.setDefaultKeyboardFocus(NULL); @@ -396,22 +290,13 @@ void LLPanelLogin::draw() S32 width = getRect().getWidth(); S32 height = getRect().getHeight(); - if ( mHtmlAvailable ) - { - if (getChild("login_widgets")->getVisible()) - { - // draw a background box in black - gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); - // draw the bottom part of the background image - // just the blue background to the native client UI - mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); - } - } - else + if (getChild("login_widgets")->getVisible()) { - // the HTML login page is not available so default to the original screen - S32 offscreen_part = height / 3; - mLogoImage->draw(0, -offscreen_part, width, height+offscreen_part); + // draw a background box in black + gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); + // draw the bottom part of the background image + // just the blue background to the native client UI + mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); }; } glPopMatrix(); @@ -870,23 +755,10 @@ void LLPanelLogin::loadLoginPage() oStr << "&os=" << os_info; curl_free(os_info); - gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); - gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); LLMediaCtrl* web_browser = sInstance->getChild("login_html"); - - // navigate to the "real" page - if (gSavedSettings.getBOOL("RegInClient")) - { - web_browser->setFocus(TRUE); - login_page = sInstance->getString("reg_in_client_url"); - web_browser->navigateTo(login_page, "text/html"); - } - else - { - web_browser->navigateTo( oStr.str(), "text/html" ); - } + web_browser->navigateTo( oStr.str(), "text/html" ); } void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) @@ -917,10 +789,6 @@ void LLPanelLogin::onClickConnect(void *) { if (sInstance && sInstance->mCallback) { - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); @@ -988,24 +856,6 @@ void LLPanelLogin::onClickConnect(void *) } } -/* -// static -bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (0 == option) - { - llinfos << "Going to account creation URL" << llendl; - LLWeb::loadURLExternal( LLNotifications::instance().getGlobalString("CREATE_ACCOUNT_URL")); - } - else - { - sInstance->setFocus(TRUE); - } - return false; -} -*/ - // static void LLPanelLogin::onClickNewAccount(void*) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 9cc5e3456a..11273453ba 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -89,7 +89,6 @@ private: void addUsersWithFavoritesToUsername(); static void onClickConnect(void*); static void onClickNewAccount(void*); -// static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); static void onClickVersion(void*); static void onClickForgotPassword(void*); static void onClickHelp(void*); @@ -114,7 +113,6 @@ private: static LLPanelLogin* sInstance; static BOOL sCapslockDidNotification; - BOOL mHtmlAvailable; }; std::string load_password_from_disk(void); -- cgit v1.2.3 From 368173b7d602aa1d790a4510c4bf9e6d9e102d1d Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 22 Apr 2011 18:52:22 -0700 Subject: EXP-749 [REGRESSION] Voice status indicator shown in IM session instead of profile pic in Basic and Advanced modes --- indra/newview/llchiclet.cpp | 3 ++- indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 885d553524..277fc9d7b9 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -483,8 +483,9 @@ void LLIMChiclet::setShowSpeaker(bool show) if(needs_resize) { mShowSpeaker = show; - toggleSpeakerControl(); } + + toggleSpeakerControl(); } void LLIMChiclet::enableCounterControl(bool enable) diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml index 99807d4717..d27c14f4e7 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml @@ -21,6 +21,7 @@ width="20" /> Date: Mon, 25 Apr 2011 17:31:04 -0700 Subject: EXP-637 FIX -- As a new user, I would like Second Life to start up with a maximized window to fully immerse myself in the experience Mac viewer now properly supports the calls to maximize and unmaximize the screen. Reviewed by Callum --- indra/llwindow/llwindowmacosx.cpp | 101 +++++++++++++++++++++++++------------- indra/llwindow/llwindowmacosx.h | 3 +- 2 files changed, 69 insertions(+), 35 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index affd7276cc..447e3661db 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -108,9 +108,6 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key); static EventTypeSpec WindowHandlerEventList[] = { // Window-related events - // { kEventClassWindow, kEventWindowCollapsing }, - // { kEventClassWindow, kEventWindowCollapsed }, - // { kEventClassWindow, kEventWindowShown }, { kEventClassWindow, kEventWindowActivated }, { kEventClassWindow, kEventWindowDeactivated }, { kEventClassWindow, kEventWindowShown }, @@ -121,8 +118,7 @@ static EventTypeSpec WindowHandlerEventList[] = { kEventClassWindow, kEventWindowClose }, { kEventClassWindow, kEventWindowBoundsChanging }, { kEventClassWindow, kEventWindowBoundsChanged }, - // { kEventClassWindow, kEventWindowZoomed }, - // { kEventClassWindow, kEventWindowDrawContent }, + { kEventClassWindow, kEventWindowGetIdealSize }, // Mouse events { kEventClassMouse, kEventMouseDown }, @@ -248,6 +244,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, mCursorIgnoreNextDelta = FALSE; mNeedsResize = FALSE; mOverrideAspectRatio = 0.f; + mMaximized = FALSE; mMinimized = FALSE; mTSMDocument = NULL; // Just in case. mLanguageTextInputAllowed = FALSE; @@ -455,24 +452,23 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits if(!mFullscreen && (mWindow == NULL)) { - Rect window_rect; //int displayWidth = CGDisplayPixelsWide(mDisplay); //int displayHeight = CGDisplayPixelsHigh(mDisplay); //const int menuBarPlusTitleBar = 44; // Ugly magic number. LL_DEBUGS("Window") << "createContext: creating window" << LL_ENDL; - window_rect.left = (long) x; - window_rect.right = (long) x + width; - window_rect.top = (long) y; - window_rect.bottom = (long) y + height; + mPreviousWindowRect.left = (long) x; + mPreviousWindowRect.right = (long) x + width; + mPreviousWindowRect.top = (long) y; + mPreviousWindowRect.bottom = (long) y + height; //----------------------------------------------------------------------- // Create the window //----------------------------------------------------------------------- mWindow = NewCWindow( NULL, - &window_rect, + &mPreviousWindowRect, mWindowTitle, false, // Create the window invisible. Whoever calls createContext() should show it after any moving/resizing. // noGrowDocProc, // Window with no grow box and no zoom box @@ -481,8 +477,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits kFirstWindowOfClass, true, (long)this); - - + if (!mWindow) { setupFailure("Window creation error", "Error", OSMB_OK); @@ -1093,31 +1088,22 @@ BOOL LLWindowMacOSX::getVisible() BOOL LLWindowMacOSX::getMinimized() { - BOOL result = FALSE; - - // Since the set of states where we want to act "minimized" is non-trivial, it's easier to - // track things locally than to try and retrieve the state from the window manager. - result = mMinimized; - - return(result); + return mMinimized; } BOOL LLWindowMacOSX::getMaximized() { - BOOL result = FALSE; - - if (mWindow) - { - // TODO - } - - return(result); + return mMaximized; } BOOL LLWindowMacOSX::maximize() { - // TODO - return FALSE; + if (mWindow && !mMaximized) + { + ZoomWindow(mWindow, inContent, true); + } + + return mMaximized; } BOOL LLWindowMacOSX::getFullscreen() @@ -2559,7 +2545,24 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, ¤tBounds); GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &previousBounds); - + + // Put an offset into window un-maximize operation since the kEventWindowGetIdealSize + // event only allows the specification of size and not position. + if (mMaximized) + { + short leftOffset = mPreviousWindowRect.left - currentBounds.left; + currentBounds.left += leftOffset; + currentBounds.right += leftOffset; + + short topOffset = mPreviousWindowRect.top - currentBounds.top; + currentBounds.top += topOffset; + currentBounds.bottom += topOffset; + } + else + { + // Store off the size for future un-maximize operations + mPreviousWindowRect = previousBounds; + } if ((currentBounds.right - currentBounds.left) < MIN_WIDTH) { @@ -2578,13 +2581,43 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e case kEventWindowBoundsChanged: { + // Get new window bounds Rect newBounds; - GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &newBounds); + + // Get previous window bounds + Rect oldBounds; + GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &oldBounds); + + // Determine if the new size is larger than the old + bool newBoundsLarger = ((newBounds.right - newBounds.left) >= (oldBounds.right - oldBounds.left)); + newBoundsLarger &= ((newBounds.bottom - newBounds.top) >= (oldBounds.bottom - oldBounds.top)); + + // Check to see if this is a zoom event (+ button on window pane) + unsigned int eventParams; + GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(int), NULL, &eventParams); + bool isZoomEvent = ((eventParams & kWindowBoundsChangeZoom) != 0); + + // Maximized flag is if zoom event and increasing window size + mMaximized = (isZoomEvent && newBoundsLarger); + aglUpdateContext(mContext); + mCallbacks->handleResize(this, newBounds.right - newBounds.left, newBounds.bottom - newBounds.top); - - + } + break; + + case kEventWindowGetIdealSize: + // Only recommend a new ideal size when un-maximizing + if (mMaximized == TRUE) + { + Point nonMaximizedSize; + + nonMaximizedSize.v = mPreviousWindowRect.bottom - mPreviousWindowRect.top; + nonMaximizedSize.h = mPreviousWindowRect.right - mPreviousWindowRect.left; + + SetEventParameter(event, kEventParamDimensions, typeQDPoint, sizeof(Point), &nonMaximizedSize); + result = noErr; } break; diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 6dc093b4be..6c9e075a21 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -156,7 +156,6 @@ protected: static pascal Boolean staticMoveEventComparator( EventRef event, void* data); OSStatus eventHandler (EventHandlerCallRef myHandler, EventRef event); void adjustCursorDecouple(bool warpingMouse = false); - void fixWindowSize(void); void stopDockTileBounce(); static MASK modifiersToMask(SInt16 modifiers); @@ -182,6 +181,7 @@ protected: EventComparatorUPP mMoveEventCampartorUPP; Rect mOldMouseClip; // Screen rect to which the mouse cursor was globally constrained before we changed it in clipMouse() + Rect mPreviousWindowRect; // Save previous window for un-maximize event Str255 mWindowTitle; double mOriginalAspectRatio; BOOL mSimulatedRightClick; @@ -195,6 +195,7 @@ protected: BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize. LLCoordScreen mNeedsResizeSize; F32 mOverrideAspectRatio; + BOOL mMaximized; BOOL mMinimized; U32 mFSAASamples; BOOL mForceRebuild; -- cgit v1.2.3 From d952f97459a04d64b698380b777406f1644f9bb2 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 26 Apr 2011 14:02:41 -0700 Subject: EXP-752 FIX -- When "View Display Names" is disabled, only my own profile loads, when I click others profiles Avatar username is now looked up in the name cache when it is blank, which happens when display names are turned off apparently. Reviewed by Fredrik. --- indra/newview/llavataractions.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ca7ec7cc30..cbbdcb2983 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -302,8 +302,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { - llinfos << "opening web profile for " << av_name.mUsername << llendl; - std::string url = getProfileURL(av_name.mUsername); + std::string username = av_name.mUsername; + if (username.empty()) + { + username = LLCacheName::buildUsername(av_name.mDisplayName); + } + + llinfos << "opening web profile for " << username << llendl; + std::string url = getProfileURL(username); // PROFILES: open in webkit window LLWeb::loadWebURLInternal(url, "", agent_id.asString()); -- cgit v1.2.3 From 37ef2c4f0f7958106ea09abcd486cb9c305316e4 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 16:45:33 -0700 Subject: EXP-670 Voice for basic mode reviewed by Merov http://codereview.lindenlab.com/6231263/ --- indra/newview/llpanelvoicedevicesettings.cpp | 2 +- indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/llviewermenu.cpp | 9 + .../default/xui/en/panel_preferences_sound.xml | 171 +--------------- indra/newview/skins/minimal/textures/textures.xml | 4 +- .../skins/minimal/xui/en/panel_bottomtray.xml | 220 ++++++++++++--------- 6 files changed, 152 insertions(+), 256 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index aef870d352..d13f57bd6a 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -316,6 +316,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice() if(LLVoiceClient::getInstance()) { LLVoiceClient::getInstance()->setRenderDevice( - getChild("voice_input_device")->getValue().asString()); + getChild("voice_output_device")->getValue().asString()); } } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index dca1e33e60..6dc85799ce 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -91,6 +91,7 @@ #include "llfloatersettingsdebug.h" #include "llfloatersidetraytab.h" #include "llfloatersnapshot.h" +#include "llfloatersounddevices.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" #include "llfloatertestlistview.h" @@ -239,6 +240,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build); + LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3665b7d91f..c568c8eedb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5591,6 +5591,14 @@ class LLToggleHelp : public view_listener_t } }; +class LLToggleSpeak : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVoiceClient::getInstance()->toggleUserPTTState(); + return true; + } +}; class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8187,6 +8195,7 @@ void initialize_menus() commit.add("BuyCurrency", boost::bind(&handle_buy_currency)); view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLToggleHelp(), "ToggleHelp"); + view_listener_t::addMenu(new LLToggleSpeak(), "ToggleSpeak"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleAgentProfile(), "ToggleAgentProfile"); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 26af8dc29d..a314e0d85e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -466,164 +466,13 @@ name="device_settings_btn" width="190"> - - - Default - - - Default system device - - - No device - - - - Input - - - - My volume: - - - - Please wait - - - - - - - - - Output - - - - + + diff --git a/indra/newview/skins/minimal/textures/textures.xml b/indra/newview/skins/minimal/textures/textures.xml index b4848a0619..e3ed01721a 100644 --- a/indra/newview/skins/minimal/textures/textures.xml +++ b/indra/newview/skins/minimal/textures/textures.xml @@ -6,4 +6,6 @@ - + + + diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index 95f2010e44..70a59cea43 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -12,16 +12,16 @@ focus_root="true" top="28" width="1310"> - - - - - - - - + - + + + + + + width="88"> - - - - - + + - - - - - + + - - - + - - - - - + + - - - - - + + - - - + - - - - - + + - - - - - + + - - - - - + + - - - - - - + + + - - @@ -517,5 +551,5 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well min_width="4" name="DUMMY2" width="8" /> - + -- cgit v1.2.3 From 892c5109e8679ca28a53799289732efcbebd9d48 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 16:45:57 -0700 Subject: EXP-670 Voice for basic mode new files reviewed by merov --- indra/newview/llfloatersounddevices.cpp | 85 +++++++++++ indra/newview/llfloatersounddevices.h | 49 +++++++ .../skins/default/xui/en/floater_sound_devices.xml | 28 ++++ .../skins/default/xui/en/panel_sound_devices.xml | 163 +++++++++++++++++++++ .../minimal/textures/bottomtray/Speak_Btn_Off.png | Bin 0 -> 993 bytes .../bottomtray/Speak_Btn_Selected_Press.png | Bin 0 -> 1217 bytes 6 files changed, 325 insertions(+) create mode 100644 indra/newview/llfloatersounddevices.cpp create mode 100644 indra/newview/llfloatersounddevices.h create mode 100644 indra/newview/skins/default/xui/en/floater_sound_devices.xml create mode 100644 indra/newview/skins/default/xui/en/panel_sound_devices.xml create mode 100644 indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png create mode 100644 indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png (limited to 'indra') diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp new file mode 100644 index 0000000000..1f6a992fc5 --- /dev/null +++ b/indra/newview/llfloatersounddevices.cpp @@ -0,0 +1,85 @@ +/** + * @file llfloatersounddevices.cpp + * @author Leyla Farazha + * @brief Sound Preferences used for minimal skin + * +* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * 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; + * version 2.1 of the License only. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llfloatersounddevices.h" + +#include "llbottomtray.h" +#include "lldraghandle.h" + +#include "llpanelvoicedevicesettings.h" + +// Library includes +#include "indra_constants.h" + +// protected +LLFloaterSoundDevices::LLFloaterSoundDevices(const LLSD& key) +: LLTransientDockableFloater(NULL, false, key) +{ + LLTransientFloaterMgr::getInstance()->addControlView(this); + + // force docked state since this floater doesn't save it between recreations + setDocked(true); +} + +LLFloaterSoundDevices::~LLFloaterSoundDevices() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(this); +} + +// virtual +BOOL LLFloaterSoundDevices::postBuild() +{ + LLTransientDockableFloater::postBuild(); + + LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_flyout_btn"); + setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP)); + + setIsChrome(TRUE); + if (mDragHandle) + mDragHandle->setTitleVisible(TRUE); + updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) + + return TRUE; +} + +//virtual +void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/) +{ + LLTransientDockableFloater::setDocked(docked, pop_on_undock); +} + +// virtual +void LLFloaterSoundDevices::setFocus( BOOL b ) +{ + LLTransientDockableFloater::setFocus(b); + + // Force using active floater transparency + // We have to override setFocus() for because selecting an item of the + // combobox causes the floater to lose focus and thus become transparent. + updateTransparency(TT_ACTIVE); +} \ No newline at end of file diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h new file mode 100644 index 0000000000..f09ee3b069 --- /dev/null +++ b/indra/newview/llfloatersounddevices.h @@ -0,0 +1,49 @@ +/** + * @file llfloatersounddevices.h + * @author Leyla Farazha + * @brief Sound Preferences used for minimal skin + * +* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * 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; + * version 2.1 of the License only. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERSOUNDDEVICES_H +#define LL_LLFLOATERSOUNDDEVICES_H + +#include "lltransientdockablefloater.h" + +class LLFloaterSoundDevices : public LLTransientDockableFloater +{ +public: + + LOG_CLASS(LLFloaterSoundDevices); + + LLFloaterSoundDevices(const LLSD& key); + ~LLFloaterSoundDevices(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + /*virtual*/ void setFocus( BOOL b ); +}; + + +#endif //LL_LLFLOATERSOUNDDEVICES_H + diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml new file mode 100644 index 0000000000..3c9e5aeff3 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -0,0 +1,28 @@ + + + + diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml new file mode 100644 index 0000000000..9812281323 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml @@ -0,0 +1,163 @@ + + + Default + + + Default system device + + + No device + + + + Input + + + + My volume: + + + + Please wait + + + + + + + + + Output + + + diff --git a/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png new file mode 100644 index 0000000000..b6e9eef891 Binary files /dev/null and b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png differ diff --git a/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png new file mode 100644 index 0000000000..687cb7fb53 Binary files /dev/null and b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png differ -- cgit v1.2.3 From a59de335c5bfa7b730977f0061a046654e2b964c Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 17:41:34 -0700 Subject: EXP-626 New bottomtray tooltips for basic mode --- indra/newview/skins/minimal/xui/en/panel_bottomtray.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index 70a59cea43..aff22c7e45 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -78,7 +78,7 @@ label="Speak" left="0" name="speak_btn" - + tool_tip="Turn your microphone on and off" pad_right="30" halign="center" use_ellipses="true" @@ -118,6 +118,7 @@ name="speak_flyout_btn" label="" tab_stop="false" + tool_tip="Change your sound preferences" is_toggle="true" image_disabled="ComboButton_UpOff" image_unselected="ComboButton_UpOff" @@ -152,7 +153,7 @@ view_all="false" left="3" name="Gesture" - tool_tip="Shows/hides gestures" + tool_tip="Make your avatar do things" top="5" width="82"> @@ -235,7 +236,7 @@ layout="topleft" left="0" name="destination_btn" - tool_tip="Shows destinations window" + tool_tip="Travel through Second Life" top="5" is_toggle="true" use_ellipses="true" @@ -268,6 +269,7 @@ name="avatar_btn" top="5" is_toggle="true" + tool_tip="Change your appearance" use_ellipses="true" width="100"> Date: Wed, 27 Apr 2011 17:41:49 -0700 Subject: Fixed floater sound devices title --- indra/newview/skins/default/xui/en/floater_sound_devices.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml index 3c9e5aeff3..584413c030 100644 --- a/indra/newview/skins/default/xui/en/floater_sound_devices.xml +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -14,7 +14,7 @@ height="140" layout="topleft" name="floater_sound_devices" - title="Sound Devicess" + title="Sound Devices" width="315"> Date: Wed, 27 Apr 2011 17:59:15 -0700 Subject: adding llfloatersounddevices.cpp/.h to the cmake file --- indra/newview/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b1cb10665b..95cfc23ede 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -214,6 +214,7 @@ set(viewer_SOURCE_FILES llfloatersettingsdebug.cpp llfloatersidetraytab.cpp llfloatersnapshot.cpp + llfloatersounddevices.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp llfloatertestlistview.cpp @@ -758,6 +759,7 @@ set(viewer_HEADER_FILES llfloatersettingsdebug.h llfloatersidetraytab.h llfloatersnapshot.h + llfloatersounddevices.h llfloatertelehub.h llfloatertestinspectors.h llfloatertestlistview.h -- cgit v1.2.3 From f56a2e55ccd86e3739f69c3d8dcc007c337bdaa1 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 18:17:09 -0700 Subject: adding newline at end of llfloatersounddevices.cpp --- indra/newview/llfloatersounddevices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp index 1f6a992fc5..4f3945c95f 100644 --- a/indra/newview/llfloatersounddevices.cpp +++ b/indra/newview/llfloatersounddevices.cpp @@ -82,4 +82,4 @@ void LLFloaterSoundDevices::setFocus( BOOL b ) // We have to override setFocus() for because selecting an item of the // combobox causes the floater to lose focus and thus become transparent. updateTransparency(TT_ACTIVE); -} \ No newline at end of file +} -- cgit v1.2.3 From 367823ced0cc885474850b4400c7936d667a7d7a Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 29 Apr 2011 15:35:22 -0700 Subject: EXP-623 FIX Selecting fly option while on click to walk path flys avatar to end point but avatar spins and shakes when arriving at click point --- indra/newview/llagent.cpp | 3 +++ indra/newview/lltoolpie.cpp | 9 +++++++++ indra/newview/lltoolpie.h | 1 + 3 files changed, 13 insertions(+) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d491a7774..a6d2c96d52 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -62,6 +62,7 @@ #include "llstatusbar.h" #include "llteleportflags.h" #include "lltool.h" +#include "lltoolpie.h" #include "lltoolmgr.h" #include "lltrans.h" #include "llurlentry.h" @@ -559,6 +560,8 @@ void LLAgent::setFlying(BOOL fly) // static void LLAgent::toggleFlying() { + LLToolPie::instance().stopClickToWalk(); + BOOL fly = !gAgent.getFlying(); gAgent.mMoveTimer.reset(); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 06e0d17b8c..9ec4d33036 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -688,6 +688,15 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) return LLTool::handleMouseUp(x, y, mask); } +void LLToolPie::stopClickToWalk() +{ + mPick.mPosGlobal = gAgent.getPositionGlobal(); + handle_go_to(); + if(mAutoPilotDestination) + { + mAutoPilotDestination->markDead(); + } +} BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) { diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 22359a6db8..d7c79ee223 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -67,6 +67,7 @@ public: LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; } void resetSelection(); void blockClickToWalk() { mBlockClickToWalk = true; } + void stopClickToWalk(); static void selectionPropertiesReceived(); -- cgit v1.2.3 From 314961674a508c7d13cc889d914b0ded99376f9b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 29 Apr 2011 15:52:48 -0700 Subject: EXP-769 Group call requests received in Basic mode --- indra/newview/app_settings/settings.xml | 6 +++--- indra/newview/app_settings/settings_minimal.xml | 6 +++--- indra/newview/llimview.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f2a0e5ac19..b95c83e1ac 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11662,10 +11662,10 @@ Value 0 - VoiceCallsRejectAll + VoiceCallsRejectGroup Comment - Silently reject all incoming voice calls. + Silently reject all incoming group voice calls. Persist 1 Type @@ -11673,7 +11673,7 @@ Value 0 - VoiceDisableMic + VoiceDisableMic Comment Completely disable the ability to open the mic. diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 60aecb279c..3d470b27c1 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -117,14 +117,14 @@ Value 0 - VoiceCallsRejectAll + VoiceCallsRejectGroup Comment - Silently reject all incoming voice calls. + Silently reject all incoming group voice calls. Type Boolean Value - 0 + 1 VoiceDisableMic diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ec3fe48151..38c5ba71bd 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2696,10 +2696,10 @@ void LLIMMgr::inviteToSession( if (voice_invite) { - if ( // if we're rejecting all incoming call requests - gSavedSettings.getBOOL("VoiceCallsRejectAll") + if ( // if we are rejecting group calls + (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && notify_box_type == "VoiceInviteGroup") || // or we're rejecting non-friend voice calls and this isn't a friend - || (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)) + (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)) ) { // silently decline the call -- cgit v1.2.3 From 5fe3675564f1c7d8cf13e94f43d32be5ea45940b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 29 Apr 2011 15:53:14 -0700 Subject: EXP-761, EXP-758 --- indra/newview/llbottomtray.cpp | 42 +++++++++++++++------- indra/newview/llspeakbutton.cpp | 20 ----------- indra/newview/llspeakbutton.h | 5 --- .../skins/minimal/xui/en/panel_bottomtray.xml | 2 +- 4 files changed, 30 insertions(+), 39 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 0371b7be71..6d40786b08 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -378,12 +378,13 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b } // We have to enable/disable right and left parts of speak button separately (EXT-4648) - mSpeakBtn->setSpeakBtnEnabled(enable); + getChild("speak_btn")->setEnabled(enable); + // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); - mSpeakBtn->setFlyoutBtnEnabled(voice_status); + getChild("speak_flyout_btn")->setEnabled(voice_status); if (voice_status) { LLFirstUse::speak(true); @@ -566,17 +567,21 @@ BOOL LLBottomTray::postBuild() setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4)); mSpeakPanel = getChild("speak_panel"); - mSpeakBtn = getChild("talk"); - LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); + mSpeakBtn = findChild("talk"); + if (mSpeakBtn) + { + LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); + + // Localization tool doesn't understand custom buttons like + mSpeakBtn->setSpeakToolTip( getString("SpeakBtnToolTip") ); + mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") ); + } // Both parts of speak button should be initially disabled because // it takes some time between logging in to world and connecting to voice channel. - mSpeakBtn->setSpeakBtnEnabled(false); - mSpeakBtn->setFlyoutBtnEnabled(false); + getChild("speak_btn")->setEnabled(false); + getChild("speak_flyout_btn")->setEnabled(false); - // Localization tool doesn't understand custom buttons like - mSpeakBtn->setSpeakToolTip( getString("SpeakBtnToolTip") ); - mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") ); // Registering Chat Bar to receive Voice client status change notifications. LLVoiceClient::getInstance()->addObserver(this); @@ -872,6 +877,10 @@ void LLBottomTray::draw() getChild("show_help_btn")->setToggleState(help_floater_visible); + bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); + bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); + getChild("speak_btn")->setToggleState(openmic && voiceenabled); + getChild("chat_zone_indicator")->setIsMuted(!voiceenabled); } @@ -1345,7 +1354,11 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ if (possible_shrink_width > 0) { - mSpeakBtn->setLabelVisible(false); + if (mSpeakBtn) + { + mSpeakBtn->setLabelVisible(false); + } + mSpeakPanel->reshape(panel_width - possible_shrink_width, mSpeakPanel->getRect().getHeight()); required_width += possible_shrink_width; @@ -1442,10 +1455,13 @@ void LLBottomTray::processExtendButtons(S32& available_width) S32 possible_extend_width = panel_max_width - panel_width; if (possible_extend_width >= 0 && possible_extend_width <= available_width + available_width_chiclet) // HACK: this button doesn't change size so possible_extend_width will be 0 - { - mSpeakBtn->setLabelVisible(true); + { + if (mSpeakBtn) + { + mSpeakBtn->setLabelVisible(true); + } + mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); - log(mSpeakBtn, "speak button is extended"); if( available_width > possible_extend_width) { diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index d52e0a6c86..d3e96f8dfb 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -54,26 +54,6 @@ LLSpeakButton::Params::Params() // See widgets/talk_button.xml } -void LLSpeakButton::draw() -{ - // LLVoiceClient::getInstance() is the authoritative global source of info regarding our open-mic state, we merely reflect that state. - bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); - bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); - mSpeakBtn->setToggleState(openmic && voiceenabled); - mOutputMonitor->setIsMuted(!voiceenabled); - LLUICtrl::draw(); -} -void LLSpeakButton::setSpeakBtnEnabled(bool enabled) -{ - LLButton* speak_btn = getChild("speak_btn"); - speak_btn->setEnabled(enabled); -} -void LLSpeakButton::setFlyoutBtnEnabled(bool enabled) -{ - LLButton* show_btn = getChild("speak_flyout_btn"); - show_btn->setEnabled(enabled); -} - LLSpeakButton::LLSpeakButton(const Params& p) : LLUICtrl(p) , mOutputMonitor(NULL) diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h index 2fdf80c1f2..7db01112ef 100644 --- a/indra/newview/llspeakbutton.h +++ b/indra/newview/llspeakbutton.h @@ -53,12 +53,7 @@ public: }; /*virtual*/ ~LLSpeakButton(); - /*virtual*/ void draw(); - // methods for enabling/disabling right and left parts of speak button separately(EXT-4648) - void setSpeakBtnEnabled(bool enabled); - void setFlyoutBtnEnabled(bool enabled); - // *HACK: Need to put tooltips in a translatable location, // the panel that contains this button. void setSpeakToolTip(const std::string& msg); diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index aff22c7e45..49eead5079 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -105,7 +105,7 @@ min_height="28" min_width="20" mouse_opaque="false" - name="flyout_panel" + name="speak_flyout_panel" top_delta="0" user_resize="false" width="20"> -- cgit v1.2.3 From af41eb0d2c9f45c545c0470d44b91147e74c82a4 Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 29 Apr 2011 15:54:45 -0700 Subject: EXP-742 FIX [PUBLIC] CTRL-ALT-w doesn't "spin_over" --- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 51610c0ae0..81b7d35253 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2696,7 +2696,7 @@ + shortcut="control|shift|Z"> -- cgit v1.2.3 From 814e540e85d0f8dc3b50ade6b1b3194e7cbb57fb Mon Sep 17 00:00:00 2001 From: callum Date: Mon, 2 May 2011 13:40:41 -0700 Subject: EXP-743 FIX Side bar panel is visible on login screen after getting 'We're having trouble connecting' message --- indra/newview/skins/default/xui/en/main_view.xml | 16 +++++++++------- indra/newview/skins/minimal/xui/en/main_view.xml | 15 ++++++++------- 2 files changed, 17 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index e5ae0b950a..3ead67ca57 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -8,12 +8,6 @@ tab_stop="false" name="main_view" width="1024"> - - + + + + - - + + +