From 36b8d3f9c92c78809f5f9b4f391ab7851ea36f4d Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 27 Feb 2015 09:33:23 -0500 Subject: [PATCH 01/67] autoresponse settings are per account, fix sending items to muteds for real, thanks Deltek --- indra/newview/llmutelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 4fb306317..2551b3216 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -500,7 +500,7 @@ BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason) { BOOL removed = FALSE; - if (isMuted(agent_id) && !(reason == AR_INVENTORY && gSavedSettings.getBOOL("AutoresponseMutedItem"))) + if (isMuted(agent_id) && !(reason == AR_INVENTORY && gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"))) { LLMute automute(agent_id, LLStringUtil::null, LLMute::AGENT); removed = TRUE; From e8dd91f98d8d50cd160b53a035f81817bd59d9fc Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 4 Mar 2015 22:27:27 -0500 Subject: [PATCH 02/67] Fix a potential bug in LLSpeakerMgr wherein speakers would not be added to group chat participant lists in LOTE Also clean up (static) translated constants for group_member_statuses --- indra/newview/llgroupmgr.cpp | 23 ++++++++++++++++------- indra/newview/llpanelgrouproles.cpp | 8 +++----- indra/newview/llspeakers.cpp | 3 ++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 524763f98..d6a85512a 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -964,6 +964,17 @@ static void formatDateString(std::string &date_string) } } +const std::string& localized_online() +{ + static const std::string online(LLTrans::getString("group_member_status_online")); + return online; +} +const std::string& localized_unknown() +{ + static const std::string unknown(LLTrans::getString("group_member_status_unknown")); + return unknown; +} + // static void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) { @@ -1015,13 +1026,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) { if (online_status == "Online") { - static std::string localized_online(LLTrans::getString("group_member_status_online")); - online_status = localized_online; + online_status = localized_online(); } else if (online_status == "unknown") { - static std::string localized_unknown(LLTrans::getString("group_member_status_unknown")); - online_status = localized_unknown; + online_status = localized_unknown(); } else { @@ -2214,7 +2223,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) for ( ; member_iter_start != member_iter_end; ++member_iter_start) { // Reset defaults - online_status = LLTrans::getString("group_member_status_unknown"); + online_status = localized_unknown(); title = titles[0].asString(); contribution = 0; member_powers = default_powers; @@ -2227,9 +2236,9 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) { online_status = member_info["last_login"].asString(); if (online_status == "Online") - online_status = LLTrans::getString("group_member_status_online"); + online_status = localized_online(); else if (online_status == "unknown") - online_status = LLTrans::getString("group_member_status_unknown"); + online_status = localized_unknown(); else formatDateString(online_status); } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 2575b53d2..b180c7b70 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -51,7 +51,6 @@ #include "lltabcontainer.h" #include "lltextbox.h" #include "lltexteditor.h" -#include "lltrans.h" #include "llviewertexturelist.h" #include "llviewerwindow.h" #include "llfocusmgr.h" @@ -1670,10 +1669,9 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) bool is_online_status_string(const std::string& status) { - static const std::string online(LLTrans::getString("group_member_status_online")); - if (status == online) return true; - static const std::string unknown(LLTrans::getString("group_member_status_unknown")); - return status == unknown; + const std::string& localized_online(); + const std::string& localized_unknown(); + return status == localized_online() || status == localized_unknown(); } void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index c1a497e39..58f801d73 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -580,7 +580,8 @@ void LLSpeakerMgr::updateSpeakerList() LLGroupMemberData* member = member_it->second; LLUUID id = member_it->first; // Add only members who are online and not already in the list - if ((member->getOnlineStatus() == "Online") && (mSpeakers.find(id) == mSpeakers.end())) + const std::string& localized_online(); + if ((member->getOnlineStatus() == localized_online()) && (mSpeakers.find(id) == mSpeakers.end())) { LLPointer speakerp = setSpeaker(id, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); speakerp->mIsModerator = ((member->getAgentPowers() & GP_SESSION_MODERATOR) == GP_SESSION_MODERATOR); From 2d690dba45cb7cb53375758ef4f560f4f0a2343e Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 7 Mar 2015 08:26:43 -0500 Subject: [PATCH 03/67] Fix mispackaging for linux32 Thanks to Beware Hax for pointing out the flaw --- indra/newview/viewer_manifest.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 24ba7707f..60065d7d1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -776,10 +776,6 @@ class LinuxManifest(ViewerManifest): self.path("../plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") self.end_prefix("bin/llplugin") - # llcommon - if not self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so"): - print "Skipping llcommon.so (assuming llcommon was linked statically)" - self.path("featuretable_linux.txt") def wrapper_name(self): @@ -846,6 +842,10 @@ class Linux_i686Manifest(LinuxManifest): def construct(self): super(Linux_i686Manifest, self).construct() + # llcommon + if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"): + print "Skipping llcommon.so (assuming llcommon was linked statically)" + if (not self.standalone()) and self.prefix(src="../packages/lib/release", alt_build="../packages/libraries/i686-linux/lib/release", dst="lib"): self.path("libapr-1.so*") self.path("libaprutil-1.so*") @@ -900,6 +900,10 @@ class Linux_x86_64Manifest(LinuxManifest): def construct(self): super(Linux_x86_64Manifest, self).construct() + # llcommon + if not self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so"): + print "Skipping llcommon.so (assuming llcommon was linked statically)" + if (not self.standalone()) and self.prefix(src="../packages/lib/release", alt_build="../packages/libraries/x86_64-linux/lib/release", dst="lib64"): self.path("libapr-1.so*") self.path("libaprutil-1.so*") From 0f7036cb1660c2874ae59b9eb118a2a3b881cd11 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 8 Mar 2015 09:08:41 -0400 Subject: [PATCH 04/67] Restore Cinder's codesigning Support --- indra/newview/viewer_manifest.py | 79 +++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 60065d7d1..1230617e3 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -412,6 +412,21 @@ class WindowsManifest(ViewerManifest): mask = "%s_%s_Setup.exe" return mask % (self.channel_oneword(), '-'.join(self.args['version'])) + def sign_command(self, *argv): + return [ + "signtool.exe", + "sign", "/v", + "/f",os.environ['VIEWER_SIGNING_KEY'], + "/p",os.environ['VIEWER_SIGNING_PASSWORD'], + "/d","%s" % self.channel(), + "/du",os.environ['VIEWER_SIGNING_URL'], + "/t","http://timestamp.comodoca.com/authenticode" + ] + list(argv) + + + def sign(self, *argv): + subprocess.check_call(self.sign_command(*argv)) + def package_finish(self): # a standard map of strings for replacing in the templates substitution_strings = { @@ -458,6 +473,15 @@ class WindowsManifest(ViewerManifest): installer_file = installer_file % substitution_strings substitution_strings['installer_file'] = installer_file + # Sign the binaries + if 'VIEWER_SIGNING_PASSWORD' in os.environ: + try: + self.sign(self.args['configuration']+"\\"+self.final_exe()) + self.sign(self.args['configuration']+"\\SLPlugin.exe") + self.sign(self.args['configuration']+"\\SLVoice.exe") + except Exception, e: + print "Couldn't sign binaries. Tried to sign %s" % self.args['configuration'] + "\\" + self.final_exe() + "\nException: %s" % e + tempfile = "secondlife_setup_tmp.nsi" # the following replaces strings in the nsi template # it also does python-style % substitution @@ -485,14 +509,24 @@ class WindowsManifest(ViewerManifest): NSIS_path = os.environ['ProgramFiles(X86)'] + '\\NSIS\\Unicode\\makensis.exe' self.run_command([proper_windows_path(NSIS_path),self.dst_path_of(tempfile)]) # self.remove(self.dst_path_of(tempfile)) - # If we're on a build machine, sign the code using our Authenticode certificate. JC - sign_py = os.path.expandvars("{SIGN_PY}") - if sign_py == "" or sign_py == "{SIGN_PY}": - sign_py = 'C:\\buildscripts\\code-signing\\sign.py' - if os.path.exists(sign_py): - self.run_command('python ' + sign_py + ' ' + self.dst_path_of(installer_file)) + + # Sign the installer + # We're probably not on a build machine, but maybe we want to sign + if 'VIEWER_SIGNING_PASSWORD' in os.environ: + try: + self.sign(self.args['configuration'] + "\\" + substitution_strings['installer_file']) + except Exception, e: + print "Couldn't sign windows installer. Tried to sign %s" % self.args['configuration'] + "\\" + substitution_strings['installer_file'] + "\nException: %s" % e else: - print "Skipping code signing,", sign_py, "does not exist" + # If we're on a build machine, sign the code using our Authenticode certificate. JC + sign_py = os.path.expandvars("{SIGN_PY}") + if sign_py == "" or sign_py == "{SIGN_PY}": + sign_py = 'C:\\buildscripts\\code-signing\\sign.py' + if os.path.exists(sign_py): + self.run_command('python ' + sign_py + ' ' + self.dst_path_of(installer_file)) + else: + print "Skipping code signing,", sign_py, "does not exist" + self.created_path(self.dst_path_of(installer_file)) self.package_file = installer_file @@ -640,6 +674,37 @@ class DarwinManifest(ViewerManifest): if not self.default_channel_for_brand(): channel_standin = self.channel() + # Sign the app if we have a key. + try: + signing_password = os.environ['VIEWER_SIGNING_PASSWORD'] + except KeyError: + print "Skipping code signing" + pass + else: + home_path = os.environ['HOME'] + + self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % (signing_password, home_path)) + signed=False + sign_attempts=3 + sign_retry_wait=15 + while (not signed) and (sign_attempts > 0): + try: + sign_attempts-=1; + self.run_command('codesign --verbose --force --timestamp --keychain "%(home_path)s/Library/Keychains/viewer.keychain" -s %(identity)r -f %(bundle)r' % { + 'home_path' : home_path, + 'identity': os.environ['VIEWER_SIGNING_KEY'], + 'bundle': self.get_dst_prefix() + }) + signed=True + except: + if sign_attempts: + print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait + time.sleep(sign_retry_wait) + sign_retry_wait*=2 + else: + print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" + raise + imagename=self.installer_prefix() + '_'.join(self.args['version']) # See Ambroff's Hack comment further down if you want to create new bundles and dmg From 9c23439b857ab69c5f9311cda2852c760c3270a9 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 8 Mar 2015 09:09:33 -0400 Subject: [PATCH 05/67] Fix Issue 1849 by adding the missing keys from upstream --- indra/newview/app_settings/keys.ini | 13 +++++++++++++ indra/newview/app_settings/keysZQSD.ini | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/indra/newview/app_settings/keys.ini b/indra/newview/app_settings/keys.ini index c21bf9ef8..50594923b 100644 --- a/indra/newview/app_settings/keys.ini +++ b/indra/newview/app_settings/keys.ini @@ -312,11 +312,24 @@ SITTING PAD_DIVIDE NONE start_gesture # these are for passing controls when sitting on vehicles SITTING A SHIFT slide_left SITTING D SHIFT slide_right +SITTING W SHIFT move_forward_sitting +SITTING S SHIFT move_backward_sitting +SITTING E SHIFT spin_over_sitting +SITTING C SHIFT spin_under_sitting + SITTING LEFT SHIFT slide_left SITTING RIGHT SHIFT slide_right +SITTING UP SHIFT move_forward_sitting +SITTING DOWN SHIFT move_backward_sitting +SITTING PGUP SHIFT spin_over_sitting +SITTING PGDN SHIFT spin_under_sitting SITTING PAD_LEFT SHIFT slide_left SITTING PAD_RIGHT SHIFT slide_right +SITTING PAD_UP SHIFT move_forward_sitting +SITTING PAD_DOWN SHIFT move_backward_sitting +SITTING PAD_PGUP SHIFT spin_over_sitting +SITTING PAD_PGDN SHIFT spin_under_sitting SITTING PAD_ENTER SHIFT start_chat SITTING PAD_DIVIDE SHIFT start_gesture diff --git a/indra/newview/app_settings/keysZQSD.ini b/indra/newview/app_settings/keysZQSD.ini index 72704408f..fd3d4805b 100644 --- a/indra/newview/app_settings/keysZQSD.ini +++ b/indra/newview/app_settings/keysZQSD.ini @@ -312,11 +312,24 @@ SITTING PAD_DIVIDE NONE start_gesture # these are for passing controls when sitting on vehicles SITTING Q SHIFT slide_left SITTING D SHIFT slide_right +SITTING Z SHIFT move_forward_sitting +SITTING S SHIFT move_backward_sitting +SITTING E SHIFT spin_over_sitting +SITTING C SHIFT spin_under_sitting + SITTING LEFT SHIFT slide_left SITTING RIGHT SHIFT slide_right +SITTING UP SHIFT move_forward_sitting +SITTING DOWN SHIFT move_backward_sitting +SITTING PGUP SHIFT spin_over_sitting +SITTING PGDN SHIFT spin_under_sitting SITTING PAD_LEFT SHIFT slide_left SITTING PAD_RIGHT SHIFT slide_right +SITTING PAD_UP SHIFT move_forward_sitting +SITTING PAD_DOWN SHIFT move_backward_sitting +SITTING PAD_PGUP SHIFT spin_over_sitting +SITTING PAD_PGDN SHIFT spin_under_sitting SITTING PAD_ENTER SHIFT start_chat SITTING PAD_DIVIDE SHIFT start_gesture From 585465d8c34fd9d165df3d92601b03b3d3ce28fc Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Mon, 9 Mar 2015 18:57:58 -0400 Subject: [PATCH 06/67] Patch Issue 1850: Graphical anomaly when searching inventory via creator --- indra/newview/llfolderviewitem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 3014bf180..8f07d243b 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -454,6 +454,9 @@ void LLFolderViewItem::filter( LLInventoryFilter& filter) setFiltered(passed_filter, filter.getCurrentGeneration()); mStringMatchOffset = filter.getStringMatchOffset(); + // If Creator is part of the filter, don't let it get highlighted if it matches + if (mSearchType & 4 && mStringMatchOffset >= mSearchable.length()-mSearchableLabelCreator.length()) + mStringMatchOffset = std::string::npos; filter.decrementFilterCount(); if (getRoot()->getDebugFilters()) From f168d6b60ac26cb0a047674ae1ea73664c7d6952 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 13 Mar 2015 16:27:43 -0400 Subject: [PATCH 07/67] Apply Aleric's fix to llsingleton.h to fix issues with AISync stuff Modified to diff with LL better. --- indra/llcommon/llsingleton.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index b1e17fc13..a73c9d06f 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -102,10 +102,10 @@ private: // stores pointer to singleton instance struct SingletonLifetimeManager { - SingletonLifetimeManager() + /*SingletonLifetimeManager() { construct(); - } + }*/ static void construct() { @@ -115,14 +115,14 @@ private: sData.mInitState = INITIALIZING; } - ~SingletonLifetimeManager() + /*~SingletonLifetimeManager() { SingletonData& sData(getData()); if (sData.mInitState != DELETED) { deleteSingleton(); } - } + }*/ }; public: @@ -178,33 +178,28 @@ public: static DERIVED_TYPE* getInstance() { - static SingletonLifetimeManager sLifeTimeMgr; + //static SingletonLifetimeManager sLifeTimeMgr; SingletonData& sData(getData()); switch (sData.mInitState) { - case UNINITIALIZED: - // should never be uninitialized at this point - llassert(false); - return NULL; case CONSTRUCTING: llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << LL_ENDL; return NULL; case INITIALIZING: - // go ahead and flag ourselves as initialized so we can be reentrant during initialization - sData.mInitState = INITIALIZED; - // initialize singleton after constructing it so that it can reference other singletons which in turn depend on it, - // thus breaking cyclic dependencies - sData.mInstance->initSingleton(); + llwarns << "Using singleton " << typeid(DERIVED_TYPE).name() << " during its own initialization, before its initialization completed!" << LL_ENDL; return sData.mInstance; case INITIALIZED: return sData.mInstance; case DELETED: llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << LL_ENDL; + case UNINITIALIZED: + // This must be the first time we get here. SingletonLifetimeManager::construct(); // same as first time construction - sData.mInitState = INITIALIZED; + // Singu note: LL sets the state to INITIALIZED here *already* - which avoids the warning below, but is clearly total bullshit. sData.mInstance->initSingleton(); + sData.mInitState = INITIALIZED; return sData.mInstance; } From be6ad2a919ffecb1ea69912b5e17d6d7c99d37d1 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Fri, 13 Mar 2015 22:16:07 -0400 Subject: [PATCH 08/67] Add Mouselook IFF from Alchemy! Also Assorted Code Cleanup and sync with Alchemy Debug Settings are AlchemyMouselookIFF and AlchemyMouselookIFFRange Look to see if an avatar is in a nearby region always when checking if they're an estate owner. --- .../newview/app_settings/settings_ascent.xml | 22 +++++ indra/newview/llfloateravatarlist.cpp | 47 ++------- indra/newview/llfloaterland.cpp | 3 +- indra/newview/llimview.cpp | 8 +- indra/newview/llinventorybridge.cpp | 58 ++++++----- indra/newview/llnetmap.cpp | 49 ++-------- indra/newview/llpanellogin.cpp | 18 ++-- indra/newview/llspeakers.cpp | 9 +- indra/newview/lltoolgun.cpp | 83 ++++++++++++---- indra/newview/lltoolgun.h | 3 + indra/newview/llvoavatar.cpp | 66 +++++++------ indra/newview/llworld.cpp | 96 ++++++++++++++----- indra/newview/llworld.h | 7 +- .../skins/default/xui/en-us/notifications.xml | 12 +++ 14 files changed, 282 insertions(+), 199 deletions(-) diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 41207d047..457aeb477 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -135,6 +135,28 @@ Value 0 + AlchemyMouselookIFF + + Comment + Display user that is currently focused upon by crosshair in mouselook + Persist + 1 + Type + Boolean + Value + 1 + + AlchemyMouselookIFFRange + + Comment + Range of IFF display + Persist + 1 + Type + F32 + Value + 380.0 + AlchemyRainbowEffects Comment diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 51f7728a7..5085aac4d 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -530,25 +530,22 @@ void LLFloaterAvatarList::updateAvatarList() } { - std::vector avatar_ids; - std::vector sorted_avatar_ids; - std::vector positions; - + LLWorld::pos_map_t avs; LLVector3d mypos = gAgent.getPositionGlobal(); static const LLCachedControl radar_range_radius("RadarRangeRadius", 0); - LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, radar_range_radius ? radar_range_radius : F32_MAX); + LLWorld::instance().getAvatars(&avs, mypos, radar_range_radius ? radar_range_radius : F32_MAX); static LLCachedControl announce(gSavedSettings, "RadarChatKeys"); std::queue announce_keys; - for (size_t i = 0, count = avatar_ids.size(); i < count; ++i) + for (LLWorld::pos_map_t::const_iterator i = avs.cbegin(), end = avs.cend(); i != end; ++i) { - const LLUUID& avid = avatar_ids[i]; + const LLUUID& avid = i->first; std::string name; static const LLCachedControl namesystem("RadarNameSystem"); if (!LLAvatarNameCache::getNSName(avid, name, namesystem)) continue; //prevent (Loading...) - LLVector3d position = positions[i]; + LLVector3d position = i->second; LLVOAvatar* avatarp = gObjectList.findAvatar(avid); if (avatarp) position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition()); @@ -653,7 +650,7 @@ void LLFloaterAvatarList::updateAvatarSorting() } } -bool mm_getMarkerColor(const LLUUID&, LLColor4&); +bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate); /** * Redraws the avatar list @@ -740,37 +737,7 @@ void LLFloaterAvatarList::refreshAvatarList() } // custom colors for certain types of avatars! - //Changed a bit so people can modify them in settings. And since they're colors, again it's possibly account-based. Starting to think I need a function just to determine that. - HgB - //name.color = gColors.getColor( "MapAvatar" ); - LLUUID estate_owner = LLUUID::null; - if (LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition())) - if (parent_estate->isAlive()) - estate_owner = parent_estate->getOwner(); - - //Lindens are always more Linden than your friend, make that take precedence - if (mm_getMarkerColor(av_id, color)) {} - else if (LLMuteList::getInstance()->isLinden(av_id)) - { - static const LLCachedControl ascent_linden_color("AscentLindenColor", LLColor4(0.f,0.f,1.f,1.f)); - color = ascent_linden_color; - } - //check if they are an estate owner at their current position - else if (estate_owner.notNull() && av_id == estate_owner) - { - static const LLCachedControl ascent_estate_owner_color("AscentEstateOwnerColor", LLColor4(1.f,0.6f,1.f,1.f)); - color = ascent_estate_owner_color; - } - //without these dots, SL would suck. - else if (LLAvatarActions::isFriend(av_id)) - { - static const LLCachedControl ascent_friend_color("AscentFriendColor", LLColor4(1.f,1.f,0.f,1.f)); - color = ascent_friend_color; - } - //big fat jerkface who is probably a jerk, display them as such. - else if (LLMuteList::getInstance()->isMuted(av_id)) - { - color = ascent_muted_color; - } + getCustomColor(av_id, color, LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition())); name.color = color*0.5f + unselected_color*0.5f; element.columns.add(name); } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 57e4c0f20..b9db1820d 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1574,8 +1574,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo LLVector3d mypos = gAgent.getPositionGlobal(); std::vector avatar_ids; - std::vector positions; - LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, F32_MAX); + LLWorld::instance().getAvatars(&avatar_ids, NULL, mypos, F32_MAX); for(S32 i = 0; i < rows; ++i) { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 31b562e31..71f2221ec 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -53,6 +53,7 @@ #include "llmutelist.h" #include "llspeakers.h" #include "llvoavatar.h" // For mIdleTimer reset +#include "llviewerobjectlist.h" #include "llviewerregion.h" // [RLVa:KB] - Checked: 2013-05-10 (RLVa-1.4.9) @@ -97,9 +98,10 @@ LLColor4 agent_chat_color(const LLUUID& id, const std::string& name, bool local_ static const LLCachedControl color_eo_chat("ColorEstateOwnerChat"); if (color_eo_chat) { - const LLViewerRegion* parent_estate = gAgent.getRegion(); - if (parent_estate && id == parent_estate->getOwner()) - return gSavedSettings.getColor4("AscentEstateOwnerColor"); + const LLViewerObject* obj = gObjectList.findObject(id); // Nearby? + if (const LLViewerRegion* parent_estate = obj ? obj->getRegion() : gAgent.getRegion()) + if (id == parent_estate->getOwner()) + return gSavedSettings.getColor4("AscentEstateOwnerColor"); } return local_chat ? gSavedSettings.getColor4("AgentChatColor") : gSavedSettings.getColor("IMChatColor"); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a5ababe30..2358bec4c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1520,46 +1520,42 @@ void LLItemBridge::restoreItem() } } -void LLItemBridge::restoreToWorld() +void restore_to_world(LLViewerInventoryItem* itemp, bool no_copy, bool response = true) { - //Similar functionality to the drag and drop rez logic - bool remove_from_inventory = false; + if (!response) return; + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("RezRestoreToWorld"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgentID); + msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); - LLViewerInventoryItem* itemp = static_cast(getItem()); - if (itemp) - { - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("RezRestoreToWorld"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_InventoryData); + itemp->packMessage(msg); + msg->sendReliable(gAgent.getRegion()->getHost()); - msg->nextBlockFast(_PREHASH_InventoryData); - itemp->packMessage(msg); - msg->sendReliable(gAgent.getRegion()->getHost()); - - //remove local inventory copy, sim will deal with permissions and removing the item - //from the actual inventory if its a no-copy etc - if(!itemp->getPermissions().allowCopyBy(gAgent.getID())) - { - remove_from_inventory = true; - } - - // Check if it's in the trash. (again similar to the normal rez logic) - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id)) - { - remove_from_inventory = true; - } - } - - if(remove_from_inventory) + //remove local inventory copy, sim will deal with permissions and removing the item + //from the actual inventory if it's a no-copy etc + // Check if it's in the trash. (again similar to the normal rez logic) + if (no_copy || gInventory.isObjectDescendentOf(itemp->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) { gInventory.deleteObject(itemp->getUUID()); gInventory.notifyObservers(); } } +void LLItemBridge::restoreToWorld() +{ + if (LLViewerInventoryItem* itemp = static_cast(getItem())) + { + //Similar functionality to the drag and drop rez logic + bool no_copy = !itemp->getPermissions().allowCopyBy(gAgentID); + if (no_copy && gHippoGridManager->getCurrentGrid()->isSecondLife()) + LLNotificationsUtil::add("RestoreToWorldConfirm", LLSD(), LLSD(), boost::bind(restore_to_world, itemp, true, !boost::bind(LLNotification::getSelectedOption, _1, _2))); + else + restore_to_world(itemp, no_copy); + } +} + void LLItemBridge::gotoItem() { LLInventoryObject *obj = getInventoryObject(); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index adacb2a79..838417b4c 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -76,7 +76,6 @@ // #include "lfsimfeaturehandler.h" #include "llfloateravatarlist.h" -#include "llmutelist.h" #include "llvoavatar.h" // @@ -558,10 +557,9 @@ void LLNetMap::draw() // [RLVa:KB] - Version: 1.23.4 | Alternate: Snowglobe-1.2.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b bool show_friends = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); // [/RLVa:KB] - uuid_vec_t avatar_ids; - std::vector positions; + LLWorld::pos_map_t positions; - LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal()); + LLWorld::getInstance()->getAvatars(&positions, gAgentCamera.getCameraPositionGlobal()); // Get the selected ids from radar now, as they are loop invariant uuid_vec_t gmSelected; @@ -570,57 +568,30 @@ void LLNetMap::draw() gmSelected = LLFloaterAvatarList::instance().getSelectedIDs(); // Draw avatars - for(U32 i=0; ifirst; static const LLCachedControl standard_color("MapAvatar",LLColor4(0.f,1.f,0.f,1.f)); LLColor4 color = standard_color; // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest. // just be careful to sort the avatar IDs along with the positions. -MG - pos_map = globalPosToView(positions[i]); - if (positions[i].mdV[VZ] == 0.f || positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z) + const LLVector3d& position = iter->second; + pos_map = globalPosToView(position); + if (position.mdV[VZ] == 0.f || position.mdV[VZ] == COARSEUPDATE_MAX_Z) { pos_map.mV[VZ] = 16000.f; } if (dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x, local_mouse_y)) < min_pick_dist) { - mClosestAgentsToCursor[uuid] = positions[i]; + mClosestAgentsToCursor[uuid] = position; static const LLCachedControl map_avatar_rollover_color(gSavedSettings, "ExodusMapRolloverColor", LLColor4::cyan); color = map_avatar_rollover_color; } else { - - if(LLMuteList::getInstance()->isMuted(uuid)) - { - static const LLCachedControl muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); - color = muted_color; - } - - LLViewerRegion* avatar_region = LLWorld::getInstance()->getRegionFromPosGlobal(positions[i]); - const LLUUID estate_owner = avatar_region ? avatar_region->getOwner() : LLUUID::null; - - // MOYMOD Minimap custom av colors. - if (mm_getMarkerColor(uuid, color)) {} - //Lindens are always more Linden than your friend, make that take precedence - else if (LLMuteList::getInstance()->isLinden(uuid)) - { - static const LLCachedControl linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); - color = linden_color; - } - //check if they are an estate owner at their current position - else if (estate_owner.notNull() && uuid == estate_owner) - { - static const LLCachedControl em_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); - color = em_color; - } - //without these dots, SL would suck. - else if (show_friends && LLAvatarActions::isFriend(uuid)) - { - static const LLCachedControl friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); - color = friend_color; - } + bool getCustomColorRLV(const LLUUID&, LLColor4&, LLViewerRegion*, bool name_restricted); + getCustomColorRLV(uuid, color, LLWorld::getInstance()->getRegionFromPosGlobal(position), show_friends); } LLWorldMapView::drawAvatar( diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 572a35145..0756a4c1e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -503,14 +503,14 @@ void LLPanelLogin::setFields(const std::string& firstname, // fill it with MAX_PASSWORD characters so we get a // nice row of asterixes. const std::string filler("123456789!123456"); - sInstance->childSetText("password_edit", filler); + sInstance->getChild("password_edit")->setValue(filler); sInstance->mIncomingPassword = filler; sInstance->mMungedPassword = password; } else { // this is a normal text password - sInstance->childSetText("password_edit", password); + sInstance->getChild("password_edit")->setValue(password); sInstance->mIncomingPassword = password; LLMD5 pass((unsigned char *)password.c_str()); char munged_password[MD5HEX_STR_SIZE]; @@ -533,7 +533,7 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus) LLComboBox* login_combo = sInstance->getChild("username_combo"); login_combo->setTextEntry(fullname); login_combo->resetTextDirty(); - //sInstance->childSetText("username_combo", fullname); + //sInstance->getChild("username_combo")->setValue(fullname); std::string grid = entry.getGrid(); //grid comes via LLSavedLoginEntry, which uses full grid names, not nicks @@ -544,13 +544,13 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus) if (entry.getPassword().empty()) { - sInstance->childSetText("password_edit", std::string("")); + sInstance->getChild("password_edit")->setValue(LLStringUtil::null); remember_pass_check->setValue(LLSD(false)); } else { const std::string filler("123456789!123456"); - sInstance->childSetText("password_edit", filler); + sInstance->getChild("password_edit")->setValue(filler); sInstance->mIncomingPassword = filler; sInstance->mMungedPassword = entry.getPassword(); remember_pass_check->setValue(LLSD(true)); @@ -902,10 +902,8 @@ void LLPanelLogin::refreshLoginPage() sInstance->updateGridCombo(); - sInstance->childSetVisible("create_new_account_text", - !gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()); - sInstance->childSetVisible("forgot_password_text", - !gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty()); + sInstance->getChildView("create_new_account_text")->setVisible(!gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()); + sInstance->getChildView("forgot_password_text")->setVisible(!gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty()); std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); if (!login_page.empty()) @@ -996,7 +994,7 @@ void LLPanelLogin::onLoginComboLostFocus(LLComboBox* combo_box) { if (combo_box->isTextDirty()) { - childSetText("password_edit", mIncomingPassword = mMungedPassword = LLStringUtil::null); + getChild("password_edit")->setValue(mIncomingPassword = mMungedPassword = LLStringUtil::null); combo_box->resetTextDirty(); } } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 58f801d73..c1b794500 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -42,6 +42,8 @@ #include "rlvhandler.h" +#include + extern AIHTTPTimeoutPolicy moderationResponder_timeout; const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); @@ -1041,11 +1043,10 @@ void LLLocalSpeakerMgr::updateSpeakerList() // pick up non-voice speakers in chat range uuid_vec_t avatar_ids; - std::vector positions; - LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS); - for(U32 i=0; igetAvatars(&avatar_ids, NULL, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS); + BOOST_FOREACH(const LLUUID& id, avatar_ids) { - setSpeaker(avatar_ids[i]); + setSpeaker(id); } // check if text only speakers have moved out of chat range diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 07629eefc..d4c5faba0 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -48,14 +48,19 @@ #include "llhudmanager.h" #include "lltoolmgr.h" #include "lltoolgrab.h" - +#include "lluiimage.h" // Linden library includes #include "llwindow.h" // setMouseClipping() +bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate); +#include "llavatarnamecache.h" +#include "llworld.h" + LLToolGun::LLToolGun( LLToolComposite* composite ) : LLTool( std::string("gun"), composite ), mIsSelected(FALSE) { + mCrosshairp = LLUI::getUIImage("UIImgCrosshairsUUID"); // - UI Caching } void LLToolGun::handleSelect() @@ -95,8 +100,8 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) { const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f; - F32 mouse_sensitivity = gSavedSettings.getF32("MouseSensitivity"); - mouse_sensitivity = clamp_rescale(mouse_sensitivity, 0.f, 15.f, 0.5f, 2.75f) * NOMINAL_MOUSE_SENSITIVITY; + static LLCachedControl mouse_sensitivity_setting(gSavedSettings, "MouseSensitivity"); + F32 mouse_sensitivity = clamp_rescale(mouse_sensitivity_setting, 0.f, 15.f, 0.5f, 2.75f) * NOMINAL_MOUSE_SENSITIVITY; // ...move the view with the mouse @@ -107,18 +112,21 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) if (dx != 0 || dy != 0) { // ...actually moved off center - if (gSavedSettings.getBOOL("InvertMouse")) + const F32 fov = LLViewerCamera::getInstance()->getView() / DEFAULT_FIELD_OF_VIEW; + static LLCachedControl invert_mouse(gSavedSettings, "InvertMouse"); + if (invert_mouse) { - gAgent.pitch(mouse_sensitivity * -dy); + gAgent.pitch(mouse_sensitivity * fov * -dy); } else { - gAgent.pitch(mouse_sensitivity * dy); + gAgent.pitch(mouse_sensitivity * fov * dy); } LLVector3 skyward = gAgent.getReferenceUpVector(); - gAgent.rotate(mouse_sensitivity * dx, skyward.mV[VX], skyward.mV[VY], skyward.mV[VZ]); + gAgent.rotate(mouse_sensitivity * fov * dx, skyward.mV[VX], skyward.mV[VY], skyward.mV[VZ]); - if (gSavedSettings.getBOOL("MouseSun")) + static LLCachedControl mouse_sun(gSavedSettings, "MouseSun"); + if (mouse_sun) { gSky.setSunDirection(LLViewerCamera::getInstance()->getAtAxis(), LLVector3(0.f, 0.f, 0.f)); gSky.setOverrideSun(TRUE); @@ -129,11 +137,11 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->hideCursor(); } - lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (mouselook)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << LL_ENDL; } else { - lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (not mouselook)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << LL_ENDL; } // HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden. @@ -144,14 +152,55 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) void LLToolGun::draw() { - static const LLCachedControl show("ShowCrosshairs"); - if (show) + static LLCachedControl show_crosshairs(gSavedSettings, "ShowCrosshairs"); + static LLCachedControl show_iff(gSavedSettings, "AlchemyMouselookIFF", true); + static LLCachedControl iff_range(gSavedSettings, "AlchemyMouselookIFFRange", 380.f); + if (show_crosshairs) { - LLUIImagePtr crosshair = LLUI::getUIImage("UIImgCrosshairsUUID"); + const S32 windowWidth = gViewerWindow->getWorldViewRectScaled().getWidth(); + const S32 windowHeight = gViewerWindow->getWorldViewRectScaled().getHeight(); static const LLCachedControl color("LiruCrosshairColor"); - crosshair->draw( - ( gViewerWindow->getWorldViewRectScaled().getWidth() - crosshair->getWidth() ) / 2, - ( gViewerWindow->getWorldViewRectScaled().getHeight() - crosshair->getHeight() ) / 2, - color); + LLColor4 targetColor = color; + targetColor.mV[VALPHA] = 0.5f; + if (show_iff) + { + LLVector3d myPosition = gAgentCamera.getCameraPositionGlobal(); + LLQuaternion myRotation = LLViewerCamera::getInstance()->getQuaternion(); + myRotation.set(-myRotation.mQ[VX], -myRotation.mQ[VY], -myRotation.mQ[VZ], myRotation.mQ[VW]); + + LLWorld::pos_map_t positions; + LLWorld& world(LLWorld::instance()); + world.getAvatars(&positions, gAgent.getPositionGlobal(), iff_range); + for (LLWorld::pos_map_t::const_iterator iter = positions.cbegin(), iter_end = positions.cend(); iter != iter_end; ++iter) + { + const LLUUID& id = iter->first; + const LLVector3d& targetPosition = iter->second; + if (id == gAgentID || targetPosition.isNull()) + { + continue; + } + + LLVector3d magicVector = (targetPosition - myPosition) * myRotation; + magicVector.setVec(-magicVector.mdV[VY], magicVector.mdV[VZ], magicVector.mdV[VX]); + if (magicVector.mdV[VX] > -0.75 && magicVector.mdV[VX] < 0.75 && magicVector.mdV[VZ] > 0.0 && magicVector.mdV[VY] > -1.5 && magicVector.mdV[VY] < 1.5) // Do not fuck with these, cheater. :( + { + LLAvatarName avatarName; + LLAvatarNameCache::get(id, &avatarName); + getCustomColor(id, targetColor, world.getRegionFromPosGlobal(targetPosition)); + targetColor.mV[VALPHA] = 0.5f; + LLFontGL::getFontSansSerifBold()->renderUTF8( + llformat("%s : %.2fm", avatarName.getNSName().c_str(), (targetPosition - myPosition).magVec()), + 0, (windowWidth / 2.f), (windowHeight / 2.f) - 25.f, targetColor, + LLFontGL::HCENTER, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::NO_SHADOW + ); + + break; + } + } + } + + mCrosshairp->draw( + (windowWidth - mCrosshairp->getWidth() ) / 2, + (windowHeight - mCrosshairp->getHeight() ) / 2, targetColor); } } diff --git a/indra/newview/lltoolgun.h b/indra/newview/lltoolgun.h index 4644e686b..e15a88f47 100644 --- a/indra/newview/lltoolgun.h +++ b/indra/newview/lltoolgun.h @@ -54,6 +54,9 @@ public: virtual BOOL clipMouseWhenDown() { return FALSE; } private: BOOL mIsSelected; + + // - UI Caching + LLUIImagePtr mCrosshairp; }; #endif diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 41c12b68c..c01938d70 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -909,48 +909,54 @@ const LLUUID SHClientTagMgr::getClientID(const LLVOAvatar* pAvatar) const } return tag.asUUID(); } +bool getColorFor(const LLUUID& id, LLViewerRegion* parent_estate, LLColor4& color, bool name_restricted = false) +{ + static const LLCachedControl ascent_linden_color("AscentLindenColor"); + static const LLCachedControl ascent_estate_owner_color("AscentEstateOwnerColor" ); + static const LLCachedControl ascent_friend_color("AscentFriendColor"); + static const LLCachedControl ascent_muted_color("AscentMutedColor"); + //Lindens are always more Linden than your friend, make that take precedence + if (LLMuteList::getInstance()->isLinden(id)) + color = ascent_linden_color; + //check if they are an estate owner at their current position + else if (parent_estate && parent_estate->isAlive() && id.notNull() && id == parent_estate->getOwner()) + color = ascent_estate_owner_color; + //without these dots, SL would suck. + else if (!name_restricted && LLAvatarTracker::instance().isBuddy(id)) + color = ascent_friend_color; + //big fat jerkface who is probably a jerk, display them as such. + else if (LLMuteList::getInstance()->isMuted(id)) + color = ascent_muted_color; + else + return false; + return true; +} bool mm_getMarkerColor(const LLUUID&, LLColor4&); +bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate) +{ + return mm_getMarkerColor(id, color) || getColorFor(id, parent_estate, color); +} +bool getCustomColorRLV(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate, bool name_restricted) +{ + return mm_getMarkerColor(id, color) || getColorFor(id, parent_estate, color, name_restricted); +} bool SHClientTagMgr::getClientColor(const LLVOAvatar* pAvatar, bool check_status, LLColor4& color) const { - if (mm_getMarkerColor(pAvatar->getID(), color)) return true; + const LLUUID& id(pAvatar->getID()); + if (mm_getMarkerColor(id, color)) return true; static const LLCachedControl ascent_use_status_colors("AscentUseStatusColors",true); static const LLCachedControl ascent_show_self_tag_color("AscentShowSelfTagColor"); static const LLCachedControl ascent_show_others_tag_color("AscentShowOthersTagColor"); - if(check_status && ascent_use_status_colors && !pAvatar->isSelf()) + if (check_status && ascent_use_status_colors && !pAvatar->isSelf()) { - LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(pAvatar->getPositionGlobal()); - if(LLMuteList::getInstance()->isLinden(pAvatar->getFullname())) - { - static const LLCachedControl ascent_linden_color( "AscentLindenColor" ); - color = ascent_linden_color.get(); - return true; - } - else if(pAvatar->getID().notNull() && parent_estate && parent_estate->isAlive() && pAvatar->getID() == parent_estate->getOwner()) - { - static const LLCachedControl ascent_estate_owner_color( "AscentEstateOwnerColor" ); - color = ascent_estate_owner_color.get(); - return true; - } - else if(LLAvatarTracker::instance().isBuddy(pAvatar->getID())) - { - static const LLCachedControl ascent_friend_color( "AscentFriendColor" ); - color = ascent_friend_color.get(); - return true; - } - else if(LLMuteList::getInstance()->isMuted(pAvatar->getID())) - { - static const LLCachedControl ascent_muted_color( "AscentMutedColor" ); - color = ascent_muted_color.get(); - return true; - } + getColorFor(id, pAvatar->getRegion(), color); } std::map::const_iterator it; LLSD tag; if( - ((pAvatar->isSelf() && ascent_show_self_tag_color) || - (!pAvatar->isSelf() && ascent_show_others_tag_color)) && - (it = mAvatarTags.find(pAvatar->getID()))!=mAvatarTags.end() && + (pAvatar->isSelf() ? ascent_show_self_tag_color : ascent_show_others_tag_color) && + (it = mAvatarTags.find(id))!=mAvatarTags.end() && (tag = it->second.get("color")).isDefined()) { color.setValue(tag); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index d83f6013c..7a6924188 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -142,6 +142,7 @@ void LLWorld::destroyClass() LLViewerRegion* region_to_delete = *region_it++; removeRegion(region_to_delete->getHost()); } + if(LLVOCache::hasInstance()) { LLVOCache::getInstance()->destroyClass() ; @@ -181,7 +182,8 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) if (host != old_host) { llwarns << "LLWorld::addRegion exists, but old host " << old_host - << " does not match new host " << host << llendl; + << " does not match new host " << host + << ", removing old region and creating new" << LL_ENDL; } if (!regionp->isAlive()) { @@ -207,7 +209,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) S32 y = (S32)(jindex/256); //MegaRegion // Aurora Sim llinfos << "Adding new region (" << x << ":" << y << ")" - << " on host: " << host << llendl; + << " on host: " << host << LL_ENDL; LLVector3d origin_global; @@ -321,12 +323,12 @@ void LLWorld::removeRegion(const LLHost &host) llwarns << "RegionDump: " << reg->getName() << " " << reg->getHost() << " " << reg->getOriginGlobal() - << llendl; + << LL_ENDL; } llwarns << "Agent position global " << gAgent.getPositionGlobal() << " agent " << gAgent.getPositionAgent() - << llendl; + << LL_ENDL; llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl; @@ -349,13 +351,13 @@ void LLWorld::removeRegion(const LLHost &host) mRegionRemovedSignal(regionp); + updateWaterObjects(); + //double check all objects of this region are removed. gObjectList.clearAllMapObjectsInRegion(regionp) ; //llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; - updateWaterObjects(); - - delete regionp; + delete regionp; // - Use after free fix? } @@ -698,7 +700,8 @@ void LLWorld::updateVisibilities() if (part) { LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); - if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->mBounds; + if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1])) { mCulledRegionList.erase(curiter); mVisibleRegionList.push_back(regionp); @@ -721,13 +724,11 @@ void LLWorld::updateVisibilities() if (part) { LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); - if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->mBounds; + if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1])) { regionp->calculateCameraDistance(); - if (!gNoRender) - { - regionp->getLand().updatePatchVisibilities(gAgent); - } + regionp->getLand().updatePatchVisibilities(gAgent); } else { @@ -910,7 +911,7 @@ void LLWorld::printPacketsLost() LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal(); llinfos << regionp->getHost() << ", range: " << range.length() - << " packets lost: " << cdp->getPacketsLost() << llendl; + << " packets lost: " << cdp->getPacketsLost() << LL_ENDL; } } } @@ -1358,8 +1359,9 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) if (!gAgent.getRegion()) return; - static const LLCachedControl connectToNeighbors(gSavedSettings, "AlchemyConnectToNeighbors"); - if (!connectToNeighbors && ((gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL) || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE))) + static LLCachedControl connectToNeighbors(gSavedSettings, "AlchemyConnectToNeighbors"); + if ((!connectToNeighbors) && ((gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL) + || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE))) return; // enable the appropriate circuit for this simulator and @@ -1428,7 +1430,7 @@ public: if (!regionp) { llwarns << "Got EstablishAgentCommunication for unknown region " - << sim << llendl; + << sim << LL_ENDL; return; } regionp->setSeedCapability(input["body"]["seed-capability"]); @@ -1441,7 +1443,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data) { LLHost host = mesgsys->getSender(); - //llinfos << "Disabling simulator with message from " << host << llendl; + //LL_INFOS() << "Disabling simulator with message from " << host << LL_ENDL; LLWorld::getInstance()->removeRegion(host); mesgsys->disableCircuit(host); @@ -1455,7 +1457,7 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data) if (!regionp) { llwarns << "Got region handshake for unknown region " - << host << llendl; + << host << LL_ENDL; return; } @@ -1539,7 +1541,7 @@ static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3 return region_origin + pos_local; } -void LLWorld::getAvatars(std::vector* avatar_ids, std::vector* positions, const LLVector3d& relative_to, F32 radius) const +void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positions, const LLVector3d& relative_to, F32 radius) const { F32 radius_squared = radius * radius; @@ -1578,8 +1580,8 @@ void LLWorld::getAvatars(std::vector* avatar_ids, std::vectorgetRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + for (LLWorld::region_list_t::const_iterator iter = getRegionList().begin(); + iter != getRegionList().end(); ++iter) { LLViewerRegion* regionp = *iter; const LLVector3d& origin_global = regionp->getOriginGlobal(); @@ -1604,6 +1606,56 @@ void LLWorld::getAvatars(std::vector* avatar_ids, std::vectorempty()) + { + umap->clear(); + } + // get the list of avatars from the character list first, so distances are correct + // when agent is above 1020m and other avatars are nearby + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; + + if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy) + { + LLVector3d pos_global = pVOAvatar->getPositionGlobal(); + LLUUID uuid = pVOAvatar->getID(); + + if (!uuid.isNull() + && dist_vec_squared(pos_global, relative_to) <= radius_squared) + { + umap->emplace(uuid, pos_global); + } + } + } + // region avatars added for situations where radius is greater than RenderFarClip + for (LLWorld::region_list_t::const_iterator iter = getRegionList().begin(); + iter != getRegionList().end(); ++iter) + { + LLViewerRegion* regionp = *iter; + const LLVector3d& origin_global = regionp->getOriginGlobal(); + S32 count = regionp->mMapAvatars.count(); + for (S32 i = 0; i < count; i++) + { + LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global); + if(dist_vec_squared(pos_global, relative_to) <= radius_squared) + { + LLUUID uuid = regionp->mMapAvatarIDs.get(i); + // if this avatar doesn't already exist in the list, add it + if(uuid.notNull()) + { + umap->emplace(uuid, pos_global); + } + } + } + } +} + bool LLWorld::isRegionListed(const LLViewerRegion* region) const { region_list_t::const_iterator it = find(mRegionList.begin(), mRegionList.end(), region); diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index b363d0d67..fa65c364a 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -167,10 +167,15 @@ public: // All arguments are optional. Given containers will be emptied and then filled. // Not supplying origin or radius input returns data on all avatars in the known regions. void getAvatars( - std::vector* avatar_ids = NULL, + uuid_vec_t* avatar_ids = NULL, std::vector* positions = NULL, const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const; + typedef boost::unordered_map pos_map_t; + void getAvatars(pos_map_t* map, + const LLVector3d& relative_to = LLVector3d(), + F32 radius = FLT_MAX) const; + // Returns 'true' if the region is in mRegionList, // 'false' if the region has been removed due to region change // or if the circuit to this simulator had been lost. diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index 1af8cfc62..ba152b6c8 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -10418,6 +10418,18 @@ Would you like to enable announcing keys to objects in the sim? canceltext="No, don't ask again!"/> + +The object you're attempting to restore in world is no copy, if you do not have rez rights at <0, 0, 0>, you will lose this object!! + + + Date: Tue, 3 Mar 2015 12:30:58 -0700 Subject: [PATCH 09/67] Fix search floater title --- indra/newview/skins/default/xui/en-us/floater_directory.xml | 4 ++-- indra/newview/skins/default/xui/en-us/panel_status_bar.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/floater_directory.xml b/indra/newview/skins/default/xui/en-us/floater_directory.xml index 9227b34b9..e9a58fd7f 100644 --- a/indra/newview/skins/default/xui/en-us/floater_directory.xml +++ b/indra/newview/skins/default/xui/en-us/floater_directory.xml @@ -1,7 +1,7 @@ @@ -83,7 +83,7 @@ font="SansSerif" handle_edit_keys_directly="false" height="18" label="Search" left_delta="56" max_length="254" mouse_opaque="true" name="search_editor" select_all_on_focus_received="false" - select_on_focus="false" tab_group="1" tool_tip="Search Second Life" + select_on_focus="false" tab_group="1" tool_tip="Search" width="160" spell_check="true" /> + + + + + + + + + @@ -1056,10 +1064,6 @@ - - - - diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index bd5e03a64..9a7bb44b9 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -10361,6 +10361,27 @@ Changes won't take effect until after you restart [APP_NAME]. + +What label would you like to use for +the region "[REGION]"? + confirm +
+ [LABEL] +
+ + + diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 4d102ed7f..52202b9a5 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -221,13 +221,15 @@ + + - + diff --git a/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml index dc29ebf6d..ac2c75570 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml @@ -139,6 +139,7 @@ Puedes usar los siguientes comodines para personalizar tus respuestas: #n para n + Respuesta en Modo Ocupado: diff --git a/indra/newview/skins/default/xui/es/panel_preferences_input.xml b/indra/newview/skins/default/xui/es/panel_preferences_input.xml index a62a2105f..e3e50351a 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_input.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_input.xml @@ -8,6 +8,8 @@ + + Esconder Interface en Vista Subjetiva: diff --git a/indra/newview/skins/default/xui/es/panel_sound_devices.xml b/indra/newview/skins/default/xui/es/panel_sound_devices.xml index cb70f1989..c5612fa41 100644 --- a/indra/newview/skins/default/xui/es/panel_sound_devices.xml +++ b/indra/newview/skins/default/xui/es/panel_sound_devices.xml @@ -21,7 +21,7 @@ Nivel de Entrada: + tool_tip="Cambia el Nivel del Micrófno usando este deslizable"/> Por favor, espera diff --git a/indra/newview/skins/default/xui/es/panel_toolbar.xml b/indra/newview/skins/default/xui/es/panel_toolbar.xml index c2b5aefc9..c6374c6ae 100644 --- a/indra/newview/skins/default/xui/es/panel_toolbar.xml +++ b/indra/newview/skins/default/xui/es/panel_toolbar.xml @@ -52,6 +52,11 @@ + + diff --git a/indra/newview/wlfPanel_AdvSettings.cpp b/indra/newview/wlfPanel_AdvSettings.cpp index bb40fb896..a69de701e 100644 --- a/indra/newview/wlfPanel_AdvSettings.cpp +++ b/indra/newview/wlfPanel_AdvSettings.cpp @@ -47,13 +47,21 @@ #include "llfloaterwindlight.h" #include "llfloaterwater.h" +#include "llagent.h" #include "llagentcamera.h" #include "lldaycyclemanager.h" #include "llenvmanager.h" +#include "llviewerregion.h" +#include "llvoavatarself.h" #include "llwaterparammanager.h" #include "llwlparamset.h" #include "llwlparammanager.h" +// Hover funcs +void syncFromPreferenceSetting(LLSliderCtrl* sldrCtrl); +void onHoverSliderMoved(const LLSD& val); +void onHoverSliderFinalCommit(const LLSD& val); + wlfPanel_AdvSettings::wlfPanel_AdvSettings() : mExpanded(false) { setVisible(false); @@ -76,6 +84,7 @@ void wlfPanel_AdvSettings::build() mConnections.clear(); deleteAllChildren(); mExpanded = gSavedSettings.getBOOL("wlfAdvSettingsPopup"); + if (mRegionChangedSlot.connected()) mRegionChangedSlot.disconnect(); LLUICtrlFactory::instance().buildPanel(this, mExpanded ? "wlfPanel_AdvSettings_expanded.xml" : "wlfPanel_AdvSettings.xml", &getFactoryMap()); } @@ -140,6 +149,7 @@ BOOL wlfPanel_AdvSettings::postBuild() if (mExpanded) { + // Windlight getChild("use_estate_wl")->setCommitCallback(boost::bind(&wlfPanel_AdvSettings::onUseRegionSettings, this, _2)); mWaterPresetCombo = getChild("WLWaterPresetsCombo"); @@ -174,6 +184,7 @@ BOOL wlfPanel_AdvSettings::postBuild() updateTimeSlider(); updateRlvVisibility(); + // Camera Presets const U32 preset(gSavedSettings.getU32("CameraPreset")); if (preset == CAMERA_PRESET_REAR_VIEW) getChildView("Rear")->setValue(true); @@ -181,6 +192,35 @@ BOOL wlfPanel_AdvSettings::postBuild() getChildView("Front")->setValue(true); else if (preset == CAMERA_PRESET_GROUP_VIEW) getChildView("Group")->setValue(true); + + // Hover height + mHoverHeight = getChild("HoverHeightSlider"); + mHoverHeight->setMinValue(MIN_HOVER_Z); + mHoverHeight->setMaxValue(MAX_HOVER_Z); + mHoverHeight->setSliderMouseUpCallback(boost::bind(onHoverSliderFinalCommit, _2)); + mHoverHeight->setSliderEditorCommitCallback(boost::bind(onHoverSliderFinalCommit, _2)); + mHoverHeight->setCommitCallback(boost::bind(onHoverSliderMoved, _2)); + + // Initialize slider from pref setting. + syncFromPreferenceSetting(mHoverHeight); + // Update slider on future pref changes. + if (LLControlVariable* control = gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")) + { + control->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, mHoverHeight)); + } + else + { + llwarns << "Control not found for AvatarHoverOffsetZ" << LL_ENDL; + } + + updateEditHoverEnabled(); + + if (!mRegionChangedSlot.connected()) + { + mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&wlfPanel_AdvSettings::onRegionChanged, this)); + } + // Set up based on initial region. + onRegionChanged(); } return TRUE; } @@ -411,3 +451,71 @@ void wlfPanel_AdvSettings::updateTimeSlider() } mTimeSlider->setValue(val); } + +// Hover junk +void syncFromPreferenceSetting(LLSliderCtrl* sldrCtrl) +{ + F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); + + sldrCtrl->setValue(value,FALSE); + + if (isAgentAvatarValid()) + { + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset); + } +} + +void onHoverSliderMoved(const LLSD& val) +{ + F32 value = val.asFloat(); + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset, false); +} + +// Do send-to-the-server work when slider drag completes, or new +// value entered as text. +void onHoverSliderFinalCommit(const LLSD& val) +{ + F32 value = val.asFloat(); + gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", value); + + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset, true); // will send update this time. +} + +void wlfPanel_AdvSettings::onRegionChanged() +{ + LLViewerRegion* region = gAgent.getRegion(); + if (region && region->simulatorFeaturesReceived()) + { + updateEditHoverEnabled(); + } + else if (region) + { + region->setSimulatorFeaturesReceivedCallback(boost::bind(&wlfPanel_AdvSettings::onSimulatorFeaturesReceived, this, _1)); + } +} + +void wlfPanel_AdvSettings::onSimulatorFeaturesReceived(const LLUUID& region_id) +{ + const LLViewerRegion* region = gAgent.getRegion(); + if (region && (region->getRegionID()==region_id)) + { + updateEditHoverEnabled(); + } +} + +void wlfPanel_AdvSettings::updateEditHoverEnabled() +{ + const LLViewerRegion* region = gAgent.getRegion(); + bool enabled = region && region->avatarHoverHeightEnabled(); + mHoverHeight->setEnabled(enabled); + if (enabled) + { + syncFromPreferenceSetting(mHoverHeight); + } +} diff --git a/indra/newview/wlfPanel_AdvSettings.h b/indra/newview/wlfPanel_AdvSettings.h index 17b2ddc9a..1bf1b9691 100644 --- a/indra/newview/wlfPanel_AdvSettings.h +++ b/indra/newview/wlfPanel_AdvSettings.h @@ -79,14 +79,20 @@ protected: // void populateDayCyclePresetsList(); void updateTimeSlider(); + void onRegionChanged(); + void onSimulatorFeaturesReceived(const LLUUID& region_id); + void updateEditHoverEnabled(); + LLComboBox* mWaterPresetCombo; LLComboBox* mSkyPresetCombo; // LLComboBox* mDayCyclePresetCombo; LLSliderCtrl* mTimeSlider; + LLSliderCtrl* mHoverHeight; bool mExpanded; boost::ptr_list mConnections; + boost::signals2::connection mRegionChangedSlot; }; #endif // LL_wlfPanel_AdvSettings_H diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 1ec83cb85..ce7e2a442 100644 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -3594,6 +3594,10 @@ version 2.0 { CofVersion S32 } { Flags U32 } } + { + AppearanceHover Variable + { HoverHeight LLVector3 } + } } // AvatarSitResponse - response to a request to sit on an object From 9d8028009e9c2f74a1a31a4caa106355b3e424df Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 25 Mar 2015 08:05:07 -0400 Subject: [PATCH 37/67] French translation pokings from Nomade --- indra/newview/skins/default/xui/fr/floater_world_map.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/fr/floater_world_map.xml b/indra/newview/skins/default/xui/fr/floater_world_map.xml index 90e21836b..796dfbad0 100644 --- a/indra/newview/skins/default/xui/fr/floater_world_map.xml +++ b/indra/newview/skins/default/xui/fr/floater_world_map.xml @@ -67,6 +67,6 @@ - + From eb0247d27adb90ecfc4670e316af43e724e6c6a3 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 25 Mar 2015 08:18:32 -0400 Subject: [PATCH 39/67] Revert "[STORM-2109] Apply fixes from Brett Joseph of Vivox", this doesn't seem ready yet. This reverts commit 0681b88cbcaf7d8b2ebae0848f852b9c5c244121. --- indra/newview/llimpanel.cpp | 27 ++++- indra/newview/llvoiceclient.cpp | 2 - indra/newview/llvoiceclient.h | 8 +- indra/newview/llvoicevivox.cpp | 99 +++++++------------ indra/newview/llvoicevivox.h | 14 ++- .../default/xui/en-us/panel_sound_devices.xml | 2 +- 6 files changed, 70 insertions(+), 82 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 92004554e..9ce08dfa0 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -420,8 +420,25 @@ LLFloaterIMPanel::~LLFloaterIMPanel() delete mSpeakers; mSpeakers = NULL; - + + // End the text IM session if necessary + if(LLVoiceClient::instanceExists() && mOtherParticipantUUID.notNull()) + { + switch(mDialog) + { + case IM_NOTHING_SPECIAL: + case IM_SESSION_P2P_INVITE: + LLVoiceClient::getInstance()->endUserIMSession(mOtherParticipantUUID); + break; + + default: + // Appease the compiler + break; + } + } + //kicks you out of the voice channel if it is currently active + // HAVE to do this here -- if it happens in the LLVoiceChannel destructor it will call the wrong version (since the object's partially deconstructed at that point). mVoiceChannel->deactivate(); @@ -1061,12 +1078,20 @@ void deliver_message(const std::string& utf8_text, EInstantMessage dialog) { std::string name; + bool sent = false; gAgent.buildFullname(name); const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id); U8 offline = (!info || info->isOnline()) ? IM_ONLINE : IM_OFFLINE; + if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id))) + { + // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice. + sent = LLVoiceClient::getInstance()->sendTextMessage(other_participant_id, utf8_text); + } + + if(!sent) { // Send message normally. diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index c5b7e66a7..54ca806de 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -354,7 +354,6 @@ BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id) } } -/* BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) { if (mVoiceModule) @@ -374,7 +373,6 @@ void LLVoiceClient::endUserIMSession(const LLUUID& participant_id) mVoiceModule->endUserIMSession(participant_id); } } -*/ //---------------------------------------------- // channels diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index a4a1dba5f..b8cf474cc 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -212,8 +212,8 @@ public: //@{ virtual BOOL isSessionTextIMPossible(const LLUUID& id)=0; virtual BOOL isSessionCallBackPossible(const LLUUID& id)=0; - //virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message)=0; - //virtual void endUserIMSession(const LLUUID &uuid)=0; + virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message)=0; + virtual void endUserIMSession(const LLUUID &uuid)=0; //@} // authorize the user @@ -428,8 +428,8 @@ public: //@{ BOOL isSessionTextIMPossible(const LLUUID& id); BOOL isSessionCallBackPossible(const LLUUID& id); - //BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); - //void endUserIMSession(const LLUUID &uuid); + BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); + void endUserIMSession(const LLUUID &uuid); //@} diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 8a5f2a299..ce1d09041 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -80,10 +80,10 @@ const int MAX_LOGIN_RETRIES = 12; // Defines the maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine() // which is treated as normal. If this number is exceeded we suspect there is a problem with connection -// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 1500 was chosen +// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 50 was chosen // to make sure we don't make mistake when slight connection problems happen- situation when connection to server is // blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. -const int MAX_NORMAL_JOINING_SPATIAL_NUM = 1500; +const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; // How often to check for expired voice fonts in seconds const F32 VOICE_FONT_EXPIRY_INTERVAL = 10.f; @@ -478,21 +478,17 @@ bool LLVivoxVoiceClient::writeString(const std::string &str) (const char*)str.data(), &written); - if (err == 0 && written == size) + if(err == 0) { // Success. result = true; } - else if (err == 0 && written != size) - { - // Did a short write, log it for now - LL_WARNS("Voice") << ") short write on socket sending data to vivox daemon." << "Sent " << written << "bytes instead of " << size << LL_ENDL; - } - else if (APR_STATUS_IS_EAGAIN(err)) - { - char buf[MAX_STRING]; - LL_WARNS("Voice") << "EAGAIN error " << err << " (" << apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << LL_ENDL; - } + // TODO: handle partial writes (written is number of bytes written) + // Need to set socket to non-blocking before this will work. +// else if(APR_STATUS_IS_EAGAIN(err)) +// { +// // +// } else { // Assume any socket error means something bad. For now, just close the socket. @@ -1130,8 +1126,8 @@ void LLVivoxVoiceClient::stateMachine() } else { - // loop mic back to render device. - tuningCaptureStartSendMessage(1); // 1-loop, zero, don't loop + // duration parameter is currently unused, per Mike S. + tuningCaptureStartSendMessage(10000); setState(stateMicTuningRunning); } @@ -1568,8 +1564,6 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateSessionJoined case stateSessionJoined: // session handle received - if (mSpatialJoiningNum > 100) - llwarns << "There seems to be problem with connecting to a voice channel. Frames to join were " << mSpatialJoiningNum << LL_ENDL; mSpatialJoiningNum = 0; // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 @@ -1668,7 +1662,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateLeavingSession case stateLeavingSession: // waiting for terminate session response // The handler for the Session.Terminate response will transition from here to stateSessionTerminated. - // Fall through and clean up session before getting terminated event. + break; //MARK: stateSessionTerminated case stateSessionTerminated: @@ -1678,7 +1672,6 @@ void LLVivoxVoiceClient::stateMachine() if(mAudioSession) { - leaveAudioSession(); sessionState *oldSession = mAudioSession; mAudioSession = NULL; @@ -1838,7 +1831,6 @@ void LLVivoxVoiceClient::loginSendMessage() << "" << mAccountPassword << "" << "VerifyAnswer" << "false" - << "0" << "Application" << "5" << (autoPostCrashDumps?"true":"") @@ -2039,7 +2031,6 @@ void LLVivoxVoiceClient::leaveAudioSession() case stateJoiningSession: case stateSessionJoined: case stateRunning: - case stateSessionTerminated: if(!mAudioSession->mHandle.empty()) { @@ -2070,12 +2061,10 @@ void LLVivoxVoiceClient::leaveAudioSession() case stateJoinSessionFailed: case stateJoinSessionFailedWaiting: setState(stateSessionTerminated); - break; - case stateLeavingSession: // managed to get back to this case statement before the media gets disconnected. break; default: - LL_WARNS("Voice") << "called from unknown state " << getState() << LL_ENDL; + LL_WARNS("Voice") << "called from unknown state" << LL_ENDL; break; } } @@ -2128,7 +2117,6 @@ void LLVivoxVoiceClient::sessionMediaDisconnectSendMessage(sessionState *session } -/* obsolete void LLVivoxVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) { std::ostringstream stream; @@ -2142,7 +2130,6 @@ void LLVivoxVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) writeString(stream.str()); } -*/ void LLVivoxVoiceClient::getCaptureDevicesSendMessage() { @@ -2294,15 +2281,14 @@ void LLVivoxVoiceClient::tuningRenderStopSendMessage() writeString(stream.str()); } -void LLVivoxVoiceClient::tuningCaptureStartSendMessage(int loop) +void LLVivoxVoiceClient::tuningCaptureStartSendMessage(int duration) { LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL; std::ostringstream stream; stream << "" - << "-1" - << "" << loop << "" + << "" << duration << "" << "\n\n\n"; writeString(stream.str()); @@ -2516,8 +2502,6 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) { std::ostringstream stream; - if (getState() != stateRunning) return; // don't send position updates if we are transitioning between out of running. - if(mSpatialCoordsDirty) { LLVector3 l, u, a, vel; @@ -2950,25 +2934,15 @@ void LLVivoxVoiceClient::sessionGroupAddSessionResponse(std::string &requestId, void LLVivoxVoiceClient::sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString) { sessionState *session = findSession(requestId); - // 1026 is session already has media, somehow mediaconnect was called twice on the same session. - // set the session info to reflect that the user is already connected. - if (statusCode == 1026) - { - session->mVoiceEnabled = true; - session->mMediaConnectInProgress = false; - session->mMediaStreamState = streamStateConnected; - //session->mTextStreamState = streamStateConnected; - session->mErrorStatusCode = 0; - } - else if (statusCode != 0) + if(statusCode != 0) { LL_WARNS("Voice") << "Session.Connect response failure (" << statusCode << "): " << statusString << LL_ENDL; - if (session) + if(session) { session->mMediaConnectInProgress = false; session->mErrorStatusCode = statusCode; session->mErrorStatusString = statusString; - if (session == mAudioSession) + if(session == mAudioSession) setState(stateJoinSessionFailed); } } @@ -3164,7 +3138,7 @@ void LLVivoxVoiceClient::sessionRemovedEvent( // Reset the media state (we now have no info) session->mMediaStreamState = streamStateUnknown; - //session->mTextStreamState = streamStateUnknown; + session->mTextStreamState = streamStateUnknown; // Conditionally delete the session reapSession(session); @@ -3375,9 +3349,8 @@ void LLVivoxVoiceClient::mediaStreamUpdatedEvent( switch(state) { - case streamStateDisconnecting: case streamStateIdle: - // Standard "left audio session", Vivox state 'disconnected' + // Standard "left audio session" session->mVoiceEnabled = false; session->mMediaConnectInProgress = false; leftAudioSession(session); @@ -3387,7 +3360,6 @@ void LLVivoxVoiceClient::mediaStreamUpdatedEvent( session->mVoiceEnabled = true; session->mMediaConnectInProgress = false; joinedAudioSession(session); - case streamStateConnecting: // do nothing, but prevents a warning getting into the logs. break; case streamStateRinging: @@ -3422,7 +3394,6 @@ void LLVivoxVoiceClient::mediaStreamUpdatedEvent( } } -/* Obsolete void LLVivoxVoiceClient::textStreamUpdatedEvent( std::string &sessionHandle, std::string &sessionGroupHandle, @@ -3469,7 +3440,6 @@ void LLVivoxVoiceClient::textStreamUpdatedEvent( } } } - obsolete */ void LLVivoxVoiceClient::participantAddedEvent( std::string &sessionHandle, @@ -4290,7 +4260,7 @@ LLVivoxVoiceClient::sessionState* LLVivoxVoiceClient::startUserIMSession(const L if(session->mHandle.empty()) { // Session isn't active -- start it up. - sessionCreateSendMessage(session, false, false); + sessionCreateSendMessage(session, false, true); } else { @@ -4301,7 +4271,6 @@ LLVivoxVoiceClient::sessionState* LLVivoxVoiceClient::startUserIMSession(const L return session; } -/* obsolete BOOL LLVivoxVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) { bool result = false; @@ -4326,8 +4295,7 @@ BOOL LLVivoxVoiceClient::sendTextMessage(const LLUUID& participant_id, const std return result; } -*/ -/* obsolete + void LLVivoxVoiceClient::sendQueuedTextMessages(sessionState *session) { if(session->mTextStreamState == 1) @@ -4356,9 +4324,7 @@ void LLVivoxVoiceClient::sendQueuedTextMessages(sessionState *session) // Session isn't connected yet, defer until later. } } - obsolete */ -/* void LLVivoxVoiceClient::endUserIMSession(const LLUUID &uuid) { // Figure out if a session with the user exists @@ -4368,7 +4334,7 @@ void LLVivoxVoiceClient::endUserIMSession(const LLUUID &uuid) // found the session if(!session->mHandle.empty()) { - // sessionTextDisconnectSendMessage(session); // a SLim leftover, not used any more. + sessionTextDisconnectSendMessage(session); } } else @@ -4376,7 +4342,6 @@ void LLVivoxVoiceClient::endUserIMSession(const LLUUID &uuid) LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL; } } -*/ bool LLVivoxVoiceClient::isValidChannel(std::string &sessionHandle) { return(findSession(sessionHandle) != NULL); @@ -4720,8 +4685,6 @@ void LLVivoxVoiceClient::enforceTether(void) void LLVivoxVoiceClient::updatePosition(void) { - // Throttle the position updates to one every 1/10 of a second if we are in an audio session at all - if (mAudioSession == NULL) return; LLViewerRegion *region = gAgent.getRegion(); if(region && isAgentAvatarValid()) @@ -6837,10 +6800,6 @@ void LLVivoxProtocolParser::processResponse(std::string tag) { LLVivoxVoiceClient::getInstance()->sessionRemovedEvent(sessionHandle, sessionGroupHandle); } - else if (!stricmp(eventTypeCstr, "SessionGroupUpdatedEvent")) - { - //TODO, we don't process this event, but we should not WARN that we have received it. - } else if (!stricmp(eventTypeCstr, "SessionGroupAddedEvent")) { LLVivoxVoiceClient::getInstance()->sessionGroupAddedEvent(sessionGroupHandle); @@ -6869,11 +6828,19 @@ void LLVivoxProtocolParser::processResponse(std::string tag) */ LLVivoxVoiceClient::getInstance()->mediaCompletionEvent(sessionGroupHandle, mediaCompletionType); } - /* obsolete, let else statement complain if a text message arrives else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) { + /* + + c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg1 + c1_m1000xFnPP04IpREWNkuw1cOXlhw==1 + true + 1 + true + + */ LLVivoxVoiceClient::getInstance()->textStreamUpdatedEvent(sessionHandle, sessionGroupHandle, enabled, state, incoming); - } */ + } else if (!stricmp(eventTypeCstr, "ParticipantAddedEvent")) { /* diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index ad7df8960..2d723184b 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -92,10 +92,10 @@ public: virtual bool isParticipant(const LLUUID& speaker_id); // Send a text message to the specified user, initiating the session if necessary. - // virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message) const { return false; } + virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); // close any existing text IM session with the specified user - //virtual void endUserIMSession(const LLUUID &uuid); + virtual void endUserIMSession(const LLUUID &uuid); // Returns true if calling back the session URI after the session has closed is possible. // Currently this will be false only for PSTN P2P calls. @@ -242,8 +242,6 @@ protected: streamStateIdle = 1, streamStateConnected = 2, streamStateRinging = 3, - streamStateConnecting = 6, // same as Vivox session_media_connecting enum - streamStateDisconnecting = 7, //Same as Vivox session_media_disconnecting enum }; struct participantState { @@ -434,7 +432,7 @@ protected: void tuningRenderStartSendMessage(const std::string& name, bool loop); void tuningRenderStopSendMessage(); - void tuningCaptureStartSendMessage(int loop); + void tuningCaptureStartSendMessage(int duration); void tuningCaptureStopSendMessage(); //---------------------------------- @@ -465,7 +463,7 @@ protected: void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); void mediaCompletionEvent(std::string &sessionGroupHandle, std::string &mediaCompletionType); void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); - // obsolete void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); + void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); void sessionGroupAddedEvent(std::string &sessionGroupHandle); void sessionRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle); @@ -581,7 +579,7 @@ protected: void sessionTerminateSendMessage(sessionState *session); void sessionGroupTerminateSendMessage(sessionState *session); void sessionMediaDisconnectSendMessage(sessionState *session); - // void sessionTextDisconnectSendMessage(sessionState *session); + void sessionTextDisconnectSendMessage(sessionState *session); @@ -743,7 +741,7 @@ private: // start a text IM session with the specified user // This will be asynchronous, the session may be established at a future time. sessionState* startUserIMSession(const LLUUID& uuid); - // obsolete void sendQueuedTextMessages(sessionState *session); + void sendQueuedTextMessages(sessionState *session); void enforceTether(void); diff --git a/indra/newview/skins/default/xui/en-us/panel_sound_devices.xml b/indra/newview/skins/default/xui/en-us/panel_sound_devices.xml index b805e16ec..eb6f6a035 100644 --- a/indra/newview/skins/default/xui/en-us/panel_sound_devices.xml +++ b/indra/newview/skins/default/xui/en-us/panel_sound_devices.xml @@ -43,7 +43,7 @@ + tool_tip="Change the volume using this slider" width="120" /> Please wait From 744def3c1f517810b1a684ca8a2f17897ae0379f Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 1 Apr 2015 01:54:46 -0400 Subject: [PATCH 40/67] French Translation updates~ Thanks Nomade! --- .../default/xui/fr/panel_preferences_ascent_chat.xml | 9 +++++---- .../default/xui/fr/panel_preferences_ascent_system.xml | 1 + .../skins/default/xui/fr/panel_preferences_im.xml | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml index 4a28134f4..992b2b4b5 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml @@ -12,7 +12,7 @@ - + Active un lien qui montre le nom du propriétaire dans l'historique du chat pour : Aucun objet @@ -89,18 +89,19 @@ Et aussi : #n Pour le nom classique, #d Pour le Display, #r Pour la SLURL de vô - + - + + Mode Busy: - + diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml index 11d25e01a..b8ec0dc57 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml @@ -78,6 +78,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_im.xml b/indra/newview/skins/default/xui/fr/panel_preferences_im.xml index d4923b855..b4d2c6670 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_im.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_im.xml @@ -8,6 +8,7 @@ + Enregistrements: From 0d27d0cbc7c72c10b71120f91922f18c5d05dfdb Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 4 Apr 2015 15:31:39 -0400 Subject: [PATCH 41/67] Inventory decline notifications are annoying, add LogInventoryDecline from upstream. View without space changes please~ --- indra/newview/app_settings/settings.xml | 11 ++++++++ indra/newview/llviewermessage.cpp | 35 ++++++++++++++----------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5e3fc7ed2..9c3cbd84d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -18029,6 +18029,17 @@ This should be as low as possible, but too low may break functionality 0
+ LogInventoryDecline + + Comment + Log in system chat whenever an inventory offer is declined + Persist + 1 + Type + Boolean + Value + 1 + UseHTTPInventory Comment diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 54c5f9242..a506437e4 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1651,26 +1651,29 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // send the message msg->sendReliable(mHost); -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e - if ( (rlv_handler_t::isEnabled()) && - (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) ) + if (gSavedSettings.getBOOL("LogInventoryDecline")) { - std::string::size_type idxToken = mDesc.find("' ( http://"); - if (std::string::npos != idxToken) - RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1)); - } +// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e + if ( (rlv_handler_t::isEnabled()) && + (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) ) + { + std::string::size_type idxToken = mDesc.find("' ( http://"); + if (std::string::npos != idxToken) + RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1)); + } // [/RLVa:KB] - LLStringUtil::format_map_t log_message_args; - log_message_args["[DESC]"] = mDesc; - log_message_args["[NAME]"] = mFromName; - log_message = LLTrans::getString("InvOfferDecline", log_message_args); - chat.mText = log_message; - if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 - { - chat.mMuted = TRUE; + LLStringUtil::format_map_t log_message_args; + log_message_args["[DESC]"] = mDesc; + log_message_args["[NAME]"] = mFromName; + log_message = LLTrans::getString("InvOfferDecline", log_message_args); + chat.mText = log_message; + if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 + { + chat.mMuted = TRUE; + } + LLFloaterChat::addChatHistory(chat); } - LLFloaterChat::addChatHistory(chat); // If it's from an agent, we have to fetch the item to throw // it away. If it's from a task or group, just denying the From f514243c1b821a12927dbccfb5e4916c21f50ddd Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 4 Apr 2015 15:47:20 -0400 Subject: [PATCH 42/67] Make /regionsay fall back on normal chat pipes --- indra/newview/chatbar_as_cmdline.cpp | 8 +++++++- .../default/xui/en-us/panel_preferences_ascent_system.xml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 916e52b7c..dc1c77e41 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -452,6 +452,12 @@ bool cmd_line_chat(std::string revised_text, EChatType type) { if (revised_text.length() > command.length() + 1) { + const std::string& message = revised_text.substr(command.length()+1); + if (!gAgent.getRegion()->isEstateManager()) + { + gChatBar->sendChatFromViewer(message, CHAT_TYPE_REGION, false); + return false; + } std::vector strings(5, "-1"); // [0] grid_x, unused here // [1] grid_y, unused here @@ -460,7 +466,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type) std::string name; LLAgentUI::buildFullname(name); strings[3] = name; - strings[4] = revised_text.substr(command.length()+1); // [4] message + strings[4] = message; // [4] message LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, "simulatormessage", LLFloaterRegionInfo::getLastInvoice(), strings); } return false; diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index 96bf4f9b6..b3449200d 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -82,7 +82,7 @@ Toggle Fake Away Status (usage: cmd) Send region message (usage: cmd msg) - + Hover Height (usage: cmd height) From 036d5b84d15b3e0572f373c6d96f6d558d261781 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 7 Apr 2015 18:37:34 -0400 Subject: [PATCH 43/67] UseHTTPInventory can never be turned off on SL anymore. --- indra/newview/llinventorymodelbackgroundfetch.cpp | 7 ++++++- indra/newview/llviewerinventory.cpp | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index e6b2a72cb..a511c2c7c 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -193,12 +193,17 @@ void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *) LLInventoryModelBackgroundFetch::instance().backgroundFetch(); } +bool use_http_inventory() +{ + return gHippoGridManager->getConnectedGrid()->isSecondLife() || gSavedSettings.getBOOL("UseHTTPInventory"); +} + void LLInventoryModelBackgroundFetch::backgroundFetch() { LLViewerRegion* region = gAgent.getRegion(); if (mBackgroundFetchActive && region && region->capabilitiesReceived()) { - if (gSavedSettings.getBOOL("UseHTTPInventory")) + if (use_http_inventory()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. std::string url = region->getCapability("FetchInventory2"); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 4455b4d11..2ee341638 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -64,6 +64,7 @@ #include "llfloatercustomize.h" // #include "llappviewer.h" // System Folders +bool use_http_inventory(); // UseHTTPInventory replacement // // Two do-nothing ops for use in callbacks. @@ -354,7 +355,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const { std::string url; - if (gSavedSettings.getBOOL("UseHTTPInventory")) + if (use_http_inventory()) { LLViewerRegion* region = gAgent.getRegion(); // we have to check region. It can be null after region was destroyed. See EXT-245 @@ -656,13 +657,13 @@ bool LLViewerInventoryCategory::fetch() { llwarns << "agent region is null" << llendl; } - if (!url.empty() && gSavedSettings.getBOOL("UseHTTPInventory")) //Capability found and HTTP inventory enabled. Build up LLSD and use it. + if (!url.empty() && use_http_inventory()) //Capability found and HTTP inventory enabled. Build up LLSD and use it. { LLInventoryModelBackgroundFetch::instance().start(mUUID, false); } else { //We don't have a capability or the use of HTTP inventory is disabled, use the old system. - if (gSavedSettings.getBOOL("UseHTTPInventory")) + if (use_http_inventory()) { llinfos << "FetchInventoryDescendents2 capability not found. Using UDP message." << llendl; } From be41d8f734b86da7f0b2cc9b68fb82686229c9b6 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 18 Apr 2015 13:11:13 -0400 Subject: [PATCH 44/67] Getting possessive --- .../newview/skins/default/xui/en-us/panel_preferences_input.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml index 1d7b38e44..3fd1dde36 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml @@ -6,7 +6,7 @@ - + UI Hidden in mouselook: From 8b7b0649a852286b3e193ae4184fe1173bf32ac9 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 19 Apr 2015 18:08:49 -0400 Subject: [PATCH 45/67] Uncomment use of etc/ for spawnWebBrowser on Linux, now that we use etc/ for scripts. Thanks to H-H-H for pointing this out. --- indra/llwindow/llwindowsdl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index e7832731e..2f87037dc 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2561,8 +2561,8 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) std::string cmd, arg; cmd = gDirUtilp->getAppRODataDir(); cmd += gDirUtilp->getDirDelimiter(); - //cmd += "etc"; - //cmd += gDirUtilp->getDirDelimiter(); + cmd += "etc"; + cmd += gDirUtilp->getDirDelimiter(); cmd += "launch_url.sh"; arg = escaped_url; exec_cmd(cmd, arg); From b28e4e06aed47b4d7fd2ec4c21356cc7ed6c0868 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 19 Apr 2015 18:09:40 -0400 Subject: [PATCH 46/67] refresh_desktop_app_entry.sh lives in etc/ now, missed that spot. Thanks to H-H-H for pointing this out. --- indra/newview/linux_tools/install.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/linux_tools/install.sh.in b/indra/newview/linux_tools/install.sh.in index 2bfd6d192..2d42c13dd 100755 --- a/indra/newview/linux_tools/install.sh.in +++ b/indra/newview/linux_tools/install.sh.in @@ -59,7 +59,7 @@ function homedir_install() fi install_to_prefix "$HOME/.@VIEWER_BRANDING_ID@-install" - $HOME/.@VIEWER_BRANDING_ID@-install/refresh_desktop_app_entry.sh + $HOME/.@VIEWER_BRANDING_ID@-install/etc/refresh_desktop_app_entry.sh } function root_install() From 9f06333a8605387152c5d1b056f9e2120b72cd41 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 19 Apr 2015 18:59:17 -0400 Subject: [PATCH 47/67] Address Issue 1897: Pressing letter keys STARTS local chat Option lives in Text Chat preferences. "Letter keys start typing into local chat" Code is from upstream..ish --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerwindow.cpp | 13 +++++++++++++ .../default/xui/en-us/panel_preferences_chat.xml | 1 + 3 files changed, 25 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9c3cbd84d..6b7faff76 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4219,6 +4219,17 @@ This should be as low as possible, but too low may break functionality Value 1 + LetterKeysFocusChatBar + + Comment + When printable characters keys (possibly with Shift held) are pressed, the chatbar takes focus + Persist + 1 + Type + Boolean + Value + 0 + ChatBubbleOpacity Comment diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1eaea06ef..f6a532c4c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2853,6 +2853,19 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } + // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook, + // no view has keyboard focus, this is a printable character key (and no modifier key is + // pressed except shift), then give focus to nearby chat (STORM-560) + if (gSavedSettings.getBOOL("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && + !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT)) + { + { + // passing NULL here, character will be added later when it is handled by character handler. + gChatBar->startChat(NULL); + return TRUE; + } + } + // give menus a chance to handle unmodified accelerator keys if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))) diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index 5dca51194..b187d93b3 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml @@ -28,6 +28,7 @@ Chat Options: + From 886a05549df8a4f6a12df65ffbea42a481dc16c1 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 19 Apr 2015 19:26:51 -0400 Subject: [PATCH 48/67] Fix alignment of Text Chat Preferences; bottom_delta > bottom --- .../default/xui/en-us/panel_preferences_chat.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index b187d93b3..c2b6a3918 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml @@ -25,21 +25,21 @@ - Chat Options: + Chat Options: - Bubble Chat: - - + Bubble Chat: + +