diff options
author | Josh Bell <josh@lindenlab.com> | 2007-04-04 19:49:24 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-04-04 19:49:24 +0000 |
commit | 98740db8fd5875033d08b6aef6d9bf5c3c49eeee (patch) | |
tree | dd0e83734e50ffd4d9f87eb2ed4091f867f2f1fd /indra/newview | |
parent | aa96d1fddff3d5bf68a5014229a0d20584937222 (diff) |
svn merge -r 59826:59968 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llface.cpp | 32 | ||||
-rw-r--r-- | indra/newview/llfilepicker.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloateravatarpicker.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llfloaterland.cpp | 42 | ||||
-rw-r--r-- | indra/newview/llfloaterland.h | 19 | ||||
-rw-r--r-- | indra/newview/llfloatermap.cpp | 44 | ||||
-rw-r--r-- | indra/newview/llfloatermap.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewanim.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 17 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 8 |
14 files changed, 124 insertions, 96 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index b3e68e24df..b96ffa46fe 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -729,7 +729,18 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, { size.scaleVec(mDrawablep->getVObj()->getScale()); } - LLQuaternion rotation = LLQuaternion(mat_normal); + + LLMatrix3 mat = mat_normal; + LLVector3 x = mat.getFwdRow(); + LLVector3 y = mat.getLeftRow(); + LLVector3 z = mat.getUpRow(); + x.normVec(); + y.normVec(); + z.normVec(); + + mat.setRows(x,y,z); + + LLQuaternion rotation = LLQuaternion(mat); LLVector3 v[4]; //get 4 corners of bounding box @@ -948,20 +959,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } else { - //if (mode & LLViewerTextureAnim::TRANSLATE) - { - os = ot = 0.f; - } - //if (mode & LLViewerTextureAnim::ROTATE) - { - r = 0.f; - cos_ang = 1.f; - sin_ang = 0.f; - } - //if (mode & LLViewerTextureAnim::SCALE) - { - ms = mt = 1.f; - } + os = ot = 0.f; + r = 0.f; + cos_ang = 1.f; + sin_ang = 0.f; + ms = mt = 1.f; } } diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 2b2a9fa859..4a69286493 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -260,6 +260,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const char* filename) wcsncpy( mFilesW,L"untitled.wav", FILENAME_BUFFER_SIZE); /*Flawfinder: ignore*/ } mOFN.lpstrDefExt = L"wav"; + mOFN.lpstrFilter = L"WAV Sounds (*.wav)\0*.wav\0" \ L"\0"; break; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 559b29379c..b541b279d0 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -167,11 +167,12 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata) } std::vector<LLScrollListItem*> items = self->mListNames->getAllSelected(); - std::vector<LLScrollListItem*>::iterator itor; - for (itor = items.begin(); itor != items.end(); ++itor) + for (std::vector<LLScrollListItem*>::iterator iter = items.begin(); + iter != items.end(); ++iter) { - self->mAvatarNames.push_back((*itor)->getColumn(0)->getText()); - self->mAvatarIDs.push_back((*itor)->getUUID()); + LLScrollListItem* item = *iter; + self->mAvatarNames.push_back(item->getColumn(0)->getText()); + self->mAvatarIDs.push_back(item->getUUID()); self->childSetEnabled("Select", TRUE); } } @@ -313,7 +314,10 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* self->mListNames->setEnabled(TRUE); found_one = TRUE; } - self->mListNames->addSimpleElement(avatar_name); + LLSD element; + element["id"] = avatar_id; // value + element["columns"][0]["value"] = avatar_name; + self->mListNames->addElement(element); } if (found_one) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 45570f6aa2..9b28211476 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1035,65 +1035,39 @@ BOOL LLPanelLandObjects::postBuild() mFirstReply = TRUE; mParcelObjectBonus = LLUICtrlFactory::getTextBoxByName(this, "Simulator Primitive Bonus Factor: 1.00"); - - mSWTotalObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Simulator primitive usage:"); mSWTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "0 out of 0 available"); - - mObjectContributionLabel = LLUICtrlFactory::getTextBoxByName(this, "Primitives parcel supports:"); mObjectContribution = LLUICtrlFactory::getTextBoxByName(this, "object_contrib_text"); - - - mTotalObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Primitives on parcel:"); mTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "total_objects_text"); - - - mOwnerObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Owned by parcel owner:"); mOwnerObjects = LLUICtrlFactory::getTextBoxByName(this, "owner_objects_text"); - mBtnShowOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ShowOwner"); mBtnShowOwnerObjects->setClickedCallback(onClickShowOwnerObjects, this); - + mBtnReturnOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOwner..."); mBtnReturnOwnerObjects->setClickedCallback(onClickReturnOwnerObjects, this); - - mGroupObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Set to group:"); mGroupObjects = LLUICtrlFactory::getTextBoxByName(this, "group_objects_text"); - - mBtnShowGroupObjects = LLUICtrlFactory::getButtonByName(this, "ShowGroup"); mBtnShowGroupObjects->setClickedCallback(onClickShowGroupObjects, this); - + mBtnReturnGroupObjects = LLUICtrlFactory::getButtonByName(this, "ReturnGroup..."); mBtnReturnGroupObjects->setClickedCallback(onClickReturnGroupObjects, this); - - mOtherObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Owned by others:"); mOtherObjects = LLUICtrlFactory::getTextBoxByName(this, "other_objects_text"); - mBtnShowOtherObjects = LLUICtrlFactory::getButtonByName(this, "ShowOther"); mBtnShowOtherObjects->setClickedCallback(onClickShowOtherObjects, this); - + mBtnReturnOtherObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOther..."); mBtnReturnOtherObjects->setClickedCallback(onClickReturnOtherObjects, this); - - mSelectedObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Selected / sat upon:"); - mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text"); - mCleanOtherObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Autoreturn other resident's objects (minutes, 0 for off):"); - + mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text"); mCleanOtherObjectsTime = LLUICtrlFactory::getLineEditorByName(this, "clean other time"); mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus); childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32); childSetUserData("clean other time", this); - mOwnerListText = LLUICtrlFactory::getTextBoxByName(this, "Object Owners:"); - - mBtnRefresh = LLUICtrlFactory::getButtonByName(this, "Refresh List"); mBtnRefresh->setClickedCallback(onClickRefresh, this); - mBtnReturnOwnerList = LLUICtrlFactory::getButtonByName(this, "Return objects..."); mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this); @@ -2515,6 +2489,7 @@ BOOL LLPanelLandAccess::postBuild() childSetCommitCallback("AccessCheck", onCommitAny, this); mListAccess = LLUICtrlFactory::getNameListByName(this, "AccessList"); + mListAccess->sortByColumn(0, TRUE); // ascending mBtnAddAccess = LLUICtrlFactory::getButtonByName(this, "Add..."); @@ -2601,9 +2576,9 @@ void LLPanelLandAccess::refresh() } suffix.append(" remaining)"); } - mListAccess->addNameItem(entry.mID, ADD_BOTTOM, TRUE, suffix); + mListAccess->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); } - + BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); BOOL enable_add = can_manage_allowed && (count < PARCEL_MAX_ACCESS_LIST); @@ -2793,6 +2768,7 @@ BOOL LLPanelLandBan::postBuild() childSetCommitCallback("LandBanCheck", onCommitAny, this); mList = LLUICtrlFactory::getNameListByName(this, "LandBanList"); + mList->sortByColumn(0, TRUE); // ascending mBtnAdd = LLUICtrlFactory::getButtonByName(this, "Add..."); @@ -2870,7 +2846,7 @@ void LLPanelLandBan::refresh() } suffix.append(" remaining)"); } - mList->addNameItem(entry.mID, ADD_BOTTOM, TRUE, suffix); + mList->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); } BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index cfd009c335..6c0fb7319f 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -243,39 +243,22 @@ public: protected: void sortBtnCore(S32 column); - LLTextBox *mSWTotalObjectsLabel; - LLTextBox *mSWTotalObjects; - LLTextBox *mParcelObjectBonus; - - LLTextBox *mObjectContributionLabel; + LLTextBox *mSWTotalObjects; LLTextBox *mObjectContribution; - LLTextBox *mTotalObjectsLabel; LLTextBox *mTotalObjects; - - LLTextBox *mOwnerObjectsLabel; LLTextBox *mOwnerObjects; LLButton *mBtnShowOwnerObjects; LLButton *mBtnReturnOwnerObjects; - - LLTextBox *mGroupObjectsLabel; LLTextBox *mGroupObjects; LLButton *mBtnShowGroupObjects; LLButton *mBtnReturnGroupObjects; - - LLTextBox *mOtherObjectsLabel; LLTextBox *mOtherObjects; LLButton *mBtnShowOtherObjects; LLButton *mBtnReturnOtherObjects; - - LLTextBox *mSelectedObjectsLabel; LLTextBox *mSelectedObjects; - - LLTextBox *mCleanOtherObjectsLabel; LLLineEditor *mCleanOtherObjectsTime; S32 mOtherTime; - - LLTextBox *mOwnerListText; LLButton *mBtnRefresh; LLButton *mBtnReturnOwnerList; LLButton *mBtnType; // column 0 diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index d53929272c..242f5b7991 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -197,3 +197,47 @@ void LLFloaterMap::toggle(void*) } } } + + +BOOL process_secondlife_url(LLString url) +{ + S32 strpos, strpos2; + + LLString slurlID = "slurl.com/secondlife/"; + strpos = url.find(slurlID); + + if (strpos < 0) + { + slurlID="secondlife://"; + strpos = url.find(slurlID); + } + + if (strpos >= 0) + { + LLString simname; + + strpos+=slurlID.length(); + strpos2=url.find("/",strpos); + if (strpos2 < strpos) strpos2=url.length(); + simname="secondlife://" + url.substr(strpos,url.length() - strpos); + + LLURLSimString::setString( simname ); + LLURLSimString::parse(); + + // if there is a world map + if ( gFloaterWorldMap ) + { + // mark where the destination is + gFloaterWorldMap->trackURL( LLURLSimString::sInstance.mSimName.c_str(), + LLURLSimString::sInstance.mX, + LLURLSimString::sInstance.mY, + LLURLSimString::sInstance.mZ ); + + // display map + LLFloaterWorldMap::show( NULL, TRUE ); + }; + + return TRUE; + } + return FALSE; +} diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 00a483d17c..5b581c0fe5 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -46,5 +46,6 @@ protected: extern LLFloaterMap *gFloaterMap; +BOOL process_secondlife_url(LLString url); #endif // LL_LLFLOATERMAP_H diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 05897c6bd9..94773e21ba 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -382,7 +382,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) if ( KEY_F1 == key ) { llinfos << "Spawning HTML help window" << llendl; - LLHtmlHelp::show( ); + LLHtmlHelp::show(); return TRUE; }; #if ! LL_RELEASE_FOR_DOWNLOAD diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 25273d035d..99cff4b718 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -73,11 +73,14 @@ LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const // static void LLPreviewAnim::endAnimCallback( void *userdata ) { - LLPreviewAnim* self = (LLPreviewAnim*) userdata; - - self->childSetValue("Anim play btn", FALSE); - self->childSetValue("Anim audition btn", FALSE); - + LLViewHandle* handlep = ((LLViewHandle*)userdata); + LLFloater* self = getFloaterByHandle(*handlep); + delete handlep; // done with the handle + if (self) + { + self->childSetValue("Anim play btn", FALSE); + self->childSetValue("Anim audition btn", FALSE); + } } // static @@ -105,7 +108,9 @@ void LLPreviewAnim::playAnim( void *userdata ) LLMotion* motion = avatar->findMotion(itemID); if (motion) - motion->setDeactivateCallback(&endAnimCallback, (void *)self); + { + motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLViewHandle(self->getHandle()))); + } } else { @@ -140,7 +145,9 @@ void LLPreviewAnim::auditionAnim( void *userdata ) LLMotion* motion = avatar->findMotion(itemID); if (motion) - motion->setDeactivateCallback(&endAnimCallback, (void *)self); + { + motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLViewHandle(self->getHandle()))); + } } else { @@ -190,8 +197,9 @@ void LLPreviewAnim::onClose(bool app_quitting) LLMotion* motion = avatar->findMotion(item->getAssetUUID()); if (motion) + { motion->setDeactivateCallback(NULL, (void *)NULL); - + } } destroy(); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d57292e23d..f3a2c629fd 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -128,8 +128,8 @@ #include "viewer.h" #include "llmediaengine.h" #include "llfasttimerview.h" +#include "llfloatermap.h" #include "llweb.h" -#include "llfloaterhtml.h" #if LL_LIBXUL_ENABLED #include "llmozlib.h" @@ -503,12 +503,11 @@ BOOL idle_startup() // the locale to protect it, as exotic/non-C locales // causes our code lots of general critical weirdness // and crashness. (SL-35450) - char *saved_locale = setlocale(LC_ALL, NULL); + std::string saved_locale = setlocale(LC_ALL, NULL); #endif // LL_LINUX LLMozLib::getInstance()->init( profileBaseDir, gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) ); #if LL_LINUX - if (saved_locale) - setlocale(LC_ALL, saved_locale); + setlocale(LC_ALL, saved_locale.c_str() ); #endif // LL_LINUX std::ostringstream codec; diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index 389f0e8bc6..2203df4287 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -36,7 +36,7 @@ protected: //setting variables are declared in this function void declare_settings(); -void settings_version_fixup(); +void fixup_settings(); // saved at end of session extern LLControlGroup gSavedSettings; diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index f6fa23c6f6..df5b0f1182 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -138,12 +138,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield) LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL); // No clue where this is getting unset, but safe enough to reset it here. - for (S32 j = 7; j >=0; j--) - { - glActiveTextureARB(GL_TEXTURE0_ARB+j); - glClientActiveTextureARB(GL_TEXTURE0_ARB+j); - j == 0 ? glEnable(GL_TEXTURE_2D) : glDisable(GL_TEXTURE_2D); - } + LLGLState::resetTextureStates(); #ifndef LL_RELEASE_FOR_DOWNLOAD LLGLState::checkStates(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 89665171c9..114c90a4d8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -81,6 +81,7 @@ #include "llfloatergodtools.h" #include "llfloatergroupinfo.h" #include "llfloatergroups.h" +#include "llfloaterhtml.h" #include "llfloaterhtmlhelp.h" #include "llfloaterhtmlfind.h" #include "llfloaterimport.h" @@ -6477,10 +6478,22 @@ class LLShowFloater : public view_listener_t { LLFloaterScriptDebug::show(LLUUID::null); } - else if (floater_name == "help") + else if (floater_name == "help f1") { #if LL_LIBXUL_ENABLED - LLHtmlHelp::show(NULL); + LLHtmlHelp::show(); +#endif + } + else if (floater_name == "help in-world") + { +#if LL_LIBXUL_ENABLED + LLFloaterHtml::getInstance()->show( "in-world_help" ); +#endif + } + else if (floater_name == "help additional") + { +#if LL_LIBXUL_ENABLED + LLFloaterHtml::getInstance()->show( "additional_help" ); #endif } else if (floater_name == "complaint reporter") diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 52ceb481d9..44ebb2503b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1916,11 +1916,13 @@ void LLPipeline::renderGeom(LLCamera& camera) // // stop_glerror(); - BOOL did_hud_elements = FALSE; + BOOL did_hud_elements = LLDrawPoolWater::sSkipScreenCopy; BOOL occlude = sUseOcclusion; U32 cur_type = 0; + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING)) { gObjectList.renderObjectsForSelect(camera); @@ -1928,7 +1930,6 @@ void LLPipeline::renderGeom(LLCamera& camera) else { LLFastTimer t(LLFastTimer::FTM_POOLS); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); calcNearbyLights(camera); pool_set_t::iterator iter1 = mPools.begin(); while ( iter1 != mPools.end() ) @@ -2002,7 +2003,6 @@ void LLPipeline::renderGeom(LLCamera& camera) iter1 = iter2; stop_glerror(); } - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -2039,6 +2039,8 @@ void LLPipeline::renderGeom(LLCamera& camera) // have touch-handlers. mHighlightFaces.clear(); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + if (!hasRenderType(LLPipeline::RENDER_TYPE_HUD) && !LLDrawPoolWater::sSkipScreenCopy && sRenderGlow && |