From bc1fe099cca6ba81c357ccc764df1648c978ac86 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 18 Mar 2010 02:15:30 -0500 Subject: Manifest files can now be optional. If required=False, the manifest won't fail if the file is missing. --- linden/indra/lib/python/indra/util/llmanifest.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py index 369cc81..7a2505d 100644 --- a/linden/indra/lib/python/indra/util/llmanifest.py +++ b/linden/indra/lib/python/indra/util/llmanifest.py @@ -608,7 +608,7 @@ class LLManifest(object): d = src_re.sub(d_template, s.replace('\\', '/')) yield os.path.normpath(s), os.path.normpath(d) - def path(self, src, dst=None): + def path(self, src, dst=None, required=True): sys.stdout.write("Processing %s => %s ... " % (src, dst)) sys.stdout.flush() if src == None: @@ -625,9 +625,10 @@ class LLManifest(object): assert(s != d) count += self.process_file(s, d) else: - # if we're specifying a single path (not a glob), - # we should error out if it doesn't exist - self.check_file_exists(src) + # if we're specifying a single path (not a glob), and + # it's required, error out if it doesn't exist + if required: + self.check_file_exists(src) # if it's a directory, recurse through it if os.path.isdir(src): count += self.process_directory(src, dst) -- cgit v1.1 From 78955530d145a08bae5daf3a7c3339f6d6435c8e Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 18 Mar 2010 03:13:22 -0500 Subject: ChangeLog.txt is no longer required for packaging. @nochangelog --- linden/indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 204bd1f..8c907a3 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -118,7 +118,7 @@ class ViewerManifest(LLManifest): self.path("MANIFESTO.txt") self.path("CONTRIBUTE.txt") self.path("RELEASE_NOTES.txt") - self.path("ChangeLog.txt") + self.path("ChangeLog.txt", required=False) self.end_prefix("../../..") # From the linden directory -- cgit v1.1 From 0f3d6ce1fb4b7d581b7e18e940e03cffe5e098ce Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 18 Mar 2010 03:09:14 -0500 Subject: Improved make_changelog.py. * Uses 'subprocess' module instead of 'commands' (which is Unix-only). * No longer overwrites ChangeLog.txt when it fails. @nochangelog --- linden/scripts/make_changelog.py | 59 ++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 20 deletions(-) (limited to 'linden') diff --git a/linden/scripts/make_changelog.py b/linden/scripts/make_changelog.py index 43745a4..713adc1 100755 --- a/linden/scripts/make_changelog.py +++ b/linden/scripts/make_changelog.py @@ -50,9 +50,7 @@ # - -import commands, re, os, sys -from string import Template +import re, os, sys, subprocess SCRIPT_DIR = os.path.abspath( os.path.dirname( sys.argv[0] ) ) @@ -316,8 +314,9 @@ Author: %(an)s <%(ae)s>""" % { "ad" : self.author_date, "id" : self.id[0:7] }) if self.commit_name != self.author_name: - texts.append("Committer: %(cn)s <%(ce)s>" % { "cn" : self.commit_name, - "ce" : self.commit_mail }) + texts.append("Committer: %(cn)s <%(ce)s>" % \ + { "cn" : self.commit_name, + "ce" : self.commit_mail }) texts.append("\n") @@ -360,32 +359,52 @@ Author: %(an)s <%(ae)s>""" % { "ad" : self.author_date, +def fail( reason, abort=False ): + """Prints a message that the ChangeLog couldn't be generated, then + exits the script. If abort is True, exit with status code 1 (to + indicate that Make/VisualStudio/Xcode/etc. should abort), + otherwise exit with status code 0.""" + + if abort: + print "Error: Could not generate ChangeLog.txt: " + reason + exit(1) + else: + print "Warning: Could not generate ChangeLog.txt: " + reason + exit(0) + + def main(): commits = sys.argv[1:] - if commits: - commits = " ".join(commits) - else: - commits = "HEAD" + if not commits: + commits = ["HEAD"] # Set PATH to help find the git executable on Mac OS X. if sys.platform == "darwin": os.environ["PATH"] += ":/usr/local/bin:/usr/local/git/bin:/sw/bin:/opt/bin:~/bin" - # Fetch the log entries from git in one big chunk. - cmd = "git log --pretty=fuller --name-status --date=short --date-order " + commits - status, output = commands.getstatusoutput(cmd) - - # If the git command failed, write a placeholder ChangeLog.txt and exit. + # Fetch the log entries from git in one big chunk. + cmd = ["git", "log", "--pretty=fuller", "--name-status", + "--date=short", "--date-order"] + commits + + try: + proc = subprocess.Popen(cmd, + cwd = ROOT_DIR, + stdout = subprocess.PIPE, + stderr = subprocess.STDOUT, + shell = True) + except OSError: + fail("The 'git' command is not available.") + + output = proc.communicate()[0] + status = proc.returncode + + + # If the git command failed, print the reason and exit. if status != 0: - print "Could not generate ChangeLog.txt: " + output - changelog = open(CHANGELOG, "w") - changelog.write( output + "\n (Imprudence must be compiled from a Git repository to generate a ChangeLog.)\n\n") - changelog.close() - exit(0) - + fail(output) # Split it up into individual commits. logs = re.compile("^commit ", re.MULTILINE).split(output)[1:] -- cgit v1.1 From 8cd94404e0d20361667aae5d18cad256a733b72c Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 18 Mar 2010 16:41:31 -0500 Subject: Load login page using Imprudence version instead of SL version. This will enable us to notify users of updates via the login page. --- linden/indra/newview/llpanellogin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index e0acd34..d3e295d 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -826,8 +826,9 @@ void LLPanelLogin::loadLoginPage() } // Channel and Version - std::string version = llformat("%d.%d.%d (%d)", - LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); + std::string version = llformat("%d.%d.%d %s", + IMP_VERSION_MAJOR, IMP_VERSION_MINOR, + IMP_VERSION_PATCH, IMP_VERSION_TEST); char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); -- cgit v1.1 From fa8c88026ed70eff10dee9c6d53916eebadc0df1 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 27 Mar 2010 18:45:30 -0500 Subject: Removed Second Life from the default grid list. Second Life is no longer officially supported, due to TPV Policy concerns. --- linden/indra/newview/app_settings/default_grids.xml | 14 -------------- linden/indra/newview/app_settings/settings.xml | 2 +- linden/indra/newview/hippoGridManager.cpp | 12 +++++------- 3 files changed, 6 insertions(+), 22 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/default_grids.xml b/linden/indra/newview/app_settings/default_grids.xml index 13293cf..f11f513 100644 --- a/linden/indra/newview/app_settings/default_grids.xml +++ b/linden/indra/newview/app_settings/default_grids.xml @@ -10,20 +10,6 @@ default_grids_version0 - - - gridnicksecondlife - gridnameSecond Life - platformSecondLife - loginurihttps://login.agni.lindenlab.com/cgi-bin/login.cgi - loginpagehttp://secondlife.com/app/login/ - helperurihttps://secondlife.com/helpers/ - websitehttp://secondlife.com/ - supporthttp://secondlife.com/support/ - registerhttp://secondlife.com/registration/ - passwordhttp://secondlife.com/account/request.php - - gridnicklocalhost diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 3026cc7..a7592c7 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -12730,7 +12730,7 @@ Type String Value - secondlife + osgrid KeepAppearance diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp index 9ff2d39..f96e3ec 100644 --- a/linden/indra/newview/hippoGridManager.cpp +++ b/linden/indra/newview/hippoGridManager.cpp @@ -485,13 +485,11 @@ std::string HippoGridInfo::sanitizeUri(std::string &uri) void HippoGridInfo::initFallback() { - FALLBACK_GRIDINFO.mGridNick = "secondlife"; - FALLBACK_GRIDINFO.setPlatform(PLATFORM_SECONDLIFE); - FALLBACK_GRIDINFO.setGridName("Second Life"); - FALLBACK_GRIDINFO.setLoginUri("https://login.agni.lindenlab.com/cgi-bin/login.cgi"); - FALLBACK_GRIDINFO.setLoginPage("http://secondlife.com/app/login/"); - FALLBACK_GRIDINFO.setHelperUri("https://secondlife.com/helpers/"); - FALLBACK_GRIDINFO.setWebSite("http://secondlife.com/"); + FALLBACK_GRIDINFO.mGridNick = "localhost"; + FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM); + FALLBACK_GRIDINFO.setGridName("Local Host"); + FALLBACK_GRIDINFO.setLoginUri("http://127.0.0.1:9000/"); + FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/"); } -- cgit v1.1 From ec1fc19a7ef79ae27e68735e43dc9166397871f7 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 12 Mar 2010 17:03:19 +0100 Subject: respect --grid and --login (and --loginuri over --grid). --- linden/indra/newview/llpanellogin.cpp | 32 ++++++++++++++++++++++++-------- linden/indra/newview/llstartup.cpp | 21 ++++++++++++++------- 2 files changed, 38 insertions(+), 15 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index d3e295d..64a8a1f 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -634,7 +634,23 @@ void LLPanelLogin::addServer(const std::string& server) } else { - std::string last_grid = gSavedSettings.getString("LastSelectedGrid"); + std::string last_grid = gSavedSettings.getString("CmdLineGridChoice");//imprudence TODO:errorcheck + std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString(); + if (!last_grid.empty()&& cmd_line_login_uri.empty())//don't use --grid if --loginuri is also given + { + //give user chance to change their mind, even with --grid set + gSavedSettings.setString("CmdLineGridChoice",""); + } + else if (!cmd_line_login_uri.empty()) + { + last_grid = cmd_line_login_uri; + //also clear --grid no matter if it was given + gSavedSettings.setString("CmdLineGridChoice",""); + } + else if (last_grid.empty()) + { + last_grid = gSavedSettings.getString("LastSelectedGrid"); + } if (last_grid.empty()) last_grid = defaultGrid; grids->setSimple(last_grid); } @@ -876,17 +892,17 @@ void LLPanelLogin::loadLoginPage() location = "home"; } } - + std::string firstname, lastname; - if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) - { - LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); + if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) + { + LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); firstname = cmd_line_login[0].asString(); lastname = cmd_line_login[1].asString(); - password = cmd_line_login[2].asString(); - } - + password = cmd_line_login[2].asString(); + } + if (firstname.empty()) { firstname = gSavedSettings.getString("FirstName"); diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 11bd87b..993e6e2 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -683,9 +683,9 @@ bool idle_startup() show_connect_box = firstname.empty() || lastname.empty() || web_login_key.isNull(); } - else if((gSavedSettings.getLLSD("UserLoginInfo").size() == 3) && !LLStartUp::shouldAutoLogin()) - { - LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); + else if((gSavedSettings.getLLSD("UserLoginInfo").size() == 3) && !LLStartUp::shouldAutoLogin()) + { + LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); firstname = cmd_line_login[0].asString(); lastname = cmd_line_login[1].asString(); @@ -700,7 +700,7 @@ bool idle_startup() show_connect_box = false; #endif gSavedSettings.setBOOL("AutoLogin", TRUE); - } + } else if (gSavedSettings.getBOOL("AutoLogin")) { firstname = gSavedSettings.getString("FirstName"); @@ -877,13 +877,20 @@ bool idle_startup() gDebugInfo["LoginName"] = firstname + " " + lastname; } - gHippoGridManager->setCurrentGridAsConnected(); + std::string cmd_line_grid_choice = gSavedSettings.getString("CmdLineGridChoice"); + std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString(); + if(!cmd_line_grid_choice.empty() && cmd_line_login_uri.empty()) + { + gHippoGridManager->setCurrentGrid(cmd_line_grid_choice); + } + + gHippoGridManager->setCurrentGridAsConnected(); // create necessary directories // *FIX: these mkdir's should error check gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); - LLFile::mkdir(gDirUtilp->getLindenUserDir()); + LLFile::mkdir(gDirUtilp->getLindenUserDir()); - // Set PerAccountSettingsFile to the default value. + // Set PerAccountSettingsFile to the default value. gSavedSettings.setString("PerAccountSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount") -- cgit v1.1 From e0fdedff3ef4c94384b0b222c36b6c51a062fb65 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Thu, 25 Mar 2010 12:27:30 +0100 Subject: despam voice client: no ProvisionVoiceAccountRequest capability --- linden/indra/newview/llvoiceclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 7a41510..ef817cf 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -1856,7 +1856,7 @@ void LLVoiceClient::stateMachine() // We never started up the connector. This will shut down the daemon. setState(stateConnectorStopped); } - else if(!mAccountName.empty()) + else if(!mAccountName.empty() && mVoiceEnabled) { LLViewerRegion *region = gAgent.getRegion(); @@ -1872,7 +1872,7 @@ void LLVoiceClient::stateMachine() } else { - LL_WARNS("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; + LL_DEBUGS("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; } } } -- cgit v1.1 From 1b7ef3a912fddcfb3e28e342aae202b92a1878a3 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Thu, 25 Mar 2010 12:42:13 +0100 Subject: disable voice (for the session) if binary not found --- linden/indra/newview/llvoiceclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'linden') diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index ef817cf..67e4075 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -1753,6 +1753,7 @@ void LLVoiceClient::stateMachine() else { LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; + mVoiceEnabled = false; } } else -- cgit v1.1 From 5ac51f73e29ffa561b0dae87a06b6d5c1bd0e32e Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 29 Mar 2010 14:11:34 +0200 Subject: Use Hippogridmanager for OpenSim detection. --- linden/indra/newview/app_settings/settings.xml | 11 ---------- linden/indra/newview/llappviewer.cpp | 4 +++- linden/indra/newview/llmanipscale.cpp | 30 +++++++++----------------- linden/indra/newview/llmanipscale.h | 3 --- linden/indra/newview/llpanellogin.cpp | 5 ++++- linden/indra/newview/llpanelobject.cpp | 8 +++---- linden/indra/newview/llstartup.cpp | 16 ++++++++------ linden/indra/newview/llviewermessage.cpp | 12 +++-------- linden/indra/newview/llvoavatar.cpp | 5 ++--- 9 files changed, 35 insertions(+), 59 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index a7592c7..852369f 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -5909,17 +5909,6 @@ Value 0 - LoggedIntoOpenSim - - Comment - Check whether or not we're in an OpenSimulator (default 0) - Persist - 1 - Type - Boolean - Value - 0 - LoginAsGod Comment diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index e4cd3af..7aa3a05 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -1899,7 +1899,9 @@ bool LLAppViewer::initConfiguration() gHippoGridManager = new HippoGridManager(); gHippoGridManager->init(); } - + if (!gHippoLimits) { + gHippoLimits = new HippoLimits(); + } //initGridChoice(); diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp index 65f99ef..969ee43 100644 --- a/linden/indra/newview/llmanipscale.cpp +++ b/linden/indra/newview/llmanipscale.cpp @@ -63,6 +63,8 @@ #include "v2math.h" #include "llvoavatar.h" +#include "hippoLimits.h" + const F32 MAX_MANIP_SELECT_DISTANCE_SQUARED = 11.f * 11.f; const F32 SNAP_GUIDE_SCREEN_OFFSET = 0.05f; @@ -70,8 +72,6 @@ const F32 SNAP_GUIDE_SCREEN_LENGTH = 0.7f; const F32 SELECTED_MANIPULATOR_SCALE = 1.2f; const F32 MANIPULATOR_SCALE_HALF_LIFE = 0.07f; const S32 NUM_MANIPULATORS = 14; -const F32 DEFAULT_LL_MAX_PRIM_SCALE = 10.f; -const F32 DEFAULT_OPENSIM_MAX_PRIM_SCALE = 128.f; const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = { @@ -176,7 +176,6 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mScaledBoxHandleSize( 1.f ), mLastMouseX( -1 ), mLastMouseY( -1 ), - mMaxPrimSize(0.f), mSendUpdateOnMouseUp( FALSE ), mLastUpdateFlags( 0 ), mScaleSnapUnit1(1.f), @@ -205,7 +204,6 @@ void LLManipScale::render() LLGLDepthTest gls_depth(GL_TRUE); LLGLEnable gl_blend(GL_BLEND); LLGLEnable gls_alpha_test(GL_ALPHA_TEST); - mMaxPrimSize = gSavedSettings.getBOOL("LoggedIntoOpenSim") ? DEFAULT_OPENSIM_MAX_PRIM_SCALE : DEFAULT_LL_MAX_PRIM_SCALE; if( canAffectSelection() ) { @@ -957,8 +955,9 @@ void LLManipScale::dragCorner( S32 x, S32 y ) mInSnapRegime = FALSE; } - F32 max_scale_factor = mMaxPrimSize / MIN_PRIM_SCALE; - F32 min_scale_factor = MIN_PRIM_SCALE / mMaxPrimSize; + F32 maxScale = gHippoLimits->getMaxPrimScale(); + F32 max_scale_factor = maxScale / MIN_PRIM_SCALE; + F32 min_scale_factor = MIN_PRIM_SCALE / maxScale; // find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale for (LLObjectSelection::iterator iter = mObjectSelection->begin(); @@ -970,7 +969,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { const LLVector3& scale = selectNode->mSavedScale; - F32 cur_max_scale_factor = llmin( mMaxPrimSize / scale.mV[VX], mMaxPrimSize / scale.mV[VY], mMaxPrimSize / scale.mV[VZ] ); + F32 cur_max_scale_factor = llmin( maxScale / scale.mV[VX], maxScale / scale.mV[VY], maxScale / scale.mV[VZ] ); max_scale_factor = llmin( max_scale_factor, cur_max_scale_factor ); F32 cur_min_scale_factor = llmax( MIN_PRIM_SCALE / scale.mV[VX], MIN_PRIM_SCALE / scale.mV[VY], MIN_PRIM_SCALE / scale.mV[VZ] ); @@ -1267,7 +1266,8 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto F32 denom = axis * dir_local; F32 desired_delta_size = is_approx_zero(denom) ? 0.f : (delta_local_mag / denom); // in meters - F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_PRIM_SCALE, mMaxPrimSize); + F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_PRIM_SCALE, + gHippoLimits->getMaxPrimScale()); // propagate scale constraint back to position offset desired_delta_size = desired_scale - selectNode->mSavedScale.mV[axis_index]; // propagate constraint back to position @@ -1967,7 +1967,7 @@ F32 LLManipScale::partToMaxScale( S32 part, const LLBBox &bbox ) const max_extent = bbox_extents.mV[i]; } } - max_scale_factor = bbox_extents.magVec() * mMaxPrimSize / max_extent; + max_scale_factor = bbox_extents.magVec() * gHippoLimits->getMaxPrimScale() / max_extent; if (getUniform()) { @@ -1982,7 +1982,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const { LLVector3 bbox_extents = unitVectorToLocalBBoxExtent( partToUnitVector( part ), bbox ); bbox_extents.abs(); - F32 min_extent = mMaxPrimSize; + F32 min_extent = gHippoLimits->getMaxPrimScale(); for (U32 i = VX; i <= VZ; i++) { if (bbox_extents.mV[i] > 0.f && bbox_extents.mV[i] < min_extent) @@ -2057,13 +2057,3 @@ BOOL LLManipScale::canAffectSelection() } return can_scale; } - -//static -F32 LLManipScale::getMaxPrimSize() -{ - if (gSavedSettings.getBOOL("LoggedIntoOpenSim")) - { - return DEFAULT_OPENSIM_MAX_PRIM_SCALE; - } - return DEFAULT_LL_MAX_PRIM_SCALE; -} diff --git a/linden/indra/newview/llmanipscale.h b/linden/indra/newview/llmanipscale.h index c6545fd..1de0459 100644 --- a/linden/indra/newview/llmanipscale.h +++ b/linden/indra/newview/llmanipscale.h @@ -89,8 +89,6 @@ public: static void setShowAxes( BOOL b ); static BOOL getShowAxes(); - static F32 getMaxPrimSize(); - private: void renderCorners( const LLBBox& local_bbox ); void renderFaces( const LLBBox& local_bbox ); @@ -168,7 +166,6 @@ private: F32 mScaleSnapValue; BOOL mInSnapRegime; F32* mManipulatorScales; - F32 mMaxPrimSize; }; #endif // LL_MANIPSCALE_H diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 64a8a1f..49b9761 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -37,6 +37,8 @@ #include "llpanelgeneral.h" #include "hippoGridManager.h" +#include "hippoLimits.h" + #include "floaterlogin.h" #include "indra_constants.h" // for key and mask constants @@ -1099,7 +1101,8 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*) // //childSetText("gridname", gridInfo->getGridName()); // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 ); // } - + if (mCurGrid == gHippoGridManager->getConnectedGrid()->getGridNick()) + gHippoLimits->setLimits(); llwarns << "current grid = " << mCurGrid << llendl; diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index 40dc211..bcbd076 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -79,7 +79,7 @@ // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) #include "llvoavatar.h" // [/RLVa:KB] - +#include "hippoLimits.h" // // Constants // @@ -632,9 +632,9 @@ void LLPanelObject::getState( ) } else { - mCtrlScaleX->setMaxValue(LLManipScale::getMaxPrimSize()); - mCtrlScaleY->setMaxValue(LLManipScale::getMaxPrimSize()); - mCtrlScaleZ->setMaxValue(LLManipScale::getMaxPrimSize()); + mCtrlScaleX->setMaxValue(gHippoLimits->getMaxPrimScale()); + mCtrlScaleY->setMaxValue(gHippoLimits->getMaxPrimScale()); + mCtrlScaleZ->setMaxValue(gHippoLimits->getMaxPrimScale()); // Only allowed to change these parameters for objects // that you have permissions on AND are not attachments. diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 993e6e2..3698ecb 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -885,6 +885,7 @@ bool idle_startup() } gHippoGridManager->setCurrentGridAsConnected(); + gHippoLimits->setLimits(); // create necessary directories // *FIX: these mkdir's should error check gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); @@ -1650,13 +1651,14 @@ bool idle_startup() if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordUrl(tmp); tmp = LLUserAuth::getInstance()->getResponse("search"); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); - tmp = LLUserAuth::getInstance()->getResponse("currency"); - if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); - tmp = LLUserAuth::getInstance()->getResponse("real_currency"); - if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRealCurrencySymbol(tmp); - tmp = LLUserAuth::getInstance()->getResponse("directory_fee"); - if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setDirectoryFee(atoi(tmp.c_str())); - gHippoGridManager->saveFile(); + tmp = LLUserAuth::getInstance()->getResponse("currency"); + if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); + tmp = LLUserAuth::getInstance()->getResponse("real_currency"); + if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRealCurrencySymbol(tmp); + tmp = LLUserAuth::getInstance()->getResponse("directory_fee"); + if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setDirectoryFee(atoi(tmp.c_str())); + gHippoGridManager->saveFile(); + gHippoLimits->setLimits(); // JC: gesture loading done below, when we have an asset system // in place. Don't delete/clear user_credentials until then. diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 8bdbc30..67dc082 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -138,6 +138,8 @@ #include "llviewerdisplay.h" #include "llkeythrottle.h" +#include "hippoLimits.h" + #include #if LL_WINDOWS // For Windows specific error handler @@ -3167,15 +3169,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LLSD payload; payload["message"] = version_channel; LLNotifications::instance().add("ServerVersionChanged", LLSD(), payload); - } - - if (version_channel.find("OpenSim") != std::string::npos) - { - gSavedSettings.setBOOL("LoggedIntoOpenSim", TRUE); - } - else - { - gSavedSettings.setBOOL("LoggedIntoOpenSim", FALSE); + gHippoLimits->setLimits(); } gLastVersionChannel = version_channel; diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 10e2ec7..3055c92 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -54,7 +54,6 @@ #include "llkeyframefallmotion.h" #include "llkeyframestandmotion.h" #include "llkeyframewalkmotion.h" -#include "llmanipscale.h" // getMaxPrimSize() #include "llmutelist.h" #include "llnotify.h" #include "llquantize.h" @@ -96,7 +95,7 @@ // [RLVa:KB] #include "llstartup.h" // [/RLVa:KB] - +#include "hippoLimits.h"// getMaxPrimScale using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -1535,7 +1534,7 @@ void LLVOAvatar::getSpatialExtents(LLVector3& newMin, LLVector3& newMax) LLVector3 pos = getRenderPosition(); newMin = pos - buffer; newMax = pos + buffer; - float max_attachment_span = LLManipScale::getMaxPrimSize() * 5.0f; + float max_attachment_span = gHippoLimits->getMaxPrimScale() * 5.0f; //stretch bounding box by joint positions for (polymesh_map_t::iterator i = mMeshes.begin(); i != mMeshes.end(); ++i) -- cgit v1.1 From 3fbbd9e0b7516d1c170267acc26a767af1fa4b1d Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 29 Mar 2010 15:50:33 +0200 Subject: support more OpenSim limits (number of groups, hollow size) --- linden/indra/newview/llfloatergroups.cpp | 8 +++++--- linden/indra/newview/llmaniptranslate.cpp | 7 +++++-- linden/indra/newview/llpanelobject.cpp | 12 +++++++----- linden/indra/newview/lltoolgrab.cpp | 7 +++++-- linden/indra/newview/llviewermessage.cpp | 2 +- linden/indra/newview/llworld.cpp | 5 +++++ linden/indra/newview/llworld.h | 3 +-- 7 files changed, 29 insertions(+), 15 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index 874249b..e94734d 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp @@ -58,6 +58,8 @@ #include "llviewerwindow.h" #include "llimview.h" +#include "hippoLimits.h" + // static std::map LLFloaterGroupPicker::sInstances; @@ -200,7 +202,7 @@ void LLPanelGroups::reset() group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); - childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); + childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups())); const std::string none_text = getString("none"); init_group_list(getChild("group list"), gAgent.getGroupID(), none_text); @@ -212,7 +214,7 @@ BOOL LLPanelGroups::postBuild() childSetCommitCallback("group list", onGroupList, this); childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); - childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); + childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups())); const std::string none_text = getString("none"); init_group_list(getChild("group list"), gAgent.getGroupID(), none_text); @@ -270,7 +272,7 @@ void LLPanelGroups::enableButtons() childDisable("IM"); childDisable("Leave"); } - if(gAgent.mGroups.count() < MAX_AGENT_GROUPS) + if(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups()) { childEnable("Create"); } diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index 8d23e40..1362f0a 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp @@ -66,6 +66,8 @@ #include "llui.h" #include "pipeline.h" +#include "hippoLimits.h" + const S32 NUM_AXES = 3; const S32 MOUSE_DRAG_SLOP = 2; // pixels const F32 HANDLE_HIDE_ANGLE = 0.15f; // radians @@ -731,9 +733,10 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) } // For safety, cap heights where objects can be dragged - if (new_position_global.mdV[VZ] > MAX_OBJECT_Z) + float maxHeight = gHippoLimits->getMaxHeight(); + if (new_position_global.mdV[VZ] > maxHeight) { - new_position_global.mdV[VZ] = MAX_OBJECT_Z; + new_position_global.mdV[VZ] = maxHeight; } // Grass is always drawn on the ground, so clamp its position to the ground diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index bcbd076..460611a 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -426,6 +426,8 @@ void LLPanelObject::getState( ) mCtrlPosY->setEnabled(enable_move); mCtrlPosZ->setEnabled(enable_move); + mCtrlPosZ->setMaxValue(gHippoLimits->getMaxHeight()); + if (enable_scale) { vec = objectp->getScale(); @@ -993,9 +995,9 @@ void LLPanelObject::getState( ) mSpinScaleY->set( scale_y ); calcp->setVar(LLCalc::X_HOLE, scale_x); calcp->setVar(LLCalc::Y_HOLE, scale_y); - mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE); + mSpinScaleX->setMinValue(gHippoLimits->getMinHoleSize()); mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X); - mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE); + mSpinScaleY->setMinValue(gHippoLimits->getMinHoleSize()); mSpinScaleY->setMaxValue(OBJECT_MAX_HOLE_SIZE_Y); break; default: @@ -1031,7 +1033,7 @@ void LLPanelObject::getState( ) else { mSpinHollow->setMinValue(0.f); - mSpinHollow->setMaxValue(95.f); + mSpinHollow->setMaxValue(gHippoLimits->getMaxHollow() * 100.0f); } // Update field enablement @@ -1583,11 +1585,11 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) { scale_x = llclamp( scale_x, - OBJECT_MIN_HOLE_SIZE, + gHippoLimits->getMinHoleSize(), OBJECT_MAX_HOLE_SIZE_X); scale_y = llclamp( scale_y, - OBJECT_MIN_HOLE_SIZE, + gHippoLimits->getMinHoleSize(), OBJECT_MAX_HOLE_SIZE_Y); // Limit radius offset, based on taper and hole size y. diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index 3437193..260d533 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp @@ -64,6 +64,8 @@ #include "llvoavatar.h" #include "llworld.h" +#include "hippoLimits.h" + const S32 SLOP_DIST_SQ = 4; // Override modifier key behavior with these buttons @@ -635,9 +637,10 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) } // For safety, cap heights where objects can be dragged - if (grab_point_global.mdV[VZ] > MAX_OBJECT_Z) + float maxHeight = gHippoLimits->getMaxHeight(); + if (grab_point_global.mdV[VZ] > maxHeight) { - grab_point_global.mdV[VZ] = MAX_OBJECT_Z; + grab_point_global.mdV[VZ] = maxHeight; } grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 67dc082..8739f5c 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -655,7 +655,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = MAX_AGENT_GROUPS; + S32 max_groups = gHippoLimits->getMaxAgentGroups(); if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.count() < max_groups) diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 02c7be3..90ab49b 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -60,6 +60,7 @@ #include "pipeline.h" #include "llappviewer.h" // for do_disconnect() +#include "hippoLimits.h" // // Globals // @@ -128,6 +129,10 @@ void LLWorld::destroyClass() LLViewerPartSim::getInstance()->destroyClass(); } +F32 LLWorld::getRegionMaxHeight() const +{ + return gHippoLimits->getMaxHeight(); +} LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { diff --git a/linden/indra/newview/llworld.h b/linden/indra/newview/llworld.h index ce83cbd..46aefd9 100644 --- a/linden/indra/newview/llworld.h +++ b/linden/indra/newview/llworld.h @@ -119,8 +119,7 @@ public: // region X and Y size in meters F32 getRegionWidthInMeters() const { return mWidthInMeters; } F32 getRegionMinHeight() const { return -mWidthInMeters; } - F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; } - + F32 getRegionMaxHeight() const; void updateRegions(F32 max_update_time); void updateVisibilities(); void updateParticles(); -- cgit v1.1 From 2bef4f471d91475e21dd4494db622c4d376283ea Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 5 Apr 2010 12:08:08 +0200 Subject: fix: don't try in vain to fetch a texture from a host not responding. --- linden/indra/newview/llvoavatar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3055c92..868a6f8 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -2526,15 +2526,15 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) { // The core setTETexture() method requests images, so we need // to redirect certain avatar texture requests to different sims. - /* if (isIndexBakedTexture((ETextureIndex)te)) - {*/ + if (isIndexBakedTexture((ETextureIndex)te)) + { LLHost target_host = getObjectHost(); return setTETextureCore(te, uuid, target_host); - /*} + } else { return setTETextureCore(te, uuid, LLHost::invalid); - }*/ + } } -- cgit v1.1 From 693e7eabe0d824cd8ab243ed3b7540ac32eb5d11 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 5 Apr 2010 12:11:08 +0200 Subject: fix: don't llerr-crash on some bad textures. Downside: instead of crashing some avatars stay white for some time. --- linden/indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 868a6f8..2a1462f 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -8579,7 +8579,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerImage *src_vi, { if (!aux_src->getData()) { - llerrs << "No auxiliary source data for onBakedTextureMasksLoaded" << llendl; + llwarns << "No auxiliary source data for onBakedTextureMasksLoaded" << llendl; return; } -- cgit v1.1 From 60b38ea845d208c87c8dacfffba06e5250791e99 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 5 Apr 2010 12:15:48 +0200 Subject: fix: handle bad ping more relaxed. --- linden/indra/newview/llstartup.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 3698ecb..e7271b8 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -491,7 +491,10 @@ bool idle_startup() // TODO parameterize const F32 circuit_heartbeat_interval = 5; - const F32 circuit_timeout = 100; + const F32 circuit_timeout = 180; //seconds until llcircuit decides + //it isn't alive. + //Since we are on OpenSim we need to + //relax about 'bad' ping. Was for SL: 100; const LLUseCircuitCodeResponder* responder = NULL; bool failure_is_fatal = true; -- cgit v1.1 From 861b5ef1203d71bf3893decf26b9ff063c12601f Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 5 Apr 2010 18:07:25 +0200 Subject: fix: Bug #239 by reverting commit 187e36f6: invisible Textures on HG --- linden/indra/newview/llviewermessage.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 8739f5c..afd8503 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -3049,10 +3049,6 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // appropriate. LLVector3 shift_vector = regionp->getPosRegionFromGlobal( gAgent.getRegion()->getOriginGlobal()); - // don't shift objects, if teleporting more than about 1000 sims, as - // for long teleports shifting objects garbles the view at the target region - if (shift_vector.lengthSquared() > 6.5e10f) - shift_vector = LLVector3::zero; gAgent.setRegion(regionp); gObjectList.shiftObjects(shift_vector); gAssetStorage->setUpstream(msg->getSender()); -- cgit v1.1 From 4a683110f77060889a755fd77c814e79eeb80298 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Thu, 8 Apr 2010 20:42:06 +0200 Subject: remove link limits: (take 2) depending on grid. Seems OSim creates several linksets though. --- linden/indra/llcommon/indra_constants.h | 1 - linden/indra/newview/hippoLimits.cpp | 5 ++++- linden/indra/newview/hippoLimits.h | 3 +++ linden/indra/newview/llfloatertools.cpp | 25 +++++++++++++++---------- linden/indra/newview/llviewermenu.cpp | 21 +++++++++++++-------- 5 files changed, 35 insertions(+), 20 deletions(-) (limited to 'linden') diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h index ae7863d..96c0a1f 100644 --- a/linden/indra/llcommon/indra_constants.h +++ b/linden/indra/llcommon/indra_constants.h @@ -102,7 +102,6 @@ const F32 DEFAULT_AGENT_HEIGHT = 1.9f; const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE; // For linked sets -const S32 MAX_CHILDREN_PER_TASK = 255; const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp index dae81a6..96b3bee 100644 --- a/linden/indra/newview/hippoLimits.cpp +++ b/linden/indra/newview/hippoLimits.cpp @@ -33,13 +33,15 @@ void HippoLimits::setOpenSimLimits() mMaxAgentGroups = 100; mMaxPrimScale = 256.0f; mMaxHeight = 10000.0f; + mMaxLinkedPrims = -1; + if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { llinfos << "Using rendering compatible OpenSim limits." << llendl; mMinHoleSize = 0.05f; mMaxHollow = 0.95f; } else { llinfos << "Using Hippo OpenSim limits." << llendl; - mMinHoleSize = 0.01f; + mMinHoleSize = 0.01f; mMaxHollow = 0.99f; } } @@ -52,5 +54,6 @@ void HippoLimits::setSecondLifeLimits() mMaxHeight = 4096.0f; mMinHoleSize = 0.05f; mMaxHollow = 0.95f; + mMaxLinkedPrims = 255; } diff --git a/linden/indra/newview/hippoLimits.h b/linden/indra/newview/hippoLimits.h index 900480b..7152bcc 100644 --- a/linden/indra/newview/hippoLimits.h +++ b/linden/indra/newview/hippoLimits.h @@ -12,15 +12,18 @@ public: float getMinHoleSize() const { return mMinHoleSize; } float getMaxHollow() const { return mMaxHollow; } float getMaxPrimScale() const { return mMaxPrimScale; } + S32 getMaxLinkedPrims() const { return mMaxLinkedPrims; } void setLimits(); private: int mMaxAgentGroups; + float mMaxHeight; float mMinHoleSize; float mMaxHollow; float mMaxPrimScale; + S32 mMaxLinkedPrims; void setOpenSimLimits(); void setSecondLifeLimits(); diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 5a7fdff..260872f 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -84,6 +84,8 @@ #include "llvotree.h" #include "lluictrlfactory.h" +#include "hippoLimits.h" + // Globals LLFloaterTools *gFloaterTools = NULL; @@ -1146,18 +1148,21 @@ void LLFloaterTools::onClickLink(void* data) LLNotifications::instance().add("UnableToLinkWhileDownloading"); return; } - - S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); - if (object_count > MAX_CHILDREN_PER_TASK + 1) + + S32 max_linked_prims = gHippoLimits->getMaxLinkedPrims(); + if (max_linked_prims > -1) { - LLSD args; - args["COUNT"] = llformat("%d", object_count); - int max = MAX_CHILDREN_PER_TASK+1; - args["MAX"] = llformat("%d", max); - LLNotifications::instance().add("UnableToLinkObjects", args); - return; + S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); + if (object_count > max_linked_prims + 1) + { + LLSD args; + args["COUNT"] = llformat("%d", object_count); + args["MAX"] = llformat("%d", max_linked_prims +1); + LLNotifications::instance().add("UnableToLinkObjects", args); + return; + } } - + if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) { LLNotifications::instance().add("CannotLinkIncompleteSet"); diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 0aec752..2e72a2a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -224,6 +224,8 @@ #include "jcfloater_animation_list.h" #include "llfloaterassetbrowser.h" +#include "hippoLimits.h" + using namespace LLVOAvatarDefines; void init_client_menu(LLMenuGL* menu); void init_server_menu(LLMenuGL* menu); @@ -4668,15 +4670,18 @@ class LLToolsLink : public view_listener_t return true; } - S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); - if (object_count > MAX_CHILDREN_PER_TASK + 1) + S32 max_linked_prims = gHippoLimits->getMaxLinkedPrims(); + if (max_linked_prims > -1) { - LLSD args; - args["COUNT"] = llformat("%d", object_count); - int max = MAX_CHILDREN_PER_TASK+1; - args["MAX"] = llformat("%d", max); - LLNotifications::instance().add("UnableToLinkObjects", args); - return true; + S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); + if (object_count > max_linked_prims + 1) + { + LLSD args; + args["COUNT"] = llformat("%d", object_count); + args["MAX"] = llformat("%d", max_linked_prims+1); + LLNotifications::instance().add("UnableToLinkObjects", args); + return true; + } } if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) -- cgit v1.1 From 40297a4549bc68f22daed90930483977213fa0e4 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 27 Mar 2010 13:11:42 +0100 Subject: fix show correct register account and lost password web page --- linden/indra/newview/llpanellogin.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 49b9761..df5601a 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -462,7 +462,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask) if ( KEY_F1 == key ) { llinfos << "Spawning HTML help window" << llendl; - LLFloaterMediaBrowser::helpF1(); + gViewerHtmlHelp.show(); return TRUE; } @@ -1017,8 +1017,7 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& S32 option = LLNotification::getSelectedOption(notification, response); if (0 == option) { - llinfos << "Going to account creation URL" << llendl; - LLWeb::loadURLExternal( CREATE_ACCOUNT_URL ); + onClickNewAccount(0); } else { @@ -1031,7 +1030,14 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& // static void LLPanelLogin::onClickNewAccount(void*) { - LLWeb::loadURLExternal( CREATE_ACCOUNT_URL ); + const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); + if (!url.empty()) { + llinfos << "Going to account creation URL." << llendl; + LLWeb::loadURLExternal(url); + } else { + llinfos << "Account creation URL is empty." << llendl; + sInstance->setFocus(TRUE); + } } @@ -1062,7 +1068,12 @@ void LLPanelLogin::onClickForgotPassword(void*) { if (sInstance ) { - LLWeb::loadURLExternal(sInstance->getString( "forgot_password_url" )); + const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordUrl(); + if (!url.empty()) { + LLWeb::loadURLExternal(url); + } else { + llwarns << "Link for 'forgotton password' not set." << llendl; + } } } -- cgit v1.1 From ca315cbe559b459de7e9554d79e27f0b738fbd8a Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 27 Mar 2010 18:55:36 +0100 Subject: fix bring help-f1 page under control of hippogridmanager --- linden/indra/llcommon/llsecondlifeurls.cpp | 45 +--------------------- linden/indra/llcommon/llsecondlifeurls.h | 34 +--------------- linden/indra/newview/llfloaterhtmlhelp.cpp | 36 +++++++++-------- linden/indra/newview/llstartup.cpp | 13 +++++-- linden/indra/newview/llviewermenu.cpp | 2 +- .../skins/default/xui/en-us/notifications.xml | 9 ++++- 6 files changed, 41 insertions(+), 98 deletions(-) (limited to 'linden') diff --git a/linden/indra/llcommon/llsecondlifeurls.cpp b/linden/indra/llcommon/llsecondlifeurls.cpp index d7de8d8..1669f7b 100644 --- a/linden/indra/llcommon/llsecondlifeurls.cpp +++ b/linden/indra/llcommon/llsecondlifeurls.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2005&license=viewergpl$ * - * Copyright (c) 2005-2009, Linden Research, Inc. + * Copyright (c) 2005-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -33,56 +33,15 @@ #include "linden_common.h" #include "llsecondlifeurls.h" -const std::string CREATE_ACCOUNT_URL ( - "http://secondlife.com/registration/"); - -const std::string MANAGE_ACCOUNT ( - "http://secondlife.com/account/"); - const std::string AUCTION_URL ( "http://secondlife.com/auctions/auction-detail.php?id="); const std::string EVENTS_URL ( "http://secondlife.com/events/"); -const std::string TIER_UP_URL ( - "http://secondlife.com/app/landtier"); - -const std::string LAND_URL ( - "http://secondlife.com/app/landtier"); - -const std::string UPGRADE_TO_PREMIUM_URL ( - "http://secondlife.com/app/upgrade/"); - -const std::string DIRECTX_9_URL ( - "http://secondlife.com/support/"); - -const std::string AMD_AGP_URL ( - "http://secondlife.com/support/"); - -const std::string VIA_URL ( - "http://secondlife.com/support/"); - -const std::string SUPPORT_URL ( - "http://secondlife.com/support/"); - -const std::string INTEL_CHIPSET_URL ( - "http://secondlife.com/support/"); - -const std::string SIS_CHIPSET_URL ( - "http://secondlife.com/support/"); - -const std::string BLOGS_URL ( - "http://blog.secondlife.com/"); - const std::string BUY_CURRENCY_URL ( "http://secondlife.com/app/currency/"); -const std::string LSL_DOC_URL ( - "http://secondlife.com/app/lsldoc/"); - -const std::string SL_KB_URL ( - "http://secondlife.com/knowledgebase/"); const std::string RELEASE_NOTES_BASE_URL ( - "http://imprudenceviewer.org/wiki/Release_Notes/"); + "http://imprudenceviewer.org/wiki/Release_Notes/"); \ No newline at end of file diff --git a/linden/indra/llcommon/llsecondlifeurls.h b/linden/indra/llcommon/llsecondlifeurls.h index 9fd75c3..9c64b57 100644 --- a/linden/indra/llcommon/llsecondlifeurls.h +++ b/linden/indra/llcommon/llsecondlifeurls.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2004&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2004-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -33,46 +33,14 @@ #ifndef LL_LLSECONDLIFEURLS_H #define LL_LLSECONDLIFEURLS_H -// Account registration web page -extern const std::string CREATE_ACCOUNT_URL; - -// Manage Account -extern const std::string MANAGE_ACCOUNT; extern const std::string AUCTION_URL; extern const std::string EVENTS_URL; -// Tier up to a new land level. -extern const std::string TIER_UP_URL; - -// Tier up to a new land level. -extern const std::string LAND_URL; - -// Upgrade from basic membership to premium membership -extern const std::string UPGRADE_TO_PREMIUM_URL; - -// How to get DirectX 9 -extern const std::string DIRECTX_9_URL; - -// Out of date VIA chipset -extern const std::string VIA_URL; - -// Support URL -extern const std::string SUPPORT_URL; - -// Linden Blogs page -extern const std::string BLOGS_URL; - // Currency page extern const std::string BUY_CURRENCY_URL; -// LSL script wiki -extern const std::string LSL_DOC_URL; - -// SL KnowledgeBase page -extern const std::string SL_KB_URL; - // Release Notes Redirect URL for Server and Viewer extern const std::string RELEASE_NOTES_BASE_URL; diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 2a22a40..ff69394 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp @@ -54,6 +54,7 @@ #include "llviewerparcelmedia.h" #include "llcombobox.h" +#include "hippoGridManager.h" LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& media_data) { @@ -454,22 +455,18 @@ void LLFloaterHtmlHelp::show(std::string url, std::string title) LLFloaterHtml* floater_html = LLFloaterHtml::getInstance(); floater_html->setVisible(FALSE); - if (url.empty()) - { - url = floater_html->getSupportUrl(); - } - - if (gSavedSettings.getBOOL("UseExternalBrowser")) - { - LLSD payload; - payload["url"] = url; - - LLNotifications::instance().add("ClickOpenF1Help", LLSD(), payload, onClickF1HelpLoadURL); - } - else - { - // don't wait, just do it - LLWeb::loadURL(url); + url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); + if (!url.empty()) { + if (gSavedSettings.getBOOL("UseExternalBrowser")) { + LLSD payload; + payload["url"] = url; + LLNotifications::instance().add("ClickOpenF1Help", LLSD(), payload, onClickF1HelpLoadURL); + } else { + // don't wait, just do it + LLWeb::loadURL(url); + } + } else { + LLNotifications::instance().add("NoSupportUrl"); } } @@ -479,7 +476,12 @@ bool LLFloaterHtmlHelp::onClickF1HelpLoadURL(const LLSD& notification, const LLS S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) { - LLWeb::loadURL(notification["payload"]["url"].asString()); + const std::string &url = notification["payload"]["url"].asString(); + if (!url.empty()) { + LLWeb::loadURL(url); + } else { + llwarns << "Support URL not available." << llendl; + } } return false; } diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index e7271b8..ef25fb8 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2914,7 +2914,12 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response) if (0 == option) { LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL; - LLWeb::loadURL( CREATE_ACCOUNT_URL ); + const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); + if (!url.empty()) { + LLWeb::loadURL(url); + } else { + llwarns << "Account creation URL is empty" << llendl; + } } LLPanelLogin::giveFocus(); @@ -2939,9 +2944,11 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) { case 0: // OK break; - case 1: // Help - LLWeb::loadURL( SUPPORT_URL ); + case 1: { // Help + const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); + if (!url.empty()) LLWeb::loadURL(url); break; + } case 2: // Teleport // Restart the login process, starting at our home locaton LLURLSimString::setString(LLURLSimString::sLocationStringHome); diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 2e72a2a..41c3578 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5865,7 +5865,7 @@ class LLShowFloater : public view_listener_t } else if (floater_name == "help f1") { - LLFloaterMediaBrowser::helpF1(); + gViewerHtmlHelp.show(); } else if (floater_name == "help tutorial") { diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index efc45d0..b0deeef 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml @@ -4130,7 +4130,7 @@ Add this Ability to '[ROLE_NAME]'? icon="alertmodal.tga" name="ClickOpenF1Help" type="alertmodal"> - Visit the [SECOND_LIFE] Support Website? (note: this is not an Imprudence Help site) +Visit the [GRID] Support Web site? +[GRID] has no link for support. + + + Are you sure you want to quit? -- cgit v1.1