diff options
author | Josh Bell <josh@lindenlab.com> | 2007-12-21 06:44:41 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-12-21 06:44:41 +0000 |
commit | df4d167cd13fd89a85e4d30dca94e40c934707d7 (patch) | |
tree | cde9373bce657013bf04c83ab60b4a4aa826fc76 /indra/newview | |
parent | 8fde5f0d3241205067e5d7bf5380757e764eff31 (diff) |
svn merge -r74200:76302 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-6-Viewer --> release
Wheee, this was fun. Um, let's back-port fixes a little more rapidly next time. Reviewed by CG until alexandria died, did the rest by my lonesome.
Diffstat (limited to 'indra/newview')
31 files changed, 633 insertions, 229 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 85f7e2530f..a4383ffbeb 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.18.6.0"; -CFBundleGetInfoString = "Second Life version 1.18.6.0, Copyright 2004-2007 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.18.6.2"; +CFBundleGetInfoString = "Second Life version 1.18.6.2, Copyright 2004-2007 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 59822a1e4c..c753469212 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>1.18.6.0</string> + <string>1.18.6.2</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8b126b7597..be31d2481e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -108,22 +108,6 @@ #include "llsdserialize.h" -#if LL_WINDOWS && LL_LCD_COMPILE - #include "lllcd.h" -#endif - -#if LL_QUICKTIME_ENABLED - #if LL_DARWIN - #include <QuickTime/QuickTime.h> - #else - // quicktime specific includes - #include "MacTypes.h" - #include "QTML.h" - #include "Movies.h" - #include "FixMath.h" - #endif -#endif - #include "llworld.h" #include "llhudeffecttrail.h" #include "llvectorperfoptions.h" @@ -179,6 +163,28 @@ static char** gTempArgV; #include "llviewernetwork.h" // extern EGridInfo gGridChoice; + +////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor +// +#if LL_WINDOWS && LL_LCD_COMPILE + #include "lllcd.h" +#endif +// +#if LL_QUICKTIME_ENABLED + #if LL_DARWIN + #include <QuickTime/QuickTime.h> + #else + // quicktime specific includes + #include "MacTypes.h" + #include "QTML.h" + #include "Movies.h" + #include "FixMath.h" + #endif +#endif +// +////// + + //---------------------------------------------------------------------------- // viewer.cpp - these are only used in viewer, should be easily moved. extern void disable_win_error_reporting(); @@ -226,7 +232,6 @@ extern BOOL gPeriodicSlowFrame; void UnloadGStreamer(); #endif -extern void send_stats(); //////////////////////////////////////////////////////////// // All from the last globals push... bool gVerifySSLCert = true; @@ -246,8 +251,6 @@ LLString gDisabledMessage; // Set in LLAppViewer::initConfiguration used in idle BOOL gHideLinks = FALSE; // Set in LLAppViewer::initConfiguration, used externally -BOOL gInProductionGrid = FALSE; - BOOL gAllowIdleAFK = TRUE; F32 gAFKTimeout = DEFAULT_AFK_TIMEOUT; BOOL gShowObjectUpdates = FALSE; @@ -366,6 +369,7 @@ static LLString gWindowTitle; static char sWindowClass[] = "Second Life"; #endif +std::string gLoginPage; std::vector<std::string> gLoginURIs; static std::string gHelperURI; @@ -374,6 +378,7 @@ static const char USAGE[] = "\n" "options:\n" " -login <first> <last> <password> log in as a user\n" " -autologin log in as last saved user\n" +" -loginpage <URL> login authentication page to use\n" " -loginuri <URI> login server and CGI script to use\n" " -helperuri <URI> helper web CGI prefix to use\n" " -settings <filename> specify the filename of a\n" @@ -623,6 +628,41 @@ int parse_args(int argc, char **argv) gGridChoice = GRID_INFO_UMA; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } + else if (!strcmp(argv[j], "--mohini")) + { + gGridChoice = GRID_INFO_MOHINI; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--yami")) + { + gGridChoice = GRID_INFO_YAMI; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--nandi")) + { + gGridChoice = GRID_INFO_NANDI; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--mitra")) + { + gGridChoice = GRID_INFO_MITRA; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--radha")) + { + gGridChoice = GRID_INFO_RADHA; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--ravi")) + { + gGridChoice = GRID_INFO_RAVI; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--aruna")) + { + gGridChoice = GRID_INFO_ARUNA; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } else if (!strcmp(argv[j], "-user") && (++j < argc)) { if (!strcmp(argv[j], "-")) @@ -638,6 +678,10 @@ int parse_args(int argc, char **argv) snprintf(gGridName, MAX_STRING, "%s", ip_string.c_str()); // Flawfinder: ignore } } + else if (!strcmp(argv[j], "-loginpage") && (++j < argc)) + { + LLAppViewer::instance()->setLoginPage(utf8str_trim(argv[j])); + } else if (!strcmp(argv[j], "-loginuri") && (++j < argc)) { LLAppViewer::instance()->addLoginURI(utf8str_trim(argv[j])); @@ -998,7 +1042,7 @@ bool LLAppViewer::init() writeSystemInfo(); // Build a string representing the current version number. - gCurrentVersion = llformat("%d.%d.%d", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH ); + gCurrentVersion = llformat("%s %d.%d.%d.%d", gChannelName.c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD ); // // Load the feature tables @@ -1864,6 +1908,34 @@ bool LLAppViewer::initEarlyConfiguration() { sprintf(gGridName,"%s", gGridInfo[GRID_INFO_UMA].mName); } + else if (!strcmp(argv[j], "--mohini")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_MOHINI].mName); + } + else if (!strcmp(argv[j], "--yami")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_YAMI].mName); + } + else if (!strcmp(argv[j], "--nandi")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_NANDI].mName); + } + else if (!strcmp(argv[j], "--mitra")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_MITRA].mName); + } + else if (!strcmp(argv[j], "--radha")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_RADHA].mName); + } + else if (!strcmp(argv[j], "--ravi")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_RAVI].mName); + } + else if (!strcmp(argv[j], "--aruna")) + { + sprintf(gGridName,"%s", gGridInfo[GRID_INFO_ARUNA].mName); + } else if (!strcmp(argv[j], "-user") && (++j < argc)) { if (!strcmp(argv[j], "-")) @@ -2290,11 +2362,6 @@ bool LLAppViewer::doConfigFromCommandLine() removeMarkerFile(); return false; } - - if (!strcmp(gGridName, gGridInfo[GRID_INFO_AGNI].mName)) - { - gInProductionGrid = TRUE; - } return true; } @@ -2447,14 +2514,12 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); gDebugInfo["RAMInfo"] = llformat("%u", gSysMemory.getPhysicalMemoryKB()); - gDebugInfo["OSInfo"] = mSysOSInfo.getOSString().c_str(); + gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple(); // Dump some debugging info - llinfos << gSecondLife << " version " - << LL_VERSION_MAJOR << "." - << LL_VERSION_MINOR << "." - << LL_VERSION_PATCH - << llendl; + llinfos << gSecondLife + << " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH + << llendl; // Dump the local time and time zone time_t now; @@ -2466,6 +2531,7 @@ void LLAppViewer::writeSystemInfo() // query some system information llinfos << "CPU info:\n" << gSysCPU << llendl; llinfos << "Memory info:\n" << gSysMemory << llendl; + llinfos << "OS: " << getOSInfo().getOSStringSimple() << llendl; llinfos << "OS info: " << getOSInfo() << llendl; } @@ -2539,7 +2605,7 @@ bool LLAppViewer::anotherInstanceRunning() llinfos << "Checking marker file for lock..." << llendl; // If file doesn't exist, we create it - // If file does exist, try to get writing privilages + // If file does exist, try to get writing privileges FILE* fMarker = LLFile::fopen(marker_file.c_str(), "rb"); // Flawfinder: ignore if (fMarker != NULL) { @@ -2554,7 +2620,7 @@ bool LLAppViewer::anotherInstanceRunning() // *FIX:Mani - rather than have this exception here, // LLFile::fopen() have consistent behavior across platforms? -#if LL_DARWIN +#if LL_DARWIN || LL_LINUX || LL_SOLARIS // Try to lock it. On Mac, this is the only way to test if it's actually locked. if (flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1) { @@ -2600,7 +2666,7 @@ void LLAppViewer::initMarkerFile() llinfos << "Marker file is locked." << llendl; return; } -#if LL_DARWIN +#if LL_DARWIN || LL_LINUX || LL_SOLARIS // Try to lock it. On Mac, this is the only way to test if it's actually locked. if (flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1) { @@ -3043,6 +3109,17 @@ void LLAppViewer::setHelperURI(const std::string& uri) gHelperURI = uri; } +void LLAppViewer::setLoginPage(const std::string& login_page) +{ + gLoginPage = login_page; +} + +const std::string& LLAppViewer::getLoginPage() +{ + return gLoginPage; +} + + // Callback from a dialog indicating user was logged out. void finish_disconnect(S32 option, void* userdata) { @@ -3171,6 +3248,28 @@ void LLAppViewer::saveNameCache() } } +bool LLAppViewer::isInProductionGrid() +{ + return (GRID_INFO_AGNI == gGridChoice); +} + + +/*! @brief This class is an LLFrameTimer that can be created with + an elapsed time that starts counting up from the given value + rather than 0.0. + + Otherwise it behaves the same way as LLFrameTimer. +*/ +class LLFrameStatsTimer : public LLFrameTimer +{ +public: + LLFrameStatsTimer(F64 elapsed_already = 0.0) + : LLFrameTimer() + { + mStartTime -= elapsed_already; + } +}; + /////////////////////////////////////////////////////// // idle() // @@ -3278,12 +3377,15 @@ void LLAppViewer::idle() // { - static LLFrameTimer viewer_stats_timer; + // Initialize the viewer_stats_timer with an already elapsed time + // of SEND_STATS_PERIOD so that the initial stats report will + // be sent immediately. + static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); reset_statistics(); // Update session stats every large chunk of time // *FIX: (???) SAMANTHA - if (viewer_stats_timer.getElapsedTimeF32() >= 300.f && !gDisconnected) + if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected) { llinfos << "Transmitting sessions stats" << llendl; send_stats(); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index e97aead955..32501b4642 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -101,6 +101,8 @@ public: const std::vector<std::string>& getLoginURIs() const; const std::string& getHelperURI() const; void resetURIs() const; + void setLoginPage(const std::string& login_page); + const std::string& getLoginPage(); void forceDisconnect(const LLString& msg); // Force disconnection, with a message to the user. void badNetworkHandler(); // Cause a crash state due to bad network packet. @@ -111,6 +113,8 @@ public: void loadNameCache(); void saveNameCache(); + bool isInProductionGrid(); + // LLAppViewer testing helpers. // *NOTE: These will potentially crash the viewer. Only for debugging. virtual void forceErrorLLError(); @@ -169,7 +173,7 @@ private: // Thread objects. static LLTextureCache* sTextureCache; static LLWorkerThread* sImageDecodeThread; - static LLTextureFetch* sTextureFetch; + static LLTextureFetch* sTextureFetch; S32 mNumSessions; @@ -196,7 +200,6 @@ extern BOOL gHandleKeysAsync; // gSavedSettings used by llviewerdisplay.cpp & ll extern BOOL gProbeHardware; extern LLString gDisabledMessage; // llstartup extern BOOL gHideLinks; // used by llpanellogin, lllfloaterbuycurrency, llstartup -extern BOOL gInProductionGrid; extern LLSD gDebugInfo; extern BOOL gAllowIdleAFK; diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 2a352dfc3d..1e04d61a1f 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2767,7 +2767,7 @@ void LLPanelLandAccess::refresh_ui() { childSetToolTip("Only Allow", LLString()); } - childSetEnabled("GroupCheck", FALSE); + childSetEnabled("GroupCheck", TRUE); // Should always be an option (overrides age, payment restrictions) childSetEnabled("PassCheck", FALSE); childSetEnabled("pass_combo", FALSE); childSetEnabled("AccessList", FALSE); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 9170e70ccd..6128909528 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -656,7 +656,7 @@ LLSD LLFloaterReporter::gatherReport() mCopyrightWarningSeen = FALSE; std::ostringstream summary; - if (!gInProductionGrid) + if (!LLAppViewer::instance()->isInProductionGrid()) { summary << "Preview "; } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index deffca3b79..90df2284c5 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -108,6 +108,7 @@ LLColor4 LLFolderViewItem::sHighlightBgColor; LLColor4 LLFolderViewItem::sHighlightFgColor; LLColor4 LLFolderViewItem::sFilterBGColor; LLColor4 LLFolderViewItem::sFilterTextColor; +LLColor4 LLFolderViewItem::sLoadingMessageTextColor; // Default constructor LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon, @@ -132,7 +133,8 @@ LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon, mStringMatchOffset(LLString::npos), mControlLabelRotation(0.f), mRoot( root ), - mDragAndDropTarget(FALSE) + mDragAndDropTarget(FALSE), + mIsLoading(FALSE) { setIcon(icon); if( !LLFolderViewItem::sFont ) @@ -151,6 +153,7 @@ LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon, LLFolderViewItem::sHighlightFgColor = gColors.getColor( "MenuItemHighlightFgColor" ); LLFolderViewItem::sFilterBGColor = gColors.getColor( "FilterBackgroundColor" ); LLFolderViewItem::sFilterTextColor = gColors.getColor( "FilterTextColor" ); + LLFolderViewItem::sLoadingMessageTextColor = gColors.getColor( "FolderViewLoadingMessageTextColor" ); mArrowImage = gImageList.getImage(LLUUID(gViewerArt.getString("folder_arrow.tga")), MIPMAP_FALSE, TRUE); mBoxImage = gImageList.getImage(LLUUID(gViewerArt.getString("rounded_square.tga")), MIPMAP_FALSE, TRUE); @@ -933,6 +936,14 @@ void LLFolderViewItem::draw() text_left = right_x; } + + if ( mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") ) + { + sFont->renderUTF8( "Loading... ", 0, text_left, y, sLoadingMessageTextColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, S32_MAX, S32_MAX, &right_x, FALSE); + text_left = right_x; + } + sFont->renderUTF8( mLabel, 0, text_left, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, S32_MAX, S32_MAX, &right_x, FALSE ); @@ -2197,6 +2208,24 @@ void LLFolderViewFolder::draw() mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f)); } + bool possibly_has_children = false; + bool up_to_date = mListener && mListener->isUpToDate(); + if(!up_to_date && mListener && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter) + { + possibly_has_children = true; + } + + + BOOL loading = ( mIsOpen && possibly_has_children && !up_to_date ); + + if ( loading && !mIsLoading ) + { + // Measure how long we've been in the loading state + mTimeSinceRequestStart.reset(); + } + + mIsLoading = loading; + LLFolderViewItem::draw(); // draw children if root folder, or any other folder that is open or animating to closed state diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 9fcf94d802..37b9ee6c13 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -323,6 +323,7 @@ protected: static LLColor4 sHighlightFgColor; static LLColor4 sFilterBGColor; static LLColor4 sFilterTextColor; + static LLColor4 sLoadingMessageTextColor; LLString mLabel; LLString mSearchableLabel; @@ -349,6 +350,8 @@ protected: BOOL mDragAndDropTarget; LLPointer<LLViewerImage> mArrowImage; LLPointer<LLViewerImage> mBoxImage; + BOOL mIsLoading; + LLTimer mTimeSinceRequestStart; // This function clears the currently selected item, and records // the specified selected item appropriately for display and use diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 8c2eb2b596..c61fa7f2b6 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -383,6 +383,7 @@ class LLLandmarkBridge : public LLItemBridge { friend class LLInvFVBridge; public: + static const LLString& prefix() { return sPrefix; } virtual const LLString& getPrefix() { return sPrefix; } virtual void performAction(LLFolderView* folder, LLInventoryModel* model, LLString action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 46af3ec74f..8058ab9595 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -1879,16 +1879,15 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) payment_text = "NoPaymentInfoOnFile"; } args["[PAYMENTINFO]"] = self->mPanelSecondLife->childGetValue(payment_text).asString(); - LLString age_text = "NotAgeVerified"; - if(age_verified) - { - age_text = "AgeVerified"; - } - args["[PAYMENTINFO]"] += self->mPanelSecondLife->childGetValue(age_text).asString(); + LLString age_text = age_verified ? "AgeVerified" : "NotAgeVerified"; + // Do not display age verification status at this time + //args["[AGEVERIFICATION]"] = self->mPanelSecondLife->childGetValue(age_text).asString(); + args["[AGEVERIFICATION]"] = " "; } else { args["[PAYMENTINFO]"] = " "; + args["[AGEVERIFICATION]"] = " "; } LLString::format(caption_text, args); } diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 7263b11d96..bc74562d6d 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -48,6 +48,7 @@ #include "llcheckboxctrl.h" #include "llclassifiedflags.h" #include "llclassifiedstatsresponder.h" +#include "llcommandhandler.h" // for classified HTML detail page click tracking #include "llviewercontrol.h" #include "lllineeditor.h" #include "llfloateravatarinfo.h" @@ -58,6 +59,7 @@ #include "llviewertexteditor.h" #include "lltexturectrl.h" #include "lluiconstants.h" +#include "llurldispatcher.h" // for classified HTML detail click teleports #include "llvieweruictrlfactory.h" #include "llviewerparcelmgr.h" #include "llviewerwindow.h" @@ -70,6 +72,9 @@ const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ +//static +std::list<LLPanelClassified*> LLPanelClassified::sAllPanels; + // "classifiedclickthrough" // strings[0] = classified_id // strings[1] = teleport_clicks @@ -96,11 +101,45 @@ public: return true; } }; - static LLDispatchClassifiedClickThrough sClassifiedClickThrough; -//static -std::list<LLPanelClassified*> LLPanelClassified::sAllPanels; + +// We need to count classified teleport clicks from the search HTML detail pages, +// so we need have a teleport that also sends a click count message. +class LLClassifiedTeleportHandler : public LLCommandHandler +{ +public: + // Inform the system you handle commands starting + // with "foo" + LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport") { } + + bool handle(const LLSD& tokens, const LLSD& queryMap) + { + // Need at least classified id and region name, so 2 params + if (tokens.size() < 2) return false; + LLUUID classified_id = tokens[0].asUUID(); + if (classified_id.isNull()) return false; + // *HACK: construct a SLURL to do the teleport + std::string url("secondlife:///app/teleport/"); + // skip the uuid we took off above, rebuild URL + // separated by slashes. + for (S32 i = 1; i < tokens.size(); ++i) + { + url += tokens[i].asString(); + url += "/"; + } + llinfos << "classified teleport to " << url << llendl; + // *TODO: separately track old search, sidebar, and new search + // Right now detail HTML pages count as new search. + const bool from_search = true; + LLPanelClassified::sendClassifiedClickMessage(classified_id, "teleport", from_search); + // Invoke teleport + return LLURLDispatcher::dispatch(url); + } +}; +// Creating the object registers with the dispatcher. +LLClassifiedTeleportHandler gClassifiedTeleportHandler; + LLPanelClassified::LLPanelClassified(BOOL in_finder, bool from_search) : LLPanel("Classified Panel"), @@ -842,7 +881,7 @@ void LLPanelClassified::onClickTeleport(void* data) gAgent.teleportViaLocation(self->mPosGlobal); gFloaterWorldMap->trackLocation(self->mPosGlobal); - self->sendClassifiedClickMessage("teleport"); + sendClassifiedClickMessage(self->mClassifiedID, "teleport", self->mFromSearch); } } @@ -854,7 +893,7 @@ void LLPanelClassified::onClickMap(void* data) gFloaterWorldMap->trackLocation(self->mPosGlobal); LLFloaterWorldMap::show(NULL, TRUE); - self->sendClassifiedClickMessage("map"); + sendClassifiedClickMessage(self->mClassifiedID, "map", self->mFromSearch); } // static @@ -862,7 +901,7 @@ void LLPanelClassified::onClickProfile(void* data) { LLPanelClassified* self = (LLPanelClassified*)data; LLFloaterAvatarInfo::showFromDirectory(self->mCreatorID); - self->sendClassifiedClickMessage("profile"); + sendClassifiedClickMessage(self->mClassifiedID, "profile", self->mFromSearch); } // static @@ -936,20 +975,23 @@ void LLPanelClassified::onFocusReceived(LLFocusableElement* ctrl, void* data) } -void LLPanelClassified::sendClassifiedClickMessage(const char* type) +// static +void LLPanelClassified::sendClassifiedClickMessage(const LLUUID& classified_id, + const char* type, + bool from_search) { // You're allowed to click on your own ads to reassure yourself // that the system is working. std::vector<std::string> strings; - strings.push_back(mClassifiedID.asString()); + strings.push_back(classified_id.asString()); strings.push_back(type); LLUUID no_invoice; // New classified click-through handling LLSD body; body["type"] = type; - body["from_search"] = mFromSearch; - body["classified_id"] = mClassifiedID; + body["from_search"] = from_search; + body["classified_id"] = classified_id; std::string url = gAgent.getRegion()->getCapability("SearchStatTracking"); // If the capability exists send to the new database, otherwise send to the old one. diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 8884d1a25e..89939f243f 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -101,6 +101,7 @@ public: static void callbackGotPriceForListing(S32 option, LLString text, void* data); static void callbackConfirmPublish(S32 option, void* data); + static void sendClassifiedClickMessage(const LLUUID& classified_id, const char* type, bool from_search); protected: static void saveCallback(S32 option, void* data); @@ -114,7 +115,6 @@ protected: static void onFocusReceived(LLFocusableElement* ctrl, void* data); static void onCommitAny(LLUICtrl* ctrl, void* data); - void sendClassifiedClickMessage(const char* type); BOOL checkDirty(); // Update and return mDirty protected: diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 74936dce0c..7e97622c8b 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -147,9 +147,46 @@ void LLLoginHandler::parse(const LLSD& queryMap) { gGridChoice = GRID_INFO_UMA; } + else if (queryMap["grid"].asString() == "mohini") + { + gGridChoice = GRID_INFO_MOHINI; + } + else if (queryMap["grid"].asString() == "yami") + { + gGridChoice = GRID_INFO_YAMI; + } + else if (queryMap["grid"].asString() == "nandi") + { + gGridChoice = GRID_INFO_NANDI; + } + else if (queryMap["grid"].asString() == "mitra") + { + gGridChoice = GRID_INFO_MITRA; + } + else if (queryMap["grid"].asString() == "radha") + { + gGridChoice = GRID_INFO_RADHA; + } + else if (queryMap["grid"].asString() == "ravi") + { + gGridChoice = GRID_INFO_RAVI; + } + else if (queryMap["grid"].asString() == "aruna") + { + gGridChoice = GRID_INFO_ARUNA; + } +#if !LL_RELEASE_FOR_DOWNLOAD + if (gGridChoice > GRID_INFO_NONE && gGridChoice < GRID_INFO_LOCAL) + { + gSavedSettings.setS32("ServerChoice", gGridChoice); + } +#endif - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); /* Flawfinder: ignore */ - LLAppViewer::instance()->resetURIs(); + if (LLAppViewer::instance()->getLoginURIs().size() == 0) + { + snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); /* Flawfinder: ignore */ + LLAppViewer::instance()->resetURIs(); + } LLString startLocation = queryMap["location"].asString(); @@ -303,18 +340,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "login_html"); if ( web_browser ) { + // observe browser events + web_browser->addObserver( this ); + // don't make it a tab stop until SL-27594 is fixed web_browser->setTabStop(FALSE); - - // painfully build the path to the loading screen - std::string loading_path( gDirUtilp->getExpandedFilename( LL_PATH_SKINS, "" ) ); - loading_path.append( gDirUtilp->getDirDelimiter() ); - loading_path.append( "html" ); - loading_path.append( gDirUtilp->getDirDelimiter() ); - loading_path.append( "loading" ); - loading_path.append( gDirUtilp->getDirDelimiter() ); - loading_path.append( "loading.html" ); - web_browser->navigateTo( loading_path.c_str() ); + web_browser->navigateToLocalPage( "loading", "loading.html" ); // make links open in external browser web_browser->setOpenInExternalBrowser( true ); @@ -328,7 +359,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); - LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr ); + std::string login_page = LLAppViewer::instance()->getLoginPage(); + if (login_page.empty()) + { + login_page = childGetValue( "real_url" ).asString(); + } + LLHTTPClient::head( login_page, gResponsePtr ); }; #else mHtmlAvailable = FALSE; @@ -350,20 +386,19 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) // mark as available mHtmlAvailable = TRUE; - }; + } } else // the site is not available (missing page, server down, other badness) { if ( web_browser ) - { - // hide browser control (revealing default one) - web_browser->setVisible( FALSE ); + { + web_browser->navigateToLocalPage( "loading-error" , "index.html" ); - // mark as unavailable - mHtmlAvailable = FALSE; - }; - }; + // mark as available + mHtmlAvailable = TRUE; + } + } #else mHtmlAvailable = FALSE; #endif @@ -387,13 +422,6 @@ void LLPanelLogin::draw() { if (!getVisible()) return; - BOOL target_fullscreen; - S32 target_width; - S32 target_height; - gViewerWindow->getTargetWindow(target_fullscreen, target_width, target_height); - - childSetVisible("full_screen_text", target_fullscreen); - glPushMatrix(); { F32 image_aspect = 1.333333f; @@ -604,17 +632,36 @@ void LLPanelLogin::loadLoginPage() char* curl_channel = curl_escape(gChannelName.c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); + std::string login_page = LLAppViewer::instance()->getLoginPage(); + if (login_page.empty()) + { + login_page = sInstance->childGetValue( "real_url" ).asString(); + } - oStr << sInstance->childGetValue( "real_url" ).asString() << "&firstname=" << firstname << + // Use the right delimeter depending on how LLURI parses the URL + LLURI login_page_uri = LLURI(login_page); + std::string first_query_delimiter = "&"; + if (login_page_uri.queryMap().size() == 0) + { + first_query_delimiter = "?"; + } + oStr << login_page << first_query_delimiter << "firstname=" << firstname << "&lastname=" << lastname << "&location=" << location << "®ion=" << curl_region << "&grid=" << gGridInfo[gGridChoice].mLabel << "&channel=" << curl_channel << "&version=" << curl_version; - curl_free(curl_region); curl_free(curl_channel); curl_free(curl_version); + LLString language(gSavedSettings.getString("Language")); + if(language == "default") + { + language = gSavedSettings.getString("SystemLanguage"); + } + + oStr << "&lang=" << language; + if (!gCmdLinePassword.empty()) { oStr << "&password=" << gCmdLinePassword; @@ -637,12 +684,32 @@ void LLPanelLogin::loadLoginPage() } #ifndef LL_RELEASE_FOR_DOWNLOAD oStr << "&show_grid=TRUE"; +#else + if (gSavedSettings.getBOOL("ForceShowGrid")) + oStr << "&show_grid=TRUE"; #endif // navigate to the "real" page web_browser->navigateTo( oStr.str() ); } +#if LL_LIBXUL_ENABLED +void LLPanelLogin::onNavigateComplete( const EventType& eventIn ) +{ + LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); + if (web_browser) + { + // *HACK HACK HACK HACK! + /* Stuff a Tab key into the browser now so that the first field will + ** get the focus! The embedded javascript on the page that properly + ** sets the initial focus in a real web browser is not working inside + ** the viewer, so this is an UGLY HACK WORKAROUND for now. + */ + // Commented out as it's not reliable + //web_browser->handleKey(KEY_TAB, MASK_NONE, false); + } +} +#endif //--------------------------------------------------------------------------- // Protected methods diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 191e88c25b..f2a58b7b5f 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -39,6 +39,7 @@ #include "llviewerimage.h" #include "llstring.h" #include "llmd5.h" +#include "llwebbrowserctrl.h" class LLTextBox; class LLLineEditor; @@ -64,6 +65,9 @@ extern LLLoginHandler gLoginHandler; class LLPanelLogin : public LLPanel +#if LL_LIBXUL_ENABLED + , public LLWebBrowserCtrlObserver +#endif { public: LLPanelLogin(const LLRect &rect, BOOL show_server, @@ -89,6 +93,11 @@ public: private: static void onClickQuit(void*); static void onClickVersion(void*); + +#if LL_LIBXUL_ENABLED + // browser observer impls + virtual void onNavigateComplete( const EventType& eventIn ); +#endif private: LLPointer<LLViewerImage> mLogoImage; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e2e076e364..ddd73fc0df 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5829,7 +5829,8 @@ bool LLObjectSelection::applyToTEs(LLSelectedTEFunctor* func, bool firstonly) iterator nextiter = iter++; LLSelectNode* node = *nextiter; LLViewerObject* object = (*nextiter)->getObject(); - for (S32 te = 0; te < object->getNumTEs(); ++te) + S32 num_tes = llmin((S32)object->getNumTEs(), (S32)object->getNumFaces()); // avatars have TEs but no faces + for (S32 te = 0; te < num_tes; ++te) { if (node->isTESelected(te)) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b0b9fd33d1..21c97c2678 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -48,6 +48,7 @@ #include "audiosettings.h" #include "llares.h" #include "llcachename.h" +#include "llcameraview.h" #include "llviewercontrol.h" #include "lldir.h" #include "lleconomy.h" @@ -61,6 +62,7 @@ #include "llmd5.h" #include "llmemorystream.h" #include "llmessageconfig.h" +#include "llmoveview.h" #include "llregionhandle.h" #include "llsd.h" #include "llsdserialize.h" @@ -592,6 +594,7 @@ BOOL idle_startup() codec << " - " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD; codec << "]"; LLMozLib::getInstance()->setBrowserAgentId( codec.str() ); + LLMozLib::getInstance()->enableProxy( gSavedSettings.getBOOL("BrowserProxyEnabled"), gSavedSettings.getString("BrowserProxyAddress"), gSavedSettings.getS32("BrowserProxyPort") ); #endif //------------------------------------------------- @@ -736,6 +739,7 @@ BOOL idle_startup() gViewerWindow->setNormalControlsVisible( FALSE ); gLoginMenuBarView->setVisible( TRUE ); + gLoginMenuBarView->setEnabled( TRUE ); timeout.reset(); return do_normal_idle; @@ -1009,6 +1013,10 @@ BOOL idle_startup() if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState()) { //lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl; + // If we get here we have gotten past the potential stall + // in curl, so take "may appear frozen" out of progress bar. JC + auth_desc = "Logging in..."; + set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); if (!gUserAuthp) { llerrs << "No userauth in STATE_LOGIN_NO_DATA_YET!" << llendl; @@ -1552,9 +1560,19 @@ BOOL idle_startup() gViewerWindow->setNormalControlsVisible( TRUE ); } gLoginMenuBarView->setVisible( FALSE ); + gLoginMenuBarView->setEnabled( FALSE ); gFloaterMap->setVisible( gSavedSettings.getBOOL("ShowMiniMap") ); + if (gSavedSettings.getBOOL("ShowCameraControls")) + { + LLFloaterCamera::show(NULL); + } + if (gSavedSettings.getBOOL("ShowMovementControls")) + { + LLFloaterMove::show(NULL); + } + if (!gNoRender) { // Move the progress view in front of the UI @@ -1736,10 +1754,33 @@ BOOL idle_startup() } else { - llinfos << ".. initialized successfully." << llendl; - set_startup_status(0.57f, "QuickTime initialized successfully.", gAgent.mMOTD.c_str()); + //llinfos << "######### QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + //llinfos << "######### QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + if ( LLMediaEngine::getInstance()->getQuickTimeVersion() < LL_MIN_QUICKTIME_VERSION ) + { + // turn off QuickTime if version is less than required + LLMediaEngine::getInstance ()->setAvailable ( FALSE ); + + // display a message here explaining why we disabled QuickTime + gViewerWindow->alertXml("QuickTimeOutOfDate"); + } + else + { + llinfos << ".. initialized successfully." << llendl; + set_startup_status(0.57f, "QuickTime initialized successfully.", gAgent.mMOTD.c_str()); + }; }; + #elif LL_DARWIN + if ( LLMediaEngine::getInstance()->getQuickTimeVersion() < LL_MIN_QUICKTIME_VERSION ) + { + // turn off QuickTime if version is less than required + LLMediaEngine::getInstance ()->setAvailable ( FALSE ); + + // display a message here explaining why we disabled QuickTime + gViewerWindow->alertXml("QuickTimeOutOfDate"); + } #endif + EnterMovies (); gQuickTimeInitialized = true; } @@ -3583,6 +3624,7 @@ void reset_login() { // Hide menus and normal buttons gViewerWindow->setNormalControlsVisible( FALSE ); gLoginMenuBarView->setVisible( TRUE ); + gLoginMenuBarView->setEnabled( TRUE ); } // Hide any other stuff diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 706587abb0..c17f0007c2 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -351,12 +351,6 @@ void LLFloaterTexturePicker::updateImageStats() { mResolutionLabel->setTextArg("[DIMENSIONS]", LLString("[? x ?]")); } - if (gAgent.isGodlike()) - { - LLString tstring = "Pick: "; - tstring.append(mTexturep->getID().asString()); - setTitle(tstring); - } } } diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 8e742bd655..bb71be1aa4 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -8,15 +8,16 @@ #include "llviewerprecompiledheaders.h" -#include "llvieweraudio.h" #include "audioengine.h" -#include "llviewercontrol.h" -#include "llmediaengine.h" +#include "audiosettings.h" #include "llagent.h" #include "llappviewer.h" -#include "llvoiceclient.h" -#include "llviewerwindow.h" +#include "llmediaengine.h" +#include "llvieweraudio.h" #include "llviewercamera.h" +#include "llviewercontrol.h" +#include "llviewerwindow.h" +#include "llvoiceclient.h" ///////////////////////////////////////////////////////// @@ -210,7 +211,10 @@ void audio_update_wind(bool force_update) // don't use the setter setMaxWindGain() because we don't // want to screw up the fade-in on startup by setting actual source gain // outside the fade-in. - gAudiop->mMaxWindGain = gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient"); + F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient"); + gAudiop->mMaxWindGain = gSavedSettings.getBOOL("MuteAmbient") + ? 0.f + : ambient_volume * ambient_volume; last_camera_water_height = camera_water_height; gAudiop->updateWind(gRelativeWindVec, camera_water_height); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fdc0047f95..54396d083e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -677,7 +677,7 @@ void init_menus() gPopupMenuView->setBackgroundColor( color ); // If we are not in production, use a different color to make it apparent. - if (gInProductionGrid) + if (LLAppViewer::instance()->isInProductionGrid()) { color = gColors.getColor( "MenuBarBgColor" ); } @@ -694,6 +694,9 @@ void init_menus() // menu holder appears on top of menu bar so you can see the menu title // flash when an item is triggered (the flash occurs in the holder) gViewerWindow->getRootView()->addChild(gMenuHolder); + + gViewerWindow->setMenuBackgroundColor(false, + LLAppViewer::instance()->isInProductionGrid()); // *TODO:Get the cost info from the server const LLString upload_cost("10"); @@ -944,7 +947,7 @@ void init_client_menu(LLMenuGL* menu) #ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid) + if (!LLAppViewer::instance()->isInProductionGrid()) { menu->append(new LLMenuItemCheckGL("Hacked Godmode", &handle_toggle_hacked_godmode, @@ -1070,7 +1073,7 @@ void init_client_menu(LLMenuGL* menu) &menu_check_control, (void*)"ShowConsoleWindow")); - if(gQAMode && !gInProductionGrid) + if(gQAMode) { LLMenuGL* sub = NULL; sub = new LLMenuGL("Debugging"); @@ -2637,53 +2640,40 @@ void handle_leave_god_mode(void*) void set_god_level(U8 god_level) { - U8 old_god_level = gAgent.getGodLevel(); - gAgent.setGodLevel( god_level ); - show_debug_menus(); - gIMMgr->refresh(); - gParcelMgr->notifyObservers(); + U8 old_god_level = gAgent.getGodLevel(); + gAgent.setGodLevel( god_level ); + show_debug_menus(); + gIMMgr->refresh(); + gParcelMgr->notifyObservers(); - // Some classifieds change visibility on god mode - LLFloaterDirectory::requestClassifieds(); + // Some classifieds change visibility on god mode + LLFloaterDirectory::requestClassifieds(); - // God mode changes sim visibility - gWorldMap->reset(); - gWorldMap->setCurrentLayer(0); + // God mode changes sim visibility + gWorldMap->reset(); + gWorldMap->setCurrentLayer(0); - // inventory in items may change in god mode - gObjectList.dirtyAllObjectInventory(); + // inventory in items may change in god mode + gObjectList.dirtyAllObjectInventory(); + + if(gViewerWindow) + { + gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, + LLAppViewer::instance()->isInProductionGrid()); + } + + LLString::format_map_t args; + if(god_level > GOD_NOT) + { + args["[LEVEL]"] = llformat("%d",(S32)god_level); + LLNotifyBox::showXml("EnteringGodMode", args); + } + else + { + args["[LEVEL]"] = llformat("%d",(S32)old_god_level); + LLNotifyBox::showXml("LeavingGodMode", args); + } - LLString::format_map_t args; - if(god_level > GOD_NOT) - { - args["[LEVEL]"] = llformat("%d",(S32)god_level); - if (gInProductionGrid) - { - gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) ); - gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) ); - } - else - { - gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) ); - gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) ); - } - LLNotifyBox::showXml("EnteringGodMode", args); - } - else - { - args["[LEVEL]"] = llformat("%d",(S32)old_god_level); - if (gInProductionGrid) - { - gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) ); - gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) ); - } - else - { - gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) ); - gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) ); - } - LLNotifyBox::showXml("LeavingGodMode", args); - } } #ifdef TOGGLE_HACKED_GODLIKE_VIEWER @@ -3990,7 +3980,8 @@ BOOL enable_take() return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && gAgent.isGodlike()) + if (!LLAppViewer::instance()->isInProductionGrid() + && gAgent.isGodlike()) { return TRUE; } @@ -4549,7 +4540,8 @@ class LLObjectEnableDelete : public view_listener_t TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - (!gInProductionGrid && gAgent.isGodlike()) || + (!LLAppViewer::instance()->isInProductionGrid() + && gAgent.isGodlike()) || # endif (gSelectMgr && gSelectMgr->canDoDelete()); #endif @@ -6276,13 +6268,7 @@ void handle_selected_texture_info(void*) S32 height = img->getHeight(); S32 width = img->getWidth(); S32 components = img->getComponents(); - std::string image_id_string; - if (gAgent.isGodlike()) - { - image_id_string = image_id.asString() + " "; - } - msg = llformat("%s%dx%d %s on face ", - image_id_string.c_str(), + msg = llformat("%dx%d %s on face ", width, height, (components == 4 ? "alpha" : "opaque")); @@ -6466,7 +6452,8 @@ class LLToolsEnableTakeCopy : public view_listener_t all_valid = true; #ifndef HACKED_GODLIKE_VIEWER # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (gInProductionGrid || !gAgent.isGodlike()) + if (LLAppViewer::instance()->isInProductionGrid() + || !gAgent.isGodlike()) # endif { struct f : public LLSelectedObjectFunctor @@ -6571,7 +6558,8 @@ BOOL enable_save_into_inventory(void*) return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && gAgent.isGodlike()) + if (!LLAppViewer::instance()->isInProductionGrid() + && gAgent.isGodlike()) { return TRUE; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8a4cd16c08..dd786da4d3 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -279,11 +279,6 @@ void process_logout_reply(LLMessageSystem* msg, void**) llinfos << "process_logout_reply item not found: " << item_id << llendl; } } - if(!parents.empty()) - { - gInventory.accountForUpdate(parents); - gInventory.notifyObservers(); - } LLAppViewer::instance()->forceQuit(); } @@ -1348,7 +1343,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) S32 binary_bucket_size; LLChat chat; - //*TODO:translate - need to fix the full name to first/last (maybe) + // *TODO:translate - need to fix the full name to first/last (maybe) msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id); msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group); msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ToAgentID, to_id); @@ -1885,6 +1880,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_GOTO_URL: { + // n.b. this is for URLs sent by the system, not for + // URLs sent by scripts (i.e. llLoadURL) if (binary_bucket_size <= 0) { llwarns << "bad binary_bucket_size: " @@ -5081,7 +5078,7 @@ void callback_load_url_name(const LLUUID& id, const char* first, const char* las owner_name += last; } - // TODO: Talk to james about using an id instead of a name for this. + // For legacy name-only mutes. if (gMuteListp->isMuted(LLUUID::null, owner_name)) { delete infop; @@ -5116,8 +5113,12 @@ void process_load_url(LLMessageSystem* msg, void**) // URL is safety checked in load_url above // Check if object or owner is muted - if (gMuteListp->isMuted(infop->mObjectID, infop->mObjectName)) + if (gMuteListp && + (gMuteListp->isMuted(infop->mObjectID, infop->mObjectName) || + gMuteListp->isMuted(infop->mOwnerID)) + ) { + llinfos<<"Ignoring load_url from muted object/owner."<<llendl; delete infop; infop = NULL; return; diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index caa61d6418..ad0dacbd13 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -77,6 +77,34 @@ LLGridData gGridInfo[GRID_INFO_COUNT] = "util.uma.lindenlab.com", "https://login.uma.lindenlab.com/cgi-bin/login.cgi", "http://uma-secondlife.webdev.lindenlab.com/helpers/" }, + { "Mohini", + "util.mohini.lindenlab.com", + "https://login.mohini.lindenlab.com/cgi-bin/login.cgi", + "http://mohini-secondlife.webdev.lindenlab.com/helpers/" }, + { "Yami", + "util.yami.lindenlab.com", + "https://login.yami.lindenlab.com/cgi-bin/login.cgi", + "http://yami-secondlife.webdev.lindenlab.com/helpers/" }, + { "Nandi", + "util.nandi.lindenlab.com", + "https://login.nandi.lindenlab.com/cgi-bin/login.cgi", + "http://nandi-secondlife.webdev.lindenlab.com/helpers/" }, + { "Mitra", + "util.mitra.lindenlab.com", + "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", + "http://mitra-secondlife.webdev.lindenlab.com/helpers/" }, + { "Radha", + "util.radha.lindenlab.com", + "https://login.radha.lindenlab.com/cgi-bin/login.cgi", + "http://radha-secondlife.webdev.lindenlab.com/helpers/" }, + { "Ravi", + "util.ravi.lindenlab.com", + "https://login.ravi.lindenlab.com/cgi-bin/login.cgi", + "http://ravi-secondlife.webdev.lindenlab.com/helpers/" }, + { "Aruna", + "util.aruna.lindenlab.com", + "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", + "http://aruna-secondlife.webdev.lindenlab.com/helpers/" }, { "Local", "localhost", "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 118897aebc..dbeaf2c1cd 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -48,6 +48,13 @@ enum EGridInfo GRID_INFO_GANGA, GRID_INFO_VAAK, GRID_INFO_UMA, + GRID_INFO_MOHINI, + GRID_INFO_YAMI, + GRID_INFO_NANDI, + GRID_INFO_MITRA, + GRID_INFO_RADHA, + GRID_INFO_RAVI, + GRID_INFO_ARUNA, GRID_INFO_LOCAL, GRID_INFO_OTHER, // IP address set via -user or other command line option GRID_INFO_COUNT diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9243263794..f242b06d9b 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4511,7 +4511,8 @@ BOOL LLViewerObject::permYouOwner() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) + if (!LLAppViewer::instance()->isInProductionGrid() + && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; } @@ -4547,7 +4548,8 @@ BOOL LLViewerObject::permOwnerModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) + if (!LLAppViewer::instance()->isInProductionGrid() + && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; } @@ -4570,7 +4572,8 @@ BOOL LLViewerObject::permModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) + if (!LLAppViewer::instance()->isInProductionGrid() + && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; } @@ -4593,7 +4596,8 @@ BOOL LLViewerObject::permCopy() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) + if (!LLAppViewer::instance()->isInProductionGrid() + && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; } @@ -4616,7 +4620,8 @@ BOOL LLViewerObject::permMove() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) + if (!LLAppViewer::instance()->isInProductionGrid() + && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; } @@ -4639,7 +4644,8 @@ BOOL LLViewerObject::permTransfer() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!gInProductionGrid && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) + if (!LLAppViewer::instance()->isInProductionGrid() + && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; } diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 9d5b301d26..ec4f66d681 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -47,6 +47,7 @@ #include "llvlmanager.h" #include "llagent.h" #include "llviewercontrol.h" +#include "llfloaterdirectory.h" #include "llfloatertools.h" #include "lldebugview.h" #include "llfasttimerview.h" @@ -660,10 +661,27 @@ void send_stats() F32 run_time = F32(LLFrameTimer::getElapsedSeconds()); agent["start_time"] = ltime - run_time; - agent["run_time"] = run_time; + + // The first stat set must have a 0 run time if it doesn't actually + // contain useful data in terms of FPS, etc. We use half the + // SEND_STATS_PERIOD seconds as the point at which these statistics become + // valid. Data warehouse uses a 0 value here to easily discard these + // records with non-useful FPS values etc. + if (run_time < (SEND_STATS_PERIOD / 2)) + { + agent["run_time"] = 0.0f; + } + else + { + agent["run_time"] = run_time; + } + // send fps only for time app spends in foreground agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32(); agent["version"] = gCurrentVersion; + LLString language(gSavedSettings.getString("Language")); + if(language == "default") language = gSavedSettings.getString("SystemLanguage"); + agent["language"] = language; agent["sim_fps"] = ((F32) gFrameCount - gSimFrames) / (F32) (gRenderStartTime.getElapsedTimeF32() - gSimLastTime); @@ -680,7 +698,7 @@ void send_stats() LLSD &system = body["system"]; system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB(); - system["os"] = LLAppViewer::instance()->getOSInfo().getOSString(); + system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); std::string gpu_desc = llformat( @@ -725,6 +743,17 @@ void send_stats() fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets; fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets; + // Misc stats, two strings and two ints + // These are not expecticed to persist across multiple releases + // Comment any changes with your name and the expected release revision + // If the current revision is recent, ping the previous author before overriding + LLSD &misc = body["stats"]["misc"]; + + // misc["string_1"] = + // misc["string_2"] = + misc["int_1"] = LLFloaterDirectory::sOldSearchCount; // Steve: 1.18.6 + misc["int_2"] = LLFloaterDirectory::sNewSearchCount; // Steve: 1.18.6 + gViewerStats->addToMessage(body); LLHTTPClient::post(url, body, new ViewerStatsResponder()); diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 4c2a741244..277bf44e48 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -187,10 +187,13 @@ private: extern LLViewerStats *gViewerStats; +static const F32 SEND_STATS_PERIOD = 300.0f; + // The following are from (older?) statistics code found in appviewer. void reset_statistics(); void output_statistics(void*); void update_statistics(U32 frame_count); +void send_stats(); extern std::map<S32,LLFrameTimer> gDebugTimers; #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 18f07efb44..5c613052ea 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -37,6 +37,7 @@ #include "llinventory.h" #include "llinventorymodel.h" #include "llinventoryview.h" +#include "llinventorybridge.h" // for landmark prefix string #include "llviewertexteditor.h" @@ -1391,7 +1392,9 @@ void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item ) void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item ) { - open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE); + LLString title = + LLString(" ") + LLLandmarkBridge::prefix() + item->getName(); + open_landmark((LLViewerInventoryItem*)item, title, FALSE, item->getUUID(), TRUE); } void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved ) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4c96083337..2a496f6698 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1849,16 +1849,6 @@ void LLViewerWindow::initWorldUI() // keep onscreen gFloaterView->adjustToFitScreen(gFloaterMap, FALSE); - - if (gSavedSettings.getBOOL("ShowCameraControls")) - { - LLFloaterCamera::show(NULL); - } - - if (gSavedSettings.getBOOL("ShowMovementControls")) - { - LLFloaterMove::show(NULL); - } gIMMgr = LLIMMgr::getInstance(); @@ -2154,8 +2144,12 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) { gMenuBarView->setVisible( visible ); gMenuBarView->setEnabled( visible ); + + // ...and set the menu color appropriately. + setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, + LLAppViewer::instance()->isInProductionGrid()); } - + if ( gStatusBar ) { gStatusBar->setVisible( visible ); @@ -2163,8 +2157,38 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) } } - - +void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) +{ + LLString::format_map_t args; + LLColor4 new_bg_color; + + if(god_mode && LLAppViewer::instance()->isInProductionGrid()) + { + new_bg_color = gColors.getColor( "MenuBarGodBgColor" ); + } + else if(god_mode && !LLAppViewer::instance()->isInProductionGrid()) + { + new_bg_color = gColors.getColor( "MenuNonProductionGodBgColor" ); + } + else if(!god_mode && !LLAppViewer::instance()->isInProductionGrid()) + { + new_bg_color = gColors.getColor( "MenuNonProductionBgColor" ); + } + else + { + new_bg_color = gColors.getColor( "MenuBarBgColor" ); + } + + if(gMenuBarView) + { + gMenuBarView->setBackgroundColor( new_bg_color ); + } + + if(gStatusBar) + { + gStatusBar->setBackgroundColor( new_bg_color ); + } +} void LLViewerWindow::drawDebugText() { @@ -2369,6 +2393,18 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) toggle_debug_menus(NULL); } + // Explicit hack for debug menu. + if ((mask == (MASK_SHIFT | MASK_CONTROL)) && + ('G' == key || 'g' == key)) + { + if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page + { + BOOL visible = ! gSavedSettings.getBOOL("ForceShowGrid"); + gSavedSettings.setBOOL("ForceShowGrid", visible); + LLPanelLogin::loadLoginPage(); + } + } + // Example "bug" for bug reporter web page if ((MASK_SHIFT & mask) && (MASK_ALT & mask) @@ -2410,6 +2446,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { return TRUE; } + // let menus handle navigation keys + if (gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) + { + return TRUE; + } // Traverses up the hierarchy LLUICtrl* keyboard_focus = gFocusMgr.getKeyboardFocus(); @@ -2515,6 +2556,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { return TRUE; } + + // give menus a chance to handle keys + if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)) + { + return TRUE; + } // don't pass keys on to world when something in ui has focus return gFocusMgr.childHasKeyboardFocus(mRootView) diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 36225cb7d3..612484e2dc 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -181,6 +181,7 @@ public: // Hide normal UI when a logon fails, re-show everything when logon is attempted again void setNormalControlsVisible( BOOL visible ); + void setMenuBackgroundColor(bool god_mode = false, bool dev_grid = false); // Handle the application becoming active (frontmost) or inactive //BOOL handleActivate(BOOL activate); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c6a3ff192b..1e800a372e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3426,7 +3426,10 @@ void LLVOAvatar::updateCharacter(LLAgent &agent) // AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, // AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); - F32 gain = gSavedSettings.getBOOL("MuteAmbient") ? 0.f : (.30f * gSavedSettings.getF32("AudioLevelAmbient")); + F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient"); + F32 gain = gSavedSettings.getBOOL("MuteAmbient") + ? 0.f + : (.50f * ambient_volume * ambient_volume); LLUUID& step_sound_id = getStepSound(); LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 6867cacfa4..70037d3c20 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -723,6 +723,7 @@ void LLVOVolume::sculpt() S32 current_discard = getVolume()->getSculptLevel(); + llassert_always(current_discard >= -2 && current_discard <= max_discard); if (current_discard == discard_level) // no work to do here return; @@ -756,7 +757,7 @@ BOOL LLVOVolume::calcLOD() S32 cur_detail = 0; - F32 radius = mVolumep->mLODScaleBias.scaledVec(getScale()).magVec(); + F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).magVec(); F32 distance = mDrawable->mDistanceWRTCamera; distance *= sDistanceFactor; diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index 13c5ac3bbb..949ea71c56 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -35,7 +35,6 @@ #include <tchar.h> #include <tlhelp32.h> -#include <atlbase.h> #include "llappviewer.h" #include "llwindebug.h" #include "llviewercontrol.h" @@ -56,11 +55,11 @@ LLSD Block for Windows Dump Information <string></string> <key>Module</key> <string></string> - <key>Date Modified</key> + <key>DateModified</key> <string></string> - <key>Exception Code</key> + <key>ExceptionCode</key> <string></string> - <key>Exception Read/Write Address</key> + <key>ExceptionRead/WriteAddress</key> <string></string> <key>Instruction</key> <string></string> @@ -75,11 +74,11 @@ LLSD Block for Windows Dump Information <array> <!-- One map per stack frame --> <map> - <key>Module Name</key> + <key>ModuleName</key> <string></string> - <key>Module Base Address</key> + <key>ModuleBaseAddress</key> <string></string> - <key>Module Offset Address</key> + <key>ModuleOffsetAddress</key> <string></string> <key>Parameters</key> <array> @@ -93,8 +92,6 @@ LLSD Block for Windows Dump Information */ -// From viewer.h -extern BOOL gInProductionGrid; extern void (*gCrashCallback)(void); @@ -124,6 +121,9 @@ MODULE32_NEST Module32Next_; #define CALL_TRACE_MAX ((DUMP_SIZE_MAX - 2000) / (MAX_PATH + 40)) //max number of traced calls #define NL L"\r\n" //new line +//Windows Call Stack Construction idea from +//http://www.codeproject.com/tools/minidump.asp + //**************************************************************************************** BOOL WINAPI Get_Module_By_Ret_Addr(PBYTE Ret_Addr, LPWSTR Module_Name, PBYTE & Module_Addr) //**************************************************************************************** @@ -168,9 +168,6 @@ void WINAPI Get_Call_Stack(PEXCEPTION_POINTERS pException, LLSD& info) // pException can be either GetExceptionInformation() or NULL. // If pException = NULL - get current call stack. { - - USES_CONVERSION; - LPWSTR Module_Name = new WCHAR[MAX_PATH]; PBYTE Module_Addr = 0; @@ -210,9 +207,9 @@ void WINAPI Get_Call_Stack(PEXCEPTION_POINTERS pException, LLSD& info) if (Get_Module_By_Ret_Addr(Ebp->Ret_Addr, Module_Name, Module_Addr)) { // Save module's address and full path. - info["Call Stack"][i]["Module Name"] = W2A(Module_Name); - info["Call Stack"][i]["Module Address"] = (int)Module_Addr; - info["Call Stack"][i]["Call Offset"] = (int)(Ebp->Ret_Addr - Module_Addr); + info["CallStack"][i]["ModuleName"] = ll_convert_wide_to_string(Module_Name); + info["CallStack"][i]["ModuleAddress"] = (int)Module_Addr; + info["CallStack"][i]["CallOffset"] = (int)(Ebp->Ret_Addr - Module_Addr); LLSD params; // Save 5 params of the call. We don't know the real number of params. @@ -225,9 +222,9 @@ void WINAPI Get_Call_Stack(PEXCEPTION_POINTERS pException, LLSD& info) params[j] = (int)Ebp->Param[j]; } } - info["Call Stack"][i]["Parameters"] = params; + info["CallStack"][i]["Parameters"] = params; } - info["Call Stack"][i]["Return Address"] = (int)Ebp->Ret_Addr; + info["CallStack"][i]["ReturnAddress"] = (int)Ebp->Ret_Addr; } } //Get_Call_Stack @@ -257,12 +254,10 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) //************************************************************* // Allocate Str[DUMP_SIZE_MAX] and return Str with dump, if !pException - just return call stack in Str. { - USES_CONVERSION; - LLSD info; LPWSTR Str; int Str_Len; - int i; +// int i; LPWSTR Module_Name = new WCHAR[MAX_PATH]; PBYTE Module_Addr; HANDLE hFile; @@ -276,10 +271,9 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) return NULL; Get_Version_Str(info); - GetModuleFileName(NULL, Str, MAX_PATH); - info["Process"] = W2A(Str); + info["Process"] = ll_convert_wide_to_string(Str); // If exception occurred. if (pException) @@ -290,7 +284,7 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) // If module with E.ExceptionAddress found - save its path and date. if (Get_Module_By_Ret_Addr((PBYTE)E.ExceptionAddress, Module_Name, Module_Addr)) { - info["Module"] = W2A(Module_Name); + info["Module"] = ll_convert_wide_to_string(Module_Name); if ((hFile = CreateFile(Module_Name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) @@ -300,17 +294,17 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) FileTimeToLocalFileTime(&Last_Write_Time, &Local_File_Time); FileTimeToSystemTime(&Local_File_Time, &T); - info["Date Modified"] = llformat("%02d/%02d/%d", T.wMonth, T.wDay, T.wYear); + info["DateModified"] = llformat("%02d/%02d/%d", T.wMonth, T.wDay, T.wYear); } CloseHandle(hFile); } } else { - info["Exception Addr"] = (int)E.ExceptionAddress; + info["ExceptionAddr"] = (int)E.ExceptionAddress; } - info["Exception Code"] = (int)E.ExceptionCode; + info["ExceptionCode"] = (int)E.ExceptionCode; /* //TODO: Fix this @@ -326,11 +320,12 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) // Save instruction that caused exception. - Str_Len = 0; + /* + LLString str; for (i = 0; i < 16; i++) - Str_Len += wsprintf(Str + Str_Len, L" %02X", PBYTE(E.ExceptionAddress)[i]); - info["Instruction"] = W2A(Str); - + str += llformat(" %02X", PBYTE(E.ExceptionAddress)[i]); + info["Instruction"] = str; + */ LLSD registers; registers["EAX"] = (int)C.Eax; registers["EBX"] = (int)C.Ebx; @@ -348,10 +343,6 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) // Save call stack info. Get_Call_Stack(pException, info); - if (Str[0] == NL[0]) - lstrcpy(Str, Str + sizeof(NL) - 1); - - return info; } //Get_Exception_Info |