diff --git a/.hgtags b/.hgtags index d0a179c165..f5c6bf44ff 100755 --- a/.hgtags +++ b/.hgtags @@ -34,6 +34,7 @@ d1723a46b2470fc718a51b6e0c5df6a7f2c02d14 Firestorm_4.3.1_Release 13c2058a91bb72610b0241f5d0e8224cb5ad91ee Firestorm_4.4.0_Release e76135ef78cb1f63c10eecec5d043e24d4358bf6 Firestorm_4.4.1_Release ad5581d9b1142e48cd41727cb2262580988aafb2 Firestorm_4.4.2_Release +b8be9b6b364f29529492eee64af233465e15d12b Firestorm_4.5.1_Beta bb38ff1a763738609e1b3cada6d15fa61e5e84b9 2.1.1-release 003dd9461bfa479049afcc34545ab3431b147c7c v2start 52d96ad3d39be29147c5b2181b3bb46af6164f0e alpha-3 @@ -512,4 +513,4 @@ d40c66e410741de7e90b1ed6dac28dd8a2d7e1f6 3.6.8-release 5d746de933a98ca17887cde2fece80e9c7ab0b98 3.7.0-release dcb4981ce255841b6083d8f65444b65d5a733a17 3.7.1-release b842534cb4d76c9ef87676a62b1d2d19e79c015f 3.7.2-release -b8be9b6b364f29529492eee64af233465e15d12b Firestorm_4.5.1_Beta +962d3f98955bfc7310a7867c8cbc3df075e54aa9 3.7.3-release diff --git a/BuildParams b/BuildParams index ede2595cd3..7a6542dadc 100755 --- a/BuildParams +++ b/BuildParams @@ -49,17 +49,11 @@ viewer_channel = "Second Life Test" # Setup default packaging parameters. sourceid = "" -additional_packages = "Amazon Desura A B C" +additional_packages = "Amazon Desura" Amazon_sourceid = "1207v_Amazon" Amazon_viewer_channel_suffix = "Amazon" Desura_sourceid = "1208_desura" Desura_viewer_channel_suffix = "Desura" -A_sourceid = "1300_A" -A_viewer_channel_suffix = "A" -B_sourceid = "1301_B" -B_viewer_channel_suffix = "B" -C_sourceid = "1302_C" -C_viewer_channel_suffix = "C" # Report changes since... viewer-development.show_changes_since = last_sprint diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 3151cf485b..96dae8cd6f 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -313,10 +313,6 @@ LLAvatarAppearance::~LLAvatarAppearance() clearSkeleton(); deleteAndClearArray(mCollisionVolumes); - deleteAndClear(mTexSkinColor); - deleteAndClear(mTexHairColor); - deleteAndClear(mTexEyeColor); - std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer()); mPolyMeshes.clear(); diff --git a/indra/llaudio/lllistener_fmodex.cpp b/indra/llaudio/lllistener_fmodex.cpp index 2509a7aebc..31ab47a635 100644 --- a/indra/llaudio/lllistener_fmodex.cpp +++ b/indra/llaudio/lllistener_fmodex.cpp @@ -94,6 +94,11 @@ void LLListener_FMODEX::orient(LLVector3 up, LLVector3 at) //----------------------------------------------------------------------- void LLListener_FMODEX::commitDeferredChanges() { + if(!mSystem) + { + return; + } + mSystem->update(); } diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 2952dc2394..5ca30b97ff 100755 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -50,7 +50,7 @@ #endif // LL_WINDOWS // [/SL:KB] -LLPumpIO* gServicePump; +LLPumpIO* gServicePump = NULL; BOOL gBreak = false; BOOL gSent = false; @@ -102,7 +102,8 @@ LLCrashLogger::LLCrashLogger() : LLCrashLogger::~LLCrashLogger() { - + delete gServicePump; + gServicePump = NULL; } // TRIM_SIZE must remain larger than LINE_SEARCH_SIZE. diff --git a/indra/llmessage/llhttpsender.cpp b/indra/llmessage/llhttpsender.cpp index c48cbc42a6..d0bd343db6 100755 --- a/indra/llmessage/llhttpsender.cpp +++ b/indra/llmessage/llhttpsender.cpp @@ -38,7 +38,7 @@ namespace { typedef std::map SenderMap; static SenderMap senderMap; - static LLHTTPSender* defaultSender = new LLHTTPSender(); + static LLPointer defaultSender(new LLHTTPSender()); } //virtual @@ -90,6 +90,5 @@ void LLHTTPSender::clearSender(const LLHost& host) //static void LLHTTPSender::setDefaultSender(LLHTTPSender* sender) { - delete defaultSender; defaultSender = sender; } diff --git a/indra/llmessage/llhttpsender.h b/indra/llmessage/llhttpsender.h index 88920db24d..ff8fa2f95b 100755 --- a/indra/llmessage/llhttpsender.h +++ b/indra/llmessage/llhttpsender.h @@ -32,7 +32,7 @@ class LLHost; class LLSD; -class LLHTTPSender +class LLHTTPSender : public LLThreadSafeRefCount { public: diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 0d876d2704..48ec443f30 100755 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -93,15 +93,17 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname } LLMsgBlkData *msg_block_data = iter->second; - LLMsgVarData& vardata = msg_block_data->mMemberVarData[vnamep]; + LLMsgBlkData::msg_var_data_map_t &var_data_map = msg_block_data->mMemberVarData; - if (!vardata.getName()) + if (var_data_map.find(vnamep) == var_data_map.end()) { llerrs << "Variable "<< vnamep << " not in message " << mCurrentRMessageData->mName<< " block " << bnamep << llendl; return; } + LLMsgVarData& vardata = msg_block_data->mMemberVarData[vnamep]; + if (size && size != vardata.getSize()) { llerrs << "Msg " << mCurrentRMessageData->mName diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 68e93f5eab..91c12d3687 100755 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -3042,12 +3042,23 @@ void LLMessageSystem::setExceptionFunc(EMessageException e, BOOL LLMessageSystem::callExceptionFunc(EMessageException exception) { callbacks_t::iterator it = mExceptionCallbacks.find(exception); - if(it != mExceptionCallbacks.end()) + if(it == mExceptionCallbacks.end()) { - ((*it).second.first)(this, (*it).second.second,exception); - return TRUE; + return FALSE; } - return FALSE; + + exception_t& ex = it->second; + msg_exception_callback ex_cb = ex.first; + + if (!ex_cb) + { + LL_WARNS("Messaging") << "LLMessageSystem::callExceptionFunc: bad message exception callback." << llendl; + return FALSE; + } + + (ex_cb)(this, ex.second, exception); + + return TRUE; } void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data) diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index a8983b9511..c75835a979 100755 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -324,14 +324,15 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) S32 delta_y = screen_y - mDragLastScreenY; // if dragging a docked floater we want to undock - if (((LLFloater*)getParent())->isDocked()) + LLFloater * parent = dynamic_cast(getParent()); + if (parent && parent->isDocked()) { const S32 SLOP = 12; if (delta_y <= -SLOP || delta_y >= SLOP) { - ((LLFloater*)getParent())->setDocked(false, false); + parent->setDocked(false, false); return TRUE; } else diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 32b8e72d82..d854675c0e 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -521,8 +521,8 @@ LLFloater::~LLFloater() if( gFocusMgr.childHasKeyboardFocus(this)) { - // Just in case we might still have focus here, release it. - releaseFocus(); + // Just in case we might still have focus here, release it. + releaseFocus(); } // This is important so that floaters with persistent rects (i.e., those @@ -540,7 +540,6 @@ LLFloater::~LLFloater() setVisible(false); // We're not visible if we're destroyed storeVisibilityControl(); storeDockStateControl(); - delete mMinimizeSignal; } @@ -1203,7 +1202,11 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user) if (by_user && !getHost()) { - static_cast(getParent())->adjustToFitScreen(this, !isMinimized()); + LLFloaterView * floaterVp = dynamic_cast(getParent()); + if (floaterVp) + { + floaterVp->adjustToFitScreen(this, !isMinimized()); + } } // if not minimized, adjust all snapped dependents to new shape @@ -1414,11 +1417,8 @@ void LLFloater::setFocus( BOOL b ) if (b) { // only push focused floaters to front of stack if not in midst of ctrl-tab cycle - - // Don't use C-cast to cast between objects. - // if (!getHost() && !((LLFloaterView*)getParent())->getCycleMode()) - LLFloaterView *pParent = dynamic_cast(getParent()); - if (!getHost() && pParent && !pParent->getCycleMode() ) + LLFloaterView * parent = dynamic_cast(getParent()); + if (!getHost() && parent && !parent->getCycleMode()) { if (!isFrontmost()) { @@ -1688,10 +1688,7 @@ void LLFloater::bringToFront( S32 x, S32 y ) } else { - // Don't use C-cast to cast between objects. - // LLFloaterView* parent = (LLFloaterView*) getParent(); LLFloaterView* parent = dynamic_cast( getParent() ); - if (parent) { parent->bringToFront( this ); @@ -1726,16 +1723,15 @@ void LLFloater::setFrontmost(BOOL take_focus) // the appropriate panel hostp->showFloater(this); } - else if( getParent() ) + else { // there are more than one floater view // so we need to query our parent directly - - // Don't use C-cast to cast between objects. - // ((LLFloaterView*)getParent())->bringToFront(this, take_focus); - LLFloaterView* pView = dynamic_cast(getParent()); - if( pView ) - pView->bringToFront(this, take_focus); + LLFloaterView * parent = dynamic_cast( getParent() ); + if (parent) + { + parent->bringToFront(this, take_focus); + } // Make sure to set the appropriate transparency type (STORM-732). updateTransparency(hasFocus() || getIsChrome() ? TT_ACTIVE : TT_INACTIVE); @@ -2484,6 +2480,9 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) { + if (!child) + return; + if (mFrontChild == child) { if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) @@ -2961,9 +2960,9 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out } } - const LLRect& left_toolbar_rect = mToolbarRects[LLToolBarEnums::TOOLBAR_LEFT]; - const LLRect& bottom_toolbar_rect = mToolbarRects[LLToolBarEnums::TOOLBAR_BOTTOM]; - const LLRect& right_toolbar_rect = mToolbarRects[LLToolBarEnums::TOOLBAR_RIGHT]; + const LLRect& left_toolbar_rect = mToolbarLeftRect; + const LLRect& bottom_toolbar_rect = mToolbarBottomRect; + const LLRect& right_toolbar_rect = mToolbarRightRect; const LLRect& floater_rect = floater->getRect(); S32 delta_left = left_toolbar_rect.notEmpty() ? left_toolbar_rect.mRight - floater_rect.mRight : 0; @@ -3070,10 +3069,13 @@ LLFloater *LLFloaterView::getFocusedFloater() const { for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { - LLUICtrl* ctrlp = (*child_it)->isCtrl() ? static_cast(*child_it) : NULL; - if ( ctrlp && ctrlp->hasFocus() ) + if ((*child_it)->isCtrl()) { - return static_cast(ctrlp); + LLFloater* ctrlp = dynamic_cast(*child_it); + if ( ctrlp && ctrlp->hasFocus() ) + { + return ctrlp; + } } } return NULL; @@ -3226,9 +3228,20 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list) void LLFloaterView::setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LLRect& toolbar_rect) { - if (tb < LLToolBarEnums::TOOLBAR_COUNT) + switch (tb) { - mToolbarRects[tb] = toolbar_rect; + case LLToolBarEnums::TOOLBAR_LEFT: + mToolbarLeftRect = toolbar_rect; + break; + case LLToolBarEnums::TOOLBAR_BOTTOM: + mToolbarBottomRect = toolbar_rect; + break; + case LLToolBarEnums::TOOLBAR_RIGHT: + mToolbarRightRect = toolbar_rect; + break; + default: + llwarns << "setToolbarRect() passed odd toolbar number " << (S32) tb << llendl; + break; } } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index e623d4d2c0..c3c2424321 100755 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -595,7 +595,9 @@ private: void hiddenFloaterClosed(LLFloater* floater); LLRect mLastSnapRect; - LLRect mToolbarRects[LLToolBarEnums::TOOLBAR_COUNT]; + LLRect mToolbarLeftRect; + LLRect mToolbarBottomRect; + LLRect mToolbarRightRect; LLHandle mSnapView; BOOL mFocusCycleMode; S32 mSnapOffsetBottom; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index fd027be1d9..aa700fd0be 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -693,8 +693,11 @@ void LLMenuItemTearOffGL::onCommit() { if (getMenu()->getTornOff()) { - LLTearOffMenu* torn_off_menu = (LLTearOffMenu*)(getMenu()->getParent()); - torn_off_menu->closeFloater(); + LLTearOffMenu * torn_off_menu = dynamic_cast(getMenu()->getParent()); + if (torn_off_menu) + { + torn_off_menu->closeFloater(); + } } else { @@ -1097,7 +1100,8 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight ) BOOL auto_open = getEnabled() && (!branch->getVisible() || branch->getTornOff()); // torn off menus don't open sub menus on hover unless they have focus - if (getMenu()->getTornOff() && !((LLFloater*)getMenu()->getParent())->hasFocus()) + LLFloater * menu_parent = dynamic_cast(getMenu()->getParent()); + if (getMenu()->getTornOff() && menu_parent && !menu_parent->hasFocus()) { auto_open = FALSE; } @@ -1118,7 +1122,11 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight ) { if (branch->getTornOff()) { - ((LLFloater*)branch->getParent())->setFocus(FALSE); + LLFloater * branch_parent = dynamic_cast(branch->getParent()); + if (branch_parent) + { + branch_parent->setFocus(FALSE); + } branch->clearHoverItem(); } else @@ -1175,11 +1183,19 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) BOOL handled = branch->clearHoverItem(); if (branch->getTornOff()) { - ((LLFloater*)branch->getParent())->setFocus(FALSE); + LLFloater * branch_parent = dynamic_cast(branch->getParent()); + if (branch_parent) + { + branch_parent->setFocus(FALSE); + } } if (handled && getMenu()->getTornOff()) { - ((LLFloater*)getMenu()->getParent())->setFocus(TRUE); + LLFloater * menu_parent = dynamic_cast(getMenu()->getParent()); + if (menu_parent) + { + menu_parent->setFocus(TRUE); + } } return handled; } @@ -1219,9 +1235,13 @@ void LLMenuItemBranchGL::openMenu() if (branch->getTornOff()) { - gFloaterView->bringToFront((LLFloater*)branch->getParent()); - // this might not be necessary, as torn off branches don't get focus and hence no highligth - branch->highlightNextItem(NULL); + LLFloater * branch_parent = dynamic_cast(branch->getParent()); + if (branch_parent) + { + gFloaterView->bringToFront(branch_parent); + // this might not be necessary, as torn off branches don't get focus and hence no highligth + branch->highlightNextItem(NULL); + } } else if( !branch->getVisible() ) { @@ -1348,7 +1368,11 @@ void LLMenuItemBranchDownGL::openMenu( void ) { if (branch->getTornOff()) { - gFloaterView->bringToFront((LLFloater*)branch->getParent()); + LLFloater * branch_parent = dynamic_cast(branch->getParent()); + if (branch_parent) + { + gFloaterView->bringToFront(branch_parent); + } } else { @@ -1403,7 +1427,11 @@ void LLMenuItemBranchDownGL::setHighlight( BOOL highlight ) { if (branch->getTornOff()) { - ((LLFloater*)branch->getParent())->setFocus(FALSE); + LLFloater * branch_parent = dynamic_cast(branch->getParent()); + if (branch_parent) + { + branch_parent->setFocus(FALSE); + } branch->clearHoverItem(); } else @@ -1826,20 +1854,28 @@ BOOL LLMenuGL::jumpKeysActive() { LLMenuItemGL* highlighted_item = getHighlightedItem(); BOOL active = getVisible() && getEnabled(); - if (getTornOff()) - { - // activation of jump keys on torn off menus controlled by keyboard focus - active = active && ((LLFloater*)getParent())->hasFocus(); - } - else + if (active) { - // Are we the terminal active menu? - // Yes, if parent menu item deems us to be active (just being visible is sufficient for top-level menus) - // and we don't have a highlighted menu item pointing to an active sub-menu - active = active && (!getParentMenuItem() || getParentMenuItem()->isActive()) // I have a parent that is active... - && (!highlighted_item || !highlighted_item->isActive()); //... but no child that is active + if (getTornOff()) + { + // activation of jump keys on torn off menus controlled by keyboard focus + LLFloater * parent = dynamic_cast(getParent()); + if (parent) + { + active = parent->hasFocus(); + } + } + else + { + // Are we the terminal active menu? + // Yes, if parent menu item deems us to be active (just being visible is sufficient for top-level menus) + // and we don't have a highlighted menu item pointing to an active sub-menu + active = (!getParentMenuItem() || getParentMenuItem()->isActive()) // I have a parent that is active... + && (!highlighted_item || !highlighted_item->isActive()); //... but no child that is active + } } + return active; } @@ -1855,7 +1891,12 @@ BOOL LLMenuGL::isOpen() return TRUE; } // otherwise we are only active if we have keyboard focus - return ((LLFloater*)getParent())->hasFocus(); + LLFloater * parent = dynamic_cast(getParent()); + if (parent) + { + return parent->hasFocus(); + } + return FALSE; } else { @@ -2717,7 +2758,11 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa // same as giving focus to it if (!cur_item && getTornOff()) { - ((LLFloater*)getParent())->setFocus(TRUE); + LLFloater * parent = dynamic_cast(getParent()); + if (parent) + { + parent->setFocus(TRUE); + } } // Current item position in the items list @@ -2819,7 +2864,11 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa // same as giving focus to it if (!cur_item && getTornOff()) { - ((LLFloater*)getParent())->setFocus(TRUE); + LLFloater * parent = dynamic_cast(getParent()); + if (parent) + { + parent->setFocus(TRUE); + } } // Current item reverse position from the end of the list diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index 226d5f3eae..838f7a5161 100755 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -330,27 +330,26 @@ private: // local static instance for registering a particular panel class template -class LLRegisterPanelClassWrapper -: public LLRegisterPanelClass + class LLPanelInjector { public: - // reigister with either the provided builder, or the generic templated builder - LLRegisterPanelClassWrapper(const std::string& tag); + // register with either the provided builder, or the generic templated builder + LLPanelInjector(const std::string& tag); // [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-3.0.0a) | Added: Catznip-2.4.0g - LLRegisterPanelClassWrapper(const std::string& tag, LLPanelClassCreatorFunc func); + LLPanelInjector(const std::string& tag, LLPanelClassCreatorFunc func); // [/SL:KB] }; template -LLRegisterPanelClassWrapper::LLRegisterPanelClassWrapper(const std::string& tag) + LLPanelInjector::LLPanelInjector(const std::string& tag) { LLRegisterPanelClass::instance().addPanelClass(tag,&LLRegisterPanelClass::defaultPanelClassBuilder); } // [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-3.0.0a) | Added: Catznip-2.4.0g template -LLRegisterPanelClassWrapper::LLRegisterPanelClassWrapper(const std::string& tag, LLPanelClassCreatorFunc func) +LLPanelInjector::LLPanelInjector(const std::string& tag, LLPanelClassCreatorFunc func) { LLRegisterPanelClass::instance().addPanelClass(tag, func); } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 0f5c30271b..478df640ce 100755 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1986,7 +1986,7 @@ void LLScrollListCtrl::showNameDetails(std::string id, bool is_group) // open the resident's details or the group details std::string sltype = is_group ? "group" : "agent"; std::string slurl = "secondlife:///app/" + sltype + "/" + id + "/about"; - LLUrlAction::clickAction(slurl); + LLUrlAction::clickAction(slurl, true); } void LLScrollListCtrl::copyNameToClipboard(std::string id, bool is_group) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5de172ab36..b4cc82c727 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -180,6 +180,7 @@ LLTextBase::Params::Params() max_text_length("max_length", 255), font_shadow("font_shadow"), wrap("wrap"), + trusted_content("trusted_content", true), use_ellipses("use_ellipses", false), // Optional icon position icon_positioning("icon_positioning", LLTextBaseEnums::RIGHT), @@ -227,6 +228,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mLineSpacingPixels(p.line_spacing.pixels), mClip(p.clip), mClipPartial(p.clip_partial && !p.allow_scroll), + mTrustedContent(p.trusted_content), mTrackEnd( p.track_end ), mScrollIndex(-1), mSelectionStart( 0 ), @@ -3317,7 +3319,7 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) // Only process the click if it's actually in this segment, not to the right of the end-of-line. if(mEditor.getSegmentAtLocalPos(x, y, false) == this) { - LLUrlAction::clickAction(getStyle()->getLinkHREF()); + LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted()); return TRUE; } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 06cfe097fc..8e14a80303 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -312,7 +312,8 @@ public: parse_urls, parse_highlights, clip, - clip_partial; + clip_partial, + trusted_content; Optional v_pad, h_pad; @@ -389,6 +390,7 @@ public: bool getWordWrap() { return mWordWrap; } bool getUseEllipses() { return mUseEllipses; } bool truncate(); // returns true of truncation occurred + bool isContentTrusted() {return mTrustedContent;} // TODO: move into LLTextSegment? void createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url @@ -669,6 +671,7 @@ protected: bool mBGVisible; // render background? bool mClip; // clip text to widget rect bool mClipPartial; // false if we show lines that are partially inside bounding rect + bool mTrustedContent; // if false, does not allow to execute SURL links from this editor bool mPlainText; // didn't use Image or Icon segments bool mAutoIndent; S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 9ba5d83223..d28ccf993b 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1676,12 +1676,10 @@ BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask) } } - // Linux primary "clipboard" tainted by auto-selection - //if (handled) - //{ - // updatePrimary(); - //} - // Linux primary "clipboard" tainted by auto-selection + if (handled && !gFocusMgr.getMouseCapture()) + { + updatePrimary(); + } return handled; } diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index 40c5c357d9..1b08067cbf 100755 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -87,14 +87,14 @@ void LLUrlAction::executeSLURL(std::string url) { if (sExecuteSLURLCallback) { - sExecuteSLURLCallback(url); + sExecuteSLURLCallback(url ,true); } } -void LLUrlAction::clickAction(std::string url) +void LLUrlAction::clickAction(std::string url, bool trusted_content) { // Try to handle as SLURL first, then http Url - if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url) ) + if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url, trusted_content) ) { if (sOpenURLCallback) { diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 934b84359b..87940ae0c4 100755 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -66,7 +66,7 @@ public: static void showLocationOnMap(std::string url); /// perform the appropriate action for left-clicking on a Url - static void clickAction(std::string url); + static void clickAction(std::string url, bool trusted_content); /// copy the label for a Url to the clipboard static void copyLabelToClipboard(std::string url); @@ -89,7 +89,7 @@ public: /// specify the callbacks to enable this class's functionality typedef boost::function url_callback_t; - typedef boost::function execute_url_callback_t; + typedef boost::function execute_url_callback_t; static void setOpenURLCallback(url_callback_t cb); static void setOpenURLInternalCallback(url_callback_t cb); diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index d504ecae05..1b49cde35d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1099,7 +1099,8 @@ LLUrlEntrySLLabel::LLUrlEntrySLLabel() std::string LLUrlEntrySLLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - return getLabelFromWikiLink(url); + std::string label = getLabelFromWikiLink(url); + return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); } std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 972a455eb9..53ed819c73 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -700,17 +700,18 @@ void LLView::setVisible(BOOL visible) void LLView::handleVisibilityChange ( BOOL new_visibility ) { BOOL old_visibility; + BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus(); BOOST_FOREACH(LLView* viewp, mChildList) { // only views that are themselves visible will have their overall visibility affected by their ancestors old_visibility=viewp->getVisible(); - // Make this less awfull slow, at least when not logging (default). - // if (old_visibility!=new_visibility) - if (old_visibility!=new_visibility && LLViewerEventRecorder::instance().getLoggingStatus() ) - // + if(log_visibility_change) { - LLViewerEventRecorder::instance().logVisibilityChange( viewp->getPathname(), viewp->getName(), new_visibility,"widget"); + if (old_visibility!=new_visibility) + { + LLViewerEventRecorder::instance().logVisibilityChange( viewp->getPathname(), viewp->getName(), new_visibility,"widget"); + } } if (old_visibility) @@ -718,11 +719,13 @@ void LLView::handleVisibilityChange ( BOOL new_visibility ) viewp->handleVisibilityChange ( new_visibility ); } - // Consider changing returns to confirm success and know which widget grabbed it - // For now assume success and log at highest xui possible - // NOTE we log actual state - which may differ if it somehow failed to set visibility - lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl; - + if(log_visibility_change) + { + // Consider changing returns to confirm success and know which widget grabbed it + // For now assume success and log at highest xui possible + // NOTE we log actual state - which may differ if it somehow failed to set visibility + lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl; + } } } diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp index 4021bcbbe3..5b77887dc6 100644 --- a/indra/llui/llviewereventrecorder.cpp +++ b/indra/llui/llviewereventrecorder.cpp @@ -31,7 +31,7 @@ LLViewerEventRecorder::LLViewerEventRecorder() { clear(UNDEFINED); - + logEvents = false; // Remove any previous event log file std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.old"); LLFile::remove(old_log_ui_events_to_llsd_file); diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h index 05ebea3dbe..375efcc3de 100644 --- a/indra/llui/llviewereventrecorder.h +++ b/indra/llui/llviewereventrecorder.h @@ -65,11 +65,7 @@ class LLViewerEventRecorder : public LLSingleton std::string get_xui(); void update_xui(std::string xui); - // Implement this - // bool getLoggingStatus(); - bool getLoggingStatus() const - { return logEvents; } - + bool getLoggingStatus(){return logEvents;}; void setEventLoggingOn(); void setEventLoggingOff(); diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp index ce0bfbcc8f..229608231c 100755 --- a/indra/llvfs/lldiriterator.cpp +++ b/indra/llvfs/lldiriterator.cpp @@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname) fs::directory_iterator end_itr; // default construction yields past-the-end bool found = false; - while (mIter != end_itr && !found) - { - boost::smatch match; - std::string name = mIter->path().filename().string(); - if ((found = boost::regex_match(name, match, mFilterExp))) - { - fname = name; - } - ++mIter; + // Check if path is a directory. + try + { + while (mIter != end_itr && !found) + { + boost::smatch match; + std::string name = mIter->path().filename().string(); + if (found = boost::regex_match(name, match, mFilterExp)) + { + fname = name; + } + + ++mIter; + } + } + catch (const fs::filesystem_error& e) + { + llwarns << e.what() << llendl; } return found; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8a61b4ee46..171c857278 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5457,13 +5457,13 @@ FPSLogFrequency Comment - Seconds between display of FPS in log (0 for never) + Seconds between display of FPS in log (0 for never) Persist - 1 + 1 Type - F32 + F32 Value - 10.0 + 10.0 Backup 0 @@ -12522,7 +12522,18 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 - RevokePermsOnStopAnimation + ReportBugURL + + Comment + URL used for filing bugs from viewer + Persist + 1 + Type + String + Value + https://jira.secondlife.com/secure/CreateIssueDetails!init.jspa?pid=10610&issuetype=1&environment=[ENVIRONMENT]&customfield_10253=[LOCATION] + + RevokePermsOnStopAnimation Comment Clear animation permssions when choosing "Stop Animating Me" diff --git a/indra/newview/app_settings/shaders/class1/interface/benchmarkF.glsl b/indra/newview/app_settings/shaders/class1/interface/benchmarkF.glsl new file mode 100644 index 0000000000..1936e0dcaa --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/benchmarkF.glsl @@ -0,0 +1,39 @@ +/** + * @file benchmarkF.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2D diffuseMap; + +VARYING vec2 tc0; + +void main() +{ + frag_color = texture2D(diffuseMap, tc0); +} diff --git a/indra/newview/app_settings/shaders/class1/interface/benchmarkV.glsl b/indra/newview/app_settings/shaders/class1/interface/benchmarkV.glsl new file mode 100644 index 0000000000..7beb20ede4 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/benchmarkV.glsl @@ -0,0 +1,38 @@ +/** + * @file benchmarkV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 modelview_projection_matrix; + +ATTRIBUTE vec3 position; + +VARYING vec2 tc0; + +void main() +{ + gl_Position = vec4(position, 1.0); + + tc0 = (position.xy*0.5+0.5); +} + diff --git a/indra/newview/exopanelsnapshotflickr.cpp b/indra/newview/exopanelsnapshotflickr.cpp index e63545fe41..a170a44561 100644 --- a/indra/newview/exopanelsnapshotflickr.cpp +++ b/indra/newview/exopanelsnapshotflickr.cpp @@ -71,7 +71,7 @@ private: void uploadCallback(bool success, const LLSD& response); }; -static LLRegisterPanelClassWrapper panel_class("exopanelsnapshotflickr"); +static LLPanelInjector panel_class("exopanelsnapshotflickr"); void exoPanelSnapshotFlickr::onOpen(const LLSD& key) { diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 0abff15f80..528cea9c6f 100755 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 35 +version 36 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -637,3 +637,6 @@ Disregard128DefaultDrawDistance 1 0 list NVIDIA_GeForce_Go_7400 Disregard128DefaultDrawDistance 1 0 +list OSX_10_6_8 +RenderDeferred 0 0 + diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp index 19a33ec1c9..54768e4dbc 100644 --- a/indra/newview/fsdata.cpp +++ b/indra/newview/fsdata.cpp @@ -908,7 +908,7 @@ void FSData::callbackReqInfo(const LLSD ¬ification, const LLSD &response) //static LLSD FSData::getSystemInfo() { - LLSD info=LLFloaterAbout::getInfo(); + LLSD info=LLAppViewer::instance()->getViewerInfo(); std::string sysinfo1("\n"); sysinfo1 += llformat("%s %s (%d) %s %s (%s) %s\n\n", LLAppViewer::instance()->getSecondLifeTitle().c_str(), LLVersionInfo::getShortVersion().c_str(), LLVersionInfo::getBuild(), info["BUILD_DATE"].asString().c_str(), info["BUILD_TIME"].asString().c_str(), LLVersionInfo::getChannel().c_str(), diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp index 4e4263cdb3..ef9de543e7 100644 --- a/indra/newview/fsfloatersearch.cpp +++ b/indra/newview/fsfloatersearch.cpp @@ -711,7 +711,7 @@ void FSFloaterSearch::onBtnEventReminder() // People Search Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_people("panel_ls_people"); +static LLPanelInjector t_panel_fs_search_people("panel_ls_people"); FSPanelSearchPeople::FSPanelSearchPeople() : LLPanel() , mQueryID(NULL) @@ -974,7 +974,7 @@ void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) // Groups Search Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_groups("panel_ls_groups"); +static LLPanelInjector t_panel_fs_search_groups("panel_ls_groups"); FSPanelSearchGroups::FSPanelSearchGroups() : LLPanel() , mQueryID(NULL) @@ -1259,7 +1259,7 @@ void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) // Places Search Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_places("panel_ls_places"); +static LLPanelInjector t_panel_fs_search_places("panel_ls_places"); FSPanelSearchPlaces::FSPanelSearchPlaces() : LLPanel() , mQueryID(NULL) @@ -1591,7 +1591,7 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) // Land Search Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_land("panel_ls_land"); +static LLPanelInjector t_panel_fs_search_land("panel_ls_land"); FSPanelSearchLand::FSPanelSearchLand() : LLPanel() , mQueryID(NULL) @@ -1942,7 +1942,7 @@ void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**) // Classifieds Search Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_classifieds("panel_ls_classifieds"); +static LLPanelInjector t_panel_fs_search_classifieds("panel_ls_classifieds"); FSPanelSearchClassifieds::FSPanelSearchClassifieds() : LLPanel() , mQueryID(NULL) @@ -2244,7 +2244,7 @@ void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) // Events Search Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_events("panel_ls_events"); +static LLPanelInjector t_panel_fs_search_events("panel_ls_events"); FSPanelSearchEvents::FSPanelSearchEvents() : LLPanel() , mQueryID(NULL) @@ -2656,7 +2656,7 @@ void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) // WebSearch Panel // //////////////////////////////////////// -static LLRegisterPanelClassWrapper t_panel_fs_search_web("panel_ls_web"); +static LLPanelInjector t_panel_fs_search_web("panel_ls_web"); FSPanelSearchWeb::FSPanelSearchWeb() : LLPanel() , mWebBrowser(NULL) diff --git a/indra/newview/fspanelcontactsets.cpp b/indra/newview/fspanelcontactsets.cpp index 07c3a91971..5e52c99bc0 100644 --- a/indra/newview/fspanelcontactsets.cpp +++ b/indra/newview/fspanelcontactsets.cpp @@ -45,7 +45,7 @@ #include const U32 MAX_SELECTIONS = 20; -static LLRegisterPanelClassWrapper t_panel_contact_sets("contact_sets_panel"); +static LLPanelInjector t_panel_contact_sets("contact_sets_panel"); FSPanelContactSets::FSPanelContactSets() : LLPanel() , mContactSetCombo(NULL) diff --git a/indra/newview/fspanelprefs.cpp b/indra/newview/fspanelprefs.cpp index d9e3c67e52..b5b8f2bd75 100644 --- a/indra/newview/fspanelprefs.cpp +++ b/indra/newview/fspanelprefs.cpp @@ -41,7 +41,7 @@ #include "lltexturectrl.h" #include "llinventorymodel.h" -static LLRegisterPanelClassWrapper t_pref_fs("panel_preference_firestorm"); +static LLPanelInjector t_pref_fs("panel_preference_firestorm"); PanelPreferenceFirestorm::PanelPreferenceFirestorm() : LLPanelPreference() { diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp index b610d4d0d0..e04f764401 100644 --- a/indra/newview/fspanelprofile.cpp +++ b/indra/newview/fspanelprofile.cpp @@ -72,13 +72,13 @@ #include "llviewerregion.h" #include "llworldmap.h" -static LLRegisterPanelClassWrapper t_panel_profile_secondlife("panel_profile_secondlife"); -static LLRegisterPanelClassWrapper t_panel_web("panel_profile_web"); -static LLRegisterPanelClassWrapper t_panel_interests("panel_profile_interests"); -static LLRegisterPanelClassWrapper t_panel_picks("panel_profile_picks"); -static LLRegisterPanelClassWrapper t_panel_firstlife("panel_profile_firstlife"); -static LLRegisterPanelClassWrapper t_panel_notes("panel_profile_notes"); -static LLRegisterPanelClassWrapper t_panel_profile("panel_profile"); +static LLPanelInjector t_panel_profile_secondlife("panel_profile_secondlife"); +static LLPanelInjector t_panel_web("panel_profile_web"); +static LLPanelInjector t_panel_interests("panel_profile_interests"); +static LLPanelInjector t_panel_picks("panel_profile_picks"); +static LLPanelInjector t_panel_firstlife("panel_profile_firstlife"); +static LLPanelInjector t_panel_notes("panel_profile_notes"); +static LLPanelInjector t_panel_profile("panel_profile"); static const std::string PANEL_SECONDLIFE = "panel_profile_secondlife"; static const std::string PANEL_WEB = "panel_profile_web"; diff --git a/indra/newview/fspanelprofileclassifieds.cpp b/indra/newview/fspanelprofileclassifieds.cpp index 89d13416fc..c20ff89232 100644 --- a/indra/newview/fspanelprofileclassifieds.cpp +++ b/indra/newview/fspanelprofileclassifieds.cpp @@ -62,7 +62,7 @@ static const std::string CLASSIFIED_ID("classified_id"); static const std::string CLASSIFIED_NAME("classified_name"); -static LLRegisterPanelClassWrapper t_panel_classifieds("panel_profile_classified"); +static LLPanelInjector t_panel_classifieds("panel_profile_classified"); ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/fspanelradar.cpp b/indra/newview/fspanelradar.cpp index e384b81694..3e9ca0c2eb 100644 --- a/indra/newview/fspanelradar.cpp +++ b/indra/newview/fspanelradar.cpp @@ -75,7 +75,7 @@ public: //============================================================================= -static LLRegisterPanelClassWrapper t_fs_panel_radar("fs_panel_radar"); +static LLPanelInjector t_fs_panel_radar("fs_panel_radar"); FSPanelRadar::FSPanelRadar() : LLPanel(), diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index faeb500642..3dd9f42318 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -40,6 +40,11 @@ [super dealloc]; } +- (void) applicationWillFinishLaunching:(NSNotification *)notification +{ + [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; +} + - (void) applicationDidFinishLaunching:(NSNotification *)notification { frameTimer = nil; @@ -55,7 +60,7 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil]; - [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; + // [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; } - (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 24d660c6aa..4f959d1851 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llagentlanguage.h" +#include "llagentui.h" #include "llagentwearables.h" #include "llfloaterimcontainer.h" #include "llwindow.h" @@ -60,6 +61,7 @@ #include "llcurl.h" #include "llcalc.h" #include "llconversationlog.h" +#include "lldxhardware.h" #include "lltexturestats.h" #include "lltexturestats.h" #include "llviewerwindow.h" @@ -75,10 +77,10 @@ #include "lluicolortable.h" #include "llurldispatcher.h" #include "llurlhistory.h" -//#include "llfirstuse.h" #include "llrender.h" #include "llteleporthistory.h" #include "lltoast.h" +#include "llsdutil_math.h" #include "lllocationhistory.h" #include "llfasttimerview.h" #include "llvector4a.h" @@ -94,7 +96,9 @@ // [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4) #include "llappearancemgr.h" // [/SL:KB] -// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) +// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0) +#include "rlvactions.h" +#include "rlvhelper.h" #include "rlvhandler.h" // [/RLVa:KB] @@ -140,10 +144,6 @@ #include #include -// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) -#include "rlvhandler.h" -// [/RLVa:KB] - #if LL_WINDOWS # include // For _SH_DENYWR in processMarkerFiles #else @@ -846,7 +846,7 @@ bool LLAppViewer::init() initLoggingAndGetLastDuration(); processMarkerFiles(); - + // // OK to write stuff to logs now, we've now crash reported if necessary // @@ -1416,8 +1416,8 @@ void LLAppViewer::checkMemory() } mMemCheckTimer.reset() ; - //update the availability of memory - LLMemory::updateMemoryInfo() ; + //update the availability of memory + LLMemory::updateMemoryInfo() ; bool is_low = LLMemory::isMemoryPoolLow() ; @@ -2078,7 +2078,7 @@ bool LLAppViewer::cleanup() gAudiop->setStreamingAudioImpl(NULL); // shut down the audio subsystem - gAudiop->shutdown(); + gAudiop->shutdown(); delete gAudiop; gAudiop = NULL; @@ -3041,9 +3041,9 @@ bool LLAppViewer::initConfiguration() { llwarns << "Failed --set " << name << ": setting name unknown." << llendl; } + } } } - } if (clp.hasOption("logevents")) { LLViewerEventRecorder::instance().setEventLoggingOn(); @@ -3051,7 +3051,7 @@ bool LLAppViewer::initConfiguration() std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel")); if(! CmdLineChannel.empty()) - { + { LLVersionInfo::resetChannel(CmdLineChannel); } @@ -3063,16 +3063,16 @@ bool LLAppViewer::initConfiguration() LLFastTimer::sLog = TRUE; LLFastTimer::sLogName = std::string("performance"); } - + std::string test_name(gSavedSettings.getString("LogMetrics")); if (! test_name.empty()) - { + { LLFastTimer::sMetricLog = TRUE ; // '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test // In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...) llinfos << "'--logmetrics' argument : " << test_name << llendl; LLFastTimer::sLogName = test_name; - } + } if (clp.hasOption("graphicslevel")) { @@ -3081,14 +3081,14 @@ bool LLAppViewer::initConfiguration() // that value for validity. U32 graphicslevel = gSavedSettings.getU32("RenderQualityPerformance"); if (LLFeatureManager::instance().isValidGraphicsLevel(graphicslevel)) - { + { // graphicslevel is valid: save it and engage it later. Capture // the requested value separately from the settings variable // because, if this is the first run, LLViewerWindow's constructor // will call LLFeatureManager::applyRecommendedSettings(), which // overwrites this settings variable! mForceGraphicsLevel = graphicslevel; - } + } } LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance"); @@ -3127,17 +3127,34 @@ bool LLAppViewer::initConfiguration() // but rather it belongs into the gridmanager) std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation")); if(! CmdLineLoginLocation.empty()) - { + { start_slurl = CmdLineLoginLocation; // FIRE-11586: Restore grid manager workaround (grid is still empty here!) //LLStartUp::setStartSLURL(start_slurl); //if(start_slurl.getType() == LLSLURL::LOCATION) //{ // LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid()); - // } + //} LLStartUp::setStartSLURLString(CmdLineLoginLocation); // - } + + } + + //RN: if we received a URL, hand it off to the existing instance. + // don't call anotherInstanceRunning() when doing URL handoff, as + // it relies on checking a marker file which will not work when running + // out of different directories + + if (start_slurl.isValid() && + (gSavedSettings.getBOOL("SLURLPassToOtherInstance"))) + { + if (sendURLToOtherInstance(start_slurl.getSLURLString())) + { + // successfully handed off URL to existing instance, exit + return false; + } + } + // Hacking to save the skin and theme for future use. mCurrentSkin = gSavedSettings.getString("SkinCurrent"); @@ -3470,26 +3487,26 @@ namespace { { LL_WARNS("UpdaterService") << "no info url supplied - defaulting to hard coded release notes pattern" << LL_ENDL; - // truncate version at the rightmost '.' - std::string version_short(data["version"]); - size_t short_length = version_short.rfind('.'); - if (short_length != std::string::npos) - { - version_short.resize(short_length); - } + // truncate version at the rightmost '.' + std::string version_short(data["version"]); + size_t short_length = version_short.rfind('.'); + if (short_length != std::string::npos) + { + version_short.resize(short_length); + } - LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]"); - relnotes_url.setArg("[VERSION_SHORT]", version_short); + LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]"); + relnotes_url.setArg("[VERSION_SHORT]", version_short); - // *TODO thread the update service's response through to this point - std::string const & channel = LLVersionInfo::getChannel(); - boost::shared_ptr channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free); + // *TODO thread the update service's response through to this point + std::string const & channel = LLVersionInfo::getChannel(); + boost::shared_ptr channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free); - relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get()); - relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL")); + relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get()); + relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL")); substitutions["INFO_URL"] = relnotes_url.getString(); } - + LLNotificationsUtil::add(notification_name, substitutions, LLSD(), apply_callback); } @@ -3690,7 +3707,7 @@ bool LLAppViewer::initWindow() LLFeatureManager::getInstance()->setGraphicsLevel(*mForceGraphicsLevel, false); gSavedSettings.setU32("RenderQualityPerformance", *mForceGraphicsLevel); } - + // Set this flag in case we crash while initializing GL gSavedSettings.setBOOL("RenderInitError", TRUE); gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); @@ -3749,6 +3766,285 @@ void LLAppViewer::writeDebugInfo() out_file.close(); } +LLSD LLAppViewer::getViewerInfo() const +{ + // The point of having one method build an LLSD info block and the other + // construct the user-visible About string is to ensure that the same info + // is available to a getInfo() caller as to the user opening + // LLFloaterAbout. + LLSD info; + LLSD version; + version.append(LLVersionInfo::getMajor()); + version.append(LLVersionInfo::getMinor()); + version.append(LLVersionInfo::getPatch()); + version.append(LLVersionInfo::getBuild()); + info["VIEWER_VERSION"] = version; + info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); + info["BUILD_DATE"] = __DATE__; + info["BUILD_TIME"] = __TIME__; + info["CHANNEL"] = LLVersionInfo::getChannel(); + +// FIRE-8273: Add Open-sim indicator to About floater +#ifdef OPENSIM + info["BUILD_TYPE"] = LLTrans::getString("FSWithOpensim"); +#else + info["BUILD_TYPE"] = LLTrans::getString("FSWithHavok"); +#endif // OPENSIM +// + info["SKIN"] = gSavedSettings.getString("FSInternalSkinCurrent"); + info["THEME"] = gSavedSettings.getString("FSInternalSkinCurrentTheme"); + + //[FIRE 3113 : SJ] Added Font and fontsize to info + info["FONT"] = "Unknown Font"; + std::string fsInternalFontSettingsFile = gSavedSettings.getString("FSInternalFontSettingsFile"); + if (fsInternalFontSettingsFile == "fonts.xml") info["FONT"] = "Deja Vu"; + else if (fsInternalFontSettingsFile == "fonts_ubuntu.xml") info["FONT"] = "Ubuntu Font Family"; + else if (fsInternalFontSettingsFile == "fonts_liberation.xml") info["FONT"] = "Liberation"; + else if (fsInternalFontSettingsFile == "fonts_droid.xml") info["FONT"] = "Droid Sans"; + else if (fsInternalFontSettingsFile == "fonts_mobi.xml") info["FONT"] = "Mobi Sans"; + else if (fsInternalFontSettingsFile == "fonts_roboto.xml") info["FONT"] = "Roboto"; + else if (fsInternalFontSettingsFile == "fonts_dyslexia.xml") info["FONT"] = "OpenDyslexic"; + + info["FONT_SIZE"] = gSavedSettings.getF32("FSFontSizeAdjustment"); + info["FONT_SCREEN_DPI"] = gSavedSettings.getF32("FontScreenDPI"); + + //[FIRE-3923 : SJ] Added Drawdistance, bandwidth and LOD to info + info["DRAW_DISTANCE"] = gSavedSettings.getF32("RenderFarClip"); + info["BANDWIDTH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + info["LOD"] =gSavedSettings.getF32("RenderVolumeLODFactor"); + + //[FIRE 3113 : SJ] Added Settingsfile to info + info["MODE"] = "Unknown Mode"; + std::string sessionSettingsFile = gSavedSettings.getString("SessionSettingsFile"); + if (sessionSettingsFile == "settings_firestorm.xml") info["MODE"] = "Firestorm"; + else if (sessionSettingsFile == "settings_phoenix.xml") info["MODE"] = "Phoenix"; + else if (sessionSettingsFile == "settings_v3.xml") info["MODE"] = "Viewer 3"; + else if (sessionSettingsFile == "settings_hybrid.xml") info["MODE"] = "Hybrid"; + else if (sessionSettingsFile == "settings_latency.xml") info["MODE"] = "Latency"; + + // return a URL to the release notes for this viewer, such as: + // http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456 + std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); + if (! LLStringUtil::endsWith(url, "/")) + url += "/"; + url += LLURI::escape(LLVersionInfo::getChannel()) + "/"; + url += LLURI::escape(LLVersionInfo::getVersion()); + + info["VIEWER_RELEASE_NOTES_URL"] = url; + +#if LL_MSVC + info["COMPILER"] = "MSVC"; + info["COMPILER_VERSION"] = _MSC_VER; +#elif LL_CLANG // Clang identification + info["COMPILER"] = "Clang"; + info["COMPILER_VERSION"] = CLANG_VERSION_STRING; +#elif LL_GNUC + info["COMPILER"] = "GCC"; + info["COMPILER_VERSION"] = GCC_VERSION; +#endif + + // Position + LLViewerRegion* region = gAgent.getRegion(); + if (region) + { + LLVector3d pos = gAgent.getPositionGlobal(); + info["POSITION"] = ll_sd_from_vector3d(pos); + info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos)); + info["REGION"] = gAgent.getRegion()->getName(); + info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName(); + info["HOSTIP"] = gAgent.getRegion()->getHost().getString(); + info["SERVER_VERSION"] = gLastVersionChannel; + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + info["SLURL"] = slurl.getSLURLString(); + } + + // CPU + info["CPU"] = gSysCPU.getCPUString(); + info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024); + // Moved hack adjustment to Windows memory size into llsys.cpp + info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString(); + info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR)); + info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER)); + +#if LL_WINDOWS + LLSD driver_info = gDXHardware.getDisplayInfo(); + if (driver_info.has("DriverVersion")) + { + info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"]; + } +#endif + +// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0) + info["RLV_VERSION"] = (RlvActions::isRlvEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)"; +// [/RLVa:KB] + info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION)); + info["LIBCURL_VERSION"] = LLCurl::getVersionString(); + info["J2C_VERSION"] = LLImageJ2C::getEngineInfo(); + bool want_fullname = true; + info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD(); + if(LLVoiceClient::getInstance()->voiceEnabled()) + { + LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); + std::ostringstream version_string; + version_string << version.serverType << " " << version.serverVersion << std::endl; + info["VOICE_VERSION"] = version_string.str(); + } + else + { + info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); + } + + // TODO: Implement media plugin version query + info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)"; + + if (gPacketsIn > 0) + { + info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(); + // FIRE-3925: Formatting fails when reaching 1,000,000; + // Use S32 since it will be used in LLStringUtil::formatNumber anyway. + //info["PACKETS_IN"] = F32(gPacketsIn); + info["PACKETS_IN"] = S32(gPacketsIn); + // + info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal(); + } + + if (mServerReleaseNotesURL.empty()) + { + if (gAgent.getRegion()) + { + info["SERVER_RELEASE_NOTES_URL"] = LLTrans::getString("RetrievingData"); + } + } + else if (LLStringUtil::startsWith(mServerReleaseNotesURL, "http")) // it's an URL + { + info["SERVER_RELEASE_NOTES_URL"] = "[" + LLWeb::escapeURL(mServerReleaseNotesURL) + " " + LLTrans::getString("ReleaseNotes") + "]"; + } + else + { + info["SERVER_RELEASE_NOTES_URL"] = mServerReleaseNotesURL; + } + + // FIRE-4785: Current render quality setting in sysinfo / about floater + switch (gSavedSettings.getU32("RenderQualityPerformance")) + { + case 0: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_low"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "Low (1/7)"; + break; + case 1: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_mediumlow"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "Medium-Low (2/7)"; + break; + case 2: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_medium"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "Medium (3/7)"; + break; + case 3: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_mediumhigh"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "Medium-High (4/7)"; + break; + case 4: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_high"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "High (5/7)"; + break; + case 5: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_highultra"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "High-Ultra (6/7)"; + break; + case 6: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_ultra"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "Ultra (7/7)"; + break; + default: + info["RENDERQUALITY"] = LLTrans::getString("render_quality_unknown"); + info["RENDERQUALITY_FSDATA_ENGLISH"] = "Unknown, user has RenderQualityPerformance debug setting beyond the normal range (0-6)"; + break; + } + // + + // FIRE-11768: Include texture memory settings + info["TEXTUREMEMORY"] = gSavedSettings.getS32("TextureMemory"); + info["TEXTUREMEMORYMULTIPLIER"] = gSavedSettings.getF32("RenderTextureMemoryMultiple"); + // + + return info; +} + +std::string LLAppViewer::getViewerInfoString() const +{ + std::ostringstream support; + + LLSD info(getViewerInfo()); + + // Render the LLSD from getInfo() as a format_map_t + LLStringUtil::format_map_t args; + + // allow the "Release Notes" URL label to be localized + args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes"); + + for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap()); + ii != iend; ++ii) + { + if (! ii->second.isArray()) + { + // Scalar value + if (ii->second.isUndefined()) + { + args[ii->first] = LLTrans::getString("none_text"); + } + else + { + // don't forget to render value asString() + args[ii->first] = ii->second.asString(); + } + } + else + { + // array value: build KEY_0, KEY_1 etc. entries + for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n) + { + args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString(); + } + } + } + + // Now build the various pieces + support << LLTrans::getString("AboutHeader", args); + if (info.has("REGION")) + { +// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10) + support << "\n\n"; + if (RlvActions::canShowLocation()) + support << LLTrans::getString("AboutPosition", args); + else + support << RlvStrings::getString(RLV_STRING_HIDDEN_REGION); +// [/RLVa:KB] + //support << "\n\n" << LLTrans::getString("AboutPosition", args); + } + support << "\n\n" << LLTrans::getString("AboutSystem", args); + support << "\n"; + if (info.has("GRAPHICS_DRIVER_VERSION")) + { + support << "\n" << LLTrans::getString("AboutDriver", args); + } + support << "\n" << LLTrans::getString("AboutLibs", args); + if (info.has("BANDWIDTH")) //For added info in help floater + { + support << "\n" << LLTrans::getString("AboutSettings", args); + } + if (info.has("COMPILER")) + { + support << "\n" << LLTrans::getString("AboutCompiler", args); + } + if (info.has("PACKETS_IN")) + { + support << '\n' << LLTrans::getString("AboutTraffic", args); + } + return support.str(); +} + + void LLAppViewer::cleanupSavedSettings() { gSavedSettings.setBOOL("MouseSun", FALSE); @@ -4011,9 +4307,9 @@ void LLAppViewer::handleViewerCrash() if (gDirUtilp) { std::string crash_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, - gLLErrorActivated - ? LLERROR_MARKER_FILE_NAME - : ERROR_MARKER_FILE_NAME); + gLLErrorActivated + ? LLERROR_MARKER_FILE_NAME + : ERROR_MARKER_FILE_NAME); LLAPRFile crash_marker_file ; crash_marker_file.open(crash_marker_file_name, LL_APR_WB); if (crash_marker_file.getFileHandle()) @@ -4024,7 +4320,7 @@ void LLAppViewer::handleViewerCrash() else { LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_marker_file_name << LL_ENDL; - } + } } else { @@ -4169,7 +4465,7 @@ void LLAppViewer::processMarkerFiles() } if (mSecondInstance) - { + { LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' owned by another instance" << LL_ENDL; } else if (marker_is_same_version) @@ -4183,7 +4479,7 @@ void LLAppViewer::processMarkerFiles() { LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL; } - } + } else // marker did not exist... last exec (if any) did not freeze { // Create the marker file for this execution & lock it; it will be deleted on a clean exit @@ -4237,12 +4533,12 @@ void LLAppViewer::processMarkerFiles() { gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; LL_INFOS("MarkerFile") << "LLError marker '"<< llerror_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL; - } - else - { + } + else + { gLastExecEvent = LAST_EXEC_LLERROR_CRASH; LL_INFOS("MarkerFile") << "LLError marker '"<< llerror_marker_file << "' crashed, setting LastExecEvent to LLERROR_CRASH" << LL_ENDL; - } + } } else { @@ -4255,20 +4551,20 @@ void LLAppViewer::processMarkerFiles() if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) { if (markerIsSameVersion(error_marker_file)) - { + { if (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) - { + { gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL; - } - else - { - gLastExecEvent = LAST_EXEC_OTHER_CRASH; - LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; - } } else { + gLastExecEvent = LAST_EXEC_OTHER_CRASH; + LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + } + else + { LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL; } LLAPRFile::remove(error_marker_file); @@ -4280,29 +4576,29 @@ void LLAppViewer::removeMarkerFile(bool leave_logout_marker) if (!mSecondInstance) { LL_DEBUGS("MarkerFile") << (leave_logout_marker?"leave":"remove") <<" logout" << LL_ENDL; - if (mMarkerFile.getFileHandle()) - { + if (mMarkerFile.getFileHandle()) + { LL_DEBUGS("MarkerFile") << "removing exec marker '"<commandSendMetrics(caps_url, diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index f5d7d9ac25..002b096332 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -87,6 +87,10 @@ public: const LLOSInfo& getOSInfo() const { return mSysOSInfo; } + void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; } + LLSD getViewerInfo() const; + std::string getViewerInfoString() const; + // Report true if under the control of a debugger. A null-op default. virtual bool beingDebugged() { return false; } @@ -268,6 +272,8 @@ private: LLOSInfo mSysOSInfo; bool mReportedCrash; + std::string mServerReleaseNotesURL; + // Thread objects. static LLTextureCache* sTextureCache; static LLImageDecodeThread* sImageDecodeThread; diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 3361b47f10..a68739fc3b 100755 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -203,14 +203,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) { -#ifdef INCLUDE_VLD - // only works for debug builds (hard coded into vld.h) - #ifdef _DEBUG - // start with Visual Leak Detector turned off - VLDGlobalDisable(); - #endif // _DEBUG -#endif // INCLUDE_VLD - const S32 MAX_HEAPS = 255; DWORD heap_enable_lfh_error[MAX_HEAPS]; S32 num_heaps = 0; diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index e28b73bfc1..95c2f9d667 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -131,29 +131,33 @@ void LLChannelManager::onLoginCompleted() } else { - // create a channel for the StartUp Toast - LLScreenChannelBase::Params p; - p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); - p.channel_align = CA_RIGHT; - mStartUpChannel = createChannel(p); + // TODO: Seems this code leads to MAINT-3536 new crash in XML_ParserFree. + // Need to investigate this and fix possible problems with notifications in startup time + // Viewer can normally receive and show of postponed notifications about purchasing in marketplace on startup time. + // Other types of postponed notifications did not tested. + //// create a channel for the StartUp Toast + //LLScreenChannelBase::Params p; + //p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); + //p.channel_align = CA_RIGHT; + //mStartUpChannel = createChannel(p); - if(!mStartUpChannel) - { - onStartUpToastClose(); - } - else - { - gViewerWindow->getRootView()->addChild(mStartUpChannel); + //if(!mStartUpChannel) + //{ + // onStartUpToastClose(); + //} + //else + //{ + // gViewerWindow->getRootView()->addChild(mStartUpChannel); - // init channel's position and size - S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); - S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); - mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); + // // init channel's position and size + // S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); + // S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); + // mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); + // mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); - mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); - mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); - } + // mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); + // mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); + //} } LLPersistentNotificationStorage::getInstance()->loadNotifications(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index df6a5ade85..e36b7d2895 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -599,6 +599,7 @@ protected: menu->setItemEnabled("Offer Teleport",false); menu->setItemEnabled("Request Teleport",false); menu->setItemEnabled("Voice Call", false); + menu->setItemEnabled("Chat History", false); menu->setItemEnabled("Invite Group", false); menu->setItemEnabled("Zoom In", false); menu->setItemEnabled("Share", false); @@ -622,9 +623,9 @@ protected: menu->setItemVisible("Zoom In", should_show_zoom && gObjectList.findObject(mAvatarID)); menu->setItemEnabled("Block Unblock", LLAvatarActions::canBlock(mAvatarID)); menu->setItemEnabled("Mute Text", LLAvatarActions::canBlock(mAvatarID)); + menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID)); } - menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID)); menu->setItemEnabled("Map", (LLAvatarTracker::instance().isBuddyOnline(mAvatarID) && is_agent_mappable(mAvatarID)) || gAgent.isGodlike() ); menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); @@ -783,6 +784,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) editor_params.follows.flags = FOLLOWS_ALL; editor_params.enabled = false; // read only editor_params.show_context_menu = "true"; + editor_params.trusted_content = false; mEditor = LLUICtrlFactory::create(editor_params, this); mEditor->setIsFriendCallback(LLAvatarActions::isFriend); } diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 8a68fa22e4..12ddaa7b82 100755 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -44,7 +44,7 @@ #include "lltrans.h" #include "lltabcontainer.h" -static LLRegisterPanelClassWrapper t_cof_wearables("cof_wearables"); +static LLPanelInjector t_cof_wearables("cof_wearables"); const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 536c60810b..a3c37276e9 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -269,7 +269,6 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) //This node (conversation) was selected and a child (participant) was not if(result && getRoot()) { - if(getRoot()->getCurSelectedItem() == this) { LLConversationItem* item = dynamic_cast(getViewModelItem()); @@ -284,7 +283,6 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) { im_container->collapseMessagesPane(false); } - } selectConversationItem(); } diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index 8926f64c64..0bc7ae766c 100755 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -37,8 +37,6 @@ #include "llviewershadermgr.h" #include "llrender.h" -#define GE_FORCE_WORKAROUND LL_DARWIN - static LLGLSLShader* simple_shader = NULL; static LLGLSLShader* fullbright_shader = NULL; @@ -660,14 +658,6 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass) } else { - -// Work-around until we can figure out why the right shader causes -// the GeForce driver to go tango uniform on OS X 10.6.8 only -// -#if GE_FORCE_WORKAROUND - gObjectFullbrightAlphaMaskProgram.bind(); - gObjectFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); -#else if (LLPipeline::sUnderWaterRender) { gDeferredFullbrightAlphaMaskWaterProgram.bind(); @@ -678,9 +668,7 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass) gDeferredFullbrightAlphaMaskProgram.bind(); gDeferredFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); } -#endif } - } void LLDrawPoolFullbrightAlphaMask::renderPostDeferred(S32 pass) @@ -699,13 +687,6 @@ void LLDrawPoolFullbrightAlphaMask::endPostDeferredPass(S32 pass) } else { - -// Work-around until we can figure out why the right shader causes -// the GeForce driver to go tango uniform on OS X 10.6.8 only -// -#if GE_FORCE_WORKAROUND - gObjectFullbrightAlphaMaskProgram.unbind(); -#else if (LLPipeline::sUnderWaterRender) { gDeferredFullbrightAlphaMaskWaterProgram.unbind(); @@ -714,8 +695,6 @@ void LLDrawPoolFullbrightAlphaMask::endPostDeferredPass(S32 pass) { gDeferredFullbrightAlphaMaskProgram.unbind(); } -#endif - } LLRenderPass::endRenderPass(pass); } diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 986d039417..f91de847ce 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -973,6 +973,14 @@ void LLFeatureManager::applyBaseMasks() // maskFeatures("VRAMGT512"); //} +#if LL_DARWIN + const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo(); + if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7) + { + maskFeatures("OSX_10_6_8"); + } +#endif + // now mask by gpu string // Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces std::string gpustr = mGPUString; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 598da73d45..4331a63346 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -45,10 +45,6 @@ #include "llviewerregion.h" #include "llversioninfo.h" #include "llweb.h" -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0) -#include "rlvactions.h" -#include "rlvhelper.h" -// [/RLVa:KB] // Linden library includes #include "llaudioengine.h" @@ -71,16 +67,9 @@ #include "lldxhardware.h" #endif -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0a) -#include "rlvhandler.h" -// [/RLVa:KB] - - extern LLMemoryInfo gSysMemory; extern U32 gPacketsIn; -static std::string get_viewer_release_notes_url(); - ///---------------------------------------------------------------------------- /// Class LLServerReleaseNotesURLFetcher ///---------------------------------------------------------------------------- @@ -99,29 +88,27 @@ public: }; ///---------------------------------------------------------------------------- -/// Class LLFloaterAbout moved to llfloaterabout.h for fsdata info +/// Class LLFloaterAbout ///---------------------------------------------------------------------------- -//class LLFloaterAbout -// : public LLFloater -//{ -// friend class LLFloaterReg; -//private: -// LLFloaterAbout(const LLSD& key); -// virtual ~LLFloaterAbout(); -// -//public: -// /*virtual*/ BOOL postBuild(); -// -// /// Obtain the data used to fill out the contents string. This is -// /// separated so that we can programmatically access the same info. -// static LLSD getInfo(); -// void onClickCopyToClipboard(); -// -// void updateServerReleaseNotesURL(const std::string& url); -// -//private: -// void setSupportText(const std::string& server_release_notes_url); -//}; +class LLFloaterAbout + : public LLFloater +{ + friend class LLFloaterReg; +private: + LLFloaterAbout(const LLSD& key); + virtual ~LLFloaterAbout(); + +public: + /*virtual*/ BOOL postBuild(); + + /// Obtain the data used to fill out the contents string. This is + /// separated so that we can programmatically access the same info. + static LLSD getInfo(); + void onClickCopyToClipboard(); + +private: + void setSupportText(const std::string& server_release_notes_url); +}; // Default constructor @@ -228,198 +215,9 @@ BOOL LLFloaterAbout::postBuild() return TRUE; } -// static LLSD LLFloaterAbout::getInfo() { - // The point of having one method build an LLSD info block and the other - // construct the user-visible About string is to ensure that the same info - // is available to a getInfo() caller as to the user opening - // LLFloaterAbout. - LLSD info; - LLSD version; - version.append(LLVersionInfo::getMajor()); - version.append(LLVersionInfo::getMinor()); - version.append(LLVersionInfo::getPatch()); - version.append(LLVersionInfo::getBuild()); - info["VIEWER_VERSION"] = version; - info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); - info["BUILD_DATE"] = __DATE__; - info["BUILD_TIME"] = __TIME__; - info["CHANNEL"] = LLVersionInfo::getChannel(); -// FIRE-8273: Add Open-sim indicator to About floater -#ifdef OPENSIM - info["BUILD_TYPE"] = LLTrans::getString("FSWithOpensim"); -#else - info["BUILD_TYPE"] = LLTrans::getString("FSWithHavok"); -#endif // OPENSIM -// - info["SKIN"] = gSavedSettings.getString("FSInternalSkinCurrent"); - info["THEME"] = gSavedSettings.getString("FSInternalSkinCurrentTheme"); - - //[FIRE 3113 : SJ] Added Font and fontsize to info - info["FONT"] = "Unknown Font"; - std::string fsInternalFontSettingsFile = gSavedSettings.getString("FSInternalFontSettingsFile"); - if (fsInternalFontSettingsFile == "fonts.xml") info["FONT"] = "Deja Vu"; - else if (fsInternalFontSettingsFile == "fonts_ubuntu.xml") info["FONT"] = "Ubuntu Font Family"; - else if (fsInternalFontSettingsFile == "fonts_liberation.xml") info["FONT"] = "Liberation"; - else if (fsInternalFontSettingsFile == "fonts_droid.xml") info["FONT"] = "Droid Sans"; - else if (fsInternalFontSettingsFile == "fonts_mobi.xml") info["FONT"] = "Mobi Sans"; - else if (fsInternalFontSettingsFile == "fonts_roboto.xml") info["FONT"] = "Roboto"; - else if (fsInternalFontSettingsFile == "fonts_dyslexia.xml") info["FONT"] = "OpenDyslexic"; - - info["FONT_SIZE"] = gSavedSettings.getF32("FSFontSizeAdjustment"); - info["FONT_SCREEN_DPI"] = gSavedSettings.getF32("FontScreenDPI"); - - //[FIRE-3923 : SJ] Added Drawdistance, bandwidth and LOD to info - info["DRAW_DISTANCE"] = gSavedSettings.getF32("RenderFarClip"); - info["BANDWIDTH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS"); - info["LOD"] =gSavedSettings.getF32("RenderVolumeLODFactor"); - - //[FIRE 3113 : SJ] Added Settingsfile to info - info["MODE"] = "Unknown Mode"; - std::string sessionSettingsFile = gSavedSettings.getString("SessionSettingsFile"); - if (sessionSettingsFile == "settings_firestorm.xml") info["MODE"] = "Firestorm"; - else if (sessionSettingsFile == "settings_phoenix.xml") info["MODE"] = "Phoenix"; - else if (sessionSettingsFile == "settings_v3.xml") info["MODE"] = "Viewer 3"; - else if (sessionSettingsFile == "settings_hybrid.xml") info["MODE"] = "Hybrid"; - else if (sessionSettingsFile == "settings_latency.xml") info["MODE"] = "Latency"; - - info["VIEWER_RELEASE_NOTES_URL"] = get_viewer_release_notes_url(); - -#if LL_MSVC - info["COMPILER"] = "MSVC"; - info["COMPILER_VERSION"] = _MSC_VER; -#elif LL_CLANG // Clang identification - info["COMPILER"] = "Clang"; - info["COMPILER_VERSION"] = CLANG_VERSION_STRING; -#elif LL_GNUC - info["COMPILER"] = "GCC"; - info["COMPILER_VERSION"] = GCC_VERSION; -#endif - - // Position - LLViewerRegion* region = gAgent.getRegion(); - if (region) - { - LLVector3d pos = gAgent.getPositionGlobal(); - info["POSITION"] = ll_sd_from_vector3d(pos); - info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos)); - info["REGION"] = gAgent.getRegion()->getName(); - info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName(); - info["HOSTIP"] = gAgent.getRegion()->getHost().getString(); - info["SERVER_VERSION"] = gLastVersionChannel; - LLSLURL slurl; - LLAgentUI::buildSLURL(slurl); - info["SLURL"] = slurl.getSLURLString(); - } - - // CPU - info["CPU"] = gSysCPU.getCPUString(); - info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024); - // Moved hack adjustment to Windows memory size into llsys.cpp - info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString(); - info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR)); - info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER)); - -#if LL_WINDOWS - LLSD driver_info = gDXHardware.getDisplayInfo(); - if (driver_info.has("DriverVersion")) - { - info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"]; - } -#endif - -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0) - info["RLV_VERSION"] = (RlvActions::isRlvEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)"; -// [/RLVa:KB] - info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION)); - info["LIBCURL_VERSION"] = LLCurl::getVersionString(); - info["J2C_VERSION"] = LLImageJ2C::getEngineInfo(); - bool want_fullname = true; - info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD(); - if(LLVoiceClient::getInstance()->voiceEnabled()) - { - LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); - std::ostringstream version_string; - version_string << version.serverType << " " << version.serverVersion << std::endl; - info["VOICE_VERSION"] = version_string.str(); - } - else - { - info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); - } - - // TODO: Implement media plugin version query - info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)"; - - if (gPacketsIn > 0) - { - info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(); - // FIRE-3925: Formatting fails when reaching 1,000,000; - // Use S32 since it will be used in LLStringUtil::formatNumber anyway. - //info["PACKETS_IN"] = F32(gPacketsIn); - info["PACKETS_IN"] = S32(gPacketsIn); - // - info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal(); - } - - // FIRE-4785: Current render quality setting in sysinfo / about floater - switch (gSavedSettings.getU32("RenderQualityPerformance")) - { - case 0: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_low"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "Low (1/7)"; - break; - case 1: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_mediumlow"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "Medium-Low (2/7)"; - break; - case 2: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_medium"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "Medium (3/7)"; - break; - case 3: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_mediumhigh"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "Medium-High (4/7)"; - break; - case 4: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_high"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "High (5/7)"; - break; - case 5: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_highultra"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "High-Ultra (6/7)"; - break; - case 6: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_ultra"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "Ultra (7/7)"; - break; - default: - info["RENDERQUALITY"] = LLTrans::getString("render_quality_unknown"); - info["RENDERQUALITY_FSDATA_ENGLISH"] = "Unknown, user has RenderQualityPerformance debug setting beyond the normal range (0-6)"; - break; - } - // - - // FIRE-11768: Include texture memory settings - info["TEXTUREMEMORY"] = gSavedSettings.getS32("TextureMemory"); - info["TEXTUREMEMORYMULTIPLIER"] = gSavedSettings.getF32("RenderTextureMemoryMultiple"); - // - - return info; -} - -static std::string get_viewer_release_notes_url() -{ - // return a URL to the release notes for this viewer, such as: - // http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456 - //std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); - //if (! LLStringUtil::endsWith(url, "/")) - // url += "/"; - //url += LLVersionInfo::getChannel() + "/"; - //url += LLVersionInfo::getVersion(); - std::string url = "http://wiki.phoenixviewer.com/firestorm_change_log"; - return LLWeb::escapeURL(url); + return LLAppViewer::instance()->getViewerInfo(); } class LLFloaterAboutListener: public LLEventAPI @@ -456,105 +254,22 @@ void LLFloaterAbout::onClickCopyToClipboard() support_widget->deselect(); } -void LLFloaterAbout::updateServerReleaseNotesURL(const std::string& url) -{ - setSupportText(url); -} - void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) { #if LL_WINDOWS getWindow()->incBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); #endif - LLSD info(getInfo()); #if LL_WINDOWS getWindow()->decBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); #endif - if (LLStringUtil::startsWith(server_release_notes_url, "http")) // it's an URL - { - info["SERVER_RELEASE_NOTES_URL"] = "[" + LLWeb::escapeURL(server_release_notes_url) + " " + LLTrans::getString("ReleaseNotes") + "]"; - } - else - { - info["SERVER_RELEASE_NOTES_URL"] = server_release_notes_url; - } - LLViewerTextEditor *support_widget = getChild("support_editor", true); - std::ostringstream support; - - // Render the LLSD from getInfo() as a format_map_t - LLStringUtil::format_map_t args; - - // allow the "Release Notes" URL label to be localized - args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes"); - - for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap()); - ii != iend; ++ii) - { - if (! ii->second.isArray()) - { - // Scalar value - if (ii->second.isUndefined()) - { - args[ii->first] = getString("none"); - } - else - { - // don't forget to render value asString() - args[ii->first] = ii->second.asString(); - } - } - else - { - // array value: build KEY_0, KEY_1 etc. entries - for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n) - { - args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString(); - } - } - } - - // Now build the various pieces - support << getString("AboutHeader", args); - if (info.has("REGION")) - { -// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10) - support << "\n\n"; - if (RlvActions::canShowLocation()) - support << getString("AboutPosition", args); - else - support << RlvStrings::getString(RLV_STRING_HIDDEN_REGION); -// [/RLVa:KB] -// support << "\n\n" << getString("AboutPosition", args); - } - support << "\n\n" << getString("AboutSystem", args); - support << "\n"; - if (info.has("GRAPHICS_DRIVER_VERSION")) - { - support << "\n" << getString("AboutDriver", args); - } - support << "\n" << getString("AboutLibs", args); - if (info.has("BANDWIDTH")) - { - support << "\n" << getString("AboutSettings", args); - } - - if (info.has("COMPILER")) - { - support << "\n" << getString("AboutCompiler", args); - } - if (info.has("PACKETS_IN")) - { - support << '\n' << getString("AboutTraffic", args); - } - support_widget->clear(); - support_widget->appendText(support.str(), + support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(), FALSE, LLStyle::Params() .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor"))); @@ -601,9 +316,9 @@ void LLServerReleaseNotesURLFetcher::completedHeader(U32 status, const std::stri std::string location = content["location"].asString(); if (location.empty()) { - location = floater_about->getString("ErrorFetchingServerReleaseNotesURL"); + location = LLTrans::getString("ErrorFetchingServerReleaseNotesURL"); } - floater_about->updateServerReleaseNotesURL(location); + LLAppViewer::instance()->setServerReleaseNotesURL(location); } } diff --git a/indra/newview/llfloaterabout.h b/indra/newview/llfloaterabout.h index 9471d37313..8fc1aa4f29 100755 --- a/indra/newview/llfloaterabout.h +++ b/indra/newview/llfloaterabout.h @@ -27,37 +27,9 @@ #ifndef LL_LLFLOATERABOUT_H #define LL_LLFLOATERABOUT_H -#include "llfloater.h" //leave here -TM - namespace LLFloaterAboutUtil { void registerFloater(); } -//Leave this class here for fsdata to work. -TM -///---------------------------------------------------------------------------- -/// Class LLFloaterAbout -///---------------------------------------------------------------------------- -class LLFloaterAbout - : public LLFloater -{ - friend class LLFloaterReg; -private: - LLFloaterAbout(const LLSD& key); - virtual ~LLFloaterAbout(); - -public: - /*virtual*/ BOOL postBuild(); - - /// Obtain the data used to fill out the contents string. This is - /// separated so that we can programmatically access the same info. - static LLSD getInfo(); - static std::string buildAbout(const LLSD& info); - void onClickCopyToClipboard(); - - void updateServerReleaseNotesURL(const std::string& url); - -private: - void setSupportText(const std::string& server_release_notes_url); -}; #endif // LL_LLFLOATERABOUT_H diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index f5fec52b6f..5b93b34ece 100755 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -151,7 +151,7 @@ void LLPanelCameraItem::setValue(const LLSD& value) getChildView("selected_picture")->setVisible( value["selected"]); } -static LLRegisterPanelClassWrapper t_camera_zoom_panel("camera_zoom_panel"); +static LLPanelInjector t_camera_zoom_panel("camera_zoom_panel"); //------------------------------------------------------------------------------- // LLPanelCameraZoom diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f41d2cb55c..3b776cf2ac 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -89,12 +89,10 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param LLFloaterIMContainer::~LLFloaterIMContainer() { mConversationsEventStream.stopListening("ConversationsRefresh"); - gIdleCallbacks.deleteFunction(idle, this); - mNewMessageConnection.disconnect(); LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); - + if (mMicroChangedSignal.connected()) { mMicroChangedSignal.disconnect(); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index d390d8bae6..2ccdf3365f 100755 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -827,6 +827,7 @@ void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive) void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) { LLFloaterIMContainer* host_floater = dynamic_cast(self->getHost()); + bool should_be_expanded = false; if (host_floater) { // Hide the messages pane if a floater is hosted in the Conversations @@ -837,7 +838,7 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) if (!self->mIsP2PChat) { // The state must toggle the collapsed state of the panel - bool should_be_expanded = self->mParticipantListPanel->isCollapsed(); + should_be_expanded = self->mParticipantListPanel->isCollapsed(); // Update the expand/collapse flag of the participant list panel and save it gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded); @@ -849,6 +850,10 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) } self->assignResizeLimits(); + if (should_be_expanded) + { + self->forceReshape(); + } } void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 75b56e2ddf..c0f5d51a32 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2449,7 +2449,7 @@ void LLFloaterPreference::changed() //---------------------------------------------------------------------------- */ // FIRE-6340, FIRE-6567 - Setting Bandwidth issues -static LLRegisterPanelClassWrapper t_places("panel_preference"); +static LLPanelInjector t_places("panel_preference"); LLPanelPreference::LLPanelPreference() // FIRE-6340, FIRE-6567 - Setting Bandwidth issues //: LLPanel(), @@ -2854,8 +2854,8 @@ private: // }; -static LLRegisterPanelClassWrapper t_pref_graph("panel_preference_graphics"); -static LLRegisterPanelClassWrapper t_pref_privacy("panel_preference_privacy"); +static LLPanelInjector t_pref_graph("panel_preference_graphics"); +static LLPanelInjector t_pref_privacy("panel_preference_privacy"); BOOL LLPanelPreferenceGraphics::postBuild() { @@ -3134,7 +3134,7 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() } // [SL:KB] - Patch: Viewer-CrashReporting | Checked: 2010-11-16 (Catznip-2.6.0a) | Added: Catznip-2.4.0b -static LLRegisterPanelClassWrapper t_pref_crashreports("panel_preference_crashreports"); +static LLPanelInjector t_pref_crashreports("panel_preference_crashreports"); LLPanelPreferenceCrashReports::LLPanelPreferenceCrashReports() : LLPanelPreference() @@ -3197,7 +3197,7 @@ void LLPanelPreferenceCrashReports::cancel() // [/SL:KB] // [SL:KB] - Patch: Viewer-Skins | Checked: 2010-10-21 (Catznip-2.2) -static LLRegisterPanelClassWrapper t_pref_skins("panel_preference_skins"); +static LLPanelInjector t_pref_skins("panel_preference_skins"); LLPanelPreferenceSkins::LLPanelPreferenceSkins() : LLPanelPreference() @@ -3427,7 +3427,7 @@ S32 copy_prefs_file(const std::string& from, const std::string& to) return rv; } -static LLRegisterPanelClassWrapper t_pref_backup("panel_preference_backup"); +static LLPanelInjector t_pref_backup("panel_preference_backup"); FSPanelPreferenceBackup::FSPanelPreferenceBackup() : LLPanelPreference() { @@ -3965,7 +3965,7 @@ void LLFloaterPreference::populateFontSelectionCombo() // #ifdef OPENSIM -static LLRegisterPanelClassWrapper t_pref_opensim("panel_preference_opensim"); +static LLPanelInjector t_pref_opensim("panel_preference_opensim"); LLPanelPreferenceOpensim::LLPanelPreferenceOpensim() : LLPanelPreference(), mGridListControl(NULL) diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 306eebb5f1..5a4e1bd3b3 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -47,10 +47,10 @@ #include "llviewercontrol.h" #include "llviewermedia.h" -static LLRegisterPanelClassWrapper t_panel_status("llsocialstatuspanel"); -static LLRegisterPanelClassWrapper t_panel_photo("llsocialphotopanel"); -static LLRegisterPanelClassWrapper t_panel_checkin("llsocialcheckinpanel"); -static LLRegisterPanelClassWrapper t_panel_account("llsocialaccountpanel"); +static LLPanelInjector t_panel_status("llsocialstatuspanel"); +static LLPanelInjector t_panel_photo("llsocialphotopanel"); +static LLPanelInjector t_panel_checkin("llsocialcheckinpanel"); +static LLPanelInjector t_panel_account("llsocialaccountpanel"); const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/"; diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 3a44c5f929..1841000701 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -62,6 +62,7 @@ #include "llresmgr.h" #include "pipeline.h" #include "llspatialpartition.h" +#include "llviewershadermgr.h" // [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) #include "rlvhandler.h" // [/RLVa:KB] @@ -831,7 +832,6 @@ void draw_line_cube(F32 width, const LLVector3& center) gGL.vertex3f(center.mV[VX] + width ,center.mV[VY] - width,center.mV[VZ] - width); } - void LLViewerObjectList::renderObjectBeacons() { if (mDebugBeacons.empty()) @@ -942,3 +942,134 @@ void LLViewerObjectList::renderObjectBeacons() } +void gpu_benchmark() +{ + if (!LLGLSLShader::sNoFixedFunction) + { //don't bother benchmarking the fixed function + return; + } + + //measure memory bandwidth by: + // - allocating a batch of textures and render targets + // - rendering those textures to those render targets + // - recording time taken + // - taking the median time for a given number of samples + + //resolution of textures/render targets + const U32 res = 1024; + + //number of textures + const U32 count = 32; + + //number of samples to take + const S32 samples = 64; + + LLGLSLShader::initProfile(); + + LLRenderTarget dest[count]; + U32 source[count]; + LLImageGL::generateTextures(count, source); + std::vector results; + + //build a random texture + U8 pixels[res*res*4]; + + for (U32 i = 0; i < res*res*4; ++i) + { + pixels[i] = (U8) ll_rand(255); + } + + + gGL.setColorMask(true, true); + LLGLDepthTest depth(GL_FALSE); + + for (U32 i = 0; i < count; ++i) + { //allocate render targets and textures + dest[i].allocate(res,res,GL_RGBA,false, false, LLTexUnit::TT_TEXTURE, true); + dest[i].bindTarget(); + dest[i].clear(); + dest[i].flush(); + + gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]); + LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA, res,res,GL_RGBA, GL_UNSIGNED_BYTE, pixels); + } + + //make a dummy triangle to draw with + LLPointer buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB); + buff->allocateBuffer(3, 0, true); + + LLStrider v; + LLStrider tc; + + buff->getVertexStrider(v); + + v[0].set(-1,1,0); + v[1].set(-1,-3,0); + v[2].set(3,1,0); + buff->flush(); + + gBenchmarkProgram.bind(); + buff->setBuffer(LLVertexBuffer::MAP_VERTEX); + + //wait for any previoius GL commands to finish + glFinish(); + + for (S32 c = -1; c < samples; ++c) + { + LLTimer timer; + timer.start(); + + for (U32 i = 0; i < count; ++i) + { + dest[i].bindTarget(); + gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]); + buff->drawArrays(LLRender::TRIANGLES, 0, 3); + dest[i].flush(); + } + + //wait for current batch of copies to finish + glFinish(); + + F32 time = timer.getElapsedTimeF32(); + + if (c >= 0) // <-- ignore the first sample as it tends to be artificially slow + { + //store result in gigabytes per second + F32 gb = (F32) ((F64) (res*res*8*count))/(1000000000); + + F32 gbps = gb/time; + + results.push_back(gbps); + } + } + + gBenchmarkProgram.unbind(); + + LLGLSLShader::finishProfile(); + + LLImageGL::deleteTextures(count, source); + + + std::sort(results.begin(), results.end()); + + F32 gbps = results[results.size()/2]; + + llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to CPU timers" << llendl; + + F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f; + F32 seconds = ms/1000.f; + + F64 samples_drawn = res*res*count*samples; + F32 samples_sec = (samples_drawn/1000000000.0)/seconds; + gbps = samples_sec*8; + + if (gGLManager.mHasTimerQuery) + { + llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << llendl; + } + else + { + llinfos << "ARB_timer_query unavailable." << llendl; + } +} + diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 3e461fedbc..937c3c0c07 100755 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -362,7 +362,7 @@ private: ////////////////////////////////////////////////////////////////////////// -static LLRegisterPanelClassWrapper t_outfits_list("outfits_list"); +static LLPanelInjector t_outfits_list("outfits_list"); LLOutfitsList::LLOutfitsList() : LLPanelAppearanceTab() diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index ca23971748..f037d04bb2 100755 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -48,7 +48,7 @@ #include "llsidetraypanelcontainer.h" #include "llviewercontrol.h" -static LLRegisterPanelClassWrapper t_panel_blocked_list("panel_block_list_sidetray"); +static LLPanelInjector t_panel_blocked_list("panel_block_list_sidetray"); // // Constants diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 952340b754..04646b1ce0 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -65,7 +65,7 @@ #include "llfilepicker.h" // register panel with appropriate XML -static LLRegisterPanelClassWrapper t_edit_wearable("panel_edit_wearable"); +static LLPanelInjector t_edit_wearable("panel_edit_wearable"); // subparts of the UI for focus, camera position, etc. enum ESubpart { diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 39e4f5e10d..f38bdc4846 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -60,7 +60,7 @@ #include "llviewercontrol.h" // -static LLRegisterPanelClassWrapper t_panel_group("panel_group_info_sidetray"); +static LLPanelInjector t_panel_group("panel_group_info_sidetray"); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 6061d74963..5fbd0e7198 100755 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -58,7 +58,7 @@ #include "llclipboard.h" #include "lleconomy.h" // -static LLRegisterPanelClassWrapper t_panel_group_general("panel_group_general"); +static LLPanelInjector t_panel_group_general("panel_group_general"); // consts const S32 MATURE_CONTENT = 1; @@ -68,14 +68,12 @@ const S32 DECLINE_TO_STATE = 0; LLPanelGroupGeneral::LLPanelGroupGeneral() : LLPanelGroupTab(), - mPendingMemberUpdate(FALSE), mChanged(FALSE), mFirstUse(TRUE), mGroupNameEditor(NULL), mFounderName(NULL), mInsignia(NULL), mEditCharter(NULL), - mListVisibleMembers(NULL), mCtrlShowInGroupList(NULL), mComboMature(NULL), mCtrlOpenEnrollment(NULL), @@ -85,8 +83,6 @@ LLPanelGroupGeneral::LLPanelGroupGeneral() mCtrlListGroup(NULL), mActiveTitleLabel(NULL), mComboActiveTitle(NULL), - // Member list doesn't load properly - //mAvatarNameCacheConnection(), mCtrlReceiveGroupChat(NULL) // { @@ -94,20 +90,6 @@ LLPanelGroupGeneral::LLPanelGroupGeneral() LLPanelGroupGeneral::~LLPanelGroupGeneral() { - // Member list doesn't load properly - //if (mAvatarNameCacheConnection.connected()) - //{ - // mAvatarNameCacheConnection.disconnect(); - //} - for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) - { - if (it->second.connected()) - { - it->second.disconnect(); - } - } - mAvatarNameCacheConnections.clear(); - // } BOOL LLPanelGroupGeneral::postBuild() @@ -126,17 +108,6 @@ BOOL LLPanelGroupGeneral::postBuild() childSetCommitCallback("copy_name", boost::bind(&LLPanelGroupGeneral::onCopyName, this), NULL); childSetEnabled("copy_name", FALSE); // - - - mListVisibleMembers = getChild("visible_members", recurse); - if (mListVisibleMembers) - { - mListVisibleMembers->setDoubleClickCallback(openProfile, this); - mListVisibleMembers->setContextMenu(LLScrollListCtrl::MENU_AVATAR); - - mListVisibleMembers->setSortCallback(boost::bind(&LLPanelGroupGeneral::sortMembersList,this,_1,_2,_3)); - } - // Options mCtrlShowInGroupList = getChild("show_in_group_list", recurse); if (mCtrlShowInGroupList) @@ -330,21 +301,6 @@ void LLPanelGroupGeneral::onClickInfo(void *userdata) } -// static -void LLPanelGroupGeneral::openProfile(void* data) -{ - LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; - - if (self && self->mListVisibleMembers) - { - LLScrollListItem* selected = self->mListVisibleMembers->getFirstSelected(); - if (selected) - { - LLAvatarActions::showProfile(selected->getUUID()); - } - } -} - bool LLPanelGroupGeneral::needsApply(std::string& mesg) { updateChanged(); @@ -376,11 +332,6 @@ void LLPanelGroupGeneral::activate() void LLPanelGroupGeneral::draw() { LLPanelGroupTab::draw(); - - if (mPendingMemberUpdate) - { - updateMembers(); - } } bool LLPanelGroupGeneral::apply(std::string& mesg) @@ -582,10 +533,6 @@ bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LL return false; } -static F32 sSDTime = 0.0f; -static F32 sElementTime = 0.0f; -static F32 sAllTime = 0.0f; - // virtual void LLPanelGroupGeneral::update(LLGroupChange gc) { @@ -736,174 +683,10 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) { mEditCharter->setText(gdatap->mCharter); } - - if (mListVisibleMembers) - { - mListVisibleMembers->deleteAllItems(); - - if (gdatap->isMemberDataComplete()) - { - mMemberProgress = gdatap->mMembers.begin(); - mPendingMemberUpdate = TRUE; - mIteratorGroup = mGroupID; // FIRE-6074 - - sSDTime = 0.0f; - sElementTime = 0.0f; - sAllTime = 0.0f; - } - else - { - std::stringstream pending; - pending << "Retrieving member list (" << gdatap->mMembers.size() << "\\" << gdatap->mMemberCount << ")"; - - LLSD row; - row["columns"][0]["value"] = pending.str(); - row["columns"][0]["column"] = "name"; - - mListVisibleMembers->setEnabled(FALSE); - mListVisibleMembers->addElement(row); - } - } - - // Copy group name button - childSetEnabled("copy_name", !gdatap->mName.empty()); - mGroupName = gdatap->mName; - // resetDirty(); } -void LLPanelGroupGeneral::updateMembers() -{ - mPendingMemberUpdate = FALSE; - - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); - - if (!mListVisibleMembers - || !gdatap - || !gdatap->isMemberDataComplete() - || gdatap->mMembers.empty()) - { - return; - } - - LLTimer update_time; - update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME); - - // FIRE-6074; If the group changes, mMemberPRogresss is invalid, as it belongs to a different LLGroupMgrGroupData. Reset it, start over. - if( mIteratorGroup != mGroupID ) - { - mMemberProgress = gdatap->mMembers.begin(); - mIteratorGroup = mGroupID; - } - // FIRE-6074 - - - LLAvatarName av_name; - - for( ; mMemberProgress != gdatap->mMembers.end() && !update_time.hasExpired(); - ++mMemberProgress) - { - LLGroupMemberData* member = mMemberProgress->second; - if (!member) - { - continue; - } - - if (LLAvatarNameCache::get(mMemberProgress->first, &av_name)) - { - addMember(mMemberProgress->second); - } - else - { - // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - // *TODO : Use a callback per member, not for the panel group. - // Member list doesn't load properly - //if (mAvatarNameCacheConnection.connected()) - //{ - // mAvatarNameCacheConnection.disconnect(); - //} - //mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2)); - - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first); - if (it != mAvatarNameCacheConnections.end()) - { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); - } - mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2, _1)); - // - } - } - - if (mMemberProgress == gdatap->mMembers.end()) - { - lldebugs << " member list completed." << llendl; - mListVisibleMembers->setEnabled(TRUE); - } - else - { - mPendingMemberUpdate = TRUE; - mListVisibleMembers->setEnabled(FALSE); - } -} - -void LLPanelGroupGeneral::addMember(LLGroupMemberData* member) -{ - LLNameListCtrl::NameItem item_params; - item_params.value = member->getID(); - - LLScrollListCell::Params column; - item_params.columns.add().column("name").font.name("SANSSERIF_SMALL"); - - item_params.columns.add().column("title").value(member->getTitle()).font.name("SANSSERIF_SMALL"); - - item_params.columns.add().column("status").value(member->getOnlineStatus()).font.name("SANSSERIF_SMALL"); - - LLScrollListItem* member_row = mListVisibleMembers->addNameItemRow(item_params); - - if ( member->isOwner() ) - { - LLScrollListText* name_textp = dynamic_cast(member_row->getColumn(0)); - if (name_textp) - name_textp->setFontStyle(LLFontGL::BOLD); - } -} - -// Member list doesn't load properly -//void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) -void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) -// -{ - // Member list doesn't load properly - //mAvatarNameCacheConnection.disconnect(); - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); - if (it != mAvatarNameCacheConnections.end()) - { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); - } - // - - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); - - if (!gdatap - || !gdatap->isMemberDataComplete() - || gdatap->getMemberVersion() != update_id) - { - // Stale data - return; - } - - addMember(member); -} - void LLPanelGroupGeneral::updateChanged() { // List all the controls we want to check for changes... @@ -986,17 +769,6 @@ void LLPanelGroupGeneral::reset() mEditCharter->setText(empty_str); mGroupNameEditor->setText(empty_str); } - - { - LLSD row; - row["columns"][0]["value"] = "no members yet"; - row["columns"][0]["column"] = "name"; - - mListVisibleMembers->deleteAllItems(); - mListVisibleMembers->setEnabled(FALSE); - mListVisibleMembers->addElement(row); - } - { mComboMature->setEnabled(true); @@ -1127,21 +899,6 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id) activate(); } -S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1,const LLScrollListItem* i2) -{ - const LLScrollListCell *cell1 = i1->getColumn(col_idx); - const LLScrollListCell *cell2 = i2->getColumn(col_idx); - - if(col_idx == 2) - { - if(LLStringUtil::compareDict(cell1->getValue().asString(),"Online") == 0 ) - return 1; - if(LLStringUtil::compareDict(cell2->getValue().asString(),"Online") == 0 ) - return -1; - } - - return LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString()); -} // Copy button handlers // Copy URI button callback diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 210b7f4f1c..b01b8f39d6 100755 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -29,8 +29,6 @@ #include "llpanelgroup.h" -#include - class LLLineEditor; class LLTextBox; class LLTextureCtrl; @@ -64,11 +62,6 @@ public: virtual void setGroupID(const LLUUID& id); virtual void setupCtrls (LLPanel* parent); - - // Member list doesn't load properly - //void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); - void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id); - // // Copy button callbacks protected: @@ -87,18 +80,12 @@ private: static void onCommitEnrollment(LLUICtrl* ctrl, void* data); static void onClickInfo(void* userdata); static void onReceiveNotices(LLUICtrl* ctrl, void* data); - static void openProfile(void* data); - - S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*); - void addMember(LLGroupMemberData* member); static bool joinDlgCB(const LLSD& notification, const LLSD& response); - void updateMembers(); void updateChanged(); bool confirmMatureApply(const LLSD& notification, const LLSD& response); - BOOL mPendingMemberUpdate; BOOL mChanged; BOOL mFirstUse; std::string mIncompleteMemberDataStr; @@ -109,8 +96,6 @@ private: LLTextureCtrl *mInsignia; LLTextEditor *mEditCharter; - LLNameListCtrl *mListVisibleMembers; - // Options (include any updates in updateChanged) LLCheckBoxCtrl *mCtrlShowInGroupList; LLCheckBoxCtrl *mCtrlOpenEnrollment; @@ -123,13 +108,6 @@ private: LLComboBox *mComboMature; LLCheckBoxCtrl *mCtrlReceiveGroupChat; // - LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - // Member list doesn't load properly - //boost::signals2::connection mAvatarNameCacheConnection; - typedef boost::unordered_map avatar_name_cache_connection_map_t; - avatar_name_cache_connection_map_t mAvatarNameCacheConnections; - // - LLUUID mIteratorGroup; // FIRE-6074; UUID of the group mMemberProgress belongs to. // For storing group name for copy name button diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index bc9a6d06e9..2b3d2272b2 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -56,7 +56,7 @@ #include "llviewermessage.h" #include "tea.h" // -static LLRegisterPanelClassWrapper t_panel_group_money("panel_group_land_money"); +static LLPanelInjector t_panel_group_money("panel_group_land_money"); diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 4a2789df62..f62728e34e 100755 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -59,7 +59,7 @@ #include "llviewercontrol.h" // FIRE-11247 - gSavedSettings -static LLRegisterPanelClassWrapper t_panel_group_notices("panel_group_notices"); +static LLPanelInjector t_panel_group_notices("panel_group_notices"); ///////////////////////// diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 0b1230b908..54e62c8a3c 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -58,7 +58,7 @@ // [FS:CR] FIRE-12276 #include "llfilepicker.h" -static LLRegisterPanelClassWrapper t_panel_group_roles("panel_group_roles"); +static LLPanelInjector t_panel_group_roles("panel_group_roles"); bool agentCanRemoveFromRole(const LLUUID& group_id, const LLUUID& role_id) @@ -736,7 +736,7 @@ void LLPanelGroupSubTab::setFooterEnabled(BOOL enable) //////////////////////////// -static LLRegisterPanelClassWrapper t_panel_group_members_subtab("panel_group_members_subtab"); +static LLPanelInjector t_panel_group_members_subtab("panel_group_members_subtab"); LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() : LLPanelGroupSubTab(), @@ -756,20 +756,10 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - // Member list doesn't load properly - //if (mAvatarNameCacheConnection.connected()) - //{ - // mAvatarNameCacheConnection.disconnect(); - //} - for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) + if (mAvatarNameCacheConnection.connected()) { - if (it->second.connected()) - { - it->second.disconnect(); - } + mAvatarNameCacheConnection.disconnect(); } - mAvatarNameCacheConnections.clear(); - // if (mMembersList) { gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); @@ -1660,28 +1650,17 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) item_params.columns.add().column("online").value(data->getOnlineStatus()) .font.name("SANSSERIF_SMALL").style("NORMAL"); + + item_params.columns.add().column("title").value(data->getTitle()).font.name("SANSSERIF_SMALL").style("NORMAL");; + mMembersList->addNameItemRow(item_params); mHasMatch = TRUE; } -// Member list doesn't load properly -//void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) -void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) -// +void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) { - // Member list doesn't load properly - //mAvatarNameCacheConnection.disconnect(); - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); - if (it != mAvatarNameCacheConnections.end()) - { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); - } - // + mAvatarNameCacheConnection.disconnect(); LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap @@ -1692,10 +1671,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb } // trying to avoid unnecessary hash lookups - // FIRE-11350 - //if (matchesSearchFilter(av_name.getAccountName())) - if (matchesSearchFilter(av_name.getUserName())) - // + if (matchesSearchFilter(av_name.getAccountName())) { addMemberToList(member); if(!mMembersList->getEnabled()) @@ -1761,24 +1737,11 @@ void LLPanelGroupMembersSubTab::updateMembers() { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. // *TODO : Add one callback per fetched avatar name - // Member list doesn't load properly - //if (mAvatarNameCacheConnection.connected()) - //{ - // mAvatarNameCacheConnection.disconnect(); - //} - //mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2)); - - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first); - if (it != mAvatarNameCacheConnections.end()) + if (mAvatarNameCacheConnection.connected()) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); + mAvatarNameCacheConnection.disconnect(); } - mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2, _1)); - // + mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2)); } } @@ -1847,7 +1810,7 @@ void LLPanelGroupMembersSubTab::onExportMembersToXML() // LLPanelGroupRolesSubTab //////////////////////////// -static LLRegisterPanelClassWrapper t_panel_group_roles_subtab("panel_group_roles_subtab"); +static LLPanelInjector t_panel_group_roles_subtab("panel_group_roles_subtab"); LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab() : LLPanelGroupSubTab(), @@ -2561,7 +2524,7 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role) // LLPanelGroupActionsSubTab //////////////////////////// -static LLRegisterPanelClassWrapper t_panel_group_actions_subtab("panel_group_actions_subtab"); +static LLPanelInjector t_panel_group_actions_subtab("panel_group_actions_subtab"); LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab() @@ -2758,7 +2721,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id) // [/FS:CR] if(mSubTabContainer) - mSubTabContainer->selectTab(0); + mSubTabContainer->selectTab(1); activate(); } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 86499fa69f..bc28773f05 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -189,10 +189,7 @@ public: virtual void setGroupID(const LLUUID& id); void addMemberToList(LLGroupMemberData* data); - // Member list doesn't load properly - //void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); - void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id); - // + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); protected: typedef std::map role_change_data_map_t; @@ -218,10 +215,7 @@ protected: U32 mNumOwnerAdditions; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - // Member list doesn't load properly - //boost::signals2::connection mAvatarNameCacheConnection; - typedef boost::unordered_map avatar_name_cache_connection_map_t; - avatar_name_cache_connection_map_t mAvatarNameCacheConnections; + boost::signals2::connection mAvatarNameCacheConnection; // // [FS:CR] FIRE-12276 diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp index b03bab3127..ab0ccffae4 100755 --- a/indra/newview/llpanelhome.cpp +++ b/indra/newview/llpanelhome.cpp @@ -31,7 +31,7 @@ #include "llmediactrl.h" #include "llviewerhome.h" -static LLRegisterPanelClassWrapper t_home("panel_sidetray_home"); +static LLPanelInjector t_home("panel_sidetray_home"); LLPanelHome::LLPanelHome() : LLPanel(), diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 5c9b968ac9..934f8ed8c7 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -53,7 +53,7 @@ typedef std::pair folder_pair_t; static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right); static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); -static LLRegisterPanelClassWrapper t_landmark_info("panel_landmark_info"); +static LLPanelInjector t_landmark_info("panel_landmark_info"); // Statics for textures filenames static std::string icon_pg; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 5f40c9d539..53556f4b10 100755 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -61,7 +61,7 @@ // [/RLVa:KB] // Not yet implemented; need to remove buildPanel() from constructor when we switch -//static LLRegisterPanelClassWrapper t_landmarks("panel_landmarks"); +//static LLPanelInjector t_landmarks("panel_landmarks"); static const std::string OPTIONS_BUTTON_NAME = "options_gear_btn"; static const std::string ADD_BUTTON_NAME = "add_btn"; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 34650202ef..80614f85d6 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -67,7 +67,7 @@ bool LLPanelMainInventory::sSaveFilters = true; const std::string FILTERS_FILENAME("filters.xml"); -static LLRegisterPanelClassWrapper t_inventory("panel_main_inventory"); +static LLPanelInjector t_inventory("panel_main_inventory"); void on_file_loaded_for_save(BOOL success, LLViewerFetchedTexture *src_vi, diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index dcecce6fe4..79e079f6bd 100755 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -38,7 +38,7 @@ #include "llviewercontrol.h" -static LLRegisterPanelClassWrapper t_panel_marketplace_inbox("panel_marketplace_inbox"); +static LLPanelInjector t_panel_marketplace_inbox("panel_marketplace_inbox"); const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams() { diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index a9af56f750..7a408e736f 100755 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -48,7 +48,7 @@ #include "lltabcontainer.h" #include "lltexturectrl.h" -static LLRegisterPanelClassWrapper t_panel_me_profile("panel_me"); +static LLPanelInjector t_panel_me_profile("panel_me"); LLPanelMe::LLPanelMe(void) : LLPanelProfile() diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 64f9bb6036..3235cedcae 100755 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -77,7 +77,7 @@ #include "rlvhandler.h" // [/RLVa:KB] -static LLRegisterPanelClassWrapper t_outfit_edit("panel_outfit_edit"); +static LLPanelInjector t_outfit_edit("panel_outfit_edit"); const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE); const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index f90236f6f2..e0132d20fb 100755 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -46,7 +46,7 @@ static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; static const std::string COF_TAB_NAME = "cof_tab"; -static LLRegisterPanelClassWrapper t_inventory("panel_outfits_inventory"); +static LLPanelInjector t_inventory("panel_outfits_inventory"); LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mMyOutfitsPanel(NULL), diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 722b6ce7b2..30316678c5 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -231,7 +231,7 @@ static const LLAvatarItemStatusComparator STATUS_COMPARATOR; static LLAvatarItemDistanceComparator DISTANCE_COMPARATOR; static const LLAvatarItemRecentSpeakerComparator RECENT_SPEAKER_COMPARATOR; -static LLRegisterPanelClassWrapper t_people("panel_people"); +static LLPanelInjector t_people("panel_people"); //============================================================================= diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index cfbc8f1a94..f0617266db 100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -69,7 +69,7 @@ static const std::string CLASSIFIED_ID("classified_id"); static const std::string CLASSIFIED_NAME("classified_name"); -static LLRegisterPanelClassWrapper t_panel_picks("panel_picks"); +static LLPanelInjector t_panel_picks("panel_picks"); class LLPickHandler : public LLCommandHandler, diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 35efaa721f..ae7d548e5e 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -56,7 +56,7 @@ #include "rlvhandler.h" // [/RLVa:KB] -static LLRegisterPanelClassWrapper t_place_profile("panel_place_profile"); +static LLPanelInjector t_place_profile("panel_place_profile"); // Statics for textures filenames static std::string icon_pg; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 504118f54b..ecbf3931c9 100755 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -244,7 +244,7 @@ private: }; -static LLRegisterPanelClassWrapper t_places("panel_places"); +static LLPanelInjector t_places("panel_places"); LLPanelPlaces::LLPanelPlaces() : LLPanel(), diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 3142048cb8..fed184d160 100755 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -68,7 +68,7 @@ private: void onSend(); }; -static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotinventory"); +static LLPanelInjector panel_class("llpanelsnapshotinventory"); LLPanelSnapshotInventory::LLPanelSnapshotInventory() { diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index ba0081ae17..bd6cdefacb 100755 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -67,7 +67,7 @@ private: void onSaveFlyoutCommit(LLUICtrl* ctrl); }; -static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotlocal"); +static LLPanelInjector panel_class("llpanelsnapshotlocal"); LLPanelSnapshotLocal::LLPanelSnapshotLocal() { diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 26539b24e4..71d4c5486a 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -61,7 +61,7 @@ private: // }; -static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotoptions"); +static LLPanelInjector panel_class("llpanelsnapshotoptions"); LLPanelSnapshotOptions::LLPanelSnapshotOptions() { diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 9fed2b2d70..55c89d3b7a 100755 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -81,7 +81,7 @@ private: std::string mAgentEmail; }; -static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotpostcard"); +static LLPanelInjector panel_class("llpanelsnapshotpostcard"); LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() : mHasFirstMsgFocus(false) diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp index 97b41b6e23..4e0e5712b5 100755 --- a/indra/newview/llpanelsnapshotprofile.cpp +++ b/indra/newview/llpanelsnapshotprofile.cpp @@ -66,7 +66,7 @@ private: void onSend(); }; -static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotprofile"); +static LLPanelInjector panel_class("llpanelsnapshotprofile"); LLPanelSnapshotProfile::LLPanelSnapshotProfile() { diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index f6c16d4fb3..487db91fb8 100755 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -459,7 +459,7 @@ void LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard() } // Not yet implemented; need to remove buildPanel() from constructor when we switch -//static LLRegisterPanelClassWrapper t_teleport_history("panel_teleport_history"); +//static LLPanelInjector t_teleport_history("panel_teleport_history"); LLTeleportHistoryPanel::LLTeleportHistoryPanel() : LLPanelPlacesTab(), diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 6be2ea6481..6f0a1624a7 100755 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -40,7 +40,7 @@ #include "lluictrlfactory.h" -static LLRegisterPanelClassWrapper t_panel_group_general("panel_voice_device_settings"); +static LLPanelInjector t_panel_group_general("panel_voice_device_settings"); static const std::string DEFAULT_DEVICE("Default"); diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index 5fec6d967d..7da553801a 100755 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -36,7 +36,7 @@ #include "lltransientfloatermgr.h" #include "llvoiceclient.h" -static LLRegisterPanelClassWrapper t_panel_voice_effect("panel_voice_effect"); +static LLPanelInjector t_panel_voice_effect("panel_voice_effect"); LLPanelVoiceEffect::LLPanelVoiceEffect() : mVoiceEffectCombo(NULL) diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index a0e0e3ea64..3a2b83a287 100755 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -208,7 +208,7 @@ protected: std::string LLPanelAppearanceTab::sFilterSubString = LLStringUtil::null; -static LLRegisterPanelClassWrapper t_panel_wearing("panel_wearing"); +static LLPanelInjector t_panel_wearing("panel_wearing"); LLPanelWearing::LLPanelWearing() : LLPanelAppearanceTab() diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 08829c1184..153f0930c2 100755 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -27,7 +27,7 @@ #include "llpopupview.h" -static LLRegisterPanelClassWrapper r("popup_holder"); +static LLPanelInjector r("popup_holder"); bool view_visible_and_enabled(LLView* viewp) { diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index fd98c26a26..3602de13b3 100755 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -60,8 +60,8 @@ S32 gStartImageWidth = 1; S32 gStartImageHeight = 1; const F32 FADE_TO_WORLD_TIME = 1.0f; -static LLRegisterPanelClassWrapper r("progress_view"); -static LLRegisterPanelClassWrapper r_mini("progress_view_mini"); +static LLPanelInjector r("progress_view"); +static LLPanelInjector r_mini("progress_view_mini"); LLProgressViewMini::LLProgressViewMini() { diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 1392c35ad7..9990a91916 100755 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -49,7 +49,7 @@ #include "llvoavatarself.h" #include "llviewerwearable.h" -static LLRegisterPanelClassWrapper t_appearance("sidepanel_appearance"); +static LLPanelInjector t_appearance("sidepanel_appearance"); class LLCurrentlyWornFetchObserver : public LLInventoryFetchItemsObserver { diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index e207e12dd1..9b2883f165 100755 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -65,7 +65,7 @@ #include "llviewernetwork.h" #endif // OPENSIM -static LLRegisterPanelClassWrapper t_inventory("sidepanel_inventory"); +static LLPanelInjector t_inventory("sidepanel_inventory"); // // Constants diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 0a82b49e36..1c20868dec 100755 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -129,7 +129,7 @@ void LLObjectInventoryObserver::inventoryChanged(LLViewerObject* object, /// Class LLSidepanelItemInfo ///---------------------------------------------------------------------------- -static LLRegisterPanelClassWrapper t_item_info("sidepanel_item_info"); +static LLPanelInjector t_item_info("sidepanel_item_info"); // Default constructor LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p) diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 35688738bf..06b3113d05 100755 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -75,7 +75,7 @@ LLSidepanelTaskInfo* LLSidepanelTaskInfo::sActivePanel = NULL; -static LLRegisterPanelClassWrapper t_task_info("sidepanel_task_info"); +static LLPanelInjector t_task_info("sidepanel_task_info"); // Default constructor LLSidepanelTaskInfo::LLSidepanelTaskInfo() diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 756b09d46a..702743b1a3 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -976,15 +976,19 @@ bool idle_startup() display_startup(); LLPanelLogin::giveFocus(); - if (gSavedSettings.getBOOL("FirstLoginThisInstall")) + // MAINT-3231 Show first run dialog only for Desura viewer + if (gSavedSettings.getString("sourceid") == "1208_desura") { - LL_INFOS("AppInit") << "FirstLoginThisInstall, calling show_first_run_dialog()" << LL_ENDL; + if (gSavedSettings.getBOOL("FirstLoginThisInstall")) + { + LL_INFOS("AppInit") << "FirstLoginThisInstall, calling show_first_run_dialog()" << LL_ENDL; // Don't show first run dialog, ever, at all. - // show_first_run_dialog(); - } - else - { - LL_DEBUGS("AppInit") << "FirstLoginThisInstall off" << LL_ENDL; + // show_first_run_dialog(); + } + else + { + LL_DEBUGS("AppInit") << "FirstLoginThisInstall off" << LL_ENDL; + } } LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 26d2c732db..835d24ceb6 100755 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -40,6 +40,7 @@ #include "lltrans.h" #include "llnotificationsutil.h" #include "llviewermessage.h" +#include "llavataractions.h" // [FS communication UI] //#include "llfloaterimsession.h" #include "fsfloaterim.h" @@ -319,6 +320,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) mTextBox->setVisible(TRUE); mTextBox->setPlainText(!show_images); mTextBox->setValue(mNotification->getMessage()); + mTextBox->setIsFriendCallback(LLAvatarActions::isFriend); // Script dialog colors if (mIsScriptDialog) diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h index ecc435d844..c5bad9d532 100755 --- a/indra/newview/lltool.h +++ b/indra/newview/lltool.h @@ -39,7 +39,7 @@ class LLView; class LLPanel; class LLTool -: public LLMouseHandler +: public LLMouseHandler, public LLThreadSafeRefCount { public: LLTool( const std::string& name, LLToolComposite* composite = NULL ); diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index e7d5571c87..240e7cb2dd 100755 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -65,7 +65,7 @@ extern LLControlGroup gSavedSettings; // we use this in various places instead of NULL -static LLTool* sNullTool = new LLTool(std::string("null"), NULL); +static LLPointer sNullTool(new LLTool(std::string("null"), NULL)); //----------------------------------------------------------------------- // LLToolComposite diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 4ec393b855..253e7534b0 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -403,7 +403,7 @@ bool LLURLDispatcher::dispatchRightClick(const std::string& slurl) } // static -bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl) +bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl, bool trusted_content) { // *NOTE: Text editors are considered sources of trusted URLs // in order to make avatar profile links in chat history work. @@ -411,9 +411,9 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl) // receiving resident will see it and must affirmatively // click on it. // *TODO: Make this trust model more refined. JC - const bool trusted_browser = true; + LLMediaCtrl* web = NULL; - return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_browser); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_content); } diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h index 6309a97af5..9b05260af1 100755 --- a/indra/newview/llurldispatcher.h +++ b/indra/newview/llurldispatcher.h @@ -53,7 +53,7 @@ public: static bool dispatchRightClick(const std::string& slurl); - static bool dispatchFromTextEditor(const std::string& slurl); + static bool dispatchFromTextEditor(const std::string& slurl, bool trusted_content); }; #endif diff --git a/indra/newview/llurldispatcherlistener.cpp b/indra/newview/llurldispatcherlistener.cpp index c7b9afafef..7545f3a9b3 100755 --- a/indra/newview/llurldispatcherlistener.cpp +++ b/indra/newview/llurldispatcherlistener.cpp @@ -71,5 +71,5 @@ void LLURLDispatcherListener::dispatchRightClick(const LLSD& params) const void LLURLDispatcherListener::dispatchFromTextEditor(const LLSD& params) const { - LLURLDispatcher::dispatchFromTextEditor(params["url"]); + LLURLDispatcher::dispatchFromTextEditor(params["url"], false); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5ba8c4c757..526d60de6e 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8701,6 +8701,17 @@ class LLAdvancedClickRenderProfile: public view_listener_t } }; +void gpu_benchmark(); + +class LLAdvancedClickRenderBenchmark: public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + gpu_benchmark(); + return true; + } +}; + //[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ] class LLAdvancedToggleDoubleClickTeleport: public view_listener_t { @@ -9569,6 +9580,22 @@ void handle_show_url(const LLSD& param) } +void handle_report_bug(const LLSD& param) +{ + LLUIString url(param.asString()); + + LLStringUtil::format_map_t replace; + replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString()); + LLSLURL location_url; + LLAgentUI::buildSLURL(location_url); + replace["[LOCATION]"] = location_url.getSLURLString(); + + LLUIString file_bug_url = gSavedSettings.getString("ReportBugURL"); + file_bug_url.setArgs(replace); + + LLWeb::loadURLExternal(file_bug_url.getString()); +} + void handle_buy_currency_test(void*) { std::string url = @@ -10630,6 +10657,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedCheckRenderShadowOption(), "Advanced.CheckRenderShadowOption"); view_listener_t::addMenu(new LLAdvancedClickRenderShadowOption(), "Advanced.ClickRenderShadowOption"); view_listener_t::addMenu(new LLAdvancedClickRenderProfile(), "Advanced.ClickRenderProfile"); + view_listener_t::addMenu(new LLAdvancedClickRenderBenchmark(), "Advanced.ClickRenderBenchmark"); //[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ] view_listener_t::addMenu(new LLAdvancedToggleDoubleClickTeleport, "Advanced.ToggleDoubleClickTeleport"); @@ -10647,6 +10675,7 @@ void initialize_menus() commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater commit.add("Advanced.ShowURL", boost::bind(&handle_show_url, _2)); + commit.add("Advanced.ReportBug", boost::bind(&handle_report_bug, _2)); view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest"); view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a6fa2ab754..995396a078 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2766,15 +2766,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Log autoresponse notification after initial message bool has_session = true; - // return a standard "do not disturb" message, but only do it to online IM + // return a standard "do not disturb" message, but only do it to online IM // (i.e. not other auto responses and not store-and-forward IM) - if (!gIMMgr->hasSession(session_id)) - { + // Log autoresponse notification after initial message has_session = false; - // if there is not a panel for this conversation (i.e. it is a new IM conversation - // initiated by the other party) then... // FS autoresponse feature //send_do_not_disturb_message(msg, from_id, session_id); std::string my_name; @@ -2811,7 +2808,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) session_id); gAgent.sendReliableMessage(); // FS autoresponse feature - } // checkfor and process reqinfo if (has_session) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 12dfa6164b..8ca78f1b1e 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -241,7 +241,6 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mOnMap(FALSE), mStatic(FALSE), mNumFaces(0), - mTimeDilation(1.f), mRotTime(0.f), mAngularVelocityRot(), mPreviousRotation(), @@ -957,7 +956,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16 time_dilation16; mesgsys->getU16Fast(_PREHASH_RegionData, _PREHASH_TimeDilation, time_dilation16); F32 time_dilation = ((F32) time_dilation16) / 65535.f; - mTimeDilation = time_dilation; mRegionp->setTimeDilation(time_dilation); // this will be used to determine if we've really changed position @@ -2034,7 +2032,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender()); if (cdp) { - F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); + F32 ping_delay = 0.5f * time_dilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); LLVector3 diff = getVelocity() * ping_delay; new_pos_parent += diff; } @@ -2233,35 +2231,33 @@ BOOL LLViewerObject::isActive() const -void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time) { //static LLFastTimer::DeclareTimer ftm("Viewer Object"); //LLFastTimer t(ftm); if (!mDead) { - // CRO - don't velocity interp linked objects! - // Leviathan - but DO velocity interp joints - if (!mStatic && sVelocityInterpolate && !isSelected()) - { - // calculate dt from last update - F32 dt_raw = (F32)(time - mLastInterpUpdateSecs); - F32 dt = mTimeDilation * dt_raw; + if (!mStatic && sVelocityInterpolate && !isSelected()) + { + // calculate dt from last update + F32 time_dilation = mRegionp ? mRegionp->getTimeDilation() : 1.0f; + F32 dt = time_dilation * (F32)(time - mLastInterpUpdateSecs); applyAngularVelocity(dt); if (isAttachment()) - { - mLastInterpUpdateSecs = time; + { + mLastInterpUpdateSecs = time; return; + } + else + { // Move object based on it's velocity and rotation + interpolateLinearMotion(time, dt); + } } - else - { // Move object based on it's velocity and rotation - interpolateLinearMotion(time, dt); - } - } - updateDrawable(FALSE); + updateDrawable(FALSE); } } @@ -4143,7 +4139,7 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry) { LLPrimitive::setTE(te, texture_entry); - const LLUUID& image_id = getTE(te)->getID(); + const LLUUID& image_id = getTE(te)->getID(); mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); // Debug aid Remove again diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 49cab3890a..ae0ad8fe70 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -143,7 +143,7 @@ public: LLNameValue* getNVPair(const std::string& name) const; // null if no name value pair by that name // Object create and update functions - virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + virtual void idleUpdate(LLAgent &agent, const F64 &time); // Types of media we can associate enum { MEDIA_NONE = 0, MEDIA_SET = 1 }; @@ -311,7 +311,7 @@ public: /*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid); /*virtual*/ S32 setTENormalMap(const U8 te, const LLUUID &uuid); /*virtual*/ S32 setTESpecularMap(const U8 te, const LLUUID &uuid); - S32 setTETextureCore(const U8 te, LLViewerTexture *image); + S32 setTETextureCore(const U8 te, LLViewerTexture *image); S32 setTETextureCore(const U8 te, const LLUUID& uuid, const std::string &url ); S32 setTENormalMapCore(const U8 te, LLViewerTexture *image); S32 setTESpecularMapCore(const U8 te, LLViewerTexture *image); @@ -763,7 +763,6 @@ protected: BOOL mStatic; // Object doesn't move. S32 mNumFaces; - F32 mTimeDilation; // Time dilation sent with the object. F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega) LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations LLQuaternion mPreviousRotation; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index adda57ce6a..dfb57c3233 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -429,10 +429,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { - compressed_dp.unpackUUID(fullid, "ID"); - compressed_dp.unpackU32(local_id, "LocalID"); - compressed_dp.unpackU8(pcode, "PCode"); - } + compressed_dp.unpackUUID(fullid, "ID"); + compressed_dp.unpackU32(local_id, "LocalID"); + compressed_dp.unpackU8(pcode, "PCode"); + } else { compressed_dp.unpackU32(local_id, "LocalID"); @@ -603,7 +603,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated); } recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size); - objectp->setLastUpdateType(update_type); + objectp->setLastUpdateType(update_type); objectp->setLastUpdateCached(bCached); } @@ -903,7 +903,7 @@ private: LLSD mObjectIDs; }; -void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) +void LLViewerObjectList::update(LLAgent &agent) { // Speed up debug settings static LLCachedControl velocityInterpolate(gSavedSettings, "VelocityInterpolate"); @@ -1015,7 +1015,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) objectp = *iter; if (objectp->isAvatar()) { - objectp->idleUpdate(agent, world, frame_time); + objectp->idleUpdate(agent, frame_time); } } } @@ -1026,7 +1026,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { objectp = *idle_iter; llassert(objectp->isActive()); - objectp->idleUpdate(agent, world, frame_time); + objectp->idleUpdate(agent, frame_time); } //update flexible objects diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index f6ecf36c7a..f9bd0071c1 100755 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -83,7 +83,7 @@ public: void processCompressedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type); void processCachedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type); void updateApparentAngles(LLAgent &agent); - void update(LLAgent &agent, LLWorld &world); + void update(LLAgent &agent); void fetchObjectCosts(); void fetchPhysicsFlags(); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 195453bd82..4d28ae3daa 100755 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -87,6 +87,8 @@ LLGLSLShader gClipProgram; LLGLSLShader gDownsampleDepthProgram; LLGLSLShader gDownsampleDepthRectProgram; LLGLSLShader gAlphaMaskProgram; +LLGLSLShader gBenchmarkProgram; + //object shaders LLGLSLShader gObjectSimpleProgram; @@ -682,6 +684,7 @@ void LLViewerShaderMgr::unloadShaders() gClipProgram.unload(); gDownsampleDepthProgram.unload(); gDownsampleDepthRectProgram.unload(); + gBenchmarkProgram.unload(); gAlphaMaskProgram.unload(); gUIProgram.unload(); gPathfindingProgram.unload(); @@ -3213,6 +3216,26 @@ BOOL LLViewerShaderMgr::loadShadersInterface() success = gDownsampleDepthProgram.createShader(NULL, NULL); } + if (success) + { + gBenchmarkProgram.mName = "Benchmark Shader"; + gBenchmarkProgram.mShaderFiles.clear(); + gBenchmarkProgram.mShaderFiles.push_back(make_pair("interface/benchmarkV.glsl", GL_VERTEX_SHADER_ARB)); + gBenchmarkProgram.mShaderFiles.push_back(make_pair("interface/benchmarkF.glsl", GL_FRAGMENT_SHADER_ARB)); + gBenchmarkProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE]; + success = gBenchmarkProgram.createShader(NULL, NULL); + } + + if (success) + { + gDownsampleDepthRectProgram.mName = "DownsampleDepthRect Shader"; + gDownsampleDepthRectProgram.mShaderFiles.clear(); + gDownsampleDepthRectProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthV.glsl", GL_VERTEX_SHADER_ARB)); + gDownsampleDepthRectProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthRectF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDownsampleDepthRectProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE]; + success = gDownsampleDepthRectProgram.createShader(NULL, NULL); + } + if (success) { gDownsampleDepthRectProgram.mName = "DownsampleDepthRect Shader"; diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h index 83b9f10dac..d75265d716 100755 --- a/indra/newview/llviewershadermgr.h +++ b/indra/newview/llviewershadermgr.h @@ -183,6 +183,7 @@ extern LLGLSLShader gDebugProgram; extern LLGLSLShader gClipProgram; extern LLGLSLShader gDownsampleDepthProgram; extern LLGLSLShader gDownsampleDepthRectProgram; +extern LLGLSLShader gBenchmarkProgram; //output tex0[tc0] + tex1[tc1] extern LLGLSLShader gTwoTextureAddProgram; diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index dc107e471b..a9c55314aa 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -777,6 +777,11 @@ void LLViewerTextEditor::makePristine() LLTextEditor::makePristine(); } +void LLViewerTextEditor::handleVisibilityChange( BOOL new_visibility ) +{ + LLUICtrl::handleVisibilityChange(new_visibility); +} + BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index b0a5dca893..6cd32883f1 100755 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -46,6 +46,8 @@ public: virtual ~LLViewerTextEditor(); virtual void makePristine(); + + /*virtual*/ void handleVisibilityChange( BOOL new_visibility ); // mousehandler overrides virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index acb0edf6d7..be25753acd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3648,8 +3648,6 @@ void LLViewerWindow::updateUI() updateLayout(); - mLastMousePoint = mCurrentMousePoint; - // cleanup unused selections when no modal dialogs are open if (LLModalDialog::activeCount() == 0) { @@ -3889,6 +3887,9 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point) { // Store last mouse location. // If mouse leaves window, pretend last point was on edge of window + + mLastMousePoint = mCurrentMousePoint; + if (point.mX < 0) { mCurrentMousePoint.mX = 0; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index db9d04eaa4..c4c530c2b8 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -127,16 +127,16 @@ using namespace LLAvatarAppearanceDefines; //----------------------------------------------------------------------------- // Global constants //----------------------------------------------------------------------------- -const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise" -const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot" -const LLUUID ANIM_AGENT_EDITING = LLUUID("2a8eba1d-a7f8-5596-d44a-b4977bf8c8bb"); //"editing" -const LLUUID ANIM_AGENT_EYE = LLUUID("5c780ea8-1cd1-c463-a128-48c023f6fbea"); //"eye" -const LLUUID ANIM_AGENT_FLY_ADJUST = LLUUID("db95561f-f1b0-9f9a-7224-b12f71af126e"); //"fly_adjust" -const LLUUID ANIM_AGENT_HAND_MOTION = LLUUID("ce986325-0ba7-6e6e-cc24-b17c4b795578"); //"hand_motion" -const LLUUID ANIM_AGENT_HEAD_ROT = LLUUID("e6e8d1dd-e643-fff7-b238-c6b4b056a68d"); //"head_rot" -const LLUUID ANIM_AGENT_PELVIS_FIX = LLUUID("0c5dd2a2-514d-8893-d44d-05beffad208b"); //"pelvis_fix" -const LLUUID ANIM_AGENT_TARGET = LLUUID("0e4896cb-fba4-926c-f355-8720189d5b55"); //"target" -const LLUUID ANIM_AGENT_WALK_ADJUST = LLUUID("829bc85b-02fc-ec41-be2e-74cc6dd7215d"); //"walk_adjust" +const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise" +const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot" +const LLUUID ANIM_AGENT_EDITING = LLUUID("2a8eba1d-a7f8-5596-d44a-b4977bf8c8bb"); //"editing" +const LLUUID ANIM_AGENT_EYE = LLUUID("5c780ea8-1cd1-c463-a128-48c023f6fbea"); //"eye" +const LLUUID ANIM_AGENT_FLY_ADJUST = LLUUID("db95561f-f1b0-9f9a-7224-b12f71af126e"); //"fly_adjust" +const LLUUID ANIM_AGENT_HAND_MOTION = LLUUID("ce986325-0ba7-6e6e-cc24-b17c4b795578"); //"hand_motion" +const LLUUID ANIM_AGENT_HEAD_ROT = LLUUID("e6e8d1dd-e643-fff7-b238-c6b4b056a68d"); //"head_rot" +const LLUUID ANIM_AGENT_PELVIS_FIX = LLUUID("0c5dd2a2-514d-8893-d44d-05beffad208b"); //"pelvis_fix" +const LLUUID ANIM_AGENT_TARGET = LLUUID("0e4896cb-fba4-926c-f355-8720189d5b55"); //"target" +const LLUUID ANIM_AGENT_WALK_ADJUST = LLUUID("829bc85b-02fc-ec41-be2e-74cc6dd7215d"); //"walk_adjust" const LLUUID ANIM_AGENT_PHYSICS_MOTION = LLUUID("7360e029-3cb8-ebc4-863e-212df440d987"); //"physics_motion" @@ -824,21 +824,21 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - if (!mFullyLoaded) - { + if (!mFullyLoaded) + { debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); - } - else - { + } + else + { debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); - } + } // only call logPendingPhases if we're still alive. Otherwise this can lead to shutdown crashes // logPendingPhases(); if (isAgentAvatarValid()) logPendingPhases(); - + // lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; @@ -1264,7 +1264,7 @@ void LLVOAvatar::initInstance(void) registerMotion( ANIM_AGENT_TARGET, LLTargetingMotion::create ); registerMotion( ANIM_AGENT_WALK_ADJUST, LLWalkAdjustMotion::create ); } - + LLAvatarAppearance::initInstance(); // preload specific motions here @@ -1712,7 +1712,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector return hit; } - + LLVOAvatar* LLVOAvatar::asAvatar() { return this; @@ -2113,7 +2113,7 @@ void LLVOAvatar::dumpAnimationState() //------------------------------------------------------------------------ // idleUpdate() //------------------------------------------------------------------------ -void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) { LLFastTimer t(FTM_AVATAR_UPDATE); @@ -2172,7 +2172,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) if (isSelf()) { - LLViewerObject::idleUpdate(agent, world, time); + LLViewerObject::idleUpdate(agent, time); // trigger fidget anims if (isAnyAnimationSignaled(AGENT_STAND_ANIMS, NUM_AGENT_STAND_ANIMS)) @@ -2184,7 +2184,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { // Should override the idleUpdate stuff and leave out the angular update part. LLQuaternion rotation = getRotation(); - LLViewerObject::idleUpdate(agent, world, time); + LLViewerObject::idleUpdate(agent, time); setRotation(rotation); } @@ -4545,7 +4545,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } } - + return num_indices; } @@ -5647,7 +5647,7 @@ void LLVOAvatar::getGround(const LLVector3 &in_pos_agent, LLVector3 &out_pos_age //----------------------------------------------------------------------------- F32 LLVOAvatar::getTimeDilation() { - return mTimeDilation; + return mRegionp ? mRegionp->getTimeDilation() : 1.f; } @@ -5701,7 +5701,7 @@ BOOL LLVOAvatar::loadSkeletonNode () { return FALSE; } - + // ATTACHMENTS { LLAvatarXmlInfo::attachment_info_list_t::iterator iter; @@ -6685,7 +6685,7 @@ void LLVOAvatar::updateRezzedStatusTimers() selfStopPhase("process_initial_wearables_update", false); } } - + mLastRezzedStatus = rez_status; } } @@ -6802,7 +6802,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse record["grid_y"] = LLSD::Integer(grid_y); record["is_using_server_bakes"] = ((bool) isUsingServerBakes()); record["is_self"] = isSelf(); - + if (isAgentAvatarValid()) { gAgentAvatarp->addMetricsTimerRecord(record); @@ -7016,7 +7016,7 @@ void LLVOAvatar::updateMeshTextures() use_lkg_baked_layer[i], last_id_string.c_str()); } - + for (U32 i=0; i < mBakedTextureDatas.size(); i++) { debugColorizeSubMeshes(i, LLColor4::white); @@ -7028,7 +7028,7 @@ void LLVOAvatar::updateMeshTextures() mBakedTextureDatas[i].mIsUsed = TRUE; debugColorizeSubMeshes(i,LLColor4::red); - + avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin(); avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end(); for (; iter != end; ++iter) @@ -7492,7 +7492,7 @@ void dump_visual_param(LLAPRFile::tFiletype* file, LLVisualParam* viewer_param, // param_location_name(vparam->getParamLocation()).c_str() ); } - + void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix, const LLAppearanceMessageContents& contents) @@ -7564,7 +7564,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe // For future use: //mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0); } - + // Parse visual params, if any. S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam); bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing @@ -8381,7 +8381,7 @@ void LLVOAvatar::startAppearanceAnimation() // virtual void LLVOAvatar::bodySizeChanged() -{ +{ if (isSelf() && !LLAppearanceMgr::instance().isInUpdateAppearanceFromCOF()) { // notify simulator of change in size // but not if we are in the middle of updating appearance @@ -8405,7 +8405,7 @@ BOOL LLVOAvatar::isUsingServerBakes() const return mUseServerBakes; } - + void LLVOAvatar::setIsUsingServerBakes(BOOL newval) { mUseServerBakes = newval; @@ -8416,7 +8416,7 @@ void LLVOAvatar::setIsUsingServerBakes(BOOL newval) // virtual void LLVOAvatar::removeMissingBakedTextures() -{ +{ } //virtual diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 43490d401b..f27b33da18 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -130,28 +130,28 @@ public: /*virtual*/ void updateGL(); /*virtual*/ LLVOAvatar* asAvatar(); virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, - void **user_data, - U32 block_num, - const EObjectUpdateType update_type, - LLDataPacker *dp); - virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + void **user_data, + U32 block_num, + const EObjectUpdateType update_type, + LLDataPacker *dp); + virtual void idleUpdate(LLAgent &agent, const F64 &time); /*virtual*/ BOOL updateLOD(); BOOL updateJointLODs(); void updateLODRiggedAttachments( void ); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. S32 totalTextureMemForUUIDS(std::set& ids); - bool allTexturesCompletelyDownloaded(std::set& ids) const; - bool allLocalTexturesCompletelyDownloaded() const; - bool allBakedTexturesCompletelyDownloaded() const; - void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count, - S32 &both_count, S32 &neither_count); - std::string bakedTextureOriginInfo(); - void collectLocalTextureUUIDs(std::set& ids) const; - void collectBakedTextureUUIDs(std::set& ids) const; - void collectTextureUUIDs(std::set& ids); - void releaseOldTextures(); + bool allTexturesCompletelyDownloaded(std::set& ids) const; + bool allLocalTexturesCompletelyDownloaded() const; + bool allBakedTexturesCompletelyDownloaded() const; + void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count, + S32 &both_count, S32 &neither_count); + std::string bakedTextureOriginInfo(); + void collectLocalTextureUUIDs(std::set& ids) const; + void collectBakedTextureUUIDs(std::set& ids) const; + void collectTextureUUIDs(std::set& ids); + void releaseOldTextures(); /*virtual*/ void updateTextures(); - LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid); + LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid); /*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); // If setting a baked texture, need to request it from a non-local sim. /*virtual*/ void onShift(const LLVector4a& shift_vector); /*virtual*/ U32 getPartitionType() const; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 16a6e16e49..790817ef56 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -795,11 +795,11 @@ BOOL LLVOAvatarSelf::isValid() const } // virtual -void LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time) { if (isValid()) { - LLVOAvatar::idleUpdate(agent, world, time); + LLVOAvatar::idleUpdate(agent, time); idleUpdateTractorBeam(); } } @@ -1580,7 +1580,7 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *sr discard_level < local_tex_obj->getDiscard()) { local_tex_obj->setDiscard(discard_level); - requestLayerSetUpdate(index); + requestLayerSetUpdate(index); if (isEditingAppearance()) { LLVisualParamHint::requestHintUpdates(); @@ -2858,25 +2858,25 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe //if (!covered_by_baked) { if (imagep->getID() != IMG_DEFAULT_AVATAR) - { + { imagep->setNoDelete(); if (imagep->getDiscardLevel() != 0) - { - F32 desired_pixels; - desired_pixels = llmin(mPixelArea, (F32)getTexImageArea()); - - imagep->setBoostLevel(getAvatarBoostLevel()); - imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; - imagep->resetTextureStats(); - imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); - imagep->addTextureStats( desired_pixels / texel_area_ratio ); - imagep->forceUpdateBindStats() ; - if (imagep->getDiscardLevel() < 0) { - mHasGrey = TRUE; // for statistics gathering + F32 desired_pixels; + desired_pixels = llmin(mPixelArea, (F32)getTexImageArea()); + + imagep->setBoostLevel(getAvatarBoostLevel()); + imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; + imagep->resetTextureStats(); + imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); + imagep->addTextureStats( desired_pixels / texel_area_ratio ); + imagep->forceUpdateBindStats() ; + if (imagep->getDiscardLevel() < 0) + { + mHasGrey = TRUE; // for statistics gathering + } } } - } else { // texture asset is missing @@ -3199,17 +3199,17 @@ void LLVOAvatarSelf::requestLayerSetUpdate(ETextureIndex index ) LLViewerTexLayerSet* LLVOAvatarSelf::getLayerSet(ETextureIndex index) const { - /* switch(index) - case TEX_HEAD_BAKED: - case TEX_HEAD_BODYPAINT: - return mHeadLayerSet; */ + /* switch(index) + case TEX_HEAD_BAKED: + case TEX_HEAD_BODYPAINT: + return mHeadLayerSet; */ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index); - if (texture_dict->mIsUsedByBakedTexture) - { - const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; + if (texture_dict->mIsUsedByBakedTexture) + { + const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; return getLayerSet(baked_index); - } - return NULL; + } + return NULL; } LLViewerTexLayerSet* LLVOAvatarSelf::getLayerSet(EBakedTextureIndex baked_index) const diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index f33a579ea4..9e6b5e006a 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -84,7 +84,7 @@ protected: //-------------------------------------------------------------------- public: /*virtual*/ void updateRegion(LLViewerRegion *regionp); - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); //-------------------------------------------------------------------- // LLCharacter interface and related diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 54250e68bd..a764ab5dad 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -278,7 +278,7 @@ BOOL LLVOGrass::isActive() const return TRUE; } -void LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) { if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GRASS))) { diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index f096c58a51..df86f634a5 100755 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -74,7 +74,7 @@ public: void plantBlades(); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index 97b7418b40..c1273e684c 100755 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -49,7 +49,7 @@ LLVOGround::~LLVOGround() { } -void LLVOGround::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOGround::idleUpdate(LLAgent &agent, const F64 &time) { } diff --git a/indra/newview/llvoground.h b/indra/newview/llvoground.h index 290579b4da..a53f309e46 100755 --- a/indra/newview/llvoground.h +++ b/indra/newview/llvoground.h @@ -41,7 +41,7 @@ protected: public: LLVOGround(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); // Graphical stuff for objects - maybe broken out into render class // later? diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 64742d620f..717def6191 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -261,6 +261,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mSessionTerminateRequested(false), mRelogRequested(false), mConnected(false), + mTerminateDaemon(false), mPump(NULL), mSpatialJoiningNum(0), @@ -711,7 +712,7 @@ void LLVivoxVoiceClient::stateMachine() setVoiceEnabled(false); } - if(mVoiceEnabled || !mIsInitialized) + if(mVoiceEnabled || (!mIsInitialized &&!mTerminateDaemon) ) { updatePosition(); } @@ -724,11 +725,12 @@ void LLVivoxVoiceClient::stateMachine() if((getState() != stateDisabled) && (getState() != stateDisableCleanup)) { // User turned off voice support. Send the cleanup messages, close the socket, and reset. - if(!mConnected) + if(!mConnected || mTerminateDaemon) { // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; killGateway(); + mTerminateDaemon = false; } logout(); @@ -769,7 +771,7 @@ void LLVivoxVoiceClient::stateMachine() // Voice is locked out, we must not launch the vivox daemon. setState(stateJail); } - else if(!isGatewayRunning()) + else if(!isGatewayRunning() && gSavedSettings.getBOOL("EnableVoiceChat")) { if (true) // production build, not test { @@ -1165,6 +1167,7 @@ void LLVivoxVoiceClient::stateMachine() std::stringstream errs; errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000"; args["HOSTID"] = errs.str(); + mTerminateDaemon = true; // FIRE-13130: Unknown notification "NoVoiceConnect-GIAB" //if (LLGridManager::getInstance()->isSystemGrid()) //{ @@ -2650,6 +2653,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st std::stringstream errs; errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000"; args["HOSTID"] = errs.str(); + mTerminateDaemon = true; // FIRE-13130: Unknown notification "NoVoiceConnect-GIAB" //if (LLGridManager::getInstance()->isSystemGrid()) //{ @@ -2668,6 +2672,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; mVoiceVersion.serverVersion = versionID; mConnectorHandle = connectorHandle; + mTerminateDaemon = false; if(getState() == stateConnectorStarting) { setState(stateConnectorStarted); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 765237c977..e9d50e7687 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -659,6 +659,8 @@ private: LLSocket::ptr_t mSocket; bool mConnected; + // We should kill the voice daemon in case of connection alert + bool mTerminateDaemon; LLPumpIO *mPump; friend class LLVivoxProtocolParser; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index f3b87a7d05..1509e56de0 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -200,7 +200,7 @@ void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(p); } -void LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOPartGroup::idleUpdate(LLAgent &agent, const F64 &time) { } diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index 12ac38e710..2ef8b1c848 100755 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -63,7 +63,7 @@ public: LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. - void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + void idleUpdate(LLAgent &agent, const F64 &time); virtual F32 getBinRadius(); virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 41b23aa977..003939a685 100755 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1056,7 +1056,7 @@ void LLVOSky::calcAtmospherics(void) mFadeColor.setAlpha(0); } -void LLVOSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time) { } diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index cf7d292d1b..9cfb9773bd 100755 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -461,7 +461,7 @@ public: void cleanupGL(); void restoreGL(); - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); BOOL updateSky(); // Graphical stuff for objects - maybe broken out into render class diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 77771864da..336d587b36 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -340,7 +340,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, return retval; } -void LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOTree::idleUpdate(LLAgent &agent, const F64 &time) { if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TREE))) { diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index d8a0b95afa..bd225f0f1e 100755 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -59,7 +59,7 @@ public: void **user_data, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp); - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); // Graphical stuff for objects - maybe broken out into render class later? /*virtual*/ void render(LLAgent &agent); diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 4f7944a5c3..8e68ddd489 100755 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -103,7 +103,7 @@ void LLVOWater::updateTextures() } // Never gets called -void LLVOWater::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOWater::idleUpdate(LLAgent &agent, const F64 &time) { } diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h index cf9323ef2e..7a8d819215 100755 --- a/indra/newview/llvowater.h +++ b/indra/newview/llvowater.h @@ -58,7 +58,7 @@ public: static void initClass(); static void cleanupClass(); - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); /*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 6ba93ec662..03bbfaa56b 100755 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -92,7 +92,7 @@ void LLVOWLSky::initSunDirection(LLVector3 const & sun_direction, { } -void LLVOWLSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOWLSky::idleUpdate(LLAgent &agent, const F64 &time) { } diff --git a/indra/newview/llvowlsky.h b/indra/newview/llvowlsky.h index 729dced15e..1d419b5fea 100755 --- a/indra/newview/llvowlsky.h +++ b/indra/newview/llvowlsky.h @@ -53,7 +53,7 @@ public: void initSunDirection(LLVector3 const & sun_direction, LLVector3 const & sun_angular_velocity); - /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); /*virtual*/ BOOL isActive(void) const; /*virtual*/ LLDrawable * createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 30b34e0f66..31c6ca5b66 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -517,23 +517,24 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host, std::string seedUrl; if (regionp) { - llinfos << "Region exists, removing it " << llendl; LLHost old_host = regionp->getHost(); // region already exists! if (host == old_host && regionp->isAlive()) { // This is a duplicate for the same host and it's alive, don't bother. + llinfos << "Region already exists and is alive, using existing region" << llendl; return regionp; } if (host != old_host) { llwarns << "LLWorld::addRegion exists, but old host " << old_host - << " does not match new host " << host << llendl; + << " does not match new host " << host + << ", removing old region and creating new" << llendl; } if (!regionp->isAlive()) { - llwarns << "LLWorld::addRegion exists, but isn't alive" << llendl; + llwarns << "LLWorld::addRegion exists, but isn't alive. Removing old region and creating new" << llendl; } // Save capabilities seed URL @@ -543,6 +544,10 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host, // matches, because all the agent state for the new camera is completely different. removeRegion(old_host); } + else + { + llinfos << "Region does not exist, creating new one" << llendl; + } U32 iindex = 0; U32 jindex = 0; @@ -557,8 +562,9 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host, S32 x = (S32)(iindex/256); //MegaRegion S32 y = (S32)(jindex/256); //MegaRegion // Aurora Sim - llinfos << "Adding new region (" << x << ":" << y << ")" << llendl; - llinfos << "Host: " << host << llendl; + llinfos << "Adding new region (" << x << ":" << y << ")" + << " on host: " << host << llendl; + LLVector3d origin_global; diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 31a960443a..53ec199ce1 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1696,14 +1696,6 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, } -BOOL outside_slop(S32 x, S32 y, S32 start_x, S32 start_y) -{ - S32 dx = x - start_x; - S32 dy = y - start_y; - - return (dx <= -2 || 2 <= dx || dy <= -2 || 2 <= dy); -} - BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask ) { gFocusMgr.setMouseCapture( this ); @@ -1786,7 +1778,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) { if (hasMouseCapture()) { - if (mPanning || outside_slop(x, y, mMouseDownX, mMouseDownY)) + if (mPanning || llabs(x - mMouseDownX) > 1 || llabs(y - mMouseDownY) > 1) { // just started panning, so hide cursor if (!mPanning) @@ -1803,8 +1795,6 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) sPanY += delta_y; sTargetPanX = sPanX; sTargetPanY = sPanY; - - gViewerWindow->moveCursorToCenter(); } // doesn't matter, cursor should be hidden diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index de290be1da..8f399e7dbd 100755 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -9,75 +9,7 @@ save_rect="true" title="About [APP_NAME]" width="470"> - -[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) [BUILD_TYPE] -[[VIEWER_RELEASE_NOTES_URL] Release Notes] - - - -Built with [COMPILER] version [COMPILER_VERSION] - - - -You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP]) -SLURL: <nolink>[SLURL]</nolink> -(global coordinates [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) -[SERVER_VERSION] -[SERVER_RELEASE_NOTES_URL] - - - - -CPU: [CPU] -Memory: [MEMORY_MB] MB -OS Version: [OS_VERSION] -Graphics Card Vendor: [GRAPHICS_CARD_VENDOR] -Graphics Card: [GRAPHICS_CARD] - - -Windows Graphics Driver Version: [GRAPHICS_DRIVER_VERSION] - - -OpenGL Version: [OPENGL_VERSION] - -RestrainedLove API: [RLV_VERSION] -libcurl Version: [LIBCURL_VERSION] -J2C Decoder Version: [J2C_VERSION] -Audio Driver Version: [AUDIO_DRIVER_VERSION] -Qt Webkit Version: [QT_WEBKIT_VERSION] -Voice Server Version: [VOICE_VERSION] - - -Settings mode: [MODE] -Viewer Skin: [SKIN] ([THEME]) -Font Used: [FONT] ([FONT_SCREEN_DPI]) -Draw distance: [DRAW_DISTANCE] -Bandwidth: [BANDWIDTH] -LOD factor: [LOD] -Render quality: [RENDERQUALITY] -Texture memory: [TEXTUREMEMORY] MB ([TEXTUREMEMORYMULTIPLIER]) - - - (none) - - -Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) - - -Error fetching server release notes URL. - + + left="10" + type="string" + length="1" + follows="all" + font="Monospace" + height="366" + width="576" + ignore_tab="false" + layout="topleft" + max_length="65536" + name="region_debug_console_output" + show_line_numbers="false" + word_wrap="true" + track_end="true" + read_only="true"> + border_style="line" + border_thickness="1" + tab_group="1" + follows="left|right|bottom" + font="SansSerif" + height="19" + layout="topleft" + bottom_delta="20" + max_length="127" + name="region_debug_console_input" + top_delta="0" + width="576"> + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml index 4fae4ac983..b023ac52dd 100755 --- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml @@ -40,7 +40,7 @@ label="Request Teleport" layout="topleft" name="Request Teleport"> - + + function="Advanced.ReportBug"/> @@ -2070,7 +2069,7 @@ function="Floater.Show" parameter="bumps" /> - + + + + fail + +Unable to add estate owner or manager to ban list. + fail + + + + fail +The object '[OBJECT_NAME]' at [SLURL] cannot teleport estate managers home. + + fail You have been teleported home by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]' @@ -10378,7 +10395,7 @@ You have been teleported home by the object '[OBJECT_NAME]' on the parcel '[PARC fail You have been teleported home by the object '[OBJECT_NAME]' @@ -10822,15 +10839,7 @@ Only the first 10 selected objects have been disabled. Refresh and make addition type="notify"> fail You need to update your viewer to buy this parcel. - - - - fail -You can't buy this land due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. Please go to the Knowledge Base for details on accessing areas with this maturity Rating. - + fail -Can't divide land. There is more than one parcel selected. Try selecting a smaller piece of land. +Can't divide land. +There is more than one parcel selected. +Try selecting a smaller piece of land. fail -Can't divide land. Can't find the parcel. Please report with Help -> Report Bug... +Can't divide land. +Can't find the parcel. +Please report with Help -> Report Bug... Report Bug. name="CantDivideLandWholeParcelSelected" type="notify"> fail -Can't divide land. Whole parcel is selected. Try selecting a smaller piece of land. +Can't divide land. Whole parcel is selected. +Try selecting a smaller piece of land. -