diff options
-rw-r--r-- | indra/llui/lllineeditor.h | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 8 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llcallfloater.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 7 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 109 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.h | 15 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/location_input.xml | 9 |
14 files changed, 161 insertions, 28 deletions
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index a06a317f76..f275dfc45a 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -207,6 +207,8 @@ public: const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor.get(); } const LLColor4& getTentativeFgColor() const { return mTentativeFgColor.get(); } + const LLFontGL* getFont() const { return mGLFont; } + void setIgnoreArrowKeys(BOOL b) { mIgnoreArrowKeys = b; } void setIgnoreTab(BOOL b) { mIgnoreTab = b; } void setPassDelete(BOOL b) { mPassDelete = b; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c7300fcee2..923ba44906 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2817,16 +2817,16 @@ <key>Value</key> <integer>0</integer> </map> - <key>HadFirstSuccessfulLogin</key> + <key>FirstRunThisInstall</key> <map> <key>Comment</key> - <string>Specifies whether you have successfully logged in at least once before</string> + <string>Specifies that you have not run the viewer since you installed the latest update</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>FirstSelectedDisabledPopups</key> <map> @@ -8399,7 +8399,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>ShowTangentBasis</key> <map> 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/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/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 { 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/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 1b7ad6ab7e..ff713d74ad 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -176,7 +176,9 @@ private: static LLDefaultChildRegistry::Register<LLLocationInputCtrl> 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<LLButton>(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<LLIconCtrl>(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<bool> 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() { - //change location presentation only if user does not select/past anything and - //human-readable region name is being displayed + if (!mTextEntry) + return; + + //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 && !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<Params, LLComboBox::Params> { - Optional<LLUIImage*> add_landmark_image_enabled, + Optional<LLUIImage*> 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<LLButton::Params> add_landmark_button, for_sale_button, info_button; - Optional<LLIconCtrl::Params> voice_icon, + Optional<LLIconCtrl::Params> 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/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index df9002facc..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("HadFirstSuccessfulLogin"); + 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("HadFirstSuccessfulLogin")) + if (gSavedSettings.getBOOL("ShowStartLocation")) { oStr << "&show_start_location=TRUE"; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a402dfc3d1..37c8d94d5e 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 @@ -1698,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. @@ -2006,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 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] </text> <text font="SansSerifLarge" @@ -100,7 +100,7 @@ No Answer. Please try again later. top="27" width="315" word_wrap="true"> - [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] </text> <text font="SansSerif" 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" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index d6db451286..a5dc14c69d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -251,6 +251,7 @@ <string name="connected">Connected</string> <string name="unavailable">Voice not available at your current location</string> <string name="hang_up">Disconnected from in-world Voice Chat</string> + <string name="reconnect_nearby">You will now be reconnected to Nearby Voice Chat</string> <string name="ScriptQuestionCautionChatGranted">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS].</string> <string name="ScriptQuestionCautionChatDenied">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS].</string> <string name="ScriptTakeMoney">Take Linden dollars (L$) from you</string> 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. --> <location_input font="SansSerifSmall" + icon_maturity_general="Parcel_PG_Light" + icon_maturity_adult="Parcel_R_Light" add_landmark_image_enabled="Favorite_Star_Active" add_landmark_image_disabled="Favorite_Star_Off" add_landmark_image_hover="Favorite_Star_Over" @@ -41,6 +43,13 @@ scale_image="false" top="19" left="-3" /> + <maturity_icon + name="maturity_icon" + width="18" + height="16" + top="20" + follows="left|top" + /> <for_sale_button name="for_sale_btn" image_unselected="Parcel_ForSale_Light" |