From b94e5b597a0fb0ca667d50c4a2324025faa308f6 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 4 Feb 2010 13:39:51 -0800 Subject: Backed out changeset: b579077ebc79 I gave lynx a bad review. :( I didn't know about the setting FirstLoginThisInstall. I'm backing out lynx's change, then re-fixing EXT-4237. --- indra/newview/app_settings/settings.xml | 6 +++--- indra/newview/llappviewer.cpp | 2 +- indra/newview/llpanellogin.cpp | 4 ++-- indra/newview/llstartup.cpp | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3b9b3a51d5..62197406b6 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2817,16 +2817,16 @@ Value 0 - HadFirstSuccessfulLogin + FirstRunThisInstall Comment - Specifies whether you have successfully logged in at least once before + Specifies that you have not run the viewer since you installed the latest update Persist 1 Type Boolean Value - 0 + 1 FirstSelectedDisabledPopups diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2f90885df3..2d694eefd3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2611,7 +2611,7 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["StartupState"] = LLStartUp::getStartupStateString(); gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer) LLMemory::getCurrentRSS() >> 10; gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin(); - gDebugInfo["HadFirstSuccessfulLogin"] = gSavedSettings.getBOOL("HadFirstSuccessfulLogin"); + gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall"); if(gLogoutInProgress) { diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index df9002facc..af9e791223 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -676,7 +676,7 @@ void LLPanelLogin::refreshLocation( bool force_visible ) // Don't show on first run after install // Otherwise ShowStartLocation defaults to true. show_start = gSavedSettings.getBOOL("ShowStartLocation") - && gSavedSettings.getBOOL("HadFirstSuccessfulLogin"); + && !gSavedSettings.getBOOL("FirstRunThisInstall"); } sInstance->childSetVisible("start_location_combo", show_start); @@ -847,7 +847,7 @@ void LLPanelLogin::loadLoginPage() oStr << "&auto_login=TRUE"; } if (gSavedSettings.getBOOL("ShowStartLocation") - && gSavedSettings.getBOOL("HadFirstSuccessfulLogin")) + && !gSavedSettings.getBOOL("FirstRunThisInstall")) { oStr << "&show_start_location=TRUE"; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5cca87bd71..522adc05ce 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -773,6 +773,8 @@ bool idle_startup() LLPanelLogin::giveFocus(); + gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); + LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input } else @@ -2010,9 +2012,6 @@ bool idle_startup() LLStartUp::setStartupState( STATE_STARTED ); - // Mark that we have successfully logged in at least once - gSavedSettings.setBOOL("HadFirstSuccessfulLogin", TRUE); - // Unmute audio if desired and setup volumes. // Unmute audio if desired and setup volumes. // This is a not-uncommon crash site, so surround it with -- cgit v1.2.3 From 38376de2b4ba70ae8f88aad81832a0385b743fea Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 5 Feb 2010 18:25:05 +0200 Subject: implemented task EXT-1312 Navbar icons aren't vertically centered on buttons Overlay images have been moved up using new attribute implemented in EXT-3232 --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index b2ed51abf3..d484564e0d 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -44,6 +44,7 @@ direction="down" height="23" image_overlay="Arrow_Left_Off" + image_bottom_pad="1" layout="topleft" left="10" name="back_btn" @@ -55,6 +56,7 @@ direction="down" height="23" image_overlay="Arrow_Right_Off" + image_bottom_pad="1" layout="topleft" left_pad="0" name="forward_btn" -- cgit v1.2.3 From 790d72e781df91e4eb873187ac4ba5ea5be8d2c4 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 5 Feb 2010 14:35:43 +0200 Subject: Updated normal bug EXT-4772 - No new IM notification when in tabbed IM mode. --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 1eac90371d..34ab541a8e 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -515,8 +515,11 @@ BOOL LLIMFloater::getVisible() if(isChatMultiTab()) { LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance(); + + // Treat inactive floater as invisible. + bool is_active = im_container->getActiveFloater() == this; // getVisible() returns TRUE when Tabbed IM window is minimized. - return !im_container->isMinimized() && im_container->getVisible(); + return is_active && !im_container->isMinimized() && im_container->getVisible(); } else { -- cgit v1.2.3 From a46a029a70ead8e09810741abaf35c53adbd2763 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 5 Feb 2010 19:06:57 +0200 Subject: Fixed normal bug EXT-4397 (Call isn't ended after disabling voice). - Added customizing string with notification about ending call depending on voice availability. - Added closing of open VCP if voice is disabled. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 10 +++++++++- indra/newview/llimview.cpp | 7 +++++++ indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 4 ++-- indra/newview/skins/default/xui/en/strings.xml | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 53ae001923..d405c1bbc1 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -721,7 +721,15 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { - updateState(new_state); + // check is voice operational and if it doesn't work hide VCP (EXT-4397) + if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + { + updateState(new_state); + } + else + { + closeFloater(); + } } void LLCallFloater::updateState(const LLVoiceChannel::EState& new_state) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0c64c2b032..b6032f4dfa 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1610,6 +1610,13 @@ void LLOutgoingCallDialog::show(const LLSD& key) } childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + + // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, + // so no reconnection to nearby chat happens (EXT-4397) + bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); + childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); + childSetTextArg("nearby_P2P", "[RECONNECT_NEARBY]", reconnect_nearby); } std::string callee_name = mPayload["session_name"].asString(); diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index eb772cc0bd..cc9afe4474 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -89,7 +89,7 @@ No Answer. Please try again later. top="27" width="315" word_wrap="true"> - You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat. + You have been disconnected from [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] - [VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat. + [VOICE_CHANNEL_NAME] has ended the call. [RECONNECT_NEARBY] Connected Voice not available at your current location Disconnected from in-world Voice Chat + You will now be reconnected to Nearby Voice Chat '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS]. '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS]. Take Linden dollars (L$) from you -- cgit v1.2.3 From 95147c4529f6effcd1ed0a1d427f8ddeb033670d Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 5 Feb 2010 19:15:12 +0200 Subject: Implemented critical task (EXT-4703) Add maturity icons to the Viewer 2 toolbar. - Added maturity icons to location bar. - Added getting font used in LLLineEditor. --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 105 +++++++++++++++++++-- indra/newview/lllocationinputctrl.h | 15 ++- .../default/xui/en/widgets/location_input.xml | 9 ++ 3 files changed, 119 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 1b7ad6ab7e..66cc3c6724 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -176,7 +176,9 @@ private: static LLDefaultChildRegistry::Register r("location_input"); LLLocationInputCtrl::Params::Params() -: add_landmark_image_enabled("add_landmark_image_enabled"), +: icon_maturity_general("icon_maturity_general"), + icon_maturity_adult("icon_maturity_adult"), + add_landmark_image_enabled("add_landmark_image_enabled"), add_landmark_image_disabled("add_landmark_image_disabled"), add_landmark_image_hover("add_landmark_image_hover"), add_landmark_image_selected("add_landmark_image_selected"), @@ -185,6 +187,7 @@ LLLocationInputCtrl::Params::Params() add_landmark_button("add_landmark_button"), for_sale_button("for_sale_button"), info_button("info_button"), + maturity_icon("maturity_icon"), voice_icon("voice_icon"), fly_icon("fly_icon"), push_icon("push_icon"), @@ -204,7 +207,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mForSaleBtn(NULL), mInfoBtn(NULL), mLandmarkImageOn(NULL), - mLandmarkImageOff(NULL) + mLandmarkImageOff(NULL), + mIconMaturityGeneral(NULL), + mIconMaturityAdult(NULL) { // Lets replace default LLLineEditor with LLLocationLineEditor // to make needed escaping while copying and cutting url @@ -264,7 +269,20 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mAddLandmarkBtn = LLUICtrlFactory::create(al_params); enableAddLandmarkButton(true); addChild(mAddLandmarkBtn); - + + if (p.icon_maturity_general()) + { + mIconMaturityGeneral = p.icon_maturity_general; + } + if (p.icon_maturity_adult()) + { + mIconMaturityAdult = p.icon_maturity_adult; + } + + LLIconCtrl::Params maturity_icon = p.maturity_icon; + mMaturityIcon = LLUICtrlFactory::create(maturity_icon); + addChild(mMaturityIcon); + LLButton::Params for_sale_button = p.for_sale_button; for_sale_button.tool_tip = LLTrans::getString("LocationCtrlForSaleTooltip"); for_sale_button.click_callback.function( @@ -522,6 +540,25 @@ void LLLocationInputCtrl::draw() LLComboBox::draw(); } +void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLComboBox::reshape(width, height, called_from_parent); + + // Setting cursor to 0 to show the left edge of the text. See EXT-4967. + mTextEntry->setCursor(0); + if (mTextEntry->hasSelection()) + { + // Deselecting because selection position is changed together with + // cursor position change. + mTextEntry->deselect(); + } + + if (isHumanReadableLocationVisible) + { + positionMaturityIcon(); + } +} + void LLLocationInputCtrl::onInfoButtonClicked() { LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); @@ -672,6 +709,34 @@ void LLLocationInputCtrl::refreshLocation() // store human-readable location to compare it in changeLocationPresentation() mHumanReadableLocation = location_name; setText(location_name); + isHumanReadableLocationVisible = true; + + // Updating maturity rating icon. + LLViewerRegion* region = gAgent.getRegion(); + if (!region) + return; + + U8 sim_access = region->getSimAccess(); + switch(sim_access) + { + case SIM_ACCESS_PG: + mMaturityIcon->setValue(mIconMaturityGeneral->getName()); + mMaturityIcon->setVisible(TRUE); + break; + + case SIM_ACCESS_ADULT: + mMaturityIcon->setValue(mIconMaturityAdult->getName()); + mMaturityIcon->setVisible(TRUE); + break; + + default: + mMaturityIcon->setVisible(FALSE); + } + + if (mMaturityIcon->getVisible()) + { + positionMaturityIcon(); + } } // returns new right edge @@ -692,7 +757,7 @@ void LLLocationInputCtrl::refreshParcelIcons() { // Our "cursor" moving right to left S32 x = mAddLandmarkBtn->getRect().mLeft; - + static LLUICachedControl show_properties("NavBarShowParcelProperties", false); if (show_properties) { @@ -762,7 +827,7 @@ void LLLocationInputCtrl::refreshParcelIcons() } mDamageText->setVisible(false); } - + S32 left_pad, right_pad; mTextEntry->getTextPadding(&left_pad, &right_pad); right_pad = mTextEntry->getRect().mRight - x; @@ -785,6 +850,25 @@ void LLLocationInputCtrl::refreshHealth() } } +void LLLocationInputCtrl::positionMaturityIcon() +{ + const LLFontGL* font = mTextEntry->getFont(); + if (!font) + return; + + S32 left_pad, right_pad; + mTextEntry->getTextPadding(&left_pad, &right_pad); + + // Calculate the right edge of rendered text + a whitespace. + left_pad = left_pad + font->getWidth(mTextEntry->getText()) + font->getWidth(" "); + + LLRect rect = mMaturityIcon->getRect(); + mMaturityIcon->setRect(rect.setOriginAndSize(left_pad, rect.mBottom, rect.getWidth(), rect.getHeight())); + + // Hide icon if it text area is not width enough to display it, show otherwise. + mMaturityIcon->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad); +} + void LLLocationInputCtrl::rebuildLocationHistory(std::string filter) { LLLocationHistory::location_list_t filtered_items; @@ -885,16 +969,23 @@ void LLLocationInputCtrl::updateWidgetlayout() void LLLocationInputCtrl::changeLocationPresentation() { + if (!mTextEntry) + return; + //change location presentation only if user does not select/past anything and //human-readable region name is being displayed std::string text = mTextEntry->getText(); LLStringUtil::trim(text); - if(mTextEntry && !mTextEntry->hasSelection() && text == mHumanReadableLocation ) + if(!mTextEntry->hasSelection() && text == mHumanReadableLocation) { //needs unescaped one mTextEntry->setText(LLAgentUI::buildSLURL(false)); mTextEntry->selectAll(); - } + + mMaturityIcon->setVisible(FALSE); + + isHumanReadableLocationVisible = false; + } } void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata) diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index a830b33f6f..caa62daa1b 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -63,7 +63,9 @@ public: struct Params : public LLInitParam::Block { - Optional add_landmark_image_enabled, + Optional icon_maturity_general, + icon_maturity_adult, + add_landmark_image_enabled, add_landmark_image_disabled, add_landmark_image_hover, add_landmark_image_selected; @@ -72,7 +74,8 @@ public: Optional add_landmark_button, for_sale_button, info_button; - Optional voice_icon, + Optional maturity_icon, + voice_icon, fly_icon, push_icon, build_icon, @@ -89,6 +92,7 @@ public: /*virtual*/ void onFocusReceived(); /*virtual*/ void onFocusLost(); /*virtual*/ void draw(); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); //======================================================================== // LLUICtrl interface @@ -131,6 +135,7 @@ private: void refreshParcelIcons(); // Refresh the value in the health percentage text field void refreshHealth(); + void positionMaturityIcon(); void rebuildLocationHistory(std::string filter = ""); bool findTeleportItemsByTitle(const LLTeleportHistoryItem& item, const std::string& filter); @@ -160,7 +165,8 @@ private: LLButton* mInfoBtn; S32 mIconHPad; // pad between all icons S32 mAddLandmarkHPad; // pad to left of landmark star - + + LLIconCtrl* mMaturityIcon; LLIconCtrl* mParcelIcon[ICON_COUNT]; LLTextBox* mDamageText; @@ -172,11 +178,14 @@ private: boost::signals2::connection mLocationHistoryConnection; LLUIImage* mLandmarkImageOn; LLUIImage* mLandmarkImageOff; + LLUIImage* mIconMaturityGeneral; + LLUIImage* mIconMaturityAdult; std::string mAddLandmarkTooltip; std::string mEditLandmarkTooltip; // this field holds a human-readable form of the location string, it is needed to be able to compare copy-pated value and real location std::string mHumanReadableLocation; + bool isHumanReadableLocationVisible; }; #endif diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 626135642b..1d61447e31 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -4,6 +4,8 @@ Currently that doesn't work because LLUIImage::getWidth/getHeight() return 1 for the images. --> + Date: Fri, 5 Feb 2010 10:09:51 -0800 Subject: EXT-4237 Fixed ShowStartLocation behavior. Now the show don't show behavior is always dependent on the ShowStartLocation pref. ShowStartLocation defaults to off, but is automatically turned on after first successful login. Reviewed by Richard. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llpanellogin.cpp | 6 ++---- indra/newview/llstartup.cpp | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 62197406b6..abf72e4473 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8399,7 +8399,7 @@ Type Boolean Value - 1 + 0 ShowTangentBasis diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index af9e791223..2d5246c409 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -675,8 +675,7 @@ void LLPanelLogin::refreshLocation( bool force_visible ) { // Don't show on first run after install // Otherwise ShowStartLocation defaults to true. - show_start = gSavedSettings.getBOOL("ShowStartLocation") - && !gSavedSettings.getBOOL("FirstRunThisInstall"); + show_start = gSavedSettings.getBOOL("ShowStartLocation"); } sInstance->childSetVisible("start_location_combo", show_start); @@ -846,8 +845,7 @@ void LLPanelLogin::loadLoginPage() { oStr << "&auto_login=TRUE"; } - if (gSavedSettings.getBOOL("ShowStartLocation") - && !gSavedSettings.getBOOL("FirstRunThisInstall")) + if (gSavedSettings.getBOOL("ShowStartLocation")) { oStr << "&show_start_location=TRUE"; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 522adc05ce..dd1ab9ca29 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1700,6 +1700,10 @@ bool idle_startup() << " kbps" << LL_ENDL; gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f); } + + // Set the show start location to true, now that the user has logged + // on with this install. + gSavedSettings.setBOOL("ShowStartLocation", TRUE); } // We're successfully logged in. -- cgit v1.2.3 From 3856dcbbf36e0c8d1d278e9a7603a151580ccff1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 5 Feb 2010 18:29:20 +0000 Subject: trivial comment fixes. --- indra/newview/lllocationinputctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 66cc3c6724..ff713d74ad 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -972,8 +972,8 @@ void LLLocationInputCtrl::changeLocationPresentation() if (!mTextEntry) return; - //change location presentation only if user does not select/past anything and - //human-readable region name is being displayed + //change location presentation only if user does not select/paste anything and + //human-readable region name is being displayed std::string text = mTextEntry->getText(); LLStringUtil::trim(text); if(!mTextEntry->hasSelection() && text == mHumanReadableLocation) -- cgit v1.2.3