From 83a7a342ea83441c7fdcea1ac30cc61b2ab11546 Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Tue, 15 Jun 2010 17:21:27 -0700 Subject: removing fullscreen functionality reviewed by richard cc#212 --- indra/newview/app_settings/settings.xml | 37 +--- indra/newview/llappviewer.cpp | 12 +- indra/newview/llchatbar.cpp | 1 - indra/newview/llfloaterhardwaresettings.cpp | 7 +- indra/newview/llfloaterpreference.cpp | 19 +- indra/newview/llnearbychatbar.cpp | 1 - indra/newview/llstartup.cpp | 6 - indra/newview/llstartup.h | 3 - indra/newview/lltoolbar.cpp | 27 +-- indra/newview/lltoolgrab.cpp | 22 --- indra/newview/llviewermenu.cpp | 12 -- indra/newview/llviewerwindow.cpp | 282 +++------------------------- indra/newview/llviewerwindow.h | 18 +- 13 files changed, 51 insertions(+), 396 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4506ee6e0c..682189fcea 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3578,17 +3578,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>FullScreen</key> - <map> - <key>Comment</key> - <string>Run SL in fullscreen mode</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>FullScreenAspectRatio</key> <map> <key>Comment</key> @@ -3598,7 +3587,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>1.33329999447</real> + <real>3</real> </map> <key>FullScreenAutoDetectAspectRatio</key> <map> @@ -3609,29 +3598,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> - </map> - <key>FullScreenHeight</key> - <map> - <key>Comment</key> - <string>Fullscreen resolution in height</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>768</integer> - </map> - <key>FullScreenWidth</key> - <map> - <key>Comment</key> - <string>Fullscreen resolution in width</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>1024</integer> + <integer>0</integer> </map> <key>GesturesMarketplaceURL</key> <map> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f4004d5664..475f664917 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2366,16 +2366,9 @@ bool LLAppViewer::initWindow() LLNotificationsUI::LLNotificationManager::getInstance(); - if (gSavedSettings.getBOOL("FullScreen")) - { - // request to go full screen... which will be delayed until login - gViewerWindow->toggleFullscreen(FALSE); - } - if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->mWindow->maximize(); - gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); } if (!gNoRender) @@ -2449,11 +2442,10 @@ void LLAppViewer::cleanupSavedSettings() } } - // save window position if not fullscreen + // save window position if not maximized // as we don't track it in callbacks - BOOL fullscreen = gViewerWindow->mWindow->getFullscreen(); BOOL maximized = gViewerWindow->mWindow->getMaximized(); - if (!fullscreen && !maximized) + if (!maximized) { LLCoordScreen window_pos; diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 67d5d21b2a..cd279fa10a 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -149,7 +149,6 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { BOOL handled = FALSE; - // ALT-RETURN is reserved for windowed/fullscreen toggle if( KEY_RETURN == key ) { if (mask == MASK_CONTROL) diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index b2564eb2b6..480e4ce3a4 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -143,10 +143,9 @@ void LLFloaterHardwareSettings::apply() LLWindow* window = gViewerWindow->getWindow(); LLCoordScreen size; window->getSize(&size); - gViewerWindow->changeDisplaySettings(window->getFullscreen(), - size, - gSavedSettings.getBOOL("DisableVerticalSync"), - logged_in); + gViewerWindow->changeDisplaySettings(size, + gSavedSettings.getBOOL("DisableVerticalSync"), + logged_in); } else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) { diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 2299cd719c..88339c55e8 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -466,7 +466,7 @@ void LLFloaterPreference::apply() } } - applyResolution(); + //applyResolution(); } void LLFloaterPreference::cancel() @@ -1216,21 +1216,8 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b void LLFloaterPreference::applyResolution() { gGL.flush(); - - // Screen resolution - S32 num_resolutions; - LLWindow::LLWindowResolution* supported_resolutions = - gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions); - S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex(); - if (resIndex == -1) - { - // use highest resolution if nothing selected - resIndex = num_resolutions - 1; - } - gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth); - gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight); - - gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("FullScreen")); + + gViewerWindow->requestResolutionUpdate(); send_agent_update(TRUE); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 46f531fdd9..a300e15edd 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -433,7 +433,6 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask ) { BOOL handled = FALSE; - // ALT-RETURN is reserved for windowed/fullscreen toggle if( KEY_RETURN == key && mask == MASK_CONTROL) { // shout diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9bfcceab2f..dbfb0ec4ab 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2638,12 +2638,6 @@ void reset_login() //--------------------------------------------------------------------------- - -bool LLStartUp::canGoFullscreen() -{ - return gStartupState >= STATE_WORLD_INIT; -} - // Initialize all plug-ins except the web browser (which was initialized // early, before the login screen). JC void LLStartUp::multimediaInit() diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index e1e108ca6a..b2868378bc 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -81,9 +81,6 @@ extern LLPointer<LLViewerTexture> gStartTexture; class LLStartUp { public: - static bool canGoFullscreen(); - // returns true if we are far enough along in startup to allow - // going full screen // Always use this to set gStartupState so changes are logged static void setStartupState( EStartupState state ); diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 404eab9249..d45915499a 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -212,23 +212,16 @@ void LLToolBar::layoutButtons() // this function may be called before postBuild(), in which case mResizeHandle won't have been set up yet. if(mResizeHandle != NULL) { - if(!gViewerWindow->getWindow()->getFullscreen()) - { - // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar. - width -= RESIZE_HANDLE_WIDTH; - - LLRect r; - r.mLeft = width - pad; - r.mBottom = 0; - r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH; - r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT; - mResizeHandle->setRect(r); - mResizeHandle->setVisible(TRUE); - } - else - { - mResizeHandle->setVisible(FALSE); - } + // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar. + width -= RESIZE_HANDLE_WIDTH; + + LLRect r; + r.mLeft = width - pad; + r.mBottom = 0; + r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH; + r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT; + mResizeHandle->setRect(r); + mResizeHandle->setVisible(TRUE); } #endif // LL_DARWIN } diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index cae5e93545..9bd08287f3 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -886,28 +886,6 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask) // Not dragging. Just showing affordances void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) { - const F32 ROTATE_ANGLE_PER_SECOND = 40.f * DEG_TO_RAD; - const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped; - - // Look for cursor against the edge of the screen - // Only works in fullscreen - if (gSavedSettings.getBOOL("FullScreen")) - { - if (gAgentCamera.cameraThirdPerson() ) - { - if (x == 0) - { - gAgent.yaw(rotate_angle); - //gAgent.setControlFlags(AGENT_CONTROL_YAW_POS); - } - else if (x == (gViewerWindow->getWorldViewWidthScaled() - 1) ) - { - gAgent.yaw(-rotate_angle); - //gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG); - } - } - } - // JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl; gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2c7ae539ce..ee766c262a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3788,17 +3788,6 @@ class LLViewMouselook : public view_listener_t } }; -class LLViewFullscreen : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - // we no longer permit full screen mode EXT-6775 - // gViewerWindow->toggleFullscreen(TRUE); - llwarns << "full screen mode no longer supported" << llendl; - return true; - } -}; - class LLViewDefaultUISize : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7783,7 +7772,6 @@ void initialize_menus() view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut"); view_listener_t::addMenu(new LLZoomer(1/1.2f), "View.ZoomIn"); view_listener_t::addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault"); - view_listener_t::addMenu(new LLViewFullscreen(), "View.Fullscreen"); view_listener_t::addMenu(new LLViewDefaultUISize(), "View.DefaultUISize"); view_listener_t::addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0a65cb7330..ebc42aa5d2 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1118,28 +1118,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) mActive = TRUE; send_agent_resume(); gAgent.clearAFK(); - if (mWindow->getFullscreen() && !mIgnoreActivate) - { - if (!LLApp::isExiting() ) - { - if (LLStartUp::getStartupState() >= STATE_STARTED) - { - // if we're in world, show a progress bar to hide reloading of textures - llinfos << "Restoring GL during activate" << llendl; - restoreGL(LLTrans::getString("ProgressRestoring")); - } - else - { - // otherwise restore immediately - restoreGL(); - } - } - else - { - llwarns << "Activating while quitting" << llendl; - } - } - + // Unmute audio audio_update_volume(); } @@ -1159,12 +1138,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) } send_agent_pause(); - - if (mWindow->getFullscreen() && !mIgnoreActivate) - { - llinfos << "Stopping GL during deactivation" << llendl; - stopGL(); - } + // Mute audio audio_update_volume(); } @@ -1331,12 +1305,10 @@ LLViewerWindow::LLViewerWindow( const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, - BOOL fullscreen, BOOL ignore_pixel_depth) + BOOL fullscreen, BOOL ignore_pixel_depth) // fullscreen is no longer used : mWindow(NULL), mActive(TRUE), - mWantFullscreen(fullscreen), - mShowFullscreenProgress(FALSE), mWindowRectRaw(0, height, width, 0), mWindowRectScaled(0, height, width, 0), mWorldViewRectRaw(0, height, width, 0), @@ -1351,7 +1323,6 @@ LLViewerWindow::LLViewerWindow( mIgnoreActivate( FALSE ), mResDirty(false), mStatesDirty(false), - mIsFullscreenChecked(false), mCurrResolutionIndex(0), mViewerWindowListener(new LLViewerWindowListener(this)), mProgressView(NULL) @@ -1911,24 +1882,17 @@ void LLViewerWindow::reshape(S32 width, S32 height) sendShapeToSim(); - - // store the mode the user wants (even if not there yet) - gSavedSettings.setBOOL("FullScreen", mWantFullscreen); - // store new settings for the mode we are in, regardless - if (!mWindow->getFullscreen()) - { - // Only save size if not maximized - BOOL maximized = mWindow->getMaximized(); - gSavedSettings.setBOOL("WindowMaximized", maximized); + // Only save size if not maximized + BOOL maximized = mWindow->getMaximized(); + gSavedSettings.setBOOL("WindowMaximized", maximized); - LLCoordScreen window_size; - if (!maximized - && mWindow->getSize(&window_size)) - { - gSavedSettings.setS32("WindowWidth", window_size.mX); - gSavedSettings.setS32("WindowHeight", window_size.mY); - } + LLCoordScreen window_size; + if (!maximized + && mWindow->getSize(&window_size)) + { + gSavedSettings.setS32("WindowWidth", window_size.mX); + gSavedSettings.setS32("WindowHeight", window_size.mY); } LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width); @@ -3806,18 +3770,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) BORDERHEIGHT = size.mY- y; LLCoordScreen new_size(new_width + BORDERWIDTH, new_height + BORDERHEIGHT); - BOOL disable_sync = gSavedSettings.getBOOL("DisableVerticalSync"); - if (gViewerWindow->mWindow->getFullscreen()) - { - gViewerWindow->changeDisplaySettings(FALSE, - new_size, - disable_sync, - TRUE); - } - else - { - gViewerWindow->mWindow->setSize(new_size); - } + gViewerWindow->mWindow->setSize(new_size); } } @@ -4603,51 +4556,12 @@ void LLViewerWindow::initFonts(F32 zoom_factor) LLFontGL::loadDefaultFonts(); } -void LLViewerWindow::toggleFullscreen(BOOL show_progress) -{ - if (mWindow) - { - mWantFullscreen = mWindow->getFullscreen() ? FALSE : TRUE; - mIsFullscreenChecked = mWindow->getFullscreen() ? FALSE : TRUE; - mShowFullscreenProgress = show_progress; - } -} - -void LLViewerWindow::getTargetWindow(BOOL& fullscreen, S32& width, S32& height) const -{ - fullscreen = mWantFullscreen; - - if (mWindow - && mWindow->getFullscreen() == mWantFullscreen) - { - width = getWindowWidthRaw(); - height = getWindowHeightRaw(); - } - else if (mWantFullscreen) - { - width = gSavedSettings.getS32("FullScreenWidth"); - height = gSavedSettings.getS32("FullScreenHeight"); - } - else - { - width = gSavedSettings.getS32("WindowWidth"); - height = gSavedSettings.getS32("WindowHeight"); - } -} - void LLViewerWindow::requestResolutionUpdate() { mResDirty = true; } -void LLViewerWindow::requestResolutionUpdate(bool fullscreen_checked) -{ - mResDirty = true; - mWantFullscreen = fullscreen_checked; - mIsFullscreenChecked = fullscreen_checked; -} - -BOOL LLViewerWindow::checkSettings() +void LLViewerWindow::checkSettings() { if (mStatesDirty) { @@ -4659,70 +4573,9 @@ BOOL LLViewerWindow::checkSettings() // We want to update the resolution AFTER the states getting refreshed not before. if (mResDirty) { - if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio")) - { - getWindow()->setNativeAspectRatio(0.f); - } - else - { - getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); - } - reshape(getWindowWidthRaw(), getWindowHeightRaw()); - - // force aspect ratio - if (mIsFullscreenChecked) - { - LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); - } - mResDirty = false; - } - - BOOL is_fullscreen = mWindow->getFullscreen(); - if(mWantFullscreen) - { - LLCoordScreen screen_size; - LLCoordScreen desired_screen_size(gSavedSettings.getS32("FullScreenWidth"), - gSavedSettings.getS32("FullScreenHeight")); - getWindow()->getSize(&screen_size); - if(!is_fullscreen || - screen_size.mX != desired_screen_size.mX - || screen_size.mY != desired_screen_size.mY) - { - if (!LLStartUp::canGoFullscreen()) - { - return FALSE; - } - - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - changeDisplaySettings(TRUE, - desired_screen_size, - gSavedSettings.getBOOL("DisableVerticalSync"), - mShowFullscreenProgress); - - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - mStatesDirty = true; - return TRUE; - } - } - else - { - if(is_fullscreen) - { - // Changing to windowed mode. - changeDisplaySettings(FALSE, - LLCoordScreen(gSavedSettings.getS32("WindowWidth"), - gSavedSettings.getS32("WindowHeight")), - TRUE, - mShowFullscreenProgress); - mStatesDirty = true; - return TRUE; - } - } - return FALSE; + } } void LLViewerWindow::restartDisplay(BOOL show_progress_bar) @@ -4739,38 +4592,23 @@ void LLViewerWindow::restartDisplay(BOOL show_progress_bar) } } -BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar) +BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar) { BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized"); - mWantFullscreen = fullscreen; - mShowFullscreenProgress = show_progress_bar; - gSavedSettings.setBOOL("FullScreen", mWantFullscreen); //gResizeScreenTexture = TRUE; - BOOL old_fullscreen = mWindow->getFullscreen(); - if (!old_fullscreen && fullscreen && !LLStartUp::canGoFullscreen()) - { - // Not allowed to switch to fullscreen now, so exit early. - // *NOTE: This case should never be reached, but just-in-case. - return TRUE; - } - U32 fsaa = gSavedSettings.getU32("RenderFSAASamples"); U32 old_fsaa = mWindow->getFSAASamples(); - // going from windowed to windowed - if (!old_fullscreen && !fullscreen) + // if not maximized, use the request size + if (!mWindow->getMaximized()) { - // if not maximized, use the request size - if (!mWindow->getMaximized()) - { - mWindow->setSize(size); - } + mWindow->setSize(size); + } - if (fsaa == old_fsaa) - { - return TRUE; - } + if (fsaa == old_fsaa) + { + return TRUE; } // Close floaters that don't handle settings change @@ -4787,23 +4625,15 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, LLCoordScreen old_size; LLCoordScreen old_pos; mWindow->getSize(&old_size); - BOOL got_position = mWindow->getPosition(&old_pos); - if (!old_fullscreen && fullscreen && got_position) - { - // switching from windowed to fullscreen, so save window position - gSavedSettings.setS32("WindowX", old_pos.mX); - gSavedSettings.setS32("WindowY", old_pos.mY); - } - mWindow->setFSAASamples(fsaa); - result_first_try = mWindow->switchContext(fullscreen, size, disable_vsync); + result_first_try = mWindow->switchContext(false, size, disable_vsync); if (!result_first_try) { // try to switch back mWindow->setFSAASamples(old_fsaa); - result_second_try = mWindow->switchContext(old_fullscreen, old_size, disable_vsync); + result_second_try = mWindow->switchContext(false, old_size, disable_vsync); if (!result_second_try) { @@ -4835,19 +4665,8 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, } BOOL success = result_first_try || result_second_try; - if (success) - { -#if LL_WINDOWS - // Only trigger a reshape after switching to fullscreen; otherwise rely on the windows callback - // (otherwise size is wrong; this is the entire window size, reshape wants the visible window size) - if (fullscreen && result_first_try) -#endif - { - reshape(size.mX, size.mY); - } - } - if (!mWindow->getFullscreen() && success) + if (success) { // maximize window if was maximized, else reposition if (was_maximized) @@ -4865,45 +4684,14 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, mIgnoreActivate = FALSE; gFocusMgr.setKeyboardFocus(keyboard_focus); - mWantFullscreen = mWindow->getFullscreen(); - mShowFullscreenProgress = FALSE; return success; } - -F32 LLViewerWindow::getDisplayAspectRatio() const -{ - if (mWindow->getFullscreen()) - { - if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio")) - { - return mWindow->getNativeAspectRatio(); - } - else - { - return gSavedSettings.getF32("FullScreenAspectRatio"); - } - } - else - { - return mWindow->getNativeAspectRatio(); - } -} - - F32 LLViewerWindow::getWorldViewAspectRatio() const { F32 world_aspect = (F32)mWorldViewRectRaw.getWidth() / (F32)mWorldViewRectRaw.getHeight(); - //F32 window_aspect = (F32)mWindowRectRaw.getWidth() / (F32)mWindowRectRaw.getHeight(); - if (mWindow->getFullscreen()) - { - return world_aspect * mWindow->getPixelAspectRatio(); - } - else - { - return world_aspect; - } + return world_aspect; } void LLViewerWindow::calcDisplayScale() @@ -4911,27 +4699,13 @@ void LLViewerWindow::calcDisplayScale() F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor"); LLVector2 display_scale; display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f)); - F32 height_normalization = gSavedSettings.getBOOL("UIAutoScale") ? ((F32)mWindowRectRaw.getHeight() / display_scale.mV[VY]) / 768.f : 1.f; - if(mWindow->getFullscreen()) - { - display_scale *= (ui_scale_factor * height_normalization); - } - else - { - display_scale *= ui_scale_factor; - } + display_scale *= ui_scale_factor; // limit minimum display scale if (display_scale.mV[VX] < MIN_DISPLAY_SCALE || display_scale.mV[VY] < MIN_DISPLAY_SCALE) { display_scale *= MIN_DISPLAY_SCALE / llmin(display_scale.mV[VX], display_scale.mV[VY]); } - - if (mWindow->getFullscreen()) - { - display_scale.mV[0] = llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth()); - display_scale.mV[1] = llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight()); - } if (display_scale != mDisplayScale) { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 410445d97f..1e0200a075 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -262,10 +262,6 @@ public: // Is window of our application frontmost? BOOL getActive() const { return mActive; } - void getTargetWindow(BOOL& fullscreen, S32& width, S32& height) const; - // The 'target' is where the user wants the window to be. It may not be - // there yet, because we may be supressing fullscreen prior to login. - const std::string& getInitAlert() { return mInitAlert; } // @@ -380,17 +376,12 @@ public: // Prints window implementation details void dumpState(); - // Request display setting changes - void toggleFullscreen(BOOL show_progress); - // handle shutting down GL and bringing it back up - void requestResolutionUpdate(bool fullscreen_checked); - void requestResolutionUpdate(); // doesn't affect fullscreen - BOOL checkSettings(); + void requestResolutionUpdate(); + void checkSettings(); void restartDisplay(BOOL show_progress_bar); - BOOL changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar); + BOOL changeDisplaySettings(LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar); BOOL getIgnoreDestroyWindow() { return mIgnoreActivate; } - F32 getDisplayAspectRatio() const; F32 getWorldViewAspectRatio() const; const LLVector2& getDisplayScale() const { return mDisplayScale; } void calcDisplayScale(); @@ -415,8 +406,6 @@ public: protected: BOOL mActive; - BOOL mWantFullscreen; - BOOL mShowFullscreenProgress; LLRect mWindowRectRaw; // whole window, including UI LLRect mWindowRectScaled; // whole window, scaled by UI size @@ -470,7 +459,6 @@ protected: bool mResDirty; bool mStatesDirty; - bool mIsFullscreenChecked; // Did the user check the fullscreen checkbox in the display settings U32 mCurrResolutionIndex; boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener; -- cgit v1.2.3 From 8628e67b825331531669a6b9fea162fcba811d8f Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Tue, 15 Jun 2010 17:22:35 -0700 Subject: apply resolution cleanup --- indra/newview/llfloaterpreference.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 88339c55e8..f450b199c8 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -465,8 +465,6 @@ void LLFloaterPreference::apply() gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility); } } - - //applyResolution(); } void LLFloaterPreference::cancel() @@ -1213,18 +1211,6 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b } } -void LLFloaterPreference::applyResolution() -{ - gGL.flush(); - - gViewerWindow->requestResolutionUpdate(); - - send_agent_update(TRUE); - - // Update enable/disable - refresh(); -} - void LLFloaterPreference::onChangeMaturity() { U8 sim_access = gSavedSettings.getU32("PreferredMaturity"); -- cgit v1.2.3 From 67185e19b423ccd31242d220a625eb4f593d4410 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Wed, 16 Jun 2010 16:40:48 -0400 Subject: EXT-5342 FIXED Open in Inventory contents does nothing for certain item types "Open" is added conditionally based on item type. --- indra/newview/llpanelobjectinventory.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index da809b7baa..26f32d656f 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -114,6 +114,7 @@ public: virtual time_t getCreationDate() const; virtual LLUIImagePtr getIcon() const; virtual void openItem(); + virtual BOOL canOpenItem() const { return FALSE; } virtual void closeItem() {} virtual void previewItem(); virtual void selectItem() {} @@ -677,7 +678,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - else + else if (canOpenItem()) { items.push_back(std::string("Task Open")); if (!isItemCopyable()) @@ -723,6 +724,7 @@ public: virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data); + virtual BOOL canOpenItem() const { return TRUE; } }; LLTaskCategoryBridge::LLTaskCategoryBridge( @@ -874,6 +876,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); }; @@ -900,6 +903,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -976,9 +980,8 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - else + else if (canOpenItem()) { - items.push_back(std::string("Task Open")); if (!isItemCopyable()) { disabled_items.push_back(std::string("Task Open")); @@ -1063,6 +1066,7 @@ public: const std::string& name) : LLTaskScriptBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); @@ -1124,6 +1128,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1163,6 +1168,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1196,6 +1202,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; -- cgit v1.2.3 From 08515a8eb38a014ce5aedc737ab8c9abc15fccdb Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Wed, 16 Jun 2010 17:49:04 -0400 Subject: EXT-7890 FIXED "Open" on folder of in-world contents does nothing Removed "open" menu option, to be consistent with right-click options on inventory folders elsewhere. --- indra/newview/llpanelobjectinventory.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 26f32d656f..869b8beaec 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -725,6 +725,7 @@ public: EDragAndDropType cargo_type, void* cargo_data); virtual BOOL canOpenItem() const { return TRUE; } + virtual void openItem(); }; LLTaskCategoryBridge::LLTaskCategoryBridge( @@ -759,7 +760,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { std::vector<std::string> items; std::vector<std::string> disabled_items; - items.push_back(std::string("Task Open")); + items.push_back(std::string("--no options--")); + disabled_items.push_back(std::string("--no options--")); hide_context_entries(menu, items, disabled_items); } @@ -770,6 +772,10 @@ BOOL LLTaskCategoryBridge::hasChildren() const return FALSE; } +void LLTaskCategoryBridge::openItem() +{ +} + BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl; -- cgit v1.2.3 From eb973cf6b21457c12272ddb6213e99d332637116 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Thu, 17 Jun 2010 16:51:04 +0300 Subject: EXT-7755 FIXED Updated condition to not show "No Outfit" as a status when outfit is changing. Implementation details: * Added flag to LLAgentWearables to determining that outfit is changing. Synchronizing it with mLoadingStartedSignal and mLoadedSignal signals. * Check this flag when there is no outfit set to show empty title when outfit is being changed. * Also updated condition to disable "Wear" button when outfit is being changed. Additional improvements: * Removed reference to parent LLSidepanelAppearance from the LLPanelOutfitsInventory. * Now LLSidepanelAppearance is subscribed to mLoadingStartedSignal and mLoadedSignal to update its loading indicator. Known Issue: * When new outfit is being worn its name is shown in title for a short moment (loading indicator is shown at this time). Then it is changed with an empty title and is shown when outfit is already worn. If necessary it should be investigated and fixed in scope of another issue. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/593/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 13 ++++++++++--- indra/newview/llagentwearables.h | 7 +++++++ indra/newview/llpaneloutfitsinventory.cpp | 14 +------------- indra/newview/llpaneloutfitsinventory.h | 2 -- indra/newview/llsidepanelappearance.cpp | 8 ++++++-- 5 files changed, 24 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 557b3b0a77..05ed6ec350 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -166,6 +166,7 @@ struct LLAgentDumper LLAgentWearables::LLAgentWearables() : mWearablesLoaded(FALSE) +, mCOFChangeInProgress(false) { } @@ -1208,7 +1209,7 @@ void LLAgentWearables::createStandardWearablesAllDone() mWearablesLoaded = TRUE; checkWearablesLoaded(); - mLoadedSignal(); + notifyLoadingFinished(); updateServer(); @@ -1460,7 +1461,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); - mLoadedSignal(); + notifyLoadingFinished(); queryWearableCache(); updateServer(); @@ -1945,7 +1946,7 @@ void LLAgentWearables::updateWearablesLoaded() mWearablesLoaded = (itemUpdatePendingCount()==0); if (mWearablesLoaded) { - mLoadedSignal(); + notifyLoadingFinished(); } } @@ -2111,7 +2112,13 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ void LLAgentWearables::notifyLoadingStarted() { + mCOFChangeInProgress = true; mLoadingStartedSignal(); } +void LLAgentWearables::notifyLoadingFinished() +{ + mCOFChangeInProgress = false; + mLoadedSignal(); +} // EOF diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 3295544e04..05913825dd 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -75,6 +75,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; + bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } void updateWearablesLoaded(); void checkWearablesLoaded() const; bool canMoveWearable(const LLUUID& item_id, bool closer_to_body); @@ -233,6 +234,7 @@ public: boost::signals2::connection addLoadedCallback(loaded_callback_t cb); void notifyLoadingStarted(); + void notifyLoadingFinished(); private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed @@ -249,6 +251,11 @@ private: static BOOL mInitialWearablesUpdateReceived; BOOL mWearablesLoaded; std::set<LLUUID> mItemsAwaitingWearableUpdate; + + /** + * True if agent's outfit is being changed now. + */ + BOOL mCOFChangeInProgress; //-------------------------------------------------------------------------------- // Support classes diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 7e1bff0961..e2563efb7d 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -224,7 +224,6 @@ private: LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mMyOutfitsPanel(NULL), mCurrentOutfitPanel(NULL), - mParent(NULL), mGearMenu(NULL), mInitialized(false) { @@ -314,11 +313,6 @@ void LLPanelOutfitsInventory::updateVerbs() } } -void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) -{ - mParent = parent; -} - // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { @@ -548,7 +542,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); - bool wear_enabled = isActionEnabled("wear"); + bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear"); bool wear_visible = !isCOFPanelActive(); bool make_outfit_enabled = isActionEnabled("save_outfit"); @@ -827,12 +821,6 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const void LLPanelOutfitsInventory::setWearablesLoading(bool val) { mListCommands->childSetEnabled("wear_btn", !val); - - llassert(mParent); - if (mParent) - { - mParent->setWearablesLoading(val); - } } void LLPanelOutfitsInventory::onWearablesLoaded() diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 863dc9dd7c..eabfda7f8c 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -72,7 +72,6 @@ public: // If a compatible listener type is selected, then return a pointer to that. // Otherwise, return NULL. LLFolderViewEventListener* getCorrectListenerForAction(); - void setParent(LLSidepanelAppearance *parent); LLFolderView* getRootFolder(); static LLSidepanelAppearance* getAppearanceSP(); @@ -84,7 +83,6 @@ protected: bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; private: - LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; LLTabContainer* mAppearanceTabs; std::string mFilterSubString; diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index e2d4f5ad45..0d1be91125 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -86,6 +86,9 @@ LLSidepanelAppearance::LLSidepanelAppearance() : outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); + + gAgentWearables.addLoadingStartedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, true)); + gAgentWearables.addLoadedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, false)); } LLSidepanelAppearance::~LLSidepanelAppearance() @@ -114,7 +117,6 @@ BOOL LLSidepanelAppearance::postBuild() } mPanelOutfitsInventory = dynamic_cast<LLPanelOutfitsInventory *>(getChild<LLPanel>("panel_outfits_inventory")); - mPanelOutfitsInventory->setParent(this); mOutfitEdit = dynamic_cast<LLPanelOutfitEdit*>(getChild<LLPanel>("panel_outfit_edit")); if (mOutfitEdit) @@ -387,7 +389,9 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) mCurrentLookName->setText(outfit_name); return; } - mCurrentLookName->setText(getString("No Outfit")); + + std::string look_name = gAgentWearables.isCOFChangeInProgress() ? "" : getString("No Outfit"); + mCurrentLookName->setText(look_name); mOpenOutfitBtn->setEnabled(FALSE); } else -- cgit v1.2.3 From cdafe7cef5cb7a9823e34e563cdc2cc498664c53 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 17 Jun 2010 17:01:18 +0300 Subject: EXT-7788 FIXED Rename in context menu shows very short text field for new name 1 Made line editor width configurable for alert notifications. 2 Set line editor width to 300px. reviwed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/605/ --HG-- branch : product-engine --- indra/newview/lltoastalertpanel.cpp | 83 ++++++++++++++-------- .../newview/skins/default/xui/en/notifications.xml | 2 +- 2 files changed, 55 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index db1f4dc4cb..7ba256c870 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -247,35 +247,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal msg_box->setRect( rect ); LLToastPanel::addChild(msg_box); - // Buttons - S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2; - - for( S32 i = 0; i < num_options; i++ ) - { - LLRect button_rect; - - LLButton* btn = LLUICtrlFactory::getInstance()->createFromFile<LLButton>("alert_button.xml", this, LLPanel::child_registry_t::instance()); - if(btn) - { - btn->setName(options[i].first); - btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT )); - btn->setLabel(options[i].second); - btn->setFont(font); - - btn->setClickedCallback(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i)); - - mButtonData[i].mButton = btn; - - LLToastPanel::addChild(btn); - - if( i == mDefaultOption ) - { - btn->setFocus(TRUE); - } - } - button_left += button_width + BTN_HPAD; - } - // (Optional) Edit Box if (!edit_text_name.empty()) { @@ -307,9 +278,63 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setDrawAsterixes(is_password); setEditTextArgs(notification->getSubstitutions()); + + mLineEditor->setFollowsLeft(); + mLineEditor->setFollowsRight(); + + // find form text input field + LLSD form_text; + for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it) + { + std::string type = (*it)["type"].asString(); + if (type == "text") + { + form_text = (*it); + } + } + + // if form text input field has width attribute + if (form_text.has("width")) + { + // adjust floater width to fit line editor + S32 editor_width = form_text["width"]; + LLRect editor_rect = mLineEditor->getRect(); + U32 width_delta = editor_width - editor_rect.getWidth(); + LLRect toast_rect = getRect(); + reshape(toast_rect.getWidth() + width_delta, toast_rect.getHeight()); + } } } + // Buttons + S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2; + + for( S32 i = 0; i < num_options; i++ ) + { + LLRect button_rect; + + LLButton* btn = LLUICtrlFactory::getInstance()->createFromFile<LLButton>("alert_button.xml", this, LLPanel::child_registry_t::instance()); + if(btn) + { + btn->setName(options[i].first); + btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT )); + btn->setLabel(options[i].second); + btn->setFont(font); + + btn->setClickedCallback(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i)); + + mButtonData[i].mButton = btn; + + LLToastPanel::addChild(btn); + + if( i == mDefaultOption ) + { + btn->setFocus(TRUE); + } + } + button_left += button_width + BTN_HPAD; + } + std::string ignore_label; if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 20a2a7d954..673c095826 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2098,7 +2098,7 @@ Would you be my friend? type="alertmodal"> New outfit name: <form name="form"> - <input name="new_name" type="text"> + <input name="new_name" type="text" width="300"> [NAME] </input> <button -- cgit v1.2.3 From 9745a0a9e4fab00da010793994c6d50e42635ebe Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Thu, 17 Jun 2010 17:03:05 +0300 Subject: EXT-7777 WIP Added several cases to show Loading indicator in "My Outfits:" * Outfit is loading for the first time * After user clicks: ** Item Context menu > Add ** Item Context menu > Replace Known Issues: 1. For multi-wearable indicator will disappear after first item from the batch is worn. Did not fix this to not affect the stability before 2.1 release. 2. To show loading indicator first time we have to notify subscribers of LLAgentWearables. For now this is done from the deprecated LLAgentWearables::processAgentInitialWearablesUpdate Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/602/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 7 ++++++- indra/newview/llappearancemgr.cpp | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 05ed6ec350..3923749e64 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -921,13 +921,18 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const // static // ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume // that viewers have a Current Outfit Folder and won't need this message, and thus -// we can remove/ignore this whole function. +// we can remove/ignore this whole function. EXCEPT gAgentWearables.notifyLoadingStarted void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data) { // We should only receive this message a single time. Ignore subsequent AgentWearablesUpdates // that may result from AgentWearablesRequest having been sent more than once. if (mInitialWearablesUpdateReceived) return; + + // notify subscribers that wearables started loading. See EXT-7777 + // *TODO: find more proper place to not be called from deprecated method. + gAgentWearables.notifyLoadingStarted(); + mInitialWearablesUpdateReceived = true; LLUUID agent_id; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 52a5587a16..be58a562c0 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -923,6 +923,14 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up { if (item_id_to_wear.isNull()) return false; + // *TODO: issue with multi-wearable should be fixed: + // in this case this method will be called N times - loading started for each item + // and than N times will be called - loading completed for each item. + // That means subscribers will be notified that loading is done after first item in a batch is worn. + // (loading indicator disappears for example before all selected items are worn) + // Have not fix this issue for 2.1 because of stability reason. EXT-7777. + gAgentWearables.notifyLoadingStarted(); + LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear); if (!item_to_wear) return false; -- cgit v1.2.3 From 7aaca88e5b35c99a2c1bc61d9d386941199ab110 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 17 Jun 2010 17:41:04 +0300 Subject: EXT-4568 added assertion on receiving form server sim info with empty sim name. --HG-- branch : product-engine --- indra/newview/llworldmapmessage.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index 06040a574c..09c5b9b196 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -193,6 +193,9 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS; U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS; + // name shouldn't be empty, see EXT-4568 + llassert(!name.empty()); + // Insert that region in the world map, if failure, flag it as a "null_sim" if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags))) { -- cgit v1.2.3 From 9fbb349ec8e50e7e0cb94fa0b97c961360d3767a Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko <pchelko@productengine.com> Date: Thu, 17 Jun 2010 17:50:58 +0300 Subject: EXT-7736 FIXED Reverted fix for EXT-2819 (crash in color picker). Fix description: Check getParentFloater result. Note: ColorsWatch have no parent Floater in EditWearable side-panel. --HG-- branch : product-engine --- indra/newview/llcolorswatch.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index d079da3b36..b83e4fe830 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -338,7 +338,11 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus) if (!pickerp) { pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately); - //gFloaterView->getParentFloater(this)->addDependentFloater(pickerp); + LLFloater* parent = gFloaterView->getParentFloater(this); + if (parent) + { + parent->addDependentFloater(pickerp); + } mPickerHandle = pickerp->getHandle(); } -- cgit v1.2.3 From 09b9f5dc114e1154d66df30259a49ea7bd35d095 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 17 Jun 2010 18:32:04 +0300 Subject: EXT-7772 FIXED Corrected button texture file name. reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/606/ --HG-- branch : product-engine --- indra/newview/skins/default/textures/textures.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index c02bf5741e..cf632c085f 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -114,7 +114,7 @@ with the same filename but different name <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" /> - <texture name="DownArrow_Off" file_name="icons/DownArrow_off.png" preload="false" /> + <texture name="DownArrow_Off" file_name="icons/DownArrow_Off.png" preload="false" /> <texture name="Dragbar" file_name="windows/Dragbar.png" preload="false" scale.left="35" scale.top="5" scale.right="29" scale.bottom="5" /> <texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> -- cgit v1.2.3 From 8d2ddff47e973c1692b42081e74dba3ad7745fdd Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Thu, 17 Jun 2010 17:42:09 +0300 Subject: EXT-7609 FIXED Added worn items indication with bold text. Fixed updating worn items indication. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/551/. --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 11 +++++++---- indra/newview/llinventoryitemslist.h | 7 +++++-- indra/newview/lloutfitslist.cpp | 7 ++++--- indra/newview/llwearableitemslist.cpp | 13 +++++++++---- indra/newview/llwearableitemslist.h | 8 +++++--- 5 files changed, 30 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 384b24210c..f7a07b260b 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -80,10 +80,11 @@ void LLPanelInventoryListItemBase::draw() } // virtual -void LLPanelInventoryListItemBase::updateItem(const std::string& name) +void LLPanelInventoryListItemBase::updateItem(const std::string& name, + const LLStyle::Params& input_params) { setIconImage(mIconImage); - setTitle(name, mHighlightedText); + setTitle(name, mHighlightedText, input_params); } void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/) @@ -286,13 +287,15 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) } } -void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) +void LLPanelInventoryListItemBase::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) { setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, - LLStyle::Params(), + input_params, title, highlit_text); } diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 489a82829c..5dc0bfe3de 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -152,7 +152,8 @@ protected: /** * Called after inventory item was updated, update panel widgets to reflect inventory changes. */ - virtual void updateItem(const std::string& name); + virtual void updateItem(const std::string& name, + const LLStyle::Params& input_params = LLStyle::Params()); /** setter for mIconCtrl */ void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; } @@ -177,7 +178,9 @@ protected: void setIconImage(const LLUIImagePtr& image); /** Set item title - inventory item name usually */ - virtual void setTitle(const std::string& title, const std::string& highlit_text); + virtual void setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params = LLStyle::Params()); /** * Show tool tip if item name text size > panel size diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index de074d6aaf..8c6189353e 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -44,7 +44,6 @@ #include "llinventorymodel.h" #include "lllistcontextmenu.h" #include "llnotificationsutil.h" -#include "lloutfitobserver.h" #include "llsidetray.h" #include "lltransutil.h" #include "llviewermenu.h" @@ -208,8 +207,10 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/) mCategoriesObserver->addCategory(outfits, boost::bind(&LLOutfitsList::refreshList, this, outfits)); - // Start observing changes in Current Outfit to update items worn state. - LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLOutfitsList::onCOFChanged, this)); + const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); + + // Start observing changes in Current Outfit category. + mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); // Fetch "My Outfits" contents and refresh the list to display // initially fetched items. If not all items are fetched now diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index ea0c5f1d0f..9c308359fa 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -112,16 +112,19 @@ LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item } // virtual -void LLPanelWearableOutfitItem::updateItem(const std::string& name) +void LLPanelWearableOutfitItem::updateItem(const std::string& name, + const LLStyle::Params& input_params) { std::string search_label = name; + LLStyle::Params style_params = input_params; if (mItem && get_is_item_worn(mItem->getUUID())) { search_label += LLTrans::getString("worn"); + style_params.font.style("BOLD"); } - LLPanelInventoryListItemBase::updateItem(search_label); + LLPanelInventoryListItemBase::updateItem(search_label, style_params); } ////////////////////////////////////////////////////////////////////////// @@ -261,7 +264,9 @@ LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryIt return list_item; } -void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::string& highlit_text) +void LLPanelAttachmentListItem::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) { std::string title_joint = title; @@ -271,7 +276,7 @@ void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::st title_joint = title + " (" + joint + ")"; } - LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text); + LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text, input_params); } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 69134dd646..5dc06284c3 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -86,8 +86,8 @@ public: /** * Updates item name and (worn) suffix. */ - /*virtual*/ void updateItem(const std::string& name); - + /*virtual*/ void updateItem(const std::string& name, + const LLStyle::Params& input_params = LLStyle::Params()); protected: LLPanelWearableOutfitItem(LLViewerInventoryItem* item); @@ -124,7 +124,9 @@ public: virtual ~LLPanelAttachmentListItem() {}; /** Set item title. Joint name is added to the title in parenthesis */ - /*virtual*/ void setTitle(const std::string& title, const std::string& highlit_text); + /*virtual*/ void setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params = LLStyle::Params()); protected: LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {}; -- cgit v1.2.3 From 6bbbd6582fdf5bb24cf69f2106662032b2f77b8a Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 17 Jun 2010 11:10:28 -0400 Subject: EXT-7888 FIXED Opening a gesture from an in-world object shows gesture floater with blank information EXT-7909 FIXED Cleanup llpreviewgesture #include files Fixed an issue that was causing gesture asset loading to fail. Also did header file cleanup. --- indra/newview/llpreviewgesture.cpp | 52 +++++++++++--------------------------- indra/newview/llpreviewgesture.h | 2 -- 2 files changed, 15 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 2e061b235d..ff315d3c53 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -31,55 +31,31 @@ */ #include "llviewerprecompiledheaders.h" - #include "llpreviewgesture.h" -#include <algorithm> - -// libraries -#include "lldatapacker.h" -#include "lldarray.h" -#include "llstring.h" -#include "lldir.h" +#include "llagent.h" +#include "llanimstatelabels.h" +#include "llanimationstates.h" +#include "llappviewer.h" // gVFS +#include "llassetuploadresponders.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lldelayedgestureerror.h" #include "llfloaterreg.h" +#include "llgesturemgr.h" #include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" #include "llmultigesture.h" #include "llnotificationsutil.h" -#include "llvfile.h" - -// newview -#include "llagent.h" // todo: remove -#include "llanimationstates.h" -#include "llassetuploadresponders.h" -#include "llbutton.h" -#include "llcheckboxctrl.h" -#include "llcombobox.h" -#include "lldelayedgestureerror.h" -#include "llfloatergesture.h" // for some label constants -#include "llgesturemgr.h" -#include "llkeyboard.h" -#include "lllineeditor.h" #include "llradiogroup.h" -#include "llscrolllistctrl.h" -#include "llscrolllistitem.h" -#include "llscrolllistcell.h" -#include "lltextbox.h" -#include "lluictrlfactory.h" -#include "llviewerinventory.h" -#include "llviewerobject.h" +#include "llresmgr.h" +#include "lltrans.h" +#include "llvfile.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llviewerstats.h" -#include "llviewerwindow.h" // busycount -#include "llvoavatarself.h" -#include "llappviewer.h" // gVFS -#include "llanimstatelabels.h" -#include "llresmgr.h" -#include "lltrans.h" - std::string NONE_LABEL; std::string SHIFT_LABEL; @@ -832,7 +808,9 @@ void LLPreviewGesture::loadAsset() const LLInventoryItem* item = getItem(); if (!item) { - mAssetStatus = PREVIEW_ASSET_ERROR; + // Don't set asset status here; we may not have set the item id yet + // (e.g. when this gets called initially) + //mAssetStatus = PREVIEW_ASSET_ERROR; return; } diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 5968e936ef..b75d18873f 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -34,7 +34,6 @@ #define LL_LLPREVIEWGESTURE_H #include "llassettype.h" -#include "llmultigesture.h" #include "llpreview.h" class LLMultiGesture; @@ -45,7 +44,6 @@ class LLComboBox; class LLScrollListCtrl; class LLScrollListItem; class LLButton; -class LLGestureStep; class LLRadioGroup; class LLVFS; -- cgit v1.2.3 From 9f996443604a902e03de87d2d14545b4adffa69c Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 17 Jun 2010 19:03:57 +0300 Subject: EXT-7722 Fixed "Add to COF" and "Remove from COF" outfit context menu items to be enabled when appropriate and work properly. Work on "Take Off - Remove from Current Outfit" and "Wear - Add to Current Outfit" menu options: - The menu items of the outfit context menu and the My Outfits gear menu are now disabled when inappropriate instead of being hidden. - The menu items get enabled/disabled depending on whether you can wear (take off) anything from the selected outfit. (was: depending on whether you're wearing the outfit) - Changed the way the options work: they now only operate on clothes and attachments. "Add to COF" now only adds those body parts that are missing in COF; "Remove from COF" doesn't touch body parts at all. Without this change both "Add" and "Remove" options would be available simultaneously, because any valid outfit contains body parts. I think that would be confusing. And you don't expect you body parts to be replaced when doing "Add to COF'. (that's addition, not replacement) Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/585/ --HG-- branch : product-engine --- indra/newview/llappearancemgr.cpp | 33 +++++++++++++++++++++- indra/newview/llappearancemgr.h | 6 ++++ indra/newview/llinventorybridge.cpp | 15 +--------- indra/newview/llinventorybridge.h | 1 - indra/newview/llinventoryfunctions.cpp | 30 ++++++++++++++++---- indra/newview/llinventoryfunctions.h | 24 ++++++++++------ indra/newview/lloutfitslist.cpp | 16 +++++------ indra/newview/llpaneloutfitsinventory.cpp | 8 +++--- .../skins/default/xui/en/menu_outfit_tab.xml | 6 ++++ 9 files changed, 97 insertions(+), 42 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index be58a562c0..4e96372da9 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1068,7 +1068,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - LLFindWorn collector; + LLFindWearablesEx collector(/*is_worn=*/ true, /*include_body_parts=*/ false); gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector); @@ -1224,6 +1224,34 @@ bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id) return true; } +// static +bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id) +{ + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(outfit_cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return items.size() > 0; +} + +// static +bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id) +{ + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(outfit_cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + return items.size() > 0; +} + void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category) { LLInventoryModel::cat_array_t cats; @@ -1338,9 +1366,12 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) // - Body parts: always include COF contents as a fallback in case any // required parts are missing. + // Preserve body parts from COF if appending. LLInventoryModel::item_array_t body_items; getDescendentsOfAssetType(cof, body_items, LLAssetType::AT_BODYPART, false); getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false); + if (append) + reverse(body_items.begin(), body_items.end()); // Reduce body items to max of one per type. removeDuplicateItems(body_items); filterWearableItems(body_items, 1); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index e42f9f7d6f..8ded32a53d 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -75,6 +75,12 @@ public: // Determine whether a given outfit can be removed. bool getCanRemoveOutfit(const LLUUID& outfit_cat_id); + // Determine whether we're wearing any of the outfit contents (excluding body parts). + static bool getCanRemoveFromCOF(const LLUUID& outfit_cat_id); + + // Determine whether we can add anything (but body parts) from the outfit contents to COF. + static bool getCanAddToCOF(const LLUUID& outfit_cat_id); + // Copy all items in a category. void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ec367c1746..1881d0d780 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2489,7 +2489,7 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Wear As Ensemble")); } mItems.push_back(std::string("Remove From Outfit")); - if (!areAnyContentsWorn(model)) + if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) { disabled_items.push_back(std::string("Remove From Outfit")); } @@ -2514,19 +2514,6 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } -BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t item_array; - LLFindWorn is_worn; - model->collectDescendentsIf(mUUID, - cat_array, - item_array, - LLInventoryModel::EXCLUDE_TRASH, - is_worn); - return (item_array.size() > 0); -} - // Flags unused void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 757808eb93..64d0f8d254 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -295,7 +295,6 @@ protected: static void createNewEyes(void* user_data); BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); - BOOL areAnyContentsWorn(LLInventoryModel* model) const; void modifyOutfit(BOOL append); void determineFolderType(); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index de24bd92d0..469d1888dd 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -573,6 +573,31 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat, return FALSE; } +LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts) +: mIsWorn(is_worn) +, mIncludeBodyParts(include_body_parts) +{} + +bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + if (!vitem) return false; + + // Skip non-wearables. + if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT) + { + return false; + } + + // Skip body parts if requested. + if (!mIncludeBodyParts && vitem->getType() == LLAssetType::AT_BODYPART) + { + return false; + } + + return (bool) get_is_item_worn(item->getUUID()) == mIsWorn; +} + bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (!item) return false; @@ -593,11 +618,6 @@ void LLFindWearablesOfType::setType(LLWearableType::EType type) mWearableType = type; } -bool LLFindWorn::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - return item && get_is_item_worn(item->getUUID()); -} - bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (item) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 93c56e1b8a..1795b54679 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -337,6 +337,21 @@ public: LLInventoryItem* item); }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFindWearablesEx +// +// Collects wearables based on given criteria. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFindWearablesEx : public LLInventoryCollectFunctor +{ +public: + LLFindWearablesEx(bool is_worn, bool include_body_parts = true); + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); +private: + bool mIncludeBodyParts; + bool mIsWorn; +}; + //Inventory collect functor collecting wearables of a specific wearable type class LLFindWearablesOfType : public LLInventoryCollectFunctor { @@ -363,15 +378,6 @@ public: } }; -// Find worn items. -class LLFindWorn : public LLInventoryCollectFunctor -{ -public: - LLFindWorn() {} - virtual ~LLFindWorn() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); -}; - // Collect non-removable folders and items. class LLFindNonRemovableObjects : public LLInventoryCollectFunctor { diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 8c6189353e..73c850e1fb 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -102,6 +102,14 @@ protected: { return get_is_category_renameable(&gInventory, outfit_cat_id); } + else if ("wear_add" == param) + { + return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id); + } + else if ("take_off" == param) + { + return LLAppearanceMgr::getCanRemoveFromCOF(outfit_cat_id); + } return true; } @@ -119,14 +127,6 @@ protected: { return !is_worn; } - else if ("wear_add" == param) - { - return !is_worn; - } - else if ("take_off" == param) - { - return is_worn; - } else if ("delete" == param) { return LLAppearanceMgr::instance().getCanRemoveOutfit(outfit_cat_id); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index e2563efb7d..2405b95e7d 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -191,6 +191,10 @@ private: { return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } + else if ("take_off" == param) + { + return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id); + } return true; } @@ -209,10 +213,6 @@ private: { return !is_worn; } - else if ("take_off" == param) - { - return is_worn; - } return true; } diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml index e084216a69..9206969b2f 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml @@ -18,6 +18,9 @@ name="wear_add"> <on_click function="Outfit.WearAdd" /> + <on_enable + function="Outfit.OnEnable" + parameter="wear_add" /> <on_visible function="Outfit.OnVisible" parameter="wear_add" /> @@ -28,6 +31,9 @@ name="take_off"> <on_click function="Outfit.TakeOff" /> + <on_enable + function="Outfit.OnEnable" + parameter="take_off" /> <on_visible function="Outfit.OnVisible" parameter="take_off" /> -- cgit v1.2.3 From c75c247bc9a434e4a9e3166145e665d7811da7dc Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 17 Jun 2010 19:35:29 +0300 Subject: EXT-7620 FIXED Save outfit selection when applying filter and restore it after filter has been reset. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/603/ --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 117 +++++++++++++++++++++++----------------- indra/newview/lloutfitslist.h | 19 +++++++ 2 files changed, 86 insertions(+), 50 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 73c850e1fb..927ea19d98 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -326,19 +326,13 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // 1. Remove outfit category from observer to stop monitoring its changes. mCategoriesObserver->removeCategory(outfit_id); - // 2. Remove selected lists map entry. - mSelectedListsMap.erase(outfit_id); + // 2. Remove the outfit from selection. + deselectOutfit(outfit_id); - // 3. Reset currently selected outfit id if it is being removed. - if (outfit_id == mSelectedOutfitUUID) - { - setSelectedOutfitUUID(LLUUID()); - } - - // 4. Remove category UUID to accordion tab mapping. + // 3. Remove category UUID to accordion tab mapping. mOutfitsMap.erase(outfits_iter); - // 5. Remove outfit tab from accordion. + // 4. Remove outfit tab from accordion. mAccordion->removeCollapsibleCtrl(tab); } } @@ -494,6 +488,27 @@ void LLOutfitsList::setSelectedOutfitUUID(const LLUUID& category_id) mSelectionChangeSignal(mSelectedOutfitUUID = category_id); } +void LLOutfitsList::deselectOutfit(const LLUUID& category_id) +{ + // Remove selected lists map entry. + mSelectedListsMap.erase(category_id); + + // Reset selection if the outfit is selected. + if (category_id == mSelectedOutfitUUID) + { + setSelectedOutfitUUID(LLUUID::null); + } +} + +void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id) +{ + // Try restoring outfit selection after filtering. + if (mAccordion->getSelectedTab() == tab) + { + setSelectedOutfitUUID(category_id); + } +} + void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) { if (!ctrl || mFilterSubString.empty()) @@ -510,26 +525,7 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); if (list != ctrl) continue; - std::string title = tab->getTitle(); - LLStringUtil::toUpper(title); - - std::string cur_filter = mFilterSubString; - LLStringUtil::toUpper(cur_filter); - - if (std::string::npos == title.find(cur_filter)) - { - // hide tab if its title doesn't pass filter - // and it has no visible items - tab->setVisible(list->size() != 0); - - // remove title highlighting because it might - // have been previously highlighted by less restrictive filter - tab->setTitle(tab->getTitle()); - } - else - { - tab->setTitle(tab->getTitle(), cur_filter); - } + applyFilterToTab(iter->first, tab, mFilterSubString); } } @@ -568,26 +564,7 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) if (!new_filter_substring.empty()) { - std::string title = tab->getTitle(); - LLStringUtil::toUpper(title); - - std::string cur_filter = new_filter_substring; - LLStringUtil::toUpper(cur_filter); - - if (std::string::npos == title.find(cur_filter)) - { - // hide tab if its title doesn't pass filter - // and it has no visible items - tab->setVisible(list->size() != 0); - - // remove title highlighting because it might - // have been previously highlighted by less restrictive filter - tab->setTitle(tab->getTitle()); - } - else - { - tab->setTitle(tab->getTitle(), cur_filter); - } + applyFilterToTab(iter->first, tab, new_filter_substring); if (tab->getVisible()) { @@ -608,10 +585,50 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) //restore accordion state after all those accodrion tab manipulations tab->notifyChildren(LLSD().with("action","restore_state")); + + // Try restoring the tab selection. + restoreOutfitSelection(tab, iter->first); } } } +void LLOutfitsList::applyFilterToTab( + const LLUUID& category_id, + LLAccordionCtrlTab* tab, + const std::string& filter_substring) +{ + if (!tab) return; + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (!list) return; + + std::string title = tab->getTitle(); + LLStringUtil::toUpper(title); + + std::string cur_filter = filter_substring; + LLStringUtil::toUpper(cur_filter); + + tab->setTitle(tab->getTitle(), cur_filter); + + if (std::string::npos == title.find(cur_filter)) + { + // hide tab if its title doesn't pass filter + // and it has no visible items + tab->setVisible(!list->empty()); + + // remove title highlighting because it might + // have been previously highlighted by less restrictive filter + tab->setTitle(tab->getTitle()); + + // Remove the tab from selection. + deselectOutfit(category_id); + } + else + { + // Try restoring the tab selection. + restoreOutfitSelection(tab, category_id); + } +} + void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) { LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 5605044f41..33791fbe62 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -119,6 +119,18 @@ private: */ void setSelectedOutfitUUID(const LLUUID& category_id); + /** + * Removes the outfit from selection. + */ + void deselectOutfit(const LLUUID& category_id); + + /** + * Try restoring selection for a temporary hidden tab. + * + * A tab may be hidden if it doesn't match current filter. + */ + void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id); + /** * Called upon list refresh event to update tab visibility depending on * the results of applying filter to the title and list items of the tab. @@ -130,6 +142,13 @@ private: */ void applyFilter(const std::string& new_filter_substring); + /** + * Applies filter to the given tab + * + * @see applyFilter() + */ + void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring); + void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y); void onCOFChanged(); -- cgit v1.2.3 From fa7d983f087fd2ec1393b6f9fcd57cf4e7225e37 Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Thu, 17 Jun 2010 12:44:49 -0500 Subject: Add timer for comparison against davep/viewer-release --- indra/newview/llface.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index e0e5b32299..3f9db4831f 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -862,11 +862,14 @@ void LLFace::updateRebuildFlags() } } +static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); + BOOL LLFace::getGeometryVolume(const LLVolume& volume, const S32 &f, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, const U16 &index_offset) { + LLFastTimer t(FTM_FACE_GET_GEOM); const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mVertices.size(); S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size(); -- cgit v1.2.3 From 9ed825fe5abd569e0e41016b19e3a040bfb09e7a Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Thu, 17 Jun 2010 12:47:17 -0500 Subject: Line endings fix. --- indra/newview/llface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3f9db4831f..dbbcb6e7c4 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -862,7 +862,7 @@ void LLFace::updateRebuildFlags() } } -static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); +static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); BOOL LLFace::getGeometryVolume(const LLVolume& volume, const S32 &f, -- cgit v1.2.3 From 9a5c3a293908c3a3de362e7b3ea792e559033adf Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 17 Jun 2010 20:54:33 +0300 Subject: Fixed build. --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 927ea19d98..e4079c709a 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -613,7 +613,7 @@ void LLOutfitsList::applyFilterToTab( { // hide tab if its title doesn't pass filter // and it has no visible items - tab->setVisible(!list->empty()); + tab->setVisible(list->size() > 0); // remove title highlighting because it might // have been previously highlighted by less restrictive filter -- cgit v1.2.3 From 451ee947d6b28beb28e0bde67b19266aea251825 Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko <pchelko@productengine.com> Date: Thu, 17 Jun 2010 21:30:22 +0300 Subject: EXT-7751 FIXED Show tooltip condition was updated Fix descrition: Show tooltip, for long-named items (title text size > text box size) when mouse over text box rectangle. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/576/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index f7a07b260b..14de5442d6 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -291,7 +291,7 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text, const LLStyle::Params& input_params) { - setToolTip(title); + mTitleCtrl->setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, @@ -302,12 +302,13 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title, BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) { - LLTextBox* item_name = getChild<LLTextBox>("item_name"); - if (item_name->getRect().getWidth() < item_name->getTextPixelWidth()) + LLRect text_box_rect = mTitleCtrl->getRect(); + if (text_box_rect.pointInRect(x, y) && + mTitleCtrl->getTextPixelWidth() <= text_box_rect.getWidth()) { - return LLPanel::handleToolTip(x,y,mask); + return FALSE; } - return FALSE; + return LLPanel::handleToolTip(x, y, mask); } void LLPanelInventoryListItemBase::reshapeLeftWidgets() -- cgit v1.2.3 From 383fd7e86fa16a8b4d50211b74d6aacd0aa9f4dd Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 17 Jun 2010 21:38:46 +0300 Subject: EXT-6468 ADDITIONAL FIX Changed "- Select Mature -" to "- Select maturity rating -" in group profile. Requested by Eli and approved by Benjamin. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_general.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index e79ae34627..2af1a84400 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -243,7 +243,7 @@ Hover your mouse over the options for more help. top_pad="4" width="190"> <combo_item name="select_mature" value="Select"> - - Select Mature - + - Select maturity rating - </combo_item> <combo_box.item label="Moderate Content" -- cgit v1.2.3 From 89fb6d2ddb70fd179cddc5485ab1d2757aaf9000 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 17 Jun 2010 21:44:37 +0300 Subject: EXT-7874 FIXED Change 'Rename' to 'Rename Outfit' in outfit context menu on 'My Outfit' tab. Trivial change, not reviewed. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/menu_outfit_tab.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml index 9206969b2f..9c3151fe07 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml @@ -50,7 +50,7 @@ </menu_item_call> <menu_item_separator /> <menu_item_call - label="Rename" + label="Rename Outfit" layout="topleft" name="rename"> <on_click -- cgit v1.2.3 From 8cf968e00eab5ca3f81be1973cb6f52d34cc1f83 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 17 Jun 2010 21:58:37 +0300 Subject: EXT-7903 FIXED Disabled "Edit" context menu option for multi selection in the Outfit Editor. Trivial fix, not reviewed. --HG-- branch : product-engine --- indra/newview/llcofwearables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 46d2e0a5db..aa8cc01f7d 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -208,7 +208,7 @@ protected: } else if ("edit" == param) { - return gAgentWearables.isWearableModifiable(selected_id); + return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id); } return true; } @@ -264,7 +264,7 @@ protected: if ("edit" == param) { - return gAgentWearables.isWearableModifiable(selected_id); + return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id); } return true; -- cgit v1.2.3 From 9ae5e2816ca2b5037665b2a62f55326c4a5d9769 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 17 Jun 2010 15:43:40 -0400 Subject: EXT-7909 FIXED Cleanup llpreviewgesture #include files Superficial header file fixes. --- indra/newview/llpreviewgesture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index b75d18873f..1814f0d403 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -138,7 +138,7 @@ protected: static void onDonePreview(LLMultiGesture* gesture, void* data); -protected: +private: // LLPreview contains mDescEditor LLLineEditor* mTriggerEditor; LLTextBox* mReplaceText; @@ -171,4 +171,4 @@ protected: BOOL mDirty; }; -#endif +#endif // LL_LLPREVIEWGESTURE_H -- cgit v1.2.3 From 4fc8140a1d01742d560ea0d122b889a670e97c2e Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 17 Jun 2010 16:36:49 -0400 Subject: EXT-7916 FIXED Miscllaneous UI issues with Preview Gesture Floater See subtasks for complete lists of fixes. The preview gesture floater had some major issues and regressions. --- .../default/xui/en/floater_preview_gesture.xml | 74 ++++++++-------------- 1 file changed, 27 insertions(+), 47 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index f766fe5a5d..1cbb5ec6fb 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -39,28 +39,6 @@ name="Title"> Gesture: [NAME] </floater.string> - <text - type="string" - length="1" - follows="top|left" - font="SansSerifSmall" - height="10" - layout="topleft" - left="10" - name="name_text" - top="20" - font.style="BOLD" - width="100"> - Name: - </text> - <line_editor - follows="left|top" - height="20" - layout="topleft" - left_delta="84" - name="name" - top_delta="-4" - width="180" /> <text type="string" length="1" @@ -70,7 +48,7 @@ layout="topleft" left="10" name="desc_label" - top_pad="10" + top_pad="25" font.style="BOLD" width="100"> Description: @@ -79,10 +57,10 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" name="desc" top_delta="-4" - width="180" /> + width="175" /> <text type="string" length="1" @@ -101,11 +79,11 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" max_length="31" name="trigger_editor" top_delta="-4" - width="180" /> + width="175" /> <text type="string" length="1" @@ -125,12 +103,12 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" max_length="31" name="replace_editor" tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture" top_delta="-4" - width="180" /> + width="175" /> <text type="string" length="1" @@ -149,7 +127,7 @@ height="20" label="None" layout="topleft" - left_delta="84" + left_delta="89" name="modifier_combo" top_delta="-4" width="75" /> @@ -171,7 +149,7 @@ left="10" font.style="BOLD" name="library_label" - top="135" + top_delta="25" width="100"> Library: </text> @@ -181,7 +159,7 @@ layout="topleft" left="10" name="library_list" - top="150" + top_delta="15" width="180"> <scroll_list.rows value="Animation" /> @@ -199,7 +177,7 @@ layout="topleft" left_pad="10" name="add_btn" - top_delta="0" + top_delta="-1" width="70" /> <text type="string" @@ -230,7 +208,7 @@ layout="topleft" left_pad="10" name="up_btn" - top_delta="0" + top_delta="-1" width="70" /> <button follows="top|left" @@ -256,23 +234,25 @@ layout="topleft" left="15" name="options_text" - top="330" - width="205" /> + top="315" + width="205"> + (options) + </text> <combo_box follows="top|left" height="20" layout="topleft" left_delta="15" name="animation_list" - top="345" - width="100" /> + top="330" + width="100"/> <combo_box follows="top|left" height="20" layout="topleft" left_delta="0" name="sound_list" - top_delta="0" + top="330" width="100" /> <line_editor follows="top|left" @@ -281,7 +261,7 @@ left_delta="0" max_length="127" name="chat_editor" - top_delta="0" + top="330" width="100" /> <radio_group draw_border="false" @@ -290,7 +270,7 @@ layout="topleft" left_pad="8" name="animation_trigger_type" - top_delta="0" + top="360" width="80"> <radio_item height="16" @@ -298,7 +278,7 @@ layout="topleft" left="3" name="start" - top="-51" + top_delta="3" width="80" /> <radio_item height="16" @@ -314,14 +294,14 @@ height="20" label="until animations are done" layout="topleft" - left="16" + left="28" name="wait_anim_check" - top="340" + top="330" width="100" /> <check_box follows="top|left" height="20" - label="time in seconds" + label="time in seconds:" layout="topleft" left_delta="0" name="wait_time_check" @@ -331,10 +311,10 @@ follows="top|left" height="20" layout="topleft" - left_pad="5" + left_pad="10" max_length="15" name="wait_time_editor" - top_delta="0" + top_delta="1" width="50" /> <text type="string" -- cgit v1.2.3 From 408484d0c133627a1a5e3586aa34015d89b23379 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 17 Jun 2010 17:41:02 -0400 Subject: EXT-7916 FIXED Miscllaneous UI issues with Preview Gesture Floater EXT-7920 FIXED Start and stop buttons are not clickable Start and stop buttons were outside the UI box containing them. --- indra/newview/skins/default/xui/en/floater_preview_gesture.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index 1cbb5ec6fb..6281bc5272 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -270,7 +270,7 @@ layout="topleft" left_pad="8" name="animation_trigger_type" - top="360" + top="330" width="80"> <radio_item height="16" @@ -278,7 +278,7 @@ layout="topleft" left="3" name="start" - top_delta="3" + top_delta="45" width="80" /> <radio_item height="16" @@ -286,7 +286,7 @@ layout="topleft" left_delta="0" name="stop" - top_pad="10" + top_pad="3" width="80" /> </radio_group> <check_box -- cgit v1.2.3 From 68bfb03a9f4f4317e63bce9b9ae0370561157097 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Thu, 17 Jun 2010 17:14:59 -0700 Subject: EXT-6296 FIX "Primitive" misspelled as "Primative" in About Land menu --- indra/newview/skins/default/xui/en/floater_about_land.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 54ef6d65a7..b9489895ae 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -825,7 +825,7 @@ Leyla Linden </text> name="Simulator primitive usage:" top_pad="4" width="364"> - Primative usage: + Primitive usage: </text> <text type="string" -- cgit v1.2.3 From 884e08b5093453eeb8697ab2bdb242b4b3ab9135 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev <ychebotarev@productengine.com> Date: Fri, 18 Jun 2010 10:47:49 +0300 Subject: EXT-6527 FIX Introduce new plain_text flag in LLTextBase and prevent image segment from being created if this flag is set. reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/587/ --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 18c69b5130..ab97dbb695 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -557,6 +557,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); + if(mEditor) + { + mEditor->setPlainText(use_plain_text_chat_history); + } + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); -- cgit v1.2.3 From 7b64357562ceee47d9910f08f4e4fbc1dc108f91 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Fri, 18 Jun 2010 12:22:02 +0300 Subject: EXT-7754 FIXED Implemented marking of worn outfit accordion header text with bold - Added method to LLAccordionCtrlTabHeader which allows to change style of its textbox - Added method to LLOutfitsList which marks accordion header of currently selected otfit and tied it up to BOF callbacks Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/609/ --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 24 ++++++++++++++++++++++++ indra/newview/lloutfitslist.h | 5 +++++ 2 files changed, 29 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index e4079c709a..8dd849f947 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -44,6 +44,7 @@ #include "llinventorymodel.h" #include "lllistcontextmenu.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "llsidetray.h" #include "lltransutil.h" #include "llviewermenu.h" @@ -212,12 +213,16 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/) // Start observing changes in Current Outfit category. mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); + LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this)); + LLOutfitObserver::instance().addBOFReplacedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this)); + // Fetch "My Outfits" contents and refresh the list to display // initially fetched items. If not all items are fetched now // the observer will refresh the list as soon as the new items // arrive. category->fetch(); refreshList(outfits); + highlightBaseOutfit(); mIsInitialized = true; } @@ -350,6 +355,25 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) mAccordion->sort(); } +void LLOutfitsList::highlightBaseOutfit() +{ + // id of base outfit + LLUUID base_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + if (base_id != mHighlightedOutfitUUID) + { + if (mOutfitsMap[mHighlightedOutfitUUID]) + { + mOutfitsMap[mHighlightedOutfitUUID]->setTitleFontStyle("NORMAL"); + } + + mHighlightedOutfitUUID = base_id; + } + if (mOutfitsMap[base_id]) + { + mOutfitsMap[base_id]->setTitleFontStyle("BOLD"); + } +} + void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) { LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 33791fbe62..c984389f87 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -83,6 +83,9 @@ public: void refreshList(const LLUUID& category_id); + // highlits currently worn outfit tab text and unhighlights previously worn + void highlightBaseOutfit(); + void performAction(std::string action); void setFilterSubString(const std::string& string); @@ -167,6 +170,8 @@ private: wearables_lists_map_t mSelectedListsMap; LLUUID mSelectedOutfitUUID; + // id of currently highlited outfit + LLUUID mHighlightedOutfitUUID; selection_change_signal_t mSelectionChangeSignal; std::string mFilterSubString; -- cgit v1.2.3 From 9aa710945685a2cae8cfc622f3dc3d900c1ab4c9 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Fri, 18 Jun 2010 12:56:02 +0300 Subject: EXT-7847 FIXED Disabled "trash" button if an item is selected inside selected outfit. - Added bool mItemSelected variable and getter for it to determine if the selection inside outfit exists, and used it when determining whether to enable "Trash" button in My Outfits. Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/600/ --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 8 ++++++++ indra/newview/lloutfitslist.h | 9 +++++++++ indra/newview/llpaneloutfitsinventory.cpp | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 8dd849f947..c5043e1c3d 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -161,6 +161,7 @@ LLOutfitsList::LLOutfitsList() , mAccordion(NULL) , mListCommands(NULL) , mIsInitialized(false) + , mItemSelected(false) { mCategoriesObserver = new LLInventoryCategoriesObserver(); @@ -418,6 +419,11 @@ boost::signals2::connection LLOutfitsList::addSelectionChangeCallback(selection_ return mSelectionChangeSignal.connect(cb); } +bool LLOutfitsList::hasItemSelected() +{ + return mItemSelected; +} + ////////////////////////////////////////////////////////////////////////// // Private methods ////////////////////////////////////////////////////////////////////////// @@ -503,6 +509,8 @@ void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUI mSelectedListsMap.clear(); } + mItemSelected = list && (list->getSelectedItem() != NULL); + mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list)); setSelectedOutfitUUID(category_id); } diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index c984389f87..df65f7187b 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -94,6 +94,11 @@ public: boost::signals2::connection addSelectionChangeCallback(selection_change_callback_t cb); + /** + * Returns true if there is a selection inside currently selected outfit + */ + bool hasItemSelected(); + private: /** * Reads xml with accordion tab and Flat list from xml file. @@ -183,6 +188,10 @@ private: LLListContextMenu* mOutfitMenu; bool mIsInitialized; + /** + * True if there is a selection inside currently selected outfit + */ + bool mItemSelected; }; #endif //LL_LLOUTFITSLIST_H diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 2405b95e7d..714d9cd4c5 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -661,7 +661,8 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) else // "My Outfits" tab active { const LLUUID& selected_outfit = mMyOutfitsPanel->getSelectedOutfitUUID(); - can_delete = LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit); + // first condition prevents trash btn from enabling when items are selected inside outfit (EXT-7847) + can_delete = !mMyOutfitsPanel->hasItemSelected() && LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit); } return can_delete; -- cgit v1.2.3 From f42062aaacf7819333a141cdaf9c9aa6fdee1bf3 Mon Sep 17 00:00:00 2001 From: Aimee Linden <aimee@lindenlab.com> Date: Fri, 18 Jun 2010 16:15:49 +0100 Subject: EXT-7933 FIXED Slim down the Voice Morph preview floater --- .../default/xui/en/floater_voice_controls.xml | 6 +-- .../skins/default/xui/en/floater_voice_effect.xml | 60 +++++++++++++--------- .../skins/default/xui/en/panel_voice_effect.xml | 6 +-- 3 files changed, 43 insertions(+), 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 0569b4d515..bf5bd87ad6 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -47,8 +47,8 @@ width="263"> <layout_panel follows="top|left|right" - user_resize="false" - auto_resize="false" + user_resize="false" + auto_resize="false" layout="topleft" height="20" name="my_panel"> @@ -123,7 +123,7 @@ layout="topleft" left="2" top_pad="0" - height="132" + height="132" name="callers_panel" user_resize="false" width="280"> diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml index edc25348e4..44ab15a3f2 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - legacy_header_height="18" + legacy_header_height="27" can_resize="true" - height="420" + height="500" name="voice_effects" help_topic="voice_effects" - title="PREVIEW VOICE MORPHING" + title="VOICE MORPHING" background_visible="true" follows="all" label="Places" layout="topleft" - min_height="350" - min_width="330" - width="455"> + min_height="360" + min_width="200" + width="300"> <string name="no_voice_effect"> (No Voice Morph) </string> @@ -25,31 +25,43 @@ <string name="new_voice_effect"> (New!) </string> - <text - height="68" + <text + height="16" word_wrap="true" use_ellipses="true" type="string" follows="left|top|right" layout="topleft" + font="SansSerifBold" + color="White" left="10" name="status_text" right="-10" - top="25"> -To preview any of the Voice Morphing effects, click the Record button to record a short snippet of voice, then click any Voice Morph in the list to hear how it will sound. - -To reconnect to Nearby Voice simply close this window. + top="27">To Preview + </text> + <text + height="23" + word_wrap="true" + use_ellipses="true" + type="string" + follows="left|top|right" + layout="topleft" + left="10" + name="status_text" + right="-5" + top_pad="0"> +Record a sample, then click on a voice to hear how it will sound. </text> <button follows="left|top" height="23" - label="Record Sample" + label="Record" layout="topleft" left="10" name="record_btn" tool_tip="Record a sample of your voice." top_pad="5" - width="150"> + width="100"> <button.commit_callback function="VoiceEffect.Record" /> </button> @@ -61,22 +73,22 @@ To reconnect to Nearby Voice simply close this window. left_delta="0" name="record_stop_btn" top_delta="0" - width="150"> + width="100"> <button.commit_callback function="VoiceEffect.Stop" /> </button> <text - height="18" + height="23" halign="right" use_ellipses="true" type="string" follows="left|top|right" layout="topleft" left_pad="10" + top_delta="10" name="voice_morphing_link" - right="-10" - top_delta="5"> - [[URL] Get Voice Morphing] + right="-10"> + [[URL] Subscribe Now] </text> <scroll_list bottom="-10" @@ -88,14 +100,16 @@ To reconnect to Nearby Voice simply close this window. name="voice_effect_list" right="-10" tool_tip="Record a sample of your voice, then click an effect to preview." - top="128"> + top="95"> <scroll_list.columns - label="Voice Morph" - name="name" relative_width="0.41"/> + label="Voice Name" + name="name" + relative_width="0.60" /> <scroll_list.columns dynamic_width="true" label="Expires" name="expires" - relative_width="0.59" /> + relative_width="0.30" /> </scroll_list> + </floater> diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml index c575ca468c..93e79b7328 100644 --- a/indra/newview/skins/default/xui/en/panel_voice_effect.xml +++ b/indra/newview/skins/default/xui/en/panel_voice_effect.xml @@ -6,7 +6,7 @@ name="panel_voice_effect" width="200"> <string name="no_voice_effect"> - No Voice Morph + Voice Morphing Off </string> <string name="preview_voice_effects"> Preview Voice Morphing ▶ @@ -19,11 +19,11 @@ follows="left|top|right" height="23" name="voice_effect" - tool_tip="Select a Voice Morphing effect to change your voice." + tool_tip="Select a Voice Morph to change your voice" top_pad="0" width="200"> <combo_box.item - label="No Voice Morph" + label="Voice Morphing Off" name="no_voice_effect" top_pad="0" value="0" /> -- cgit v1.2.3 From cc0d5eae4d59adf41d59248e1b481a66db791b07 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 18 Jun 2010 16:17:34 +0100 Subject: Fix llpreviewgesture.h build borkage. --- indra/newview/llpreviewgesture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 1814f0d403..b141b14445 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -35,8 +35,8 @@ #include "llassettype.h" #include "llpreview.h" +#include "llmultigesture.h" -class LLMultiGesture; class LLLineEditor; class LLTextBox; class LLCheckBoxCtrl; -- cgit v1.2.3