From 244418e6b2f4647d09995492f52180a0d3824cd2 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 7 Apr 2010 13:38:21 +0300 Subject: Fixed critical bug EXT-1655 ([BSI] Always flying after pressing "Stand" to stand up from an object) - moved restoring the flying of the agent before calling the mAutoPilotFinishedCallback, to allow finished callback to change it. - fixed LLVOAvatar::sitOnObject() to set mIsSitting = TRUE before stoping the autopilot, like it was in 1.23 version. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/185/ --- indra/newview/llagent.cpp | 10 +++++----- indra/newview/llvoavatar.cpp | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c5d7f6f118..d9d95f1cd6 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2296,6 +2296,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } + // If the user cancelled, don't change the fly state + if (!user_cancel) + { + setFlying(mAutoPilotFlyOnStop); + } //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { @@ -2303,11 +2308,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } mLeaderID = LLUUID::null; - // If the user cancelled, don't change the fly state - if (!user_cancel) - { - setFlying(mAutoPilotFlyOnStop); - } setControlFlags(AGENT_CONTROL_STOP); if (user_cancel && !mAutoPilotBehaviorName.empty()) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f5e83ed025..16eb877b1d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5619,6 +5619,8 @@ void LLVOAvatar::sitDown(BOOL bSitting) //----------------------------------------------------------------------------- void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) { + sitDown(TRUE); + if (isSelf()) { // Might be first sit @@ -5651,7 +5653,6 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot); gPipeline.markMoved(mDrawable, TRUE); - sitDown(TRUE); mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject mRoot.setPosition(getPosition()); mRoot.updateWorldMatrixChildren(); -- cgit v1.2.3 From a89a15a9e9f409828146db90984ad728dbaf028b Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Tue, 13 Apr 2010 20:43:12 +0100 Subject: Supplementary fix for EXT-6663 TOS Screen logic for enabling agreement checkbox is questionable If the "alive" check on the ToS page returns before the browser plugin has loaded the Loading page, the checkbox never gets enabled, so postpone the check until the Loading page is up. --- indra/newview/llfloatertos.cpp | 38 ++++++++++++++++---------------------- indra/newview/llfloatertos.h | 2 -- 2 files changed, 16 insertions(+), 24 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 3db9587797..104827f4a3 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -144,9 +144,6 @@ BOOL LLFloaterTOS::postBuild() // Don't use the start_url parameter for this browser instance -- it may finish loading before we get to add our observer. // Store the URL separately and navigate here instead. web_browser->navigateTo( getString( "loading_url" ) ); - - gResponsePtr = LLIamHere::build( this ); - LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); } return TRUE; @@ -163,10 +160,19 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) if ( alive ) { // navigate to the "real" page - loadIfNeeded(); + if(!mRealNavigateBegun && mSiteAlive) + { + LLMediaCtrl* web_browser = getChild("tos_html"); + if(web_browser) + { + mRealNavigateBegun = true; + web_browser->navigateTo( getString( "real_url" ) ); + } + } } else { + LL_INFOS("TOS") << "ToS page: ToS page unavailable!" << LL_ENDL; // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads) // but if the page is unavailable, we need to do this now LLCheckBoxCtrl* tos_agreement = getChild("agree_chk"); @@ -175,22 +181,8 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) } } -void LLFloaterTOS::loadIfNeeded() -{ - if(!mRealNavigateBegun && mSiteAlive) - { - LLMediaCtrl* web_browser = getChild("tos_html"); - if(web_browser) - { - mRealNavigateBegun = true; - web_browser->navigateTo( getString( "real_url" ) ); - } - } -} - LLFloaterTOS::~LLFloaterTOS() { - // tell the responder we're not here anymore if ( gResponsePtr ) gResponsePtr->setParent( 0 ); @@ -215,7 +207,7 @@ void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata ) void LLFloaterTOS::onContinue( void* userdata ) { LLFloaterTOS* self = (LLFloaterTOS*) userdata; - llinfos << "User agrees with TOS." << llendl; + LL_INFOS("TOS") << "User agrees with TOS." << LL_ENDL; if(self->mReplyPumpName != "") { @@ -229,7 +221,7 @@ void LLFloaterTOS::onContinue( void* userdata ) void LLFloaterTOS::onCancel( void* userdata ) { LLFloaterTOS* self = (LLFloaterTOS*) userdata; - llinfos << "User disagrees with TOS." << llendl; + LL_INFOS("TOS") << "User disagrees with TOS." << LL_ENDL; LLNotificationsUtil::add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); if(self->mReplyPumpName != "") @@ -254,11 +246,13 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev if(!mLoadingScreenLoaded) { mLoadingScreenLoaded = true; - loadIfNeeded(); + + gResponsePtr = LLIamHere::build( this ); + LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); } else if(mRealNavigateBegun) { - llinfos << "NAVIGATE COMPLETE" << llendl; + LL_INFOS("TOS") << "TOS: NAVIGATE COMPLETE" << LL_ENDL; // enable Agree to TOS radio button now that page has loaded LLCheckBoxCtrl * tos_agreement = getChild("agree_chk"); tos_agreement->setEnabled( true ); diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 6ea56408ee..d985ccbab0 100644 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -67,8 +67,6 @@ public: private: - void loadIfNeeded(); - std::string mMessage; int mWebBrowserWindowId; bool mLoadingScreenLoaded; -- cgit v1.2.3 From b15629c12f9371773998075f8b599527b73c3051 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Wed, 14 Apr 2010 15:22:51 -0400 Subject: This change originally to fix EXT-1655 has caused a failure to render sitting avatars (EXT-6835). We can probably find a "right" fix, but for now backing it out. Backed out changeset bd384ded4268 --- indra/newview/llagent.cpp | 10 +++++----- indra/newview/llvoavatar.cpp | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d9d95f1cd6..c5d7f6f118 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2296,11 +2296,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } - // If the user cancelled, don't change the fly state - if (!user_cancel) - { - setFlying(mAutoPilotFlyOnStop); - } //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { @@ -2308,6 +2303,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } mLeaderID = LLUUID::null; + // If the user cancelled, don't change the fly state + if (!user_cancel) + { + setFlying(mAutoPilotFlyOnStop); + } setControlFlags(AGENT_CONTROL_STOP); if (user_cancel && !mAutoPilotBehaviorName.empty()) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 16eb877b1d..f5e83ed025 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5619,8 +5619,6 @@ void LLVOAvatar::sitDown(BOOL bSitting) //----------------------------------------------------------------------------- void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) { - sitDown(TRUE); - if (isSelf()) { // Might be first sit @@ -5653,6 +5651,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot); gPipeline.markMoved(mDrawable, TRUE); + sitDown(TRUE); mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject mRoot.setPosition(getPosition()); mRoot.updateWorldMatrixChildren(); -- cgit v1.2.3 From 956041ff1b26edc7c90fb7dbdf0d6ebff82e48b8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 16 Apr 2010 12:04:41 +0300 Subject: Fixed major bug EXT-6851 (Moderator is unable to mute group voice chat participant after his reconnect) Reason: not proper condition to check is LLSpeaker is in voice channel (implemented for EXT-3944) Fix: Updated condition to check is speaker in voice channel state. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/242/ (transplanted from fb2af72d10231e04b2e79a7d487ea9e8559c14b8) --- indra/newview/llspeakers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 6cf9c6b95d..c04b5f98af 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -84,7 +84,7 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c bool LLSpeaker::isInVoiceChannel() { - return mStatus == LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; + return mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; } LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source) -- cgit v1.2.3 From 4e76ec36a0e5bead2c806a06b62845488abf8fa5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 14 Apr 2010 18:54:06 +0300 Subject: Fixed major bug EXT-6802 (Cancelling out of People Chooser while Searching Causes Crash) * Added check of Avatar Picker floater (People Chooser) against NULL in search callback. Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/236/ (transplanted from 480f67e4eac0223626ce549a20760e81c4bce5b1) --- indra/newview/llfloateravatarpicker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index a0b2de85f0..8b5d334c86 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -387,8 +387,8 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* LLFloaterAvatarPicker* floater = LLFloaterReg::findTypedInstance("avatar_picker"); - // these are not results from our last request - if (query_id != floater->mQueryID) + // floater is closed or these are not results from our last request + if (NULL == floater || query_id != floater->mQueryID) { return; } -- cgit v1.2.3 From bbe9b636b5f78e4fe6d1a4da56a4a66ffef407d1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 7 Apr 2010 18:33:05 +0300 Subject: Fixed major bug EXT-6661 (chat log paths reset back to default) * Removed unused InstantMessageLogFolder * Restored initializing logic of InstantMessageLogPath value from 1.23 to share setting between viewers. * Restored unused in 2.0 "LogChatTimestamp" and "LogChatIM" settings to avoid removing of them in 2.0 * Restored default value of the "Save local chat log" setting from 1.23 & replaced with 2.0 own setting (LogNearbyChat was: LogChat) Reviewed by Igor Borovkov & Kent Quirk at https://codereview.productengine.com/secondlife/r/193/ (transplanted from 43297b92c1bb7487dab6610bea61acac4c355878) --- .../newview/app_settings/settings_per_account.xml | 56 +++++++++++++++++----- indra/newview/llfloaterpreference.cpp | 6 +-- indra/newview/llnearbychat.cpp | 2 +- indra/newview/llstartup.cpp | 9 ++-- .../default/xui/en/panel_preferences_privacy.xml | 2 +- 5 files changed, 51 insertions(+), 24 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index af5fa4f388..3ce32a05b0 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -22,17 +22,6 @@ Value |TOKEN COPY BusyModeResponse| - InstantMessageLogFolder - - Comment - Top level folder to your log files. - Persist - 1 - Type - String - Value - - InstantMessageLogPath Comment @@ -55,10 +44,10 @@ Value 0 - LogChat + LogNearbyChat Comment - Log Chat + Log Nearby Chat messages to a file. Is used instead of LogChat but with the "1" default value. Persist 1 Type @@ -110,5 +99,46 @@ Value 1 + + + + + LogChat + + Comment + Log Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogChatIM + + Comment + Log Incoming Instant Messages with Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogChatTimestamp + + Comment + Log Timestamp of Chat + Persist + 1 + Type + Boolean + Value + 0 + + diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1172064b59..1491484ba9 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1093,10 +1093,8 @@ void LLFloaterPreference::onClickLogPath() { return; //Canceled! } - std::string chat_log_dir = picker.getDirName(); - std::string chat_log_top_folder= gDirUtilp->getBaseFileName(chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder); + + gSavedPerAccountSettings.setString("InstantMessageLogPath", picker.getDirName()); } void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index c8d5d782b7..5d72827a7a 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -207,7 +207,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) return; } - if (gSavedPerAccountSettings.getBOOL("LogChat")) + if (gSavedPerAccountSettings.getBOOL("LogNearbyChat")) { LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d4d6a74f0c..1c439d9d14 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -886,13 +886,12 @@ bool idle_startup() } //Default the path if one isn't set. - if (gSavedPerAccountSettings.getString("InstantMessageLogFolder").empty()) + // *NOTE: unable to check variable differ from "InstantMessageLogPath" because it was + // provided in pre 2.0 viewer. See EXT-6661 + if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty()) { gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir()); - std::string chat_log_dir = gDirUtilp->getChatLogsDir(); - std::string chat_log_top_folder=gDirUtilp->getBaseFileName(chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder); + gSavedPerAccountSettings.setString("InstantMessageLogPath", gDirUtilp->getChatLogsDir()); } else { diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 3d7f392404..fca9b4bca1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -84,7 +84,7 @@ Date: Fri, 16 Apr 2010 16:06:34 -0400 Subject: For EXT-6809 - search static VFS for all asset types --- indra/newview/llappviewer.cpp | 7 +++++++ indra/newview/llstartup.cpp | 2 +- indra/newview/llviewerassetstorage.cpp | 9 +++++---- indra/newview/llviewerassetstorage.h | 4 ++-- 4 files changed, 15 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f19a33301a..7895cee4ec 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3238,6 +3238,13 @@ bool LLAppViewer::initCache() else { LLVFile::initClass(); + + llinfos << "Static VFS listing" << llendl; + gStaticVFS->listFiles(); + + llinfos << "regular VFS listing" << llendl; + gVFS->listFiles(); + return true; } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d4d6a74f0c..0eae134983 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -561,7 +561,7 @@ bool idle_startup() gXferManager->setUseAckThrottling(TRUE); gXferManager->setAckThrottleBPS(xfer_throttle_bps); } - gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS); + gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS, gStaticVFS); F32 dropPercent = gSavedSettings.getF32("PacketDropPercentage"); diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index bb49804aff..c3a6b7111b 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -41,15 +41,16 @@ #include "llagent.h" LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host) - : LLAssetStorage(msg, xfer, vfs, upstream_host) + LLVFS *vfs, LLVFS *static_vfs, + const LLHost &upstream_host) + : LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host) { } LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs) - : LLAssetStorage(msg, xfer, vfs) + LLVFS *vfs, LLVFS *static_vfs) + : LLAssetStorage(msg, xfer, vfs, static_vfs) { } diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index 512b590a1b..8e7ea3471d 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -42,10 +42,10 @@ class LLViewerAssetStorage : public LLAssetStorage { public: LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host); + LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host); LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs); + LLVFS *vfs, LLVFS *static_vfs); using LLAssetStorage::storeAssetData; virtual void storeAssetData( -- cgit v1.2.3 From a16195fb81d7f4c7a5dd60f91d067bbdcac0f44d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 19 Apr 2010 15:50:45 +0300 Subject: Fixed normal bug EXT-6864 (Resident-related menu items are enabled/displayed for PSTN bridge callers) * Disabled all currently processed menu items related to interaction with a resident for Avaline callers. * Added enable callback for View Profile menu item to disable it for Avaline callers. * Disabled menu items related to text chat. Full list is: - View Profile - Add Friend - IM - Call - Share - Pay - Block Text - Moderate Options: -- Allow Text chat DEV notes: To process moderation options separate "on_enable handler" was created for group moderate actions. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/261/ --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 57 +++++++++++++++------- indra/newview/llparticipantlist.h | 1 + .../skins/default/xui/en/menu_participant_list.xml | 11 +++-- 3 files changed, 47 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 53f92f7ad1..c3748ca81d 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -643,6 +643,7 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2)); enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2)); + enable_registrar.add("ParticipantList.EnableItem.Moderate", boost::bind(&LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem, this, _2)); enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI @@ -667,7 +668,7 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const if (uuids.size() == 0) return; - const LLUUID speaker_id = mUUIDs.front(); + const LLUUID& speaker_id = mUUIDs.front(); BOOL is_muted = isMuted(speaker_id); if (is_muted) @@ -801,28 +802,18 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); + const LLUUID& participant_id = mUUIDs.front(); + + // For now non of "can_view_profile" action and menu actions listed below except "can_block" + // can be performed for Avaline callers. + bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id); + if (!is_participant_avatar && "can_block" != item) return false; + if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item || "can_pay" == item) { return mUUIDs.front() != gAgentID; } - else if (item == "can_allow_text_chat") - { - return isGroupModerator(); - } - else if ("can_moderate_voice" == item) - { - if (isGroupModerator()) - { - LLPointer speakerp = mParent.mSpeakerMgr->findSpeaker(mUUIDs.front()); - if (speakerp.notNull()) - { - // not in voice participants can not be moderated - return speakerp->isInVoiceChannel(); - } - } - return false; - } else if (item == std::string("can_add")) { // We can add friends if: @@ -855,6 +846,36 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& return true; } +/* +Processed menu items with such parameters: + can_allow_text_chat + can_moderate_voice +*/ +bool LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem(const LLSD& userdata) +{ + // only group moderators can perform actions related to this "enable callback" + if (!isGroupModerator()) return false; + + const LLUUID& participant_id = mUUIDs.front(); + LLPointer speakerp = mParent.mSpeakerMgr->findSpeaker(participant_id); + + // not in voice participants can not be moderated + bool speaker_in_voice = speakerp.notNull() && speakerp->isInVoiceChannel(); + + const std::string& item = userdata.asString(); + + if ("can_moderate_voice" == item) + { + return speaker_in_voice; + } + + // For now non of menu actions except "can_moderate_voice" can be performed for Avaline callers. + bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id); + if (!is_participant_avatar) return false; + + return true; +} + bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 9e5a2cbc1f..bbef8baaac 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -158,6 +158,7 @@ class LLParticipantList LLParticipantList& mParent; private: bool enableContextMenuItem(const LLSD& userdata); + bool enableModerateContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata); void sortParticipantList(const LLSD& userdata); diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 59c7f4ed85..2515b60868 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -30,6 +30,9 @@ name="View Profile"> + -- cgit v1.2.3 From a94ec45cb18f262e9cb9277960c450d84479757b Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 19 Apr 2010 16:06:23 +0300 Subject: Fixed normal bug EXT-6896 (String changes to default help text in Friends, Nearby and Recent lists) * Updated default help text in Friends, Nearby and Recent lists according to requirements in the ticket. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/259/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_people.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 8131b75b70..43175c8509 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -13,10 +13,10 @@ width="333"> + value="No recent people. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." /> + value="No one nearby. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." /> @@ -264,8 +264,8 @@ top="10" width="293" wrap="true"> - To add friends try [secondlife:///app/search/people global search] or use right-click on a Resident to add them as a friend. -If you're looking for people to hang out with, [secondlife:///app/worldmap try the Map]. + Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. +Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. Date: Mon, 19 Apr 2010 16:20:11 +0300 Subject: Fixed windows EOLs. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 43175c8509..7330eded4c 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -264,7 +264,7 @@ top="10" width="293" wrap="true"> - Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. + Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. -- cgit v1.2.3 From d57e8ecc7e119ca6930499ee270f438fc5ec415a Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 19 Apr 2010 17:21:16 +0300 Subject: fixed EXT-6848 Avoid creation of dummy objects in LLOnlineStatusToast and LLPanelGenericTip classes. * decoupled tip toast panel related logic from class LLTast; * moved documentation comment of LLPanelGenericTip constructor from .cpp to .h file; * corrected name attribute in panel_generic_tip.xml; reviewed by Mike Antipov and Vadim Savchuk at https://codereview.productengine.com/secondlife/r/230/ --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 6 +- indra/newview/llnotificationtiphandler.cpp | 5 +- indra/newview/llpanelgenerictip.cpp | 9 +-- indra/newview/llpanelgenerictip.h | 14 ++++- indra/newview/llpaneltiptoast.cpp | 69 ++++++++++++++++++++++ indra/newview/llpaneltiptoast.h | 57 ++++++++++++++++++ indra/newview/lltoast.cpp | 29 +++------ indra/newview/lltoast.h | 5 +- .../skins/default/xui/en/panel_generic_tip.xml | 2 +- 9 files changed, 159 insertions(+), 37 deletions(-) create mode 100644 indra/newview/llpaneltiptoast.cpp create mode 100644 indra/newview/llpaneltiptoast.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4158899446..efb16d1e42 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -303,6 +303,7 @@ set(viewer_SOURCE_FILES llpanelcontents.cpp llpaneleditwearable.cpp llpanelface.cpp + llpanelgenerictip.cpp llpanelgroup.cpp llpanelgroupgeneral.cpp llpanelgroupinvite.cpp @@ -342,6 +343,7 @@ set(viewer_SOURCE_FILES llpanelprofile.cpp llpanelprofileview.cpp llpanelteleporthistory.cpp + llpaneltiptoast.cpp llpanelvolume.cpp llpanelvolumepulldown.cpp llparcelselection.cpp @@ -437,7 +439,6 @@ set(viewer_SOURCE_FILES lltracker.cpp lltransientdockablefloater.cpp lltransientfloatermgr.cpp - llpanelgenerictip.cpp lluilistener.cpp lluploaddialog.cpp llurl.cpp @@ -802,6 +803,7 @@ set(viewer_HEADER_FILES llpanelcontents.h llpaneleditwearable.h llpanelface.h + llpanelgenerictip.h llpanelgroup.h llpanelgroupgeneral.h llpanelgroupinvite.h @@ -841,6 +843,7 @@ set(viewer_HEADER_FILES llpanelprofile.h llpanelprofileview.h llpanelteleporthistory.h + llpaneltiptoast.h llpanelvolume.h llpanelvolumepulldown.h llparcelselection.h @@ -939,7 +942,6 @@ set(viewer_HEADER_FILES lltracker.h lltransientdockablefloater.h lltransientfloatermgr.h - llpanelgenerictip.h lluiconstants.h lluilistener.h lluploaddialog.h diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 407de79c89..e528f871af 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -41,10 +41,11 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llnotificationmanager.h" +#include "llpaneltiptoast.h" using namespace LLNotificationsUI; -class LLOnlineStatusToast : public LLToastPanel +class LLOnlineStatusToast : public LLPanelTipToast { public: @@ -57,7 +58,7 @@ public: Params() {} }; - LLOnlineStatusToast(Params& p) : LLToastPanel(p.notification) + LLOnlineStatusToast(Params& p) : LLPanelTipToast(p.notification) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml"); diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp index 2e977faf09..e0658554a4 100644 --- a/indra/newview/llpanelgenerictip.cpp +++ b/indra/newview/llpanelgenerictip.cpp @@ -36,15 +36,10 @@ #include "llpanelgenerictip.h" #include "llnotifications.h" -/** - * Generic toast tip panel. - * This is particular case of toast panel that decoupled from LLToastNotifyPanel. - * From now LLToastNotifyPanel is deprecated and will be removed after all panel - * types are represented in separate classes. - */ + LLPanelGenericTip::LLPanelGenericTip( const LLNotificationPtr& notification) : - LLToastPanel(notification) + LLPanelTipToast(notification) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_generic_tip.xml"); diff --git a/indra/newview/llpanelgenerictip.h b/indra/newview/llpanelgenerictip.h index 0eb502498a..defa069727 100644 --- a/indra/newview/llpanelgenerictip.h +++ b/indra/newview/llpanelgenerictip.h @@ -34,14 +34,24 @@ #ifndef LL_PANELGENERICTIP_H #define LL_PANELGENERICTIP_H -#include "lltoastpanel.h" +#include "llpaneltiptoast.h" -class LLPanelGenericTip: public LLToastPanel +/** + * Represents tip toast panel that contains only one child element - message text. + * This panel can be used for different cases of tip notifications. + */ +class LLPanelGenericTip: public LLPanelTipToast { // disallow instantiation of this class private: // grant privileges to instantiate this class to LLToastPanel friend class LLToastPanel; + /** + * Generic toast tip panel. + * This is particular case of toast panel that decoupled from LLToastNotifyPanel. + * From now LLToastNotifyPanel is deprecated and will be removed after all panel + * types are represented in separate classes. + */ LLPanelGenericTip(const LLNotificationPtr& notification); }; #endif /* LL_PANELGENERICTIP_H */ diff --git a/indra/newview/llpaneltiptoast.cpp b/indra/newview/llpaneltiptoast.cpp new file mode 100644 index 0000000000..23367df41a --- /dev/null +++ b/indra/newview/llpaneltiptoast.cpp @@ -0,0 +1,69 @@ +/** + * @file llpaneltiptoast.cpp + * @brief Represents a base class of tip toast panels. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneltiptoast.h" + +BOOL LLPanelTipToast::postBuild() +{ + mMessageText= findChild("message"); + + if (mMessageText != NULL) + { + mMessageText->setMouseUpCallback(boost::bind(&LLPanelTipToast::onMessageTextClick,this)); + setMouseUpCallback(boost::bind(&LLPanelTipToast::onPanelClick, this, _2, _3, _4)); + } + else + { + llassert(!"Can't find child 'message' text box."); + return FALSE; + } + + return TRUE; +} + +void LLPanelTipToast::onMessageTextClick() +{ + // notify parent toast about need hide + LLSD info; + info["action"] = "hide_toast"; + notifyParent(info); +} + +void LLPanelTipToast::onPanelClick(S32 x, S32 y, MASK mask) +{ + if (!mMessageText->getRect().pointInRect(x, y)) + { + onMessageTextClick(); + } +} diff --git a/indra/newview/llpaneltiptoast.h b/indra/newview/llpaneltiptoast.h new file mode 100644 index 0000000000..e8678aa1d3 --- /dev/null +++ b/indra/newview/llpaneltiptoast.h @@ -0,0 +1,57 @@ +/** + * @file llpaneltiptoast.h + * @brief Represents a base class of tip toast panels. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "lltoastpanel.h" + +#ifndef LL_PANELTOASTTIP_H +#define LL_PANELTOASTTIP_H + +/** + * Base class for tip toast panels. + * + * Tip toast panels are required to have text message box named as 'message'. + */ +class LLPanelTipToast : public LLToastPanel +{ + LOG_CLASS(LLPanelTipToast); +public: + LLPanelTipToast(const LLNotificationPtr& notification): LLToastPanel(notification) {} + virtual BOOL postBuild(); +private: + void onMessageTextClick(); + void onPanelClick(S32 x, S32 y, MASK mask); + + LLUICtrl* mMessageText; +}; + +#endif /* LL_PANELTOASTTIP_H */ diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 911ed6ade7..22b12ee132 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -119,29 +119,9 @@ BOOL LLToast::postBuild() mTimer->stop(); } - if (mIsTip) - { - mTextEditor = mPanel->getChild("text_editor_box"); - - if (mTextEditor) - { - mTextEditor->setMouseUpCallback(boost::bind(&LLToast::hide,this)); - mPanel->setMouseUpCallback(boost::bind(&LLToast::handleTipToastClick, this, _2, _3, _4)); - } - } - return TRUE; } -//-------------------------------------------------------------------------- -void LLToast::handleTipToastClick(S32 x, S32 y, MASK mask) -{ - if (!mTextEditor->getRect().pointInRect(x, y)) - { - hide(); - } -} - //-------------------------------------------------------------------------- void LLToast::setHideButtonEnabled(bool enabled) { @@ -421,4 +401,13 @@ bool LLToast::isNotificationValid() //-------------------------------------------------------------------------- +S32 LLToast::notifyParent(const LLSD& info) +{ + if (info.has("action") && "hide_toast" == info["action"].asString()) + { + hide(); + return 1; + } + return LLModalDialog::notifyParent(info); +} diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index bd07ff9fb1..4a213580da 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -190,14 +190,14 @@ public: boost::signals2::connection setMouseEnterCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseEnterSignal.connect(cb); }; boost::signals2::connection setMouseLeaveCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseLeaveSignal.connect(cb); }; + virtual S32 notifyParent(const LLSD& info); + private: void onToastMouseEnter(); void onToastMouseLeave(); - void handleTipToastClick(S32 x, S32 y, MASK mask); - void expire(); LLUUID mNotificationID; @@ -213,7 +213,6 @@ private: LLPanel* mPanel; LLButton* mHideBtn; - LLTextEditor* mTextEditor; LLColor4 mBgColor; bool mCanFade; diff --git a/indra/newview/skins/default/xui/en/panel_generic_tip.xml b/indra/newview/skins/default/xui/en/panel_generic_tip.xml index 453ed7c7a6..eea92895f5 100644 --- a/indra/newview/skins/default/xui/en/panel_generic_tip.xml +++ b/indra/newview/skins/default/xui/en/panel_generic_tip.xml @@ -3,7 +3,7 @@ height="40" layout="topleft" left="0" - name="panel_system_tip" + name="panel_generic_tip" top="0" width="305"> Date: Mon, 19 Apr 2010 17:26:14 +0300 Subject: Fixed normal bug EXT-6899 (String changes to default and null results Groups List help text) * Updated help texts in Groups List according to requirements in the ticket. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/260/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_people.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 7330eded4c..8a4a28e188 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -35,10 +35,10 @@ --> + value="Didn't find what you're looking for? Try [secondlife:///app/search/groups Search]." /> + value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." /> Date: Mon, 19 Apr 2010 17:56:09 +0300 Subject: Fixed bug EXT-6842 ([I18N] Date format in Profile - mm/dd/yyyy needs to be: yyyy/mm/dd for Japanese). - Made avatar registration date localizeable. - Specified localization templates for English, Japanese and German. Reviewed by Mike: https://jira.secondlife.com/browse/EXT-6842 --HG-- branch : product-engine --- indra/newview/llavatarpropertiesprocessor.cpp | 5 +++- indra/newview/llavatarpropertiesprocessor.h | 2 +- indra/newview/lldateutil.cpp | 35 ++++++++++++++++++-------- indra/newview/lldateutil.h | 23 +++++++++++++++++ indra/newview/llinspectavatar.cpp | 7 +++++- indra/newview/llpanelavatar.cpp | 7 +++++- indra/newview/skins/default/xui/de/strings.xml | 3 +++ indra/newview/skins/default/xui/en/strings.xml | 4 +++ indra/newview/skins/default/xui/ja/strings.xml | 3 +++ 9 files changed, 74 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 33e5046f50..c7e788f345 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -37,6 +37,7 @@ // Viewer includes #include "llagent.h" #include "llagentpicksinfo.h" +#include "lldateutil.h" #include "llviewergenericmessage.h" // Linden library includes @@ -246,6 +247,7 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_ void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**) { LLAvatarData avatar_data; + std::string birth_date; msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, avatar_data.agent_id); msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AvatarID, avatar_data.avatar_id); @@ -254,11 +256,12 @@ void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg->getUUIDFast( _PREHASH_PropertiesData, _PREHASH_PartnerID, avatar_data.partner_id); msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_AboutText, avatar_data.about_text); msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_FLAboutText, avatar_data.fl_about_text); - msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_BornOn, avatar_data.born_on); + msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_BornOn, birth_date); msg->getString( _PREHASH_PropertiesData, _PREHASH_ProfileURL, avatar_data.profile_url); msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_Flags, avatar_data.flags); + LLDateUtil::dateFromPDTString(avatar_data.born_on, birth_date); avatar_data.caption_index = 0; S32 charter_member_size = 0; diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 716c1b8065..b9e8bfd0ab 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -67,7 +67,7 @@ struct LLAvatarData LLUUID partner_id; std::string about_text; std::string fl_about_text; - std::string born_on; + LLDate born_on; std::string profile_url; U8 caption_index; std::string caption_text; diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp index abb2fdeb9a..3e71ecdfba 100644 --- a/indra/newview/lldateutil.cpp +++ b/indra/newview/lldateutil.cpp @@ -59,19 +59,22 @@ static S32 days_from_month(S32 year, S32 month) } } -std::string LLDateUtil::ageFromDate(const std::string& date_string, - const LLDate& now) +bool LLDateUtil::dateFromPDTString(LLDate& date, const std::string& str) +{ + S32 month, day, year; + S32 matched = sscanf(str.c_str(), "%d/%d/%d", &month, &day, &year); + if (matched != 3) return false; + date.fromYMDHMS(year, month, day); + F64 secs_since_epoch = date.secondsSinceEpoch(); + // Correct for the fact that specified date is in Pacific time, == UTC - 8 + secs_since_epoch += 8.0 * 60.0 * 60.0; + date.secondsSinceEpoch(secs_since_epoch); + return true; +} + +std::string LLDateUtil::ageFromDate(const LLDate& born_date, const LLDate& now) { S32 born_month, born_day, born_year; - S32 matched = sscanf(date_string.c_str(), "%d/%d/%d", &born_month, &born_day, &born_year); - if (matched != 3) return "???"; - LLDate born_date; - born_date.fromYMDHMS(born_year, born_month, born_day); - F64 born_date_secs_since_epoch = born_date.secondsSinceEpoch(); - // Correct for the fact that account creation dates are in Pacific time, - // == UTC - 8 - born_date_secs_since_epoch += 8.0 * 60.0 * 60.0; - born_date.secondsSinceEpoch(born_date_secs_since_epoch); // explode out to month/day/year again born_date.split(&born_year, &born_month, &born_day); @@ -155,6 +158,16 @@ std::string LLDateUtil::ageFromDate(const std::string& date_string, return LLTrans::getString("TodayOld"); } +std::string LLDateUtil::ageFromDate(const std::string& date_string, const LLDate& now) +{ + LLDate born_date; + + if (!dateFromPDTString(born_date, date_string)) + return "???"; + + return ageFromDate(born_date, now); +} + std::string LLDateUtil::ageFromDate(const std::string& date_string) { return ageFromDate(date_string, LLDate::now()); diff --git a/indra/newview/lldateutil.h b/indra/newview/lldateutil.h index 041be07f12..a0df21022e 100644 --- a/indra/newview/lldateutil.h +++ b/indra/newview/lldateutil.h @@ -36,6 +36,29 @@ class LLDate; namespace LLDateUtil { + /** + * Convert a date provided by the server into seconds since the Epoch. + * + * @param[out] date Number of seconds since 01/01/1970 UTC. + * @param[in] str Date string (MM/DD/YYYY) in PDT time zone. + * + * @return true on success, false on parse error + */ + bool dateFromPDTString(LLDate& date, const std::string& str); + + /** + * Get human-readable avatar age. + * + * Used for avatar inspectors and profiles. + * + * @param born_date Date an avatar was born on. + * @param now Current date. + * + * @return human-readable localized string like "1 year, 2 months", + * or "???" on error. + */ + std::string ageFromDate(const LLDate& born_date, const LLDate& now); + // Convert a date provided by the server (MM/DD/YYYY) into a localized, // human-readable age (1 year, 2 months) using translation strings. // Pass LLDate::now() for now. diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 94ea236757..e48bb77bda 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -58,6 +58,7 @@ #include "llfloaterreg.h" #include "llmenubutton.h" #include "lltooltip.h" // positionViewNearMouse() +#include "lltrans.h" #include "lluictrl.h" #include "llavatariconctrl.h" @@ -380,7 +381,11 @@ void LLInspectAvatar::requestUpdate() void LLInspectAvatar::processAvatarData(LLAvatarData* data) { LLStringUtil::format_map_t args; - args["[BORN_ON]"] = data->born_on; + { + std::string birth_date = LLTrans::getString("AvatarBirthDateFormat"); + LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) data->born_on.secondsSinceEpoch())); + args["[BORN_ON]"] = birth_date; + } args["[AGE]"] = LLDateUtil::ageFromDate(data->born_on, LLDate::now()); args["[SL_PROFILE]"] = data->about_text; args["[RW_PROFILE"] = data->fl_about_text; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index a0ba2f739b..dd632ccefe 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -51,6 +51,7 @@ #include "llnotificationsutil.h" #include "llvoiceclient.h" #include "llnamebox.h" +#include "lltrans.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLDropTarget @@ -645,7 +646,11 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) LLAvatarIconIDCache::getInstance()->remove(avatar_data->avatar_id); LLStringUtil::format_map_t args; - args["[REG_DATE]"] = avatar_data->born_on; + { + std::string birth_date = LLTrans::getString("AvatarBirthDateFormat"); + LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) avatar_data->born_on.secondsSinceEpoch())); + args["[REG_DATE]"] = birth_date; + } args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now()); std::string register_date = getString("RegisterDateFormat", args); childSetValue("register_date", register_date ); diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index fd05f02ceb..b3aeb8cd68 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -3577,4 +3577,7 @@ Missbrauchsbericht Inhalt + + [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 813f59ff89..df4e4153f4 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3103,4 +3103,8 @@ Abuse Report New Script New Folder Contents + + + [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] + diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index b9df82adcd..a54d96061f 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -3577,4 +3577,7 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ コンテンツ + + [year,datetime,slt]/[mthnum,datetime,slt]/[day,datetime,slt] + -- cgit v1.2.3 From 7f2ca84f5f5cf1bc10e756ef1873b20155bd1974 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 19 Apr 2010 18:37:36 +0300 Subject: Unhardcoded snapshot upload price in my fix for EXT-6606 (Set As Profile Pic uploads and charges user L$10 without confirmation). Reviewed by Richard: https://codereview.productengine.com/secondlife/r/217/ --HG-- branch : product-engine --- indra/newview/llfloatersnapshot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index a6a8194685..e994a18d9b 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -988,7 +988,7 @@ void profile_pic_upload_callback(const LLUUID& uuid) void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic) { LLSD args; - args["AMOUNT"] = "10"; // *TODO: there's currently no way to avoid hardcoding the upload price + args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); LLNotificationsUtil::add("UploadConfirmation", args, LLSD(), boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic)); } -- cgit v1.2.3 From 300651e2c80b1d4fc3498758f65a1d0e8eb59934 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 19 Apr 2010 19:19:29 +0300 Subject: Fixed bug EXT-6852 ([STRING IN EN] Media settings : Owner, Group, and Anyone). Added names to nameless textboxes. Trivial change, not reviewed. --HG-- branch : product-engine --- .../skins/default/xui/en/panel_media_settings_permissions.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml index b5c2371510..c5f44cd049 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml @@ -42,10 +42,11 @@ + name="owner_label"> Owner @@ -79,10 +80,11 @@ + name="group_label"> Group: @@ -126,10 +128,11 @@ + name="anyone_label"> Anyone -- cgit v1.2.3 From aa5e494e0cf1242dcd35725576667ab1a935363a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 19 Apr 2010 13:52:59 -0400 Subject: For EXT-6809 - fixes suggested by Nyx code review --- indra/newview/llappviewer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c23ccfa4fb..d6f2440ede 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - llinfos << "Static VFS listing" << llendl; - gStaticVFS->listFiles(); + //llinfos << "Static VFS listing" << llendl; + //gStaticVFS->listFiles(); - llinfos << "regular VFS listing" << llendl; - gVFS->listFiles(); + //llinfos << "regular VFS listing" << llendl; + //gVFS->listFiles(); return true; } -- cgit v1.2.3 From 3afda3d1c020647604748ef5001526ca3fcf0759 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 19 Apr 2010 17:01:47 -0700 Subject: EXT-6921 - Media Volume Changes changes system volume on WinXP reviewed by Callum --- indra/newview/llpanelnearbymedia.cpp | 5 ----- indra/newview/llpanelprimmediacontrols.cpp | 19 +++++-------------- indra/newview/llviewermedia.h | 6 ------ 3 files changed, 5 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 79786c06d9..6411cd802d 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -1062,15 +1062,10 @@ void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool mStopCtrl->setVisible(playing); mPlayCtrl->setVisible(!playing); mPauseCtrl->setVisible(false); -#ifdef PER_MEDIA_VOLUME mVolumeSliderCtrl->setVisible(true); mMuteCtrl->setVisible(true); mMuteBtn->setValue(muted); mVolumeSlider->setValue(volume); -#else - mVolumeSliderCtrl->setVisible(false); - mMuteCtrl->setVisible(false); -#endif mZoomCtrl->setVisible(include_zoom && !is_zoomed); mUnzoomCtrl->setVisible(include_zoom && is_zoomed); mStopCtrl->setEnabled(true); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 5209d50755..0648d99685 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -350,6 +350,11 @@ void LLPanelPrimMediaControls::updateShape() mHomeCtrl->setEnabled(has_focus && can_navigate); LLPluginClassMediaOwner::EMediaStatus result = ((media_impl != NULL) && media_impl->hasMedia()) ? media_plugin->getStatus() : LLPluginClassMediaOwner::MEDIA_NONE; + mVolumeCtrl->setVisible(has_focus); + mVolumeCtrl->setEnabled(has_focus); + mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); + mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); + if(media_plugin && media_plugin->pluginSupportsMediaTime()) { mReloadCtrl->setEnabled(false); @@ -462,14 +467,6 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setVisible(FALSE); mSkipBackCtrl->setEnabled(FALSE); -#ifdef PER_MEDIA_VOLUME - // these should be pulled up above the pluginSupportsMediaTime - // if check once we always have PER_MEDIA_VOLUME turned on - mVolumeCtrl->setVisible(has_focus); - mVolumeCtrl->setEnabled(has_focus); - mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); - mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); - if(media_impl->getVolume() <= 0.0) { mMuteBtn->setToggleState(true); @@ -478,12 +475,6 @@ void LLPanelPrimMediaControls::updateShape() { mMuteBtn->setToggleState(false); } -#else - mVolumeCtrl->setVisible(FALSE); - mVolumeSliderCtrl->setVisible(FALSE); - mVolumeCtrl->setEnabled(FALSE); - mVolumeSliderCtrl->setEnabled(FALSE); -#endif if (mMediaPanelScroll) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index bc6716697e..e829d7a5b4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -46,12 +46,6 @@ #include "llurl.h" - -#if defined(LL_DARWIN) || (LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD ) -#define PER_MEDIA_VOLUME -#endif - - class LLViewerMediaImpl; class LLUUID; class LLViewerMediaTexture; -- cgit v1.2.3 From c3fa45282f5bdb0cb7a3fcd680154e88cafde4bb Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 19 Apr 2010 17:19:35 -0700 Subject: Fix for EXT-6925 (Mime type association missing for video/* wildcard). In mime_types*.xml, added sections to the mimetype entries for video/* and audio/* which point to the quicktime plugin on Mac/Windows and gstreamer on Linux. Reviewed by Callum at http://codereview.lindenlab.com/1252035 --- indra/newview/skins/default/xui/en/mime_types.xml | 6 ++++++ indra/newview/skins/default/xui/en/mime_types_linux.xml | 6 ++++++ indra/newview/skins/default/xui/en/mime_types_mac.xml | 6 ++++++ 3 files changed, 18 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 76c0d027f3..8e1e5ff062 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -138,6 +138,9 @@ audio + + media_plugin_quicktime +