diff --git a/autobuild.xml b/autobuild.xml index e4ff35b7e7..b1cfe79275 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -611,9 +611,9 @@ archive hash - 8de71c518c248d77f70f87ab5e9de732 + 5a1d52ec3981292855a179be86988a02 url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/105828/925920/fmodstudio-2.02.06.575716-darwin64-575716.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/112152/972159/fmodstudio-2.02.13.578928-darwin64-578928.tar.bz2 name darwin64 @@ -635,9 +635,9 @@ archive hash - 2eea946ee7a572b748cec0c623ade3ef + 8594ec180b73be42d37b6f93ac59ab4a url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/105830/925932/fmodstudio-2.02.06.575716-windows-575716.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/112153/972171/fmodstudio-2.02.13.578928-windows-578928.tar.bz2 name windows @@ -647,16 +647,16 @@ archive hash - 483d6fd5d057b0a681bffef9b8b9d927 + 46941a2610f83c353e551d300e536c54 url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/105829/925931/fmodstudio-2.02.06.575716-windows64-575716.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/112154/972170/fmodstudio-2.02.13.578928-windows64-578928.tar.bz2 name windows64 version - 2.02.06.575716 + 2.02.13.578928 fontconfig diff --git a/doc/contributions.txt b/doc/contributions.txt index 51b8397d60..d1ba28acd2 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -237,6 +237,7 @@ Ansariel Hiller SL-15227 SL-15398 SL-18432 + SL-4126 Aralara Rajal Arare Chantilly CHUIBUG-191 @@ -287,6 +288,7 @@ Beq Janus SL-18592 SL-18637 SL-19317 + SL-19660 Beth Walcher Bezilon Kasei Biancaluce Robbiani diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp index a645e624f8..590915e9d2 100644 --- a/indra/llcommon/llsd.cpp +++ b/indra/llcommon/llsd.cpp @@ -622,7 +622,7 @@ namespace if (index >= mData.size()) { - mData.resize(i + 1); + mData.resize(index + 1); } return mData[index]; diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 4e9fcc77ee..cdb9a7ed8a 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -30,7 +30,6 @@ #include #include #include -#include #include "stdtypes.h" @@ -216,21 +215,15 @@ public: void assign(const Date&); void assign(const URI&); void assign(const Binary&); - - // support assignment from size_t et al. - template ::value && - ! std::is_same::value, - bool>::type = true> - void assign(VALUE v) { assign(Integer(narrow(v))); } - // support assignment from F32 et al. - template ::value, - bool>::type = true> - void assign(VALUE v) { assign(Real(narrow(v))); } - - template - LLSD& operator=(VALUE v) { assign(v); return *this; } + + LLSD& operator=(Boolean v) { assign(v); return *this; } + LLSD& operator=(Integer v) { assign(v); return *this; } + LLSD& operator=(Real v) { assign(v); return *this; } + LLSD& operator=(const String& v) { assign(v); return *this; } + LLSD& operator=(const UUID& v) { assign(v); return *this; } + LLSD& operator=(const Date& v) { assign(v); return *this; } + LLSD& operator=(const URI& v) { assign(v); return *this; } + LLSD& operator=(const Binary& v) { assign(v); return *this; } //@} /** @@ -292,6 +285,7 @@ public: //@{ LLSD(const char*); void assign(const char*); + LLSD& operator=(const char* v) { assign(v); return *this; } //@} /** @name Map Values */ diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 74ec62d347..58bedacf43 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -121,9 +121,14 @@ U32 micro_sleep(U64 us, U32 max_yields) U64 start = get_clock_count(); // This is kernel dependent. Currently, our kernel generates software clock // interrupts at 250 Hz (every 4,000 microseconds). - const U64 KERNEL_SLEEP_INTERVAL_US = 4000; + const S64 KERNEL_SLEEP_INTERVAL_US = 4000; - auto num_sleep_intervals = (us - (KERNEL_SLEEP_INTERVAL_US >> 1)) / KERNEL_SLEEP_INTERVAL_US; + // Use signed arithmetic to discover whether a sleep is even necessary. If + // either 'us' or KERNEL_SLEEP_INTERVAL_US is unsigned, the compiler + // promotes the difference to unsigned. If 'us' is less than half + // KERNEL_SLEEP_INTERVAL_US, the unsigned difference will be hugely + // positive, resulting in a crazy long wait. + auto num_sleep_intervals = (S64(us) - (KERNEL_SLEEP_INTERVAL_US >> 1)) / KERNEL_SLEEP_INTERVAL_US; if (num_sleep_intervals > 0) { U64 sleep_time = (num_sleep_intervals * KERNEL_SLEEP_INTERVAL_US) - (KERNEL_SLEEP_INTERVAL_US >> 1); diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index f19beb5be5..d732032a6c 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -286,6 +286,19 @@ F32 LLSettingsWater::getModifiedWaterFogDensity(bool underwater) const if (underwater && underwater_fog_mod > 0.0f) { underwater_fog_mod = llclamp(underwater_fog_mod, 0.0f, 10.0f); + // BUG-233797/BUG-233798 -ve underwater fog density can cause (unrecoverable) blackout. + // raising a negative number to a non-integral power results in a non-real result (which is NaN for our purposes) + // Two methods were tested, number 2 is being used: + // 1) Force the fog_mod to be integral. The effect is unlikely to be nice, but it is better than blackness. + // In this method a few of the combinations are "usable" but the water colour is effectively inverted (blue becomes yellow) + // this seems to be unlikely to be a desirable use case for the majority. + // 2) Force density to be an arbitrary non-negative (i.e. 1) when underwater and modifier is not an integer (1 was aribtrarily chosen as it gives at least some notion of fog in the transition) + // This is more restrictive, effectively forcing a density under certain conditions, but allowing the range of #1 and avoiding blackness in other cases + // at the cost of overriding the fog density. + if(fog_density < 0.0f && underwater_fog_mod != (F32)llround(underwater_fog_mod) ) + { + fog_density = 1.0f; + } fog_density = pow(fog_density, underwater_fog_mod); } return fog_density; diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 846549b368..87fd5a154f 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -253,7 +253,9 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h { const LLUUID& agent_id = *it; - LL_WARNS("AvNameCache") << "LLAvatarNameResponder::result " + // If cap fails, response can contain a lot of names, + // don't spam too much + LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result " << "failed id " << agent_id << LL_ENDL; @@ -272,7 +274,7 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) if (existing == mCache.end()) { // there is no existing cache entry, so make a temporary name from legacy - LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent " + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache get legacy for agent " << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility boost::bind(&LLAvatarNameCache::legacyNameFetch, _1, _2, _3)); diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index e1869e8125..62c311f522 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1672,7 +1672,8 @@ void LLFolderView::update() // Clear the modified setting on the filter only if the filter finished after running the filter process // Note: if the filter count has timed out, that means the filter halted before completing the entire set of items - if (filter_object.isModified() && (!filter_object.isTimedOut())) + bool filter_modified = filter_object.isModified(); + if (filter_modified && (!filter_object.isTimedOut())) { filter_object.clearModified(); } @@ -1706,7 +1707,7 @@ void LLFolderView::update() BOOL filter_finished = mViewModel->contentsReady() && (getViewModelItem()->passedFilter() || ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration() - && !filter_object.isModified())); + && !filter_modified)); if (filter_finished || gFocusMgr.childHasKeyboardFocus(mParentPanel.get()) || gFocusMgr.childHasMouseCapture(mParentPanel.get())) @@ -1794,13 +1795,26 @@ void LLFolderView::update() if (mSelectedItems.size() && mNeedsScroll) { - scrollToShowItem(mSelectedItems.back(), constraint_rect); + LLFolderViewItem* scroll_to_item = mSelectedItems.back(); + scrollToShowItem(scroll_to_item, constraint_rect); // continue scrolling until animated layout change is done - if (filter_finished - && (!needsArrange() || !is_visible)) - { - mNeedsScroll = FALSE; - } + bool selected_filter_finished = getRoot()->getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration(); + if (selected_filter_finished && scroll_to_item && scroll_to_item->getViewModelItem()) + { + selected_filter_finished = scroll_to_item->getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration(); + } + if (filter_finished && selected_filter_finished) + { + bool needs_arrange = needsArrange() || getRoot()->needsArrange(); + if (mParentFolder) + { + needs_arrange |= (bool)mParentFolder->needsArrange(); + } + if (!needs_arrange || !is_visible) + { + mNeedsScroll = FALSE; + } + } } if (mSignalSelectCallback) diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index ee20d048fd..a5157266c5 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -335,7 +335,6 @@ protected: F32 mAutoOpenCountdown; S32 mLastArrangeGeneration; S32 mLastCalculatedWidth; - bool mNeedsSort; bool mIsFolderComplete; // indicates that some children were not loaded/added yet bool mAreChildrenInited; // indicates that no children were initialized diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7c381161c9..d736aa6634 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -337,7 +337,7 @@ void LLNotificationForm::addElement(const std::string& type, const std::string& element["name"] = name; element["text"] = name; element["value"] = value; - element["index"] = mFormData.size(); + element["index"] = LLSD::Integer(mFormData.size()); element["enabled"] = enabled; mFormData.append(element); } diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp index 2123ed3939..4c207faa81 100644 --- a/indra/llwindow/llkeyboardwin32.cpp +++ b/indra/llwindow/llkeyboardwin32.cpp @@ -247,31 +247,9 @@ void LLKeyboardWin32::scanKeyboard() { S32 key; MSG msg; - BOOL pending_key_events = PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD); + PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD); for (key = 0; key < KEY_COUNT; key++) { - // On Windows, verify key down state. JC - // RN: only do this if we don't have further key events in the queue - // as otherwise there might be key repeat events still waiting for this key we are now dumping - if (!pending_key_events && mKeyLevel[key]) - { - // *TODO: I KNOW there must be a better way of - // interrogating the key state than this, using async key - // state can cause ALL kinds of bugs - Doug - if ((key < KEY_BUTTON0) && ((key < '0') || (key > '9'))) - { - // ...under windows make sure the key actually still is down. - // ...translate back to windows key - U16 virtual_key = inverseTranslateExtendedKey(key); - // keydown in highest bit - if (!pending_key_events && !(GetAsyncKeyState(virtual_key) & 0x8000)) - { - //LL_INFOS() << "Key up event missed, resetting" << LL_ENDL; - mKeyLevel[key] = FALSE; - } - } - } - // Generate callback if any event has occurred on this key this frame. // Can't just test mKeyLevel, because this could be a slow frame and // key might have gone down then up. JC diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 5ea36a044a..97154f804c 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.12 +6.6.13 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 775ddb0571..886c348e2b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8352,6 +8352,17 @@ Value 1 + NvAPICreateApplicationProfile + + Comment + Create NVIDIA application profile for optimized settings + Persist + 1 + Type + Boolean + Value + 1 + PurgeCacheOnNextStartup Comment diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index 5a720af038..77a3d47aea 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -149,7 +149,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const params.append(event_data["x"]); params.append(event_data["y"]); params.append(event_data["z"]); - LLCommandDispatcher::dispatch("teleport", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, "clicked", true); + LLCommandDispatcher::dispatch("teleport", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true); // *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "parcel", "login", login_refresh", "balance", "chat" // should we just compose LLCommandHandler and LLDispatchListener? } @@ -159,7 +159,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const LLVector3(event_data["x"].asReal(), event_data["y"].asReal(), event_data["z"].asReal())).getSLURLString(); - LLURLDispatcher::dispatch(url, "clicked", NULL, false); + LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, NULL, false); } } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 23d99da8ba..0197857a99 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2178,6 +2178,7 @@ bool LLAppViewer::cleanup() LLSelectMgr::deleteSingleton(); LLViewerEventRecorder::deleteSingleton(); LLWorld::deleteSingleton(); + LLVoiceClient::deleteSingleton(); // It's not at first obvious where, in this long sequence, a generic cleanup // call OUGHT to go. So let's say this: as we migrate cleanup from diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 6457c13ef3..d22fb7a4e6 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -259,21 +259,75 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) std::string app_name = LLTrans::getString("APP_NAME"); llutf16string w_app_name = utf8str_to_utf16str(app_name); wsprintf(profile_name, L"%s", w_app_name.c_str()); - status = NvAPI_DRS_SetCurrentGlobalProfile(hSession, profile_name); - if (status != NVAPI_OK) + NvDRSProfileHandle hProfile = 0; + // (3) Check if we already have an application profile for the viewer + status = NvAPI_DRS_FindProfileByName(hSession, profile_name, &hProfile); + if (status != NVAPI_OK && status != NVAPI_PROFILE_NOT_FOUND) { nvapi_error(status); return; } + else if (status == NVAPI_PROFILE_NOT_FOUND) + { + // Don't have an application profile yet - create one + LL_INFOS() << "Creating NVIDIA application profile" << LL_ENDL; - // (3) Obtain the current profile. - NvDRSProfileHandle hProfile = 0; - status = NvAPI_DRS_GetCurrentGlobalProfile(hSession, &hProfile); - if (status != NVAPI_OK) + NVDRS_PROFILE profileInfo; + profileInfo.version = NVDRS_PROFILE_VER; + profileInfo.isPredefined = 0; + wsprintf(profileInfo.profileName, L"%s", w_app_name.c_str()); + + status = NvAPI_DRS_CreateProfile(hSession, &profileInfo, &hProfile); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + } + + // (4) Check if current exe is part of the profile + std::string exe_name = gDirUtilp->getExecutableFilename(); + NVDRS_APPLICATION profile_application; + profile_application.version = NVDRS_APPLICATION_VER; + + llutf16string w_exe_name = utf8str_to_utf16str(exe_name); + NvAPI_UnicodeString profile_app_name; + wsprintf(profile_app_name, L"%s", w_exe_name.c_str()); + + status = NvAPI_DRS_GetApplicationInfo(hSession, hProfile, profile_app_name, &profile_application); + if (status != NVAPI_OK && status != NVAPI_EXECUTABLE_NOT_FOUND) { nvapi_error(status); return; } + else if (status == NVAPI_EXECUTABLE_NOT_FOUND) + { + LL_INFOS() << "Creating application for " << exe_name << " for NVIDIA application profile" << LL_ENDL; + + // Add this exe to the profile + NVDRS_APPLICATION application; + application.version = NVDRS_APPLICATION_VER; + application.isPredefined = 0; + wsprintf(application.appName, L"%s", w_exe_name.c_str()); + wsprintf(application.userFriendlyName, L"%s", w_exe_name.c_str()); + wsprintf(application.launcher, L"%s", w_exe_name.c_str()); + wsprintf(application.fileInFolder, L"%s", ""); + + status = NvAPI_DRS_CreateApplication(hSession, hProfile, &application); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + // Save application in case we added one + status = NvAPI_DRS_SaveSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + } // load settings for querying status = NvAPI_DRS_LoadSettings(hSession); @@ -289,7 +343,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) status = NvAPI_DRS_GetSetting(hSession, hProfile, PREFERRED_PSTATE_ID, &drsSetting); if (status == NVAPI_SETTING_NOT_FOUND) { //only override if the user hasn't specifically set this setting - // (4) Specify that we want the VSYNC disabled setting + // (5) Specify that we want to enable maximum performance setting // first we fill the NVDRS_SETTING struct, then we call the function drsSetting.version = NVDRS_SETTING_VER; drsSetting.settingId = PREFERRED_PSTATE_ID; @@ -302,7 +356,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) return; } - // (5) Now we apply (or save) our changes to the system + // (6) Now we apply (or save) our changes to the system status = NvAPI_DRS_SaveSettings(hSession); if (status != NVAPI_OK) { @@ -386,27 +440,31 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LL_WARNS() << "Application init failed." << LL_ENDL; return -1; } - - NvAPI_Status status; - - // Initialize NVAPI - status = NvAPI_Initialize(); - NvDRSSessionHandle hSession = 0; - if (status == NVAPI_OK) - { - // Create the session handle to access driver settings - status = NvAPI_DRS_CreateSession(&hSession); - if (status != NVAPI_OK) - { - nvapi_error(status); - } - else - { - //override driver setting as needed - ll_nvapi_init(hSession); - } - } + NvDRSSessionHandle hSession = 0; + static LLCachedControl use_nv_api(gSavedSettings, "NvAPICreateApplicationProfile", true); + if (use_nv_api) + { + NvAPI_Status status; + + // Initialize NVAPI + status = NvAPI_Initialize(); + + if (status == NVAPI_OK) + { + // Create the session handle to access driver settings + status = NvAPI_DRS_CreateSession(&hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + } + else + { + //override driver setting as needed + ll_nvapi_init(hSession); + } + } + } // Have to wait until after logging is initialized to display LFH info if (num_heaps > 0) @@ -620,76 +678,81 @@ bool LLAppViewerWin32::init() LLFile::remove(log_file, ENOENT); } - std::string build_data_fname( - gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json")); - // Use llifstream instead of std::ifstream because LL_PATH_EXECUTABLE - // could contain non-ASCII characters, which std::ifstream doesn't handle. - llifstream inf(build_data_fname.c_str()); - if (! inf.is_open()) - { - LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't read '" << build_data_fname - << "'" << LL_ENDL; - } - else - { - Json::Reader reader; - Json::Value build_data; - if (! reader.parse(inf, build_data, false)) // don't collect comments - { - // gah, the typo is baked into Json::Reader API - LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname - << "': " << reader.getFormatedErrorMessages() << LL_ENDL; - } - else - { - Json::Value BugSplat_DB = build_data["BugSplat DB"]; - if (! BugSplat_DB) - { - LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '" - << build_data_fname << "'" << LL_ENDL; - } - else - { - // Got BugSplat_DB, onward! - std::wstring version_string(WSTRINGIZE(LL_VIEWER_VERSION_MAJOR << '.' << - LL_VIEWER_VERSION_MINOR << '.' << - LL_VIEWER_VERSION_PATCH << '.' << - LL_VIEWER_VERSION_BUILD)); + // Win7 is no longer supported + bool is_win_7_or_below = LLOSInfo::getInstance()->mMajorVer <= 6 && LLOSInfo::getInstance()->mMajorVer <= 1; - DWORD dwFlags = MDSF_NONINTERACTIVE | // automatically submit report without prompting - MDSF_PREVENTHIJACKING; // disallow swiping Exception filter - - bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT"); - if (needs_log_file) + if (!is_win_7_or_below) + { + std::string build_data_fname( + gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json")); + // Use llifstream instead of std::ifstream because LL_PATH_EXECUTABLE + // could contain non-ASCII characters, which std::ifstream doesn't handle. + llifstream inf(build_data_fname.c_str()); + if (!inf.is_open()) + { + LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't read '" << build_data_fname + << "'" << LL_ENDL; + } + else + { + Json::Reader reader; + Json::Value build_data; + if (!reader.parse(inf, build_data, false)) // don't collect comments + { + // gah, the typo is baked into Json::Reader API + LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname + << "': " << reader.getFormatedErrorMessages() << LL_ENDL; + } + else + { + Json::Value BugSplat_DB = build_data["BugSplat DB"]; + if (!BugSplat_DB) { - // Startup only! - LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL; - dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE; + LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '" + << build_data_fname << "'" << LL_ENDL; } - - // have to convert normal wide strings to strings of __wchar_t - sBugSplatSender = new MiniDmpSender( - WCSTR(BugSplat_DB.asString()), - WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)), - WCSTR(version_string), - nullptr, // szAppIdentifier -- set later - dwFlags); - sBugSplatSender->setCallback(bugsplatSendLog); - - if (needs_log_file) + else { - // Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash - std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log"); - sBugSplatSender->setLogFilePath(WCSTR(log_file)); - } + // Got BugSplat_DB, onward! + std::wstring version_string(WSTRINGIZE(LL_VIEWER_VERSION_MAJOR << '.' << + LL_VIEWER_VERSION_MINOR << '.' << + LL_VIEWER_VERSION_PATCH << '.' << + LL_VIEWER_VERSION_BUILD)); - // engage stringize() overload that converts from wstring - LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL) - << ' ' << stringize(version_string) << ')' << LL_ENDL; - } // got BugSplat_DB - } // parsed build_data.json - } // opened build_data.json + DWORD dwFlags = MDSF_NONINTERACTIVE | // automatically submit report without prompting + MDSF_PREVENTHIJACKING; // disallow swiping Exception filter + bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT"); + if (needs_log_file) + { + // Startup only! + LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL; + dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE; + } + + // have to convert normal wide strings to strings of __wchar_t + sBugSplatSender = new MiniDmpSender( + WCSTR(BugSplat_DB.asString()), + WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)), + WCSTR(version_string), + nullptr, // szAppIdentifier -- set later + dwFlags); + sBugSplatSender->setCallback(bugsplatSendLog); + + if (needs_log_file) + { + // Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash + std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log"); + sBugSplatSender->setLogFilePath(WCSTR(log_file)); + } + + // engage stringize() overload that converts from wstring + LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL) + << ' ' << stringize(version_string) << ')' << LL_ENDL; + } // got BugSplat_DB + } // parsed build_data.json + } // opened build_data.json + } // !is_win_7_or_below #endif // LL_BUGSPLAT #endif // LL_SEND_CRASH_REPORTS diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp index 1b85c09071..46ec97d5c0 100644 --- a/indra/newview/llcommanddispatcherlistener.cpp +++ b/indra/newview/llcommanddispatcherlistener.cpp @@ -64,8 +64,13 @@ void LLCommandDispatcherListener::dispatch(const LLSD& params) const // But for testing, allow a caller to specify untrusted. trusted_browser = params["trusted"].asBoolean(); } - LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], "", NULL, - "clicked", trusted_browser); + LLCommandDispatcher::dispatch(params["cmd"], + params["params"], + params["query"], + "", + NULL, + LLCommandHandler::NAV_TYPE_CLICKED, + trusted_browser); } void LLCommandDispatcherListener::enumerate(const LLSD& params) const diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index e774a9390a..caa27e530b 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -40,6 +40,8 @@ static LLCommandDispatcherListener sCommandDispatcherListener; const std::string LLCommandHandler::NAV_TYPE_CLICKED = "clicked"; +const std::string LLCommandHandler::NAV_TYPE_EXTERNAL = "external"; +const std::string LLCommandHandler::NAV_TYPE_NAVIGATED = "navigated"; //--------------------------------------------------------------------------- // Underlying registry for command handlers, not directly accessible. diff --git a/indra/newview/llcommandhandler.h b/indra/newview/llcommandhandler.h index c7a7a18c7d..1a354b04f7 100644 --- a/indra/newview/llcommandhandler.h +++ b/indra/newview/llcommandhandler.h @@ -70,6 +70,8 @@ public: }; static const std::string NAV_TYPE_CLICKED; + static const std::string NAV_TYPE_EXTERNAL; + static const std::string NAV_TYPE_NAVIGATED; LLCommandHandler(const char* command, EUntrustedAccess untrusted_access); // Automatically registers object to get called when diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 6f3f6e9166..26782e53f0 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -247,8 +247,9 @@ namespace Details errorCount = 0; if (!result.isMap() || - !result.get("events") || - !result.get("id")) + !result.has("events") || + !result["events"].isArray() || + !result.has("id")) { LL_WARNS("LLEventPollImpl") << " <" << counter << "> received event poll with no events or id key: " << result << LL_ENDL; continue; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 329af264eb..c7f3ef3490 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -499,6 +499,18 @@ bool LLFeatureManager::loadGPUClass() { mGPUClass = GPU_CLASS_5; } + + #if LL_WINDOWS + const F32Gigabytes MIN_PHYSICAL_MEMORY(2); + + LLMemory::updateMemoryInfo(); + F32Gigabytes physical_mem = LLMemory::getMaxMemKB(); + if (MIN_PHYSICAL_MEMORY > physical_mem && mGPUClass > GPU_CLASS_1) + { + // reduce quality on systems that don't have enough memory + mGPUClass = (EGPUClass)(mGPUClass - 1); + } + #endif //LL_WINDOWS } //end if benchmark else { diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm index bca5b10c8a..4dd8bea4e1 100644 --- a/indra/newview/llfilepicker_mac.mm +++ b/indra/newview/llfilepicker_mac.mm @@ -71,31 +71,36 @@ NSOpenPanel *init_panel(const std::vector* allowed_types, unsigned return panel; } -std::unique_ptr> doLoadDialog(const std::vector* allowed_types, +std::unique_ptr> doLoadDialog(const std::vector* allowed_types, unsigned int flags) { - int result; + std::unique_ptr> outfiles; - NSOpenPanel *panel = init_panel(allowed_types,flags); - - result = [panel runModal]; - - std::unique_ptr> outfiles = nullptr; + @autoreleasepool + { + int result; + //Aura TODO: We could init a small window and release it at the end of this routine + //for a modeless interface. - if (result == NSOKButton) - { - NSArray *filesToOpen = [panel URLs]; - int count = [filesToOpen count]; + NSOpenPanel *panel = init_panel(allowed_types,flags); - if (count > 0) + result = [panel runModal]; + + if (result == NSOKButton) { - outfiles = std::make_unique>(); - } - - for (int i=0; ipush_back(std::move(afilestr)); + NSArray *filesToOpen = [panel URLs]; + int i, count = [filesToOpen count]; + + if (count > 0) + { + outfiles.reset(new std::vector); + } + + for (i=0; ipush_back(afilestr); + } } } return outfiles; @@ -106,11 +111,14 @@ void doLoadDialogModeless(const std::vector* allowed_types, void (*callback)(bool, std::vector &, void*), void *userdata) { - // Note: might need to return and save this panel - // so that it does not close immediately - NSOpenPanel *panel = init_panel(allowed_types,flags); + + @autoreleasepool + { + // Note: might need to return and save this panel + // so that it does not close immediately + NSOpenPanel *panel = init_panel(allowed_types,flags); - [panel beginWithCompletionHandler:^(NSModalResponse result) + [panel beginWithCompletionHandler:^(NSModalResponse result) { std::vector outfiles; if (result == NSOKButton) @@ -138,6 +146,7 @@ void doLoadDialogModeless(const std::vector* allowed_types, callback(false, outfiles, userdata); } }]; + } } std::unique_ptr doSaveDialog(const std::string* file, @@ -146,29 +155,32 @@ std::unique_ptr doSaveDialog(const std::string* file, const std::string* extension, unsigned int flags) { - NSSavePanel *panel = [NSSavePanel savePanel]; - - NSString *extensionns = [NSString stringWithCString:extension->c_str() encoding:[NSString defaultCStringEncoding]]; - NSArray *fileType = [extensionns componentsSeparatedByString:@","]; - - //[panel setMessage:@"Save Image File"]; - [panel setTreatsFilePackagesAsDirectories: ( flags & F_NAV_SUPPORT ) ]; - [panel setCanSelectHiddenExtension:true]; - [panel setAllowedFileTypes:fileType]; - NSString *fileName = [NSString stringWithCString:file->c_str() encoding:[NSString defaultCStringEncoding]]; - - std::unique_ptr outfile = nullptr; - NSURL* url = [NSURL fileURLWithPath:fileName]; - [panel setNameFieldStringValue: fileName]; - [panel setDirectoryURL: url]; - if([panel runModal] == - NSFileHandlingPanelOKButton) - { - NSURL* url = [panel URL]; - NSString* p = [url path]; - outfile = std::make_unique( [p UTF8String] ); - // write the file - } + std::unique_ptr outfile; + @autoreleasepool + { + NSSavePanel *panel = [NSSavePanel savePanel]; + + NSString *extensionns = [NSString stringWithCString:extension->c_str() encoding:[NSString defaultCStringEncoding]]; + NSArray *fileType = [extensionns componentsSeparatedByString:@","]; + + //[panel setMessage:@"Save Image File"]; + [panel setTreatsFilePackagesAsDirectories: ( flags & F_NAV_SUPPORT ) ]; + [panel setCanSelectHiddenExtension:true]; + [panel setAllowedFileTypes:fileType]; + NSString *fileName = [NSString stringWithCString:file->c_str() encoding:[NSString defaultCStringEncoding]]; + + NSURL* url = [NSURL fileURLWithPath:fileName]; + [panel setNameFieldStringValue: fileName]; + [panel setDirectoryURL: url]; + if([panel runModal] == + NSFileHandlingPanelOKButton) + { + NSURL* url = [panel URL]; + NSString* p = [url path]; + outfile.reset(new std::string([p UTF8String])); + // write the file + } + } return outfile; } @@ -180,38 +192,40 @@ void doSaveDialogModeless(const std::string* file, void (*callback)(bool, std::string&, void*), void *userdata) { - NSSavePanel *panel = [NSSavePanel savePanel]; + @autoreleasepool { + NSSavePanel *panel = [NSSavePanel savePanel]; - NSString *extensionns = [NSString stringWithCString:extension->c_str() encoding:[NSString defaultCStringEncoding]]; - NSArray *fileType = [extensionns componentsSeparatedByString:@","]; + NSString *extensionns = [NSString stringWithCString:extension->c_str() encoding:[NSString defaultCStringEncoding]]; + NSArray *fileType = [extensionns componentsSeparatedByString:@","]; - //[panel setMessage:@"Save Image File"]; - [panel setTreatsFilePackagesAsDirectories: ( flags & F_NAV_SUPPORT ) ]; - [panel setCanSelectHiddenExtension:true]; - [panel setAllowedFileTypes:fileType]; - NSString *fileName = [NSString stringWithCString:file->c_str() encoding:[NSString defaultCStringEncoding]]; + //[panel setMessage:@"Save Image File"]; + [panel setTreatsFilePackagesAsDirectories: ( flags & F_NAV_SUPPORT ) ]; + [panel setCanSelectHiddenExtension:true]; + [panel setAllowedFileTypes:fileType]; + NSString *fileName = [NSString stringWithCString:file->c_str() encoding:[NSString defaultCStringEncoding]]; - NSURL* url = [NSURL fileURLWithPath:fileName]; - [panel setNameFieldStringValue: fileName]; - [panel setDirectoryURL: url]; + NSURL* url = [NSURL fileURLWithPath:fileName]; + [panel setNameFieldStringValue: fileName]; + [panel setDirectoryURL: url]; - [panel beginWithCompletionHandler:^(NSModalResponse result) - { - if (result == NSOKButton) - { - NSURL* url = [panel URL]; - NSString* p = [url path]; - std::string outfile([p UTF8String]); + [panel beginWithCompletionHandler:^(NSModalResponse result) + { + if (result == NSOKButton) + { + NSURL* url = [panel URL]; + NSString* p = [url path]; + std::string outfile([p UTF8String]); - callback(true, outfile, userdata); - } - else // cancel - { - std::string outfile; - callback(false, outfile, userdata); - } - }]; + callback(true, outfile, userdata); + } + else // cancel + { + std::string outfile; + callback(false, outfile, userdata); + } + }]; + } } #endif diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 19bc865d8b..ad2533debc 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -165,10 +165,21 @@ void LLFloaterDisplayName::onReset() { return; } - getChild("display_name_editor")->setValue(av_name.getCompleteName()); + getChild("display_name_editor")->setValue(av_name.getUserName()); - getChild("display_name_confirm")->clear(); - getChild("display_name_confirm")->setFocus(TRUE); + if (getChild("display_name_editor")->getEnabled()) + { + // UI is enabled, fill the first field + getChild("display_name_confirm")->clear(); + getChild("display_name_confirm")->setFocus(TRUE); + } + else + { + // UI is disabled, looks like we should allow resetting + // even if user already set a display name, enable save button + getChild("display_name_confirm")->setValue(av_name.getUserName()); + getChild("save_btn")->setEnabled(true); + } } @@ -183,6 +194,21 @@ void LLFloaterDisplayName::onSave() return; } + LLAvatarName av_name; + if (!LLAvatarNameCache::get(gAgent.getID(), &av_name)) + { + return; + } + + std::string user_name = av_name.getUserName(); + if (display_name_utf8.compare(user_name) == 0 + && LLAvatarNameCache::getInstance()->hasNameLookupURL()) + { + // A reset + LLViewerDisplayName::set("", boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); + return; + } + const U32 DISPLAY_NAME_MAX_LENGTH = 31; // characters, not bytes LLWString display_name_wstr = utf8string_to_wstring(display_name_utf8); if (display_name_wstr.size() > DISPLAY_NAME_MAX_LENGTH) diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index 8633fe4e5e..a3222d622f 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -39,6 +39,7 @@ #include "llfloaterworldmap.h" #include "llproductinforequest.h" #include "llscrolllistctrl.h" +#include "llsdutil.h" #include "llstatusbar.h" #include "lltextbox.h" #include "llscrolllistctrl.h" @@ -79,24 +80,25 @@ BOOL LLFloaterLandHoldings::postBuild() for(S32 i = 0; i < count; ++i) { LLUUID id(gAgent.mGroups.at(i).mID); - - LLSD element; - element["id"] = id; - element["columns"][0]["column"] = "group"; - element["columns"][0]["value"] = gAgent.mGroups.at(i).mName; - element["columns"][0]["font"] = "SANSSERIF"; - LLUIString areastr = getString("area_string"); areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.at(i).mContribution)); - element["columns"][1]["column"] = "area"; - element["columns"][1]["value"] = areastr; - element["columns"][1]["font"] = "SANSSERIF"; - grant_list->addElement(element); + grant_list->addElement( + llsd::map( + "id", id, + "columns", llsd::array( + llsd::map( + "column", "group", + "value", gAgent.mGroups.at(i).mName, + "font", "SANSSERIF"), + llsd::map( + "column", "area", + "value", areastr, + "font", "SANSSERIF")))); } - + center(); - + return TRUE; } @@ -108,8 +110,8 @@ LLFloaterLandHoldings::~LLFloaterLandHoldings() void LLFloaterLandHoldings::onOpen(const LLSD& key) { - LLScrollListCtrl *list = getChild("parcel list"); - list->clearRows(); + LLScrollListCtrl *list = getChild("parcel list"); + list->clearRows(); // query_id null is known to be us const LLUUID& query_id = LLUUID::null; diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index b6d856e31b..241aa96bc8 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -182,11 +182,15 @@ void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_gen bool generation_skip = mMarkedDirtyGeneration >= 0 && mPrevPassedAllFilters && mMarkedDirtyGeneration < mRootViewModel.getFilter().getFirstSuccessGeneration(); + S32 last_generation = mLastFilterGeneration; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters || generation_skip) + if (before != mPrevPassedAllFilters // Change of state + || generation_skip // Was marked dirty + // Potential change from being in-progress and invisible to visible) + || (mPrevPassedAllFilters && last_generation < mRootViewModel.getFilter().getFirstRequiredGeneration())) { // Need to rearrange the folder if the filtered state of the item changed, // previously passed item skipped filter generation changes while being dirty diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 85b8ff0570..043316ccca 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -52,7 +52,7 @@ class LLGroupHandler : public LLCommandHandler { public: // requires trusted browser to trigger - LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_CLICK_ONLY) { } + LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { } virtual bool canHandleUntrusted( const LLSD& params, diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e424d6b5f5..13b52e97c5 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -346,7 +346,10 @@ public: { // will be deleted by ~LLInventoryModel //delete mInvObserver; - LLVoiceClient::getInstance()->removeObserver(this); + if (LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->removeObserver(this); + } LLAvatarTracker::instance().removeObserver(this); } diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index a8e012bfa1..a3a8247268 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -172,11 +172,18 @@ LLSLURL::LLSLURL(const std::string& slurl) } else { - // it wasn't a /secondlife/ or /app/, so it must be secondlife:// + if(slurl_uri.hostName() == LLSLURL::SLURL_APP_PATH) + { + mType = APP; + } + else + { + // it wasn't a /secondlife/ or /app/, so it must be secondlife:// // therefore the hostname will be the region name, and it's a location type mType = LOCATION; // 'normalize' it so the region name is in fact the head of the path_array path_array.insert(0, slurl_uri.hostName()); + } } } else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) || diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 221912a029..9afaeb1ec7 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -323,6 +323,8 @@ void set_flags_and_update_appearance() { LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); LLAppearanceMgr::instance().updateAppearanceFromCOF(true, true, no_op); + + LLInventoryModelBackgroundFetch::instance().start(); } // Returns false to skip other idle processing. Should only return @@ -3024,7 +3026,7 @@ bool LLStartUp::dispatchURL() || (dx*dx > SLOP*SLOP) || (dy*dy > SLOP*SLOP) ) { - LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), "clicked", + LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, false); } return true; diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index bf56a10d4d..223aaad811 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -220,7 +220,11 @@ void LLToast::hide() /*virtual*/ void LLToast::setFocus(BOOL b) { - if (b && !hasFocus() && mPanel) + if (b + && !hasFocus() + && mPanel + && mWrapperPanel + && !mWrapperPanel->getChildList()->empty()) { LLModalDialog::setFocus(TRUE); // mostly for buttons @@ -416,15 +420,18 @@ void LLToast::setVisible(BOOL show) //hide "hide" button in case toast was hidden without mouse_leave if(mHideBtn) mHideBtn->setVisible(show); - } - LLFloater::setVisible(show); - if(mPanel) - { - if(!mPanel->isDead()) - { - mPanel->setVisible(show); - } - } + } + LLFloater::setVisible(show); + if (mPanel + && !mPanel->isDead() + && mWrapperPanel + && !mWrapperPanel->getChildList()->empty() + // LLInspectToast can take over, but LLToast still appears to act like a data storage + && mPanel->getParent() == mWrapperPanel + ) + { + mPanel->setVisible(show); + } } void LLToast::updateHoveredState() diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 6fc870f890..76fb138768 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -144,7 +144,7 @@ bool LLURLDispatcherImpl::dispatchRightClick(const LLSLURL& slurl) const bool right_click = true; LLMediaCtrl* web = NULL; const bool trusted_browser = false; - return dispatchCore(slurl, "clicked", right_click, web, trusted_browser); + return dispatchCore(slurl, LLCommandHandler::NAV_TYPE_CLICKED, right_click, web, trusted_browser); } // static @@ -414,7 +414,7 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl, bool trus // *TODO: Make this trust model more refined. JC LLMediaCtrl* web = NULL; - return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_content); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), LLCommandHandler::NAV_TYPE_CLICKED, web, trusted_content); } diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index b03942db9f..3181ae6283 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -43,7 +43,7 @@ class LLHelpHandler : public LLCommandHandler { public: // requests will be throttled from a non-trusted browser - LLHelpHandler() : LLCommandHandler("help", UNTRUSTED_THROTTLE) {} + LLHelpHandler() : LLCommandHandler("help", UNTRUSTED_CLICK_ONLY) {} bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c762e796aa..87ebef6a90 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2896,6 +2896,13 @@ void handle_object_open() LLFloaterReg::showInstance("openobject"); } +bool enable_object_inspect() +{ + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + LLViewerObject* selected_objectp = selection->getFirstRootObject(); + return selected_objectp != NULL; +} + bool enable_object_open() { // Look for contents in root object, which is all the LLFloaterOpenObject @@ -7952,7 +7959,7 @@ bool enable_object_take_copy() bool all_valid = false; if (LLSelectMgr::getInstance()) { - if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) + if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0) { all_valid = true; #ifndef HACKED_GODLIKE_VIEWER @@ -9684,6 +9691,7 @@ void initialize_menus() commit.add("Object.Open", boost::bind(&handle_object_open)); commit.add("Object.Take", boost::bind(&handle_take)); commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector)); + enable.add("Object.EnableInspect", boost::bind(&enable_object_inspect)); enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ef83fa161b..7421bba733 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5839,12 +5839,8 @@ void process_script_question(LLMessageSystem *msg, void **user_data) { count++; known_questions |= script_perm.permbit; - - if (!LLMuteList::isLinden(owner_name)) - { - // check whether permission question should cause special caution dialog - caution |= (script_perm.caution); - } + // check whether permission question should cause special caution dialog + caution |= (script_perm.caution); if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit) continue; @@ -6308,7 +6304,7 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) // More than OFFER_RECIPIENT_LIMIT targets will overload the message // producing an llerror. LLSD args; - args["OFFERS"] = notification["payload"]["ids"].size(); + args["OFFERS"] = LLSD::Integer(notification["payload"]["ids"].size()); args["LIMIT"] = static_cast(OFFER_RECIPIENT_LIMIT); LLNotificationsUtil::add("TooManyTeleportOffers", args); return false; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 5254d766a8..4a1dd1b8d6 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -167,7 +167,7 @@ public: } // Process the SLapp as if it was a secondlife://{PLACE} SLurl - LLURLDispatcher::dispatch(url, "clicked", web, true); + LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, web, true); return true; } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 1c9360a843..779837bcf0 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -35,6 +35,7 @@ #include "llrender.h" #include "llenvironment.h" +#include "llerrorcontrol.h" #include "llatmosphere.h" #include "llworld.h" #include "llsky.h" @@ -559,10 +560,15 @@ void LLViewerShaderMgr::setShaders() std::string shader_name = loadBasicShaders(); if (shader_name.empty()) { - LL_INFOS() << "Loaded basic shaders." << LL_ENDL; + LL_INFOS("Shader") << "Loaded basic shaders." << LL_ENDL; } else { + // "ShaderLoading" and "Shader" need to be logged + LLError::ELevel lvl = LLError::getDefaultLevel(); + LLError::setDefaultLevel(LLError::LEVEL_DEBUG); + loadBasicShaders(); + LLError::setDefaultLevel(lvl); LL_ERRS() << "Unable to load basic shader " << shader_name << ", verify graphics driver installed and current." << LL_ENDL; reentrance = false; // For hygiene only, re-try probably helps nothing return; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ddc11ac0bd..b9fcc25310 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -39,6 +39,7 @@ #include "llagent.h" #include "llagentcamera.h" +#include "llcommandhandler.h" #include "llcommunicationchannel.h" #include "llfloaterreg.h" #include "llhudicon.h" @@ -1296,7 +1297,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi { if (drop) { - LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), "clicked", NULL, true ); + LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, true ); return LLWindowCallbacks::DND_MOVE; } return LLWindowCallbacks::DND_COPY; @@ -1765,7 +1766,7 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) LLMediaCtrl* web = NULL; const bool trusted_browser = false; // don't treat slapps coming from external browsers as "clicks" as this would bypass throttling - if (LLURLDispatcher::dispatch(url, "", web, trusted_browser)) + if (LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_EXTERNAL, web, trusted_browser)) { // bring window to foreground, as it has just been "launched" from a URL mWindow->bringToFront(); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index bf96f0bbb4..68d9f4ffab 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -142,6 +142,7 @@ LLVoiceClient::LLVoiceClient(LLPumpIO *pump) LLVoiceClient::~LLVoiceClient() { + llassert(!mVoiceModule); } void LLVoiceClient::init(LLPumpIO *pump) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index b59bbaaa88..6dd58518c5 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1830,7 +1830,7 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask ) // Invoke the event details floater if someone is clicking on an event. LLSD params(LLSD::emptyArray()); params.append(event_id); - LLCommandDispatcher::dispatch("event", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, "clicked", true); + LLCommandDispatcher::dispatch("event", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true); break; } case MAP_ITEM_LAND_FOR_SALE: diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index 8f55b3297f..bb9ab26ef5 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -1,146 +1,58 @@ - + - - "Parcel_PG_Dark" - - - "Parcel_M_Dark" - - - "Parcel_R_Dark" - - - [HOURS] Stunden - - - Std. - - - [MINUTES] Min. - - - Min. - - - [SECONDS] Sek. - - - Restzeit - - - Immer - + "Parcel_PG_Dark" + "Parcel_M_Dark" + "Parcel_R_Dark" + [HOURS] Stunden + Std. + [MINUTES] Min. + Min. + [SECONDS] Sek. + Restzeit + Immer - - Nur neue Benutzer - - - Jeder - - - Gebiet: - - - [AREA] m². - - - Auktions-ID: [ID] - - - Bestätigen Sie den Kauf, um dieses Land zu bearbeiten. - - - (In Gruppenbesitz) - - - Profil - - - Info - - - (öffentlich) - - - (keiner) - - - (Wird verkauft) - - - Keine Parzelle ausgewählt. - - - [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] - - - Name: - - - Beschreibung: - - - Typ: - - - Mainland / Homestead - - - Einstufung: - - - Adult - - - Eigentümer: - - - Gruppe: - + Nur neue Benutzer + Jeder + Gebiet: + [AREA] m². + Auktions-ID: [ID] + Bestätigen Sie den Kauf, um dieses Land zu bearbeiten. + (In Gruppenbesitz) + Profil + Info + (öffentlich) + (keiner) + (Wird verkauft) + Keine Parzelle ausgewählt. + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + Name: + Beschreibung: + Typ: + Mainland / Homestead + Einstufung: + Adult + Eigentümer: + Gruppe: